/* === CARBO CLEAR — Trust & Authority UI (ui-ux-pro-max) === */
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&family=Fira+Code:wght@400;500;600;700&display=swap');

:root {
    /* Brand */
    --green:        #56BA5A;
    --green-dark:   #3E9E42;
    --green-light:  #EBF7EB;
    --green-border: #C3E6C4;

    /* Trust navy (primary for B2B authority) */
    --navy:         #0F172A;
    --navy-2:       #1E293B;
    --navy-light:   #F1F5F9;

    /* Backgrounds */
    --bg:           #F8FAFC;
    --surface:      #FFFFFF;
    --surface-2:    #F8FAFC;

    /* Borders */
    --border:       #E2E8F0;
    --border-dark:  #CBD5E1;

    /* Text */
    --text:         #0F172A;
    --text-2:       #334155;
    --text-3:       #64748B;

    /* State colors */
    --red:          #DC2626;
    --red-light:    #FEF2F2;
    --red-border:   #FECACA;
    --amber:        #D97706;
    --amber-light:  #FFFBEB;
    --blue:         #0369A1;
    --blue-light:   #EFF6FF;
    --blue-border:  #BAE6FD;

    /* UI */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
    --shadow:    0 4px 12px rgba(15,23,42,0.1), 0 1px 4px rgba(15,23,42,0.06);
    --shadow-lg: 0 8px 24px rgba(15,23,42,0.14), 0 2px 8px rgba(15,23,42,0.06);

    /* Fonts — Fira Sans: data dashboards (skill rec.) */
    --font:      'Fira Sans', -apple-system, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;

    /* Compat aliases (used in app.js inline styles) */
    --primary-emerald: var(--green);
    --emerald-glow:    rgba(86, 186, 90, 0.2);
    --accent-orange:   var(--red);
    --orange-glow:     rgba(220, 38, 38, 0.15);
    --accent-blue:     var(--blue);
    --blue-glow:       rgba(37, 99, 235, 0.15);
    --text-main:       var(--text);
    --text-muted:      var(--text-3);
    --text-light:      var(--text-2);
    --bg-dark:         var(--bg);
    --bg-card:         var(--surface);
    --bg-input:        var(--surface);
    --border-color:    var(--border);
    --border-hover:    var(--green);
    --font-display:    var(--font);
    --font-body:       var(--font);
    --transition-smooth: all 0.2s ease;
}

/* ─── RESET ─── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* ─── BODY ─── */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── GLASS PANEL (now just clean card) ─── */
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ═══════════════════════════════════
   AUTH SCREEN
═══════════════════════════════════ */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 100vh;
    background: linear-gradient(145deg, #EEF2F7 0%, #F5F8FA 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 48px 44px;
    text-align: center;
    animation: fadeUp 0.5s ease forwards;
    border-top: 3px solid var(--green);
}

/* ─── CARBO CLEAR WORDMARK ─── */
.auth-logo {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0;
    margin-bottom: 10px;
}

.auth-logo-carbo {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
}

.auth-logo-clear {
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--text-3);
    letter-spacing: -1px;
    margin-left: 8px;
}

.header-logo-carbo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.header-logo-clear {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-3);
    margin-left: 4px;
}

.header-sep {
    color: var(--border-dark);
    font-size: 1rem;
    font-weight: 300;
}

.header-module {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
}

.auth-subtitle {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-bottom: 36px;
    letter-spacing: 0.2px;
}

/* ─── FORM ELEMENTS ─── */
.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.form-control::placeholder { color: var(--text-3); }

.form-control:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(86, 186, 90, 0.12);
}

/* ─── BUTTONS ─── */
.btn-primary {
    width: 100%;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 13px 20px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--navy-2);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.btn-primary:active { transform: scale(0.99); }

/* ═══════════════════════════════════
   DASHBOARD
═══════════════════════════════════ */
.dashboard-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 32px 48px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    animation: fadeIn 0.3s ease forwards;
}

/* ─── HEADER ─── */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px 16px 20px;
    margin-bottom: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--green);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.header-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    box-shadow: var(--shadow-sm);
}

.user-email {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-2);
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 0.8rem;
    font-family: var(--font);
    cursor: pointer;
    transition: color 0.15s;
    padding: 0;
}
.btn-logout:hover { color: var(--red); }

/* ─── TABS ─── */
.tabs-header {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--text-3);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 22px;
    cursor: pointer;
    transition: all 0.15s;
}

.tab-btn:hover { color: var(--text-2); }

.tab-btn.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

/* ─── SEARCH PANEL ─── */
.search-panel {
    padding: 28px;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* ─── SCRAPING STATUS BOX ─── */
.scraping-status-box {
    margin-top: 12px;
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Header */
.pipeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--green-light);
    border-bottom: 1px solid var(--green-border);
}

.pipeline-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

.pipeline-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--green-dark);
    flex: 1;
}

/* Animated dots */
.pipeline-dots-anim {
    display: flex;
    gap: 3px;
    align-items: center;
}

.pipeline-dots-anim span {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--green);
    animation: dotBounce 1.2s ease-in-out infinite;
}

.pipeline-dots-anim span:nth-child(2) { animation-delay: 0.2s; }
.pipeline-dots-anim span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40%           { opacity: 1;   transform: scale(1.2); }
}

/* Steps list */
.pipeline-steps {
    display: flex;
    flex-direction: column;
}

.status-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.status-step:last-child { border-bottom: none; }

/* Step number badge */
.step-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-3);
    flex-shrink: 0;
    transition: all 0.2s;
}

.step-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-2);
    font-weight: 500;
}

.step-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 2px 8px;
    white-space: nowrap;
}

/* Active state */
.status-step.active {
    background: var(--green-light);
}

.status-step.active .step-num {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-step.active .step-text { color: var(--green-dark); }

.status-step.active .step-tag {
    background: rgba(86,186,90,0.15);
    border-color: var(--green-border);
    color: var(--green-dark);
}

/* Spinner (spinner class still used by app.js) */
.status-step.active .spinner {
    display: none; /* ocultado — usamos o step-num animado */
}

/* Done state */
.status-step.done .step-num {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.status-step.done .step-num::after { content: "✓"; font-size: 0.65rem; }
.status-step.done .step-num { font-size: 0; }

.status-step.done .step-text { color: var(--text); }

.status-step.done::before { content: none; }

/* ─── SECTION TITLE ─── */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══════════════════════════════════
   SUPPLIER CARDS
═══════════════════════════════════ */
.suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.supplier-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 340px;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--green);
}

.supplier-card.disqualified { border-top-color: var(--red); }

.supplier-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ─── SCORE BADGE ─── */
.score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px; height: 60px;
    border-radius: var(--radius-sm);
    background: var(--green-light);
    border: 1.5px solid var(--green-border);
}

.score-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green-dark);
    line-height: 1;
}

.score-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--green-dark);
    opacity: 0.7;
}

.supplier-card.disqualified .score-badge {
    background: var(--red-light);
    border-color: var(--red-border);
}

.supplier-card.disqualified .score-number { color: var(--red); }
.supplier-card.disqualified .score-label  { color: var(--red); }

/* ─── STATUS TAG ─── */
.status-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--green-light);
    color: var(--green-dark);
    border: 1px solid var(--green-border);
}

.supplier-card.disqualified .status-tag {
    background: var(--red-light);
    color: var(--red);
    border-color: var(--red-border);
}

/* ─── SUPPLIER INFO ─── */
.supplier-details { margin-bottom: 18px; }

.supplier-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.supplier-cnpj {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-3);
    margin-bottom: 8px;
    display: inline-block;
    letter-spacing: 0.5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
}

/* ─── TRUST BADGE — Receita Federal validated ─── */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #059669;
    background: #ECFDF5;
    border: 1px solid #6EE7B7;
    border-radius: 4px;
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 6px;
    vertical-align: middle;
}

.supplier-contacts {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.contact-item {
    font-size: 0.85rem;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item svg {
    width: 14px; height: 14px;
    stroke: var(--text-3);
    fill: none;
    flex-shrink: 0;
}

/* ─── RATING / PRICE BOXES ─── */
.rating-details {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.rating-label { color: var(--text-3); }
.rating-score { font-weight: 600; color: var(--text); }

.price-comparison-box {
    background: var(--green-light);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.supplier-card.disqualified .price-comparison-box {
    background: var(--red-light);
    border-color: var(--red-border);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-row.saving {
    border-top: 1px dashed var(--border);
    padding-top: 6px;
    margin-top: 2px;
}

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

.price-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
}

.price-value.found      { color: var(--green-dark); }
.price-value.benchmark  { color: var(--text); }
.price-value.saving-pct { color: var(--blue); }

/* ─── CARD ACTIONS ─── */
.card-actions { display: flex; gap: 10px; }

.btn-contact {
    flex: 1;
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-whatsapp {
    background: var(--green-light);
    color: var(--green-dark);
    border: 1.5px solid var(--green-border);
}

.btn-whatsapp:hover {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.btn-email {
    background: var(--blue-light);
    color: var(--blue);
    border: 1.5px solid var(--blue-border);
}

.btn-email:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.justification-box {
    font-size: 0.83rem;
    line-height: 1.6;
    color: var(--text-2);
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-top: auto;
}

/* ═══════════════════════════════════
   PRODUCTS TAB
═══════════════════════════════════ */
.prod-section {
    padding: 24px 28px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prod-subtitle {
    font-size: 0.85rem;
    color: var(--text-2);
    line-height: 1.5;
}

.prod-form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.btn-save-prod {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 22px;
    height: 46px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-save-prod:hover {
    background: var(--green-dark);
    box-shadow: 0 3px 10px rgba(62, 158, 66, 0.3);
}

.btn-outline-blue {
    background: transparent;
    border: 1.5px solid var(--blue-border);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    color: var(--blue);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-outline-blue:hover { background: var(--blue-light); }

.btn-outline-muted {
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    color: var(--text-2);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-outline-muted:hover { background: var(--surface-2); }

.btn-outline-emerald {
    background: transparent;
    border: 1.5px solid var(--green-border);
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    color: var(--green-dark);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.btn-outline-emerald:hover { background: var(--green-light); }

.btn-ref-search {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 22px;
    height: 44px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex: 1;
    max-width: 360px;
    transition: background 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-ref-search:hover {
    background: var(--green-dark);
    box-shadow: 0 3px 10px rgba(62, 158, 66, 0.3);
}

.prod-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.selected-count-label {
    font-size: 0.82rem;
    color: var(--text-3);
}

.prod-search-section {
    border-color: var(--green-border) !important;
    background: var(--green-light) !important;
}

/* ─── CATALOG AUTOCOMPLETE ─── */
.catalog-search-wrapper { position: relative; }

.catalog-search-input-row {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    gap: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.catalog-search-input-row:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(86, 186, 90, 0.1);
}

.catalog-search-icon {
    flex-shrink: 0;
    width: 17px; height: 17px;
    color: var(--text-3);
    display: flex;
    align-items: center;
}

.catalog-search-icon svg { width: 17px; height: 17px; stroke: currentColor; }

.catalog-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.92rem;
    padding: 12px 0;
}

.catalog-search-input::placeholder {
    color: var(--text-3);
    font-size: 0.85rem;
}

.catalog-search-clear {
    background: transparent;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 6px;
    transition: color 0.15s;
    flex-shrink: 0;
    line-height: 1;
}
.catalog-search-clear:hover { color: var(--red); }

.catalog-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 300px;
    overflow-y: auto;
    animation: dropdownIn 0.15s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.catalog-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.88rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.catalog-dropdown-item:last-child { border-bottom: none; }

.catalog-dropdown-item:hover,
.catalog-dropdown-item.active {
    background: var(--green-light);
    color: var(--green-dark);
}

.catalog-item-icon {
    width: 14px; height: 14px;
    opacity: 0.3;
    flex-shrink: 0;
    transition: opacity 0.1s;
}

.catalog-dropdown-item:hover .catalog-item-icon,
.catalog-dropdown-item.active .catalog-item-icon { opacity: 1; }

.catalog-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-item-text mark {
    background: transparent;
    color: var(--green-dark);
    font-weight: 700;
}

.catalog-dropdown-empty {
    padding: 18px;
    text-align: center;
    color: var(--text-3);
    font-size: 0.85rem;
}

.catalog-dropdown-count {
    padding: 7px 14px;
    font-size: 0.72rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

/* ─── CHIPS ─── */
.selected-chips-area {
    background: var(--green-light);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chips-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--green-dark);
    font-weight: 600;
}

.chips-clear-all {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 0.78rem;
    cursor: pointer;
    font-family: var(--font);
    transition: color 0.15s;
    padding: 2px 6px;
}
.chips-clear-all:hover { color: var(--red); }

.chips-container { display: flex; flex-wrap: wrap; gap: 6px; }

.product-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--green-border);
    border-radius: 99px;
    padding: 4px 10px 4px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.15s;
    animation: chipIn 0.18s ease;
}

@keyframes chipIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.product-chip:hover {
    border-color: var(--red-border);
    background: var(--red-light);
}

.chip-remove {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0 2px;
    transition: color 0.12s;
    line-height: 1;
}
.chip-remove:hover { color: var(--red); }

/* ─── PRODUCTS TABLE ─── */
.products-table-wrapper { overflow-x: auto; margin-top: 8px; }

.products-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.products-table th,
.products-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.products-table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-3);
}

.products-table td { color: var(--text); }
.products-table tr:hover td { background: var(--surface-2); }

.btn-icon {
    background: var(--green-light);
    color: var(--green-dark);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.btn-icon:hover {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

/* ═══════════════════════════════════
   ANIMATIONS
═══════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ─── touch-action em todos os botões (remove 300ms tap delay) ─── */
button, [role="button"], a { touch-action: manipulation; }

/* ─── prefers-reduced-motion (skill: accessibility CRITICAL) ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 768px) {
    .dashboard-container { padding: 0 16px 32px; }
    .suppliers-grid { grid-template-columns: 1fr; }
    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding-top: 14px;
    }
    .prod-form-row { flex-direction: column; }
    .btn-save-prod { width: 100%; justify-content: center; }
    .tab-btn { padding: 10px 14px; font-size: 0.85rem; }
    .header-title { font-size: 0.95rem; }
    .auth-card { padding: 36px 24px; }
}