/* imgpronta — Design Image-First */

:root {
  --bg: #f5f5f7;
  --bg-panel: #ffffff;
  --border: #e5e5ea;
  --border-focus: #0066cc;
  --text: #1d1d1f;
  --text-muted: #86868b;
  --accent: #0066cc;
  --accent-hover: #005bb5;
  --accent-contrast: #ffffff;
  --magic: #2c2c2e;
  --magic-hover: #1c1c1e;
  --error: #d70015;
  --error-bg: #fff0f0;
  --success: #34c759;
  
  --radius: 12px;
  --radius-sm: 8px;
  --radius-btn: 8px;
  font-size: 15px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Global Nav */
.global-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background-color: #f2f2f7;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.nav-item {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--border);
  color: var(--text);
}

.nav-item.is-active {
  background: var(--accent);
  color: #fff;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 20;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header__logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.app-header__subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header__hint {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Buttons */
.btn {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  border-radius: var(--radius-btn);
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:hover:not(:disabled) {
  border-color: var(--text-muted);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--secondary {
  background: #f5f5f7;
  border-color: transparent;
}
.btn--secondary:hover:not(:disabled) {
  background: #e5e5ea;
  border-color: transparent;
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn--ghost:hover:not(:disabled) {
  background: #f5f5f7;
  color: var(--text);
  border-color: transparent;
}

.btn--magic {
  background: var(--magic);
  border-color: var(--magic);
  color: #fff;
}
.btn--magic:hover:not(:disabled) {
  background: var(--magic-hover);
  border-color: var(--magic-hover);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  padding: 4px 12px;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* Body layout */
.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  width: 340px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 10;
  flex-shrink: 0;
}

.sidebar[hidden] {
  display: none !important;
}

.sidebar__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  background: #f2f2f7;
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-section__title {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.field-row {
  display: flex;
  gap: 12px;
}
.field-row > * {
  flex: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.field input[type="number"],
.field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus, .field select:focus {
  border-color: var(--border-focus);
}

.field input[type="range"] {
  width: 100%;
  margin-top: 4px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px 0;
}

/* Presets */
.preset-group {
  margin-bottom: 16px;
}
.preset-group:last-child {
  margin-bottom: 0;
}

.preset-group__title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-btn {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: #f5f5f7;
}

.preset-btn.is-active {
  background: #e8f0fe;
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}

/* Sidebar Footer */
.sidebar__footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.output-summary-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #f5f5f7;
  padding: 12px;
  border-radius: var(--radius-sm);
}

.summary-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.summary-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.summary-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.summary-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.summary-val.highlight {
  color: var(--accent);
}

.feedback-text {
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-muted);
}
.feedback-text.is-error {
  color: var(--error);
}

/* Stage */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  background: var(--bg);
  padding: 32px;
}

.stage__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 400px;
}

.empty-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.stage__empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.stage__empty-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.stage__loading, .stage__error {
  text-align: center;
}

.stage__error {
  background: var(--error-bg);
  border: 1px solid rgba(215,0,21,0.2);
  padding: 24px;
  border-radius: var(--radius);
}

.stage__error-title {
  color: var(--error);
  font-weight: 600;
  margin: 0 0 8px;
}

.stage__error-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
}

.stage__canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-conic-gradient(#fff 0% 25%, #f2f2f7 0% 50%) 50% / 16px 16px;
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  max-width: 100%;
  max-height: 100%;
}

#preview-canvas {
  max-width: 100%;
  max-height: 80vh;
  display: block;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0,102,204,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 800px) {
  .app-header {
    padding: 12px 16px;
  }
  .app-header__subtitle, .app-header__hint {
    display: none;
  }
  .app-body {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    flex: 1;
    min-height: 0;
    border-top: 1px solid var(--border);
  }
  .stage {
    flex: none;
    height: 45vh;
    padding: 16px;
  }
  #preview-canvas {
    max-height: 40vh;
  }
  .sidebar__footer {
    position: sticky;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.05);
  }
}

/* ============================================================
   FASE 1 — HUB CENTRAL (index.html)
   ============================================================ */

.hub-body {
  height: auto;
  min-height: 100vh;
}

.hub {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 64px;
}

.hub__shell {
  width: 100%;
  max-width: 1080px;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px 48px;
  background: linear-gradient(180deg, #ebf3ff 0%, var(--bg) 100%);
  border-radius: 0 0 24px 24px;
  margin: 0 -24px;
  transition: background 0.2s;
}

.hero__privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 102, 204, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero__shield {
  font-size: 1rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.1;
}

.hero__gradient {
  background: linear-gradient(90deg, #0066cc, #0a84ff, #5856d6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 32px;
  max-width: 560px;
}

.hero__drop {
  width: 100%;
  max-width: 560px;
  background: var(--bg-panel);
  border: 2px dashed var(--border);
  border-radius: 20px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hero.is-dragover .hero__drop {
  border-color: var(--accent);
  background: #f0f7ff;
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 102, 204, 0.12);
}

.hero__drop-icon {
  color: var(--accent);
  margin-bottom: 8px;
  opacity: 0.8;
}

.hero__drop-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.hero__drop-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.hero__drop-hint strong {
  color: var(--text);
}

.hero__feedback {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--error);
  margin: 8px 0 0;
}

.hero__feedback.is-error {
  color: var(--error);
}

.btn--lg {
  padding: 12px 32px;
  font-size: 1rem;
  border-radius: 12px;
}

/* Tools grid */
.tools {
  padding: 56px 0 32px;
}

.tools__header {
  text-align: center;
  margin-bottom: 32px;
}

.tools__title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.tools__subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.tools__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
}

.tool-card__icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 4px;
}

.tool-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.tool-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.tool-card__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
}

.tool-card__badge {
  display: inline-block;
  align-self: flex-start;
  background: linear-gradient(90deg, #0066cc, #5856d6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.tool-card--featured {
  background: linear-gradient(160deg, var(--bg-panel) 0%, #f0f7ff 100%);
  border-color: rgba(0, 102, 204, 0.2);
}

.tool-card--featured:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 102, 204, 0.1);
}

.tool-card--batch {
  background: linear-gradient(160deg, var(--bg-panel) 0%, #fff7eb 100%);
  border-color: rgba(255, 149, 0, 0.2);
}

.tool-card--batch:hover {
  border-color: #ff9500;
}

.tool-card--magic .tool-card__icon {
  background: linear-gradient(135deg, #0066cc, #5856d6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Trust / privacy section */
.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 48px 0 16px;
}

.trust__item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.trust__icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 8px;
}

.trust__item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.trust__item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.hub__footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ============================================================
   FASE 1 — CROP LIVRE (overlay sobre o preview)
   ============================================================ */

.stage__canvas-wrap {
  position: relative;
}

.crop-overlay {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  z-index: 5;
  touch-action: none;
}

.crop-overlay[hidden] {
  display: none;
}

.crop-shade {
  position: absolute;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.crop-rect {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.crop-handle {
  position: absolute;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 3px;
  pointer-events: all;
  cursor: pointer;
  box-sizing: border-box;
}

.crop-handle--nw { cursor: nwse-resize; }
.crop-handle--n { cursor: ns-resize; }
.crop-handle--ne { cursor: nesw-resize; }
.crop-handle--e { cursor: ew-resize; }
.crop-handle--se { cursor: nwse-resize; }
.crop-handle--s { cursor: ns-resize; }
.crop-handle--sw { cursor: nesw-resize; }
.crop-handle--w { cursor: ew-resize; }

/* ============================================================
   FASE 1 — COMPARADOR ANTES/DEPOIS
   ============================================================ */

.stage__compare {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

.stage__compare[hidden] {
  display: none;
}

.compare-btn {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}

.compare-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.compare-btn:active {
  background: var(--accent);
}

/* ============================================================
   FASE 1 — RESPONSIVO DO HUB
   ============================================================ */

@media (max-width: 800px) {
  .hero {
    padding: 40px 16px 32px;
    margin: 0 -16px;
  }
  .hero__title {
    font-size: 1.9rem;
  }
  .hero__subtitle {
    font-size: 0.95rem;
  }
  .tools {
    padding: 32px 0 16px;
  }
  .tools__grid {
    grid-template-columns: 1fr;
  }
  .trust {
    grid-template-columns: 1fr;
    padding: 32px 0 8px;
  }
  .compare-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* ============================================================
   FASE 1 v2 — REDESIGN HUB (glassmorphism, busca, quick actions)
   ============================================================ */

/* Hero com brilhos (glows) */
.hero {
  position: relative;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.hero__glow--1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.25) 0%, transparent 70%);
  top: -160px;
  left: -80px;
  animation: heroGlowFloat 8s ease-in-out infinite alternate;
}

.hero__glow--2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(88, 86, 214, 0.22) 0%, transparent 70%);
  top: -80px;
  right: -60px;
  animation: heroGlowFloat 10s ease-in-out infinite alternate-reverse;
}

.hero__glow--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.18) 0%, transparent 70%);
  bottom: -120px;
  left: 30%;
  animation: heroGlowFloat 12s ease-in-out infinite alternate;
}

@keyframes heroGlowFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, -20px) scale(1.1); }
}

/* Barra de busca */
.hero__search {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-bottom: 20px;
  z-index: 2;
}

.hero__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.hero__search input {
  width: 100%;
  padding: 12px 80px 12px 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hero__search input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.hero__search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12), 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hero__search-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: ui-monospace, "Cascadia Code", monospace;
  pointer-events: none;
}

/* Quick Actions (chips) */
.hero__quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  z-index: 2;
}

.hero__quick-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.chip {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 102, 204, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Recentes */
.recent {
  padding: 40px 0 8px;
}

.recent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.recent__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.recent__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.recent-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-panel);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}

.recent-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.recent-item__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.recent-item__thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  color: var(--text-muted);
  font-size: 1.6rem;
}

.recent-item__info {
  padding: 10px 12px;
}

.recent-item__name {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item__meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.recent-item__tool-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* Fase 4: botão de remover individual nos recentes */
.recent-item__remove {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  backdrop-filter: blur(4px);
}

.recent-item:hover .recent-item__remove {
  opacity: 1;
}

.recent-item__remove:hover {
  background: rgba(215, 0, 21, 0.85);
}

/* Empty state da busca */
.tools__empty {
  text-align: center;
  padding: 48px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tools__empty span {
  font-weight: 600;
  color: var(--text);
}

/* Overlay de arrastar global */
.global-drop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 15, 40, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-drop[hidden] {
  display: none;
}

.global-drop__inner {
  width: 100%;
  max-width: 480px;
  min-height: 300px;
  margin: 24px;
  border: 3px dashed rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  animation: globalDropPulse 1.5s ease-in-out infinite alternate;
}

@keyframes globalDropPulse {
  0% { transform: scale(1); border-color: rgba(255, 255, 255, 0.5); }
  100% { transform: scale(1.02); border-color: rgba(255, 255, 255, 0.85); }
}

.global-drop__icon {
  color: #fff;
  opacity: 0.9;
}

.global-drop__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.global-drop__hint {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Responsivo do novo hub */
@media (max-width: 600px) {
  .hero__quick-label {
    width: 100%;
    text-align: center;
  }
  .hero__search-kbd {
    display: none;
  }
  .hero__search input {
    padding-right: 16px;
  }
}

/* Efeito de fade-in para cards filtrados */
.tool-card {
  animation: cardFadeIn 0.2s ease;
}

.tool-card.is-filtered-out {
  display: none;
}

@keyframes cardFadeIn {
  from { opacity: 0.4; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
