/* ============================================================
   Repasse Penha — Sistema FIPE
   Fonte: DM Sans (Google Fonts)
   Tema: Industrial/refinado — laranja queimado + cinza escuro
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&family=DM+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
    --brand:      #e85d30;
    --brand-dk:   #c44820;
    --brand-lt:   #fdf0eb;

    --bg:         #f4f3f0;
    --surface:    #ffffff;
    --surface2:   #f9f8f6;
    --border:     #e2e0db;
    --border-dk:  #cbc8c2;

    --text:       #1c1b18;
    --text-2:     #5a5852;
    --text-3:     #9a9690;

    --green:      #1d8a4e;
    --green-bg:   #e6f5ed;
    --red:        #c53030;
    --red-bg:     #fdf0f0;
    --amber:      #b45309;
    --amber-bg:   #fef3e2;

    --radius:     10px;
    --radius-lg:  16px;
    --shadow:     0 1px 3px rgba(0,0,0,.07), 0 4px 12px rgba(0,0,0,.05);
    --shadow-md:  0 4px 16px rgba(0,0,0,.1);

    --font:       'DM Sans', system-ui, sans-serif;
    --mono:       'DM Mono', monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Navbar ---------- */
.navbar {
    background: var(--text);
    color: #fff;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.nav-brand {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    color: rgba(255,255,255,.65);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all .15s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,.12);
    text-decoration: none;
}

.nav-links a.active { color: var(--brand); }

/* ---------- Layout ---------- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.hero {
    margin-bottom: 28px;
}

.hero h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -.03em;
    margin-bottom: 6px;
}

.hero p { color: var(--text-2); font-size: 15px; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.02em;
}

/* ---------- Card ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
}

.consult-card { margin-bottom: 24px; }

/* ---------- Tipo Toggle ---------- */
.tipo-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    width: fit-content;
}

.tipo-btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
}

.tipo-btn:hover { color: var(--text); background: rgba(0,0,0,.04); }

.tipo-btn.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 1px 4px rgba(232,93,48,.35);
}

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.form-grid.three-col { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 640px) {
    .form-grid.three-col { grid-template-columns: 1fr; }
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-grid .span-2 { grid-column: span 2; }

input, select, textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-dk);
    border-radius: var(--radius);
    padding: 9px 12px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(232,93,48,.12);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9690' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

select:disabled { background-color: var(--surface2); color: var(--text-3); cursor: not-allowed; }

textarea { resize: vertical; min-height: 80px; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ---------- Buttons ---------- */
.btn {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dk); border-color: var(--brand-dk); text-decoration: none; color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--brand);
    border-color: var(--brand);
}
.btn-outline:hover:not(:disabled) { background: var(--brand-lt); text-decoration: none; }

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: var(--border-dk);
}
.btn-ghost:hover { background: var(--surface2); text-decoration: none; }

.btn-success { background: var(--green) !important; border-color: var(--green) !important; }

.btn-full { width: 100%; justify-content: center; padding: 11px 20px; font-size: 15px; }

/* ---------- Result Area ---------- */
.result-area { margin-top: 20px; }
.result-area.hidden { display: none; }

.result-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.result-desc {
    font-size: 16px;
    font-weight: 600;
}

.result-sub {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 2px;
}

.result-ref {
    font-size: 12px;
    color: var(--text-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    white-space: nowrap;
}

.result-valor {
    font-size: 36px;
    font-weight: 600;
    color: var(--brand);
    letter-spacing: -.02em;
    margin-bottom: 16px;
}

.result-actions { display: flex; gap: 10px; }

.result-error {
    background: var(--red-bg);
    border: 1px solid #fca5a5;
    color: var(--red);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 14px;
}

/* ---------- Monitored Grid ---------- */
.monitored-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.monitor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: box-shadow .15s;
}
.monitor-card:hover { box-shadow: var(--shadow-md); }

.monitor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.monitor-desc { font-size: 14px; font-weight: 600; line-height: 1.4; }
.monitor-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.btn-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-3);
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 5px;
    transition: all .15s;
    flex-shrink: 0;
}
.btn-remove:hover { background: var(--red-bg); color: var(--red); }

.monitor-values {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 12px;
}

.value-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.value-main  { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }

.variacao {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--mono);
}
.variacao.up   { color: var(--green); }
.variacao.down { color: var(--red); }
.variacao-sub  { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); margin-top: 2px; font-family: var(--font); }

.mini-chart { width: 100% !important; }

/* ---------- Table ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-form { display: flex; gap: 10px; }

.filter-form select {
    width: auto;
    font-size: 13px;
    padding: 7px 32px 7px 10px;
}

.result-count { font-size: 13px; color: var(--text-3); }

.table-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

.data-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-2);
    white-space: nowrap;
}

.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--surface2); }

.data-table .positive { color: var(--green); font-family: var(--mono); font-size: 13px; }
.data-table .negative { color: var(--red);   font-family: var(--mono); font-size: 13px; }

.status-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 9px;
    border-radius: 20px;
}
.status-disponivel { background: var(--green-bg); color: var(--green); }
.status-reservado  { background: var(--amber-bg); color: var(--amber); }
.status-vendido    { background: var(--surface2); color: var(--text-3); }

.btn-icon {
    background: none;
    border: 1px solid var(--border-dk);
    border-radius: 7px;
    padding: 5px 9px;
    cursor: pointer;
    font-size: 14px;
    transition: all .15s;
}
.btn-icon:hover { background: var(--surface2); }

/* ---------- Badges / misc ---------- */
.badge-count {
    font-size: 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 4px 12px;
    border-radius: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-2);
}
.empty-state p { margin-bottom: 16px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid #86efac; }
.alert-error   { background: var(--red-bg);   color: var(--red);   border: 1px solid #fca5a5; }

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(2px);
}
.modal.hidden { display: none; }

.modal-box {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-md);
}

.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-3);
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
}
.modal-close:hover { background: var(--surface2); color: var(--text); }

.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

.fipe-result-modal { text-align: center; padding: 16px 0; }
.fipe-valor  { font-size: 32px; font-weight: 600; color: var(--brand); letter-spacing: -.02em; }
.fipe-detalhe { font-size: 13px; color: var(--text-2); margin-top: 6px; }

.loading { text-align: center; color: var(--text-3); padding: 24px; font-size: 14px; }

.error { color: var(--red); font-size: 14px; text-align: center; padding: 16px; }

/* ============================================================
   Responsive — Mobile First / iPhone Optimized
   ============================================================ */

/* ---------- Hamburger Button (injetado via mobile.js) ---------- */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background .15s;
    flex-shrink: 0;
}
.nav-hamburger:hover { background: rgba(255,255,255,.12); }
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all .2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile Menu Panel ---------- */
.nav-mobile-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0; right: 0;
    background: #0f0e0c;
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 99;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-menu a {
    display: flex;
    align-items: center;
    padding: 13px 20px;
    color: rgba(255,255,255,.75);
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: all .15s;
    text-decoration: none;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover,
.nav-mobile-menu a.active { color: #fff; background: rgba(255,255,255,.07); }
.nav-mobile-menu a.active { color: var(--brand); }

/* ============================================================
   Tablets & pequenas telas (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
    /* -- Navbar -- */
    .navbar { height: 56px; padding: 0 16px; }
    .nav-hamburger { display: flex; }
    .nav-links { display: none; }

    /* -- Layout -- */
    .container { padding: 20px 16px 80px; }

    /* -- Página -- */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    .page-header .btn { width: 100%; justify-content: center; }
    .page-title { font-size: 21px; }

    /* -- Hero -- */
    .hero h1 { font-size: 22px; }
    .hero { margin-bottom: 20px; }

    /* -- Card -- */
    .card { padding: 18px; }
    .form-card { padding: 18px; }

    /* -- Forms -- */
    .form-grid { grid-template-columns: 1fr !important; }
    .form-grid .span-2 { grid-column: span 1 !important; }
    .form-actions {
        flex-direction: column-reverse;
        gap: 8px;
        padding-top: 16px;
    }
    .form-actions .btn { width: 100%; justify-content: center; }

    /* Previne zoom do iOS em inputs (font-size < 16px dispara zoom) */
    input, select, textarea { font-size: 16px; padding: 12px 14px; }
    select { padding-right: 36px; }
    textarea { min-height: 90px; }

    /* Alvos de toque (44px mínimo Apple HIG) */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; padding: 7px 12px; font-size: 13px; }
    .btn-full { padding: 14px 20px; font-size: 16px; }
    .btn-icon { min-height: 38px; min-width: 38px; display: inline-flex; align-items: center; justify-content: center; }

    /* -- Tabelas -- */
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
    .data-table th,
    .data-table td { padding: 11px 12px; }
    .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .filter-form { flex-wrap: wrap; gap: 8px; }
    .filter-form select { flex: 1; min-width: 130px; }

    /* -- Barra de busca -- */
    .search-bar { flex-direction: column; }
    .search-bar .btn { width: 100%; justify-content: center; }

    /* -- Barra de ações -- */
    .barra-acoes { flex-direction: column; align-items: stretch; gap: 8px; }
    .barra-acoes .btn { width: 100%; justify-content: center; }

    /* -- Stat strip -- */
    .stat-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
    .stat-card { padding: 12px 14px; font-size: 13px; }

    /* -- Grid monitorado -- */
    .monitored-grid { grid-template-columns: 1fr; gap: 12px; }
    .monitor-card { padding: 16px; }
    .value-main { font-size: 20px; }

    /* -- Result area -- */
    .result-header { flex-direction: column; gap: 8px; align-items: flex-start; }
    .result-valor { font-size: 28px; }
    .result-actions { flex-direction: column; gap: 8px; }
    .result-actions .btn { width: 100%; justify-content: center; }
    .result-box { padding: 16px; }

    /* -- Tipo toggle -- */
    .tipo-toggle { width: 100%; }
    .tipo-btn { flex: 1; text-align: center; font-size: 12px; padding: 8px 10px; }

    /* -- Modal — bottom sheet no mobile -- */
    .modal { align-items: flex-end; padding: 0; }
    .modal-box {
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: 24px 20px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
        max-height: 90vh;
        overflow-y: auto;
    }

    /* -- Toast -- */
    .toast-fixed {
        bottom: env(safe-area-inset-bottom, 0);
        right: 0; left: 0;
        border-radius: var(--radius) var(--radius) 0 0;
        max-width: 100%;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        text-align: center;
    }

    /* -- FIPE values -- */
    .fipe-valor { font-size: 26px; }

    /* -- Consult card -- */
    .consult-card { margin-bottom: 16px; }

    /* -- Status select -- */
    .status-select { width: 100%; }

    /* -- Misc -- */
    .badge-count { font-size: 11px; }
    .result-count { font-size: 12px; }
    .empty-state { padding: 40px 16px; }
}

/* ============================================================
   Smartphones menores (≤ 430px — iPhone 15 e menores)
   ============================================================ */
@media (max-width: 430px) {
    .container { padding: 16px 12px 80px; }
    .card { padding: 14px; }
    .form-card { padding: 14px; }
    .page-title { font-size: 19px; }
    .hero h1 { font-size: 20px; }
    .stat-strip { grid-template-columns: 1fr; }
    .monitor-values { flex-direction: column; align-items: flex-start; gap: 8px; }
    .variacao { text-align: left; }
    .monitor-card-header { gap: 8px; }
    .data-table th { font-size: 10px; }
    .data-table td { font-size: 13px; }
    .result-valor { font-size: 24px; }
    .modal-box { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
    .navbar { padding: 0 12px; }
    .nav-brand { font-size: 14px; }
}

/* ============================================================
   v2 Additions — Sales workflow & Contract
   ============================================================ */

.form-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-3);
    margin-bottom: 10px;
    margin-top: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

/* ============================================================
   v3 Additions — Estoque, Clientes, Monitoramento shared
   ============================================================ */

/* ---------- Stat Strip ---------- */
.stat-strip {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0 20px;
}

.stat-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 22px;
    font-size: 14px;
    color: var(--text);
}

.stat-card--disponivel { background: var(--green-bg); border-color: #6ee7b7; }
.stat-card--reservado  { background: var(--amber-bg); border-color: #fde68a; }
.stat-card--vendido    { background: var(--red-bg);   border-color: #fca5a5; }

/* ---------- Status Select ---------- */
.status-select {
    padding: 5px 10px;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.disponivel { background: var(--green-bg); color: var(--green); }
.reservado  { background: var(--amber-bg); color: var(--amber); }
.vendido    { background: var(--red-bg);   color: var(--red); }

/* ---------- Spinner ---------- */
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Action Bar ---------- */
.barra-acoes {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sync-status { font-size: 13px; color: var(--text-3); }

/* ---------- Toast ---------- */
.toast-fixed {
    position: fixed;
    bottom: 24px; right: 24px;
    background: var(--text);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 2000;
    max-width: 340px;
}
.toast-fixed.visivel { display: block; }
.toast-fixed.ok   { background: var(--green); }
.toast-fixed.erro { background: var(--red); }

/* ---------- Card sub-components ---------- */
.card-header {
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body { padding: 18px; }

/* ---------- Buttons ---------- */
.btn-sm { padding: 5px 10px; font-size: 13px; }

.btn-danger {
    background: var(--red-bg);
    color: var(--red);
    border-color: #fca5a5;
}
.btn-danger:hover:not(:disabled) { background: #fee2e2; text-decoration: none; }

/* ---------- Table helpers ---------- */
.td-muted   { color: var(--text-3); }
.td-actions { white-space: nowrap; text-align: right; }

/* ---------- Search bar ---------- */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input { flex: 1; width: auto; }

/* ---------- Inputs ---------- */
input[readonly] { background: var(--surface2); color: var(--text-2); cursor: default; }
