:root {
    --brand-dark: #111317;
    --brand-gold: #b58a43;
    --brand-soft: #f5f2ec;
    --sidebar-width: 260px;
}

body {
    background: #f4f6f8;
    color: #20242a;
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--brand-dark);
    color: white;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1030;
}

.sidebar .brand {
    padding: 24px 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar .brand-title {
    font-weight: 800;
    letter-spacing: .5px;
}

.sidebar .brand-subtitle {
    color: var(--brand-gold);
    font-size: .78rem;
    letter-spacing: 2px;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.78);
    border-radius: 10px;
    margin: 4px 12px;
    padding: 11px 14px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background: rgba(181,138,67,.2);
}

.main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    background: white;
    border-bottom: 1px solid #e8eaed;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.page-content {
    padding: 24px;
}

.metric-card,
.panel-card {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(22, 27, 35, .06);
}

.metric-number {
    font-size: 2rem;
    font-weight: 800;
}

.badge-soft {
    background: #f0f2f4;
    color: #343a40;
}

.stage-card {
    border: 1px solid #eceef0;
    border-radius: 14px;
    background: white;
    height: 100%;
}

.kanban {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.kanban-column {
    min-width: 310px;
    max-width: 310px;
    background: #eef1f4;
    border-radius: 16px;
    padding: 14px;
}

.kanban-order {
    background: white;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    border-left: 4px solid var(--brand-gold);
}

.kanban-order.urgent {
    border-left-color: #dc3545;
}

.kanban-order.delayed {
    box-shadow: 0 0 0 2px rgba(220,53,69,.18);
}

.table-modern thead th {
    border-bottom: 0;
    color: #6b7280;
    font-size: .82rem;
    text-transform: uppercase;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(181,138,67,.18), transparent 35%),
        #0f1115;
}

.login-card {
    width: min(440px, 92vw);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.qr-box img {
    width: 180px;
    height: 180px;
}

.timeline-item {
    border-left: 3px solid #d8dde3;
    padding-left: 16px;
    margin-left: 8px;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main {
        margin-left: 0;
    }
}

.sidebar-label {
    color: rgba(255,255,255,.35);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    padding: 12px 26px 4px;
}

.form-section-title {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
    font-weight: 700;
}

.permission-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e6e8eb;
    background: #f8f9fa;
    border-radius: 999px;
    padding: .22rem .55rem;
    margin: .14rem;
    font-size: .75rem;
}

.admin-stat {
    border-radius: 16px;
    padding: 18px;
    background: white;
    border: 1px solid #eceef0;
}

.sidebar {
    transition: transform .22s ease;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1025;
}

@media (max-width: 991px) {
    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,.25);
    }
    body.sidebar-open .sidebar-backdrop {
        display: block;
    }
}

/* Sprint 2 - OS Digital */
.section-number { display:inline-grid; place-items:center; width:34px; height:34px; border-radius:10px; background:#111317; color:#fff; font-size:.8rem; font-weight:800; margin-bottom:10px; }
.upload-zone { border:2px dashed #d6d9de; border-radius:18px; padding:28px; text-align:center; background:#fafbfc; }
.file-card { display:flex; align-items:center; gap:12px; border:1px solid #e8eaed; background:#fff; padding:13px; border-radius:14px; min-height:82px; }
.file-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:12px; background:#f4f1ea; color:#8b672d; font-size:1.35rem; flex:0 0 auto; }
.prescription-view { background:#fafbfc; border:1px solid #eceef0; border-radius:14px; padding:18px; }
@media (max-width:991px) { .sidebar.sidebar-open { transform:translateX(0); box-shadow:18px 0 40px rgba(0,0,0,.25); } }

/* Sprint 3 - Recebimento e Conferência */
.reception-history-card { border:1px solid #eceef0; border-radius:14px; padding:16px; background:#fff; transition:.18s ease; height:100%; }
.reception-history-card:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(22,27,35,.07); }
.reception-summary { border-radius:12px; background:#f7f8fa; border:1px solid #e9ecef; padding:12px 14px; font-size:.9rem; }
.reception-check-list { border:1px solid #eceef0; border-radius:14px; overflow:hidden; }
.reception-check-row { display:flex; align-items:center; gap:12px; padding:14px; border-bottom:1px solid #eceef0; background:#fff; }
.reception-check-row:last-child { border-bottom:0; }
.reception-check-icon { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; font-weight:800; flex:0 0 auto; }
.reception-check-icon.status-aprovado { background:#e8f7ee; color:#198754; }
.reception-check-icon.status-reprovado { background:#fdebec; color:#dc3545; }
.reception-check-icon.status-pendente { background:#fff5d6; color:#9a6b00; }
.reception-check-icon.status-nao_aplica { background:#eef0f2; color:#6c757d; }
.manual-check-card { border:1px solid #e8eaed; border-radius:14px; padding:15px; background:#fafbfc; }
.file-icon-sm { width:36px; height:36px; border-radius:10px; font-size:1rem; }
.reception-action-card { z-index:10; }
.table-danger-subtle > * { --bs-table-bg: rgba(220,53,69,.045); }

/* Sprint 4 - planejamento */
.progress { height: 8px; border-radius: 999px; }
.table td { vertical-align: middle; }

/* Sprint 5 - Produção Digital */
.production-board { display:flex; gap:16px; overflow-x:auto; padding-bottom:18px; align-items:flex-start; }
.production-column { min-width:330px; max-width:330px; border-radius:18px; background:#edf0f3; overflow:hidden; border:1px solid #e2e5e9; }
.production-column-header { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:15px 16px; background:#fff; border-bottom:1px solid #e4e7eb; position:sticky; top:0; z-index:1; }
.production-column-body { padding:12px; min-height:220px; }
.production-card { background:#fff; border-radius:14px; padding:14px; margin-bottom:12px; border-left:4px solid #b58a43; box-shadow:0 5px 18px rgba(22,27,35,.06); transition:.18s ease; }
.production-card:hover { transform:translateY(-2px); box-shadow:0 9px 26px rgba(22,27,35,.10); }
.production-card-danger { border-left-color:#dc3545; }
.production-card-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.production-card-grid div { background:#f7f8fa; border-radius:10px; padding:8px 10px; }
.production-card-grid span { display:block; font-size:.68rem; color:#7a818b; text-transform:uppercase; }
.production-card-grid strong { display:block; font-size:.82rem; }
.production-mini-timer { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-weight:800; font-size:.92rem; }
.production-focus { border:1px solid rgba(181,138,67,.25); box-shadow:0 12px 42px rgba(22,27,35,.08); }
.production-main-timer { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:clamp(2rem,5vw,3.6rem); font-weight:800; line-height:1; letter-spacing:-.05em; }
.production-resource-box { padding:13px 15px; border-radius:13px; background:#f7f8fa; border:1px solid #e8eaed; height:100%; }
.production-resource-box span { display:block; color:#7a818b; font-size:.72rem; text-transform:uppercase; margin-bottom:3px; }
.production-resource-box strong { display:block; }
.production-route { display:flex; flex-direction:column; }
.production-route-item { display:flex; gap:14px; padding:16px 0; border-bottom:1px solid #eceef0; }
.production-route-item:last-child { border-bottom:0; }
.production-route-item.current { background:linear-gradient(90deg, rgba(181,138,67,.08), transparent); margin:0 -12px; padding-left:12px; padding-right:12px; border-radius:12px; }
.production-route-status { width:28px; text-align:center; font-size:1.15rem; flex:0 0 auto; }
.production-event { border-left:3px solid #d9dde2; padding:3px 0 12px 12px; margin-bottom:8px; }
@media(max-width:767px){ .production-column{min-width:290px;max-width:290px}.production-main-timer{width:100%;text-align:left} }


/* Sprint 6 - QR Code Operacional */
.qr-scanner-box {
    position: relative;
    min-height: 420px;
    background: #0b0d10;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.qr-scanner-box video { width: 100%; height: 420px; object-fit: cover; }
.qr-scan-frame { position:absolute; width:min(68vw,260px); height:min(68vw,260px); border:3px solid rgba(255,255,255,.9); border-radius:22px; box-shadow:0 0 0 999px rgba(0,0,0,.18); pointer-events:none; }
.qr-camera-placeholder { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; color:rgba(255,255,255,.75); }
.qr-camera-placeholder i { font-size:4rem; }
.qr-log-row { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid #eef0f2; }
.qr-log-row:last-child { border-bottom:0; }
.qr-operation-page { background:#eef1f4; min-height:100vh; }
.qr-mobile-header { background:#111317; color:white; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px; position:sticky; top:0; z-index:1040; }
.qr-order-hero { background:linear-gradient(135deg,#111317,#262a31); color:white; border-radius:22px; padding:22px; box-shadow:0 10px 36px rgba(0,0,0,.16); }
.qr-order-code { font-size:clamp(1.7rem,7vw,2.5rem); font-weight:900; letter-spacing:-.03em; }
.qr-main-timer { font-variant-numeric:tabular-nums; font-weight:900; font-size:clamp(2.4rem,10vw,4.5rem); letter-spacing:-.04em; }
.qr-route { display:flex; flex-wrap:wrap; gap:8px; }
.qr-route-step { display:inline-flex; align-items:center; gap:6px; padding:8px 11px; border-radius:999px; background:#eef0f2; font-size:.82rem; color:#6b7280; }
.qr-route-step.done { background:#e6f7ee; color:#146c43; }
.qr-route-step.current { background:#111317; color:#fff; }
@media (max-width: 767px) {
    .qr-scanner-box, .qr-scanner-box video { min-height:340px; height:340px; }
    .qr-operation-page .panel-card { border-radius:16px; }
}

/* Sprint 7 - Controle de Qualidade */
.quality-history-card { display:block; border:1px solid #e8eaed; border-radius:14px; padding:14px; background:#fff; height:100%; transition:.18s ease; }
.quality-history-card:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(22,27,35,.08); }
.quality-progress { height:10px; }
.quality-check-list { border:1px solid #e7e9ed; border-radius:16px; overflow:hidden; }
.quality-check-row { display:flex; align-items:flex-start; gap:14px; padding:16px; background:#fff; border-bottom:1px solid #eceef0; }
.quality-check-row:last-child { border-bottom:0; }
.quality-check-state { width:42px; height:42px; border-radius:50%; display:grid; place-items:center; flex:0 0 auto; font-size:1.1rem; font-weight:800; }
.quality-check-state.state-aprovado { background:#e7f7ed; color:#157347; }
.quality-check-state.state-reprovado { background:#fde9eb; color:#b02a37; }
.quality-check-state.state-nao_aplica { background:#eef0f3; color:#68707a; }
.quality-check-state.state-pendente { background:#fff2cc; color:#8a6500; }
.quality-photo-card { border:1px solid #e6e9ed; border-radius:14px; overflow:hidden; background:#fff; height:100%; }
.quality-photo-card img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; background:#eef0f2; }
.quality-decision-card { position:sticky; top:86px; }
.quality-result { display:flex; align-items:center; gap:12px; border-radius:14px; padding:16px; margin-top:14px; font-size:1.05rem; font-weight:800; }
.quality-result i { font-size:1.8rem; }
.quality-result.approved { background:#e8f7ee; color:#157347; }
.quality-result.rejected { background:#fdebec; color:#b02a37; }
.quality-result.pending { background:#fff3cd; color:#856404; }
.quality-info-row { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #eef0f2; }
.quality-info-row:last-child { border-bottom:0; }
.quality-info-row span { color:#727985; font-size:.82rem; }
.quality-info-row strong { text-align:right; font-size:.88rem; }
.quality-cycle { padding:12px 0; border-bottom:1px solid #eceef0; }
.quality-cycle:last-child { border-bottom:0; padding-bottom:0; }
@media (max-width:1199px) { .quality-decision-card { position:static; } }

/* Sprint 11 - Dashboard Executivo e KPIs */
.executive-hero{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding:22px 24px;border-radius:20px;background:linear-gradient(135deg,#fff,#f4f6f8);border:1px solid #e7eaee}.executive-kicker{font-size:.72rem;letter-spacing:.12em;font-weight:800;color:#8b672d;margin-bottom:8px}.exec-kpi-card{height:100%;padding:18px;border:1px solid #e6e9ed;border-radius:18px;background:#fff;position:relative;overflow:hidden;box-shadow:0 6px 22px rgba(17,19,23,.04)}.exec-kpi-card::after{content:"";position:absolute;right:-28px;top:-28px;width:90px;height:90px;border-radius:50%;background:rgba(181,138,67,.08)}.exec-kpi-card.is-danger{border-color:rgba(220,53,69,.28);background:linear-gradient(180deg,#fff,#fff8f8)}.exec-kpi-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#f2eee6;color:#8b672d;margin-bottom:14px}.exec-kpi-label{text-transform:uppercase;letter-spacing:.06em;font-size:.68rem;color:#7b838d;font-weight:800}.exec-kpi-value{font-size:2rem;line-height:1.1;font-weight:900;letter-spacing:-.04em;margin-top:5px}.exec-kpi-value small{font-size:.9rem;letter-spacing:0}.exec-kpi-foot{margin-top:7px;font-size:.75rem;color:#767e88}.target-card{padding:14px 15px;border-radius:14px;border:1px solid #e7eaee;background:#fafbfc;height:100%}.target-current{font-size:1.6rem;font-weight:900;letter-spacing:-.03em;margin-top:10px}.target-current small{font-size:.75rem;font-weight:700}.target-dot{width:11px;height:11px;border-radius:50%;margin-top:5px;background:#adb5bd;box-shadow:0 0 0 4px rgba(108,117,125,.12)}.target-good{border-color:rgba(25,135,84,.25);background:#f7fcf9}.target-good .target-dot{background:#198754;box-shadow:0 0 0 4px rgba(25,135,84,.12)}.target-warning{border-color:rgba(255,193,7,.35);background:#fffdf5}.target-warning .target-dot{background:#d39e00;box-shadow:0 0 0 4px rgba(255,193,7,.14)}.target-danger{border-color:rgba(220,53,69,.28);background:#fff8f8}.target-danger .target-dot{background:#dc3545;box-shadow:0 0 0 4px rgba(220,53,69,.12)}.exec-chart-wrap{width:100%;min-height:260px}.exec-bar-row{margin-bottom:14px}.exec-bar-track{height:8px;border-radius:999px;background:#edf0f2;overflow:hidden;margin-top:6px}.exec-bar-fill{height:100%;border-radius:inherit;background:linear-gradient(90deg,#b58a43,#111317)}.exec-bar-track.danger .exec-bar-fill{background:linear-gradient(90deg,#f2a5ad,#dc3545)}.exec-alert-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 13px;border-radius:12px;color:#252a30;text-decoration:none;border:1px solid #edf0f2;margin-bottom:9px;background:#fafbfc}.exec-alert-row:hover{background:#f2f4f6}.exec-alert-row.warning{background:#fffaf0;border-color:#f6df9d}.exec-alert-row.danger{background:#fff6f7;border-color:#f4c4ca}.exec-alert-row strong{font-size:1.1rem}.executive-hero+.panel-card{box-shadow:none}@media(max-width:991px){.executive-hero{display:block}.exec-kpi-value{font-size:1.7rem}}
.target-neutral{border-color:#e4e7eb;background:#fafbfc}.target-neutral .target-dot{background:#adb5bd;box-shadow:0 0 0 4px rgba(108,117,125,.10)}


/* Hotfix v1.2.1 - menu lateral recolhivel */
.app-shell {
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    box-shadow: 12px 0 32px rgba(0, 0, 0, .18);
}

.sidebar .brand {
    flex: 0 0 auto;
}

.sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0 24px;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .3);
}

.sidebar .nav {
    gap: 4px;
}

.sidebar-group {
    padding: 0 0 2px;
}

.sidebar-group + .sidebar-group {
    margin-top: 2px;
}

.sidebar-group-button {
    width: calc(100% - 24px);
    margin: 0 12px;
    padding: 11px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, .56);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .68rem;
    font-weight: 800;
}

.sidebar-group-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .04);
}

.sidebar-group-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sidebar-group-title i {
    font-size: .92rem;
    width: 16px;
    text-align: center;
}

.sidebar-group-chevron {
    transition: transform .18s ease, color .18s ease;
}

.sidebar-group-button[aria-expanded="true"] .sidebar-group-chevron {
    transform: rotate(180deg);
    color: var(--brand-gold);
}

.sidebar .collapse-inner {
    padding: 4px 0 2px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.78);
    border-radius: 10px;
    margin: 3px 12px 3px 20px;
    padding: 9px 14px;
    min-height: 42px;
}

.sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.sidebar .nav-link span {
    line-height: 1.2;
}

.sidebar-label {
    display: none;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: min(290px, 86vw);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,.25);
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* Sprint 12 - Inteligencia, Alertas e IA explicavel */
.intelligence-bell {
    position: relative;
    width: 36px;
    height: 36px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    color: #343a40;
    text-decoration: none;
    background: #fff;
}

.intelligence-bell:hover {
    background: #f8f9fa;
    color: #111317;
}

.intelligence-bell-badge,
.sidebar-alert-badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc3545;
    color: white;
    font-size: .65rem;
    font-weight: 800;
    line-height: 1;
}

.intelligence-bell-badge {
    position: absolute;
    top: -6px;
    right: -7px;
    box-shadow: 0 0 0 2px #fff;
}

.ai-hero {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background:
        radial-gradient(circle at 85% 15%, rgba(181,138,67,.28), transparent 30%),
        linear-gradient(135deg, #111317, #20242a);
    color: #fff;
    box-shadow: 0 16px 50px rgba(17,19,23,.18);
}

.ai-hero::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    right: -75px;
    bottom: -110px;
    border: 1px solid rgba(255,255,255,.09);
}

.ai-kicker {
    color: #d5b273;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    font-weight: 800;
}

.ai-metric-card {
    border: 1px solid #e9ecef;
    border-radius: 18px;
    background: white;
    padding: 18px;
    height: 100%;
    box-shadow: 0 8px 24px rgba(22,27,35,.05);
}

.ai-metric-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    margin-top: 6px;
}

.ai-state-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.ai-risk-low { background: #198754; }
.ai-risk-medium { background: #ffc107; }
.ai-risk-high { background: #fd7e14; }
.ai-risk-critical { background: #dc3545; }

.risk-score-ring {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--ring-color, #198754) calc(var(--score, 0) * 1%), #e9ecef 0);
    position: relative;
    flex: 0 0 auto;
}

.risk-score-ring::after {
    content: "";
    position: absolute;
    inset: 7px;
    background: white;
    border-radius: 50%;
}

.risk-score-ring strong {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
}

.ai-briefing {
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #fff, #fafbfc);
    padding: 18px;
}

.ai-briefing-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f2;
}

.ai-briefing-item:last-child { border-bottom: 0; }

.ai-briefing-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #f2ede4;
    color: #8b672d;
    flex: 0 0 auto;
}

.alert-severity {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.alert-severity.BAIXA { background: #198754; }
.alert-severity.MEDIA { background: #ffc107; }
.alert-severity.ALTA { background: #fd7e14; }
.alert-severity.CRITICA { background: #dc3545; box-shadow: 0 0 0 4px rgba(220,53,69,.12); }

.recommendation-card {
    border: 1px solid #e9ecef;
    border-left: 4px solid var(--brand-gold);
    border-radius: 14px;
    padding: 15px;
    background: #fff;
    height: 100%;
}

.capacity-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(220px, 2fr) 74px;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #eef0f2;
}

.capacity-row:last-child { border-bottom: 0; }

.capacity-bar {
    height: 10px;
    border-radius: 999px;
    background: #eceff2;
    overflow: hidden;
}

.capacity-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b58a43, #d8b876);
}

.capacity-bar.danger > span { background: linear-gradient(90deg, #dc3545, #ef747f); }
.capacity-bar.warning > span { background: linear-gradient(90deg, #fd7e14, #ffb36d); }

.ai-reason-chip {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 1px solid #e5e7eb;
    background: #f8f9fa;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: .76rem;
    margin: 2px 4px 2px 0;
}

.ai-explain-box {
    border-left: 4px solid var(--brand-gold);
    background: #faf8f4;
    border-radius: 0 14px 14px 0;
    padding: 16px;
}

@media (max-width: 767px) {
    .capacity-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    .ai-metric-value { font-size: 1.6rem; }
}


/* Sprint 13 - Portal do Cliente */
.client-portal-body { background:#f5f6f8; color:#20242a; min-height:100vh; }
.client-navbar { background:#fff; border-bottom:1px solid #e8eaed; box-shadow:0 4px 20px rgba(22,27,35,.04); }
.client-brand { display:flex; flex-direction:column; line-height:1; padding:.65rem 0; }
.client-brand-main { font-size:1.02rem; font-weight:900; letter-spacing:.035em; color:#111317; }
.client-brand-sub { color:var(--brand-gold); font-size:.62rem; letter-spacing:.18em; font-weight:800; margin-top:4px; }
.client-navbar .nav-link { color:#626973; font-weight:600; border-radius:9px; padding:.55rem .8rem !important; }
.client-navbar .nav-link:hover,.client-navbar .nav-link.active { color:#111317; background:#f3efe8; }
.client-content { padding-top:32px; padding-bottom:60px; }
.client-hero { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:28px; }
.client-eyebrow { color:#98712f; font-size:.72rem; font-weight:800; letter-spacing:.14em; margin-bottom:7px; }
.client-metric { height:100%; background:#fff; border:1px solid #e9ebee; border-radius:18px; padding:20px; box-shadow:0 8px 25px rgba(22,27,35,.045); display:flex; flex-direction:column; }
.client-metric span { color:#737a84; font-size:.82rem; font-weight:600; }
.client-metric strong { font-size:2.15rem; line-height:1.1; margin:5px 0; color:#111317; }
.client-metric small { color:#9298a1; }
.client-panel,.client-order-card { border:1px solid #e9ebee; border-radius:18px; box-shadow:0 8px 25px rgba(22,27,35,.045); overflow:hidden; }
.client-panel-header { padding:20px 22px; border-bottom:1px solid #eceef0; }
.client-order-list { display:flex; flex-direction:column; }
.client-order-row { display:grid; grid-template-columns:minmax(260px,1.3fr) minmax(210px,.9fr) minmax(150px,.65fr) 24px; gap:22px; align-items:center; padding:18px 22px; border-bottom:1px solid #edf0f2; text-decoration:none; color:inherit; transition:.16s ease; }
.client-order-row:last-child { border-bottom:0; }
.client-order-row:hover { background:#faf8f4; }
.client-order-progress .progress,.client-order-card .progress { height:8px; background:#eceef1; }
.client-order-progress .progress-bar,.client-order-card .progress-bar,.client-big-progress .progress-bar { background:linear-gradient(90deg,#9d7738,#c49b54); }
.client-order-progress { display:grid; grid-template-columns:1fr 38px; gap:8px; align-items:center; }
.client-order-date { display:flex; flex-direction:column; align-items:flex-start; gap:3px; }
.client-filter { display:grid; grid-template-columns:minmax(260px,1fr) 170px auto; gap:8px; }
.client-order-card { color:inherit; transition:.17s ease; background:#fff; }
.client-order-card:hover { transform:translateY(-1px); box-shadow:0 14px 30px rgba(22,27,35,.075); border-color:#ded8ce; }
.client-big-progress { height:13px; border-radius:99px; }
.client-detail-grid span { display:block; color:#7a818b; font-size:.78rem; margin-bottom:3px; }
.client-detail-grid strong { display:block; color:#21252a; }
.client-note { background:#f8f9fa; border:1px solid #e8eaed; border-radius:12px; padding:15px; white-space:pre-line; }
.client-back { color:#6d737c; font-size:.9rem; text-decoration:none; }
.client-back:hover { color:#111317; }
.client-timeline { position:relative; }
.client-timeline-item { display:flex; gap:14px; position:relative; padding:0 0 22px 2px; }
.client-timeline-item:not(:last-child):before { content:""; position:absolute; left:7px; top:15px; bottom:-3px; width:2px; background:#e1e4e7; }
.client-timeline-dot { width:16px; height:16px; border-radius:50%; background:#c7ccd1; border:3px solid #fff; box-shadow:0 0 0 2px #d9dde1; flex:0 0 auto; margin-top:2px; z-index:1; }
.client-timeline-item.current .client-timeline-dot { background:var(--brand-gold); box-shadow:0 0 0 3px rgba(181,138,67,.2); }
.client-empty-state { max-width:620px; margin:10vh auto; text-align:center; background:#fff; border:1px solid #e9ebee; border-radius:22px; padding:50px; box-shadow:0 14px 42px rgba(22,27,35,.06); }
.client-empty-icon { width:64px; height:64px; display:grid; place-items:center; margin:0 auto 20px; border-radius:18px; background:#f3efe8; color:#98712f; font-size:1.75rem; }
.client-clinic-icon { width:62px; height:62px; display:grid; place-items:center; border-radius:18px; background:#111317; color:#fff; font-size:1.6rem; flex:0 0 auto; }
.client-mini-stat { display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid #eceef0; }
.client-mini-stat strong { font-size:1.5rem; }
.client-footer { border-top:1px solid #e3e6e8; background:#fff; color:#8a9098; padding:18px 0; font-size:.8rem; }
@media (max-width: 991px) { .client-hero { align-items:flex-start; flex-direction:column; } .client-order-row { grid-template-columns:1fr; gap:10px; } .client-order-progress { max-width:360px; } .client-filter { width:100%; grid-template-columns:1fr; } }
@media (max-width: 575px) { .client-content { padding-top:22px; } .client-metric { padding:16px; } .client-metric strong { font-size:1.7rem; } .client-empty-state { padding:35px 22px; } }
