:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #18202f;
    --muted: #6d7685;
    --line: #dfe5ee;
    --line-strong: #cfd8e6;
    --primary: #155eef;
    --primary-dark: #0f3fa3;
    --primary-soft: #eaf1ff;
    --success: #078647;
    --success-soft: #ecfdf3;
    --warning: #b54708;
    --warning-soft: #fffaeb;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --info: #026aa2;
    --info-soft: #e0f2fe;
    --sidebar: #101828;
    --sidebar-soft: #1d2939;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-md: 0 12px 30px rgba(16, 24, 40, .06);
    --shadow-lg: 0 18px 42px rgba(16, 24, 40, .09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

:focus-visible {
    outline: 3px solid rgba(21, 94, 239, .22);
    outline-offset: 2px;
}

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

.app-sidebar {
    width: 280px;
    background: var(--sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand span {
    display: block;
    color: rgba(255,255,255,.62);
    font-size: 13px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: #fff;
    color: var(--primary);
}

.brand-mark-lg {
    width: 56px;
    height: 56px;
    font-size: 24px;
}

.sidebar-nav {
    padding: 12px;
    overflow-y: auto;
}

.sidebar-nav a,
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 9px 12px;
    color: rgba(255,255,255,.78);
    border-radius: 8px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.sidebar-logout:hover {
    background: var(--sidebar-soft);
    color: #fff;
}

.sidebar-logout {
    margin: auto 12px 14px;
}

.app-main {
    min-width: 0;
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

.app-header {
    min-height: 76px;
    padding: 16px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.notification-menu {
    position: relative;
}

.notification-toggle {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .72rem;
    line-height: 20px;
    font-weight: 700;
    border: 2px solid #fff;
}

.notification-dropdown {
    width: min(360px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.notification-dropdown-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.notification-dropdown-head span {
    color: var(--muted);
    font-size: .84rem;
}

.notification-item,
.notification-all,
.notification-empty {
    display: block;
    padding: 12px 16px;
    color: #111827;
    text-decoration: none;
}

.notification-item {
    border-bottom: 1px solid var(--line);
}

.notification-item:hover,
.notification-all:hover {
    background: #f8fafc;
    color: var(--primary);
}

.notification-item span {
    display: block;
    font-weight: 700;
    font-size: .92rem;
}

.notification-item small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
}

.notification-item.unread {
    background: #eff6ff;
}

.notification-all {
    text-align: center;
    font-weight: 700;
    color: var(--primary);
}

.notification-empty {
    color: var(--muted);
    text-align: center;
}

.app-content {
    padding: 28px;
    flex: 1;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.app-footer a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.app-footer a:hover {
    color: var(--primary);
}

.system-checklist {
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    margin: 0;
    background: #0f172a;
    color: #e5edf8;
    border-radius: 8px;
    font-size: 0.86rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 22px;
}

.page-title h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 750;
}

.eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card,
.content-panel,
.login-card,
.simple-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
}

.metric-card {
    min-height: 118px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.metric-card.compact {
    min-height: 86px;
    padding: 16px;
}

.os-title {
    align-items: flex-start;
}

.os-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    border: 1px solid transparent;
    vertical-align: middle;
}

.status-recebida,
.status-neutro {
    color: #344054;
    background: #f2f4f7;
    border-color: #d0d5dd;
}

.status-analise {
    color: #1849a9;
    background: #eff4ff;
    border-color: #b2ccff;
}

.status-alerta {
    color: #93370d;
    background: #fffaeb;
    border-color: #fedf89;
}

.status-aprovada,
.status-pronta {
    color: #05603a;
    background: #ecfdf3;
    border-color: #abefc6;
}

.status-entregue {
    color: #075985;
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.status-cancelada {
    color: #912018;
    background: #fef3f2;
    border-color: #fecdca;
}

.os-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.os-info-card,
.os-summary-card,
.alert-tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.os-info-card {
    padding: 16px;
    min-height: 112px;
}

.os-info-card span,
.os-summary-card span,
.alert-tile span {
    color: var(--muted);
    font-size: 13px;
}

.os-info-card strong,
.os-summary-card strong {
    display: block;
    margin-top: 5px;
    font-size: 18px;
}

.os-info-card small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

.os-info-card.highlight {
    border-color: #b2ccff;
    background: #f5f8ff;
}

.os-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.os-summary-panel {
    display: grid;
    gap: 12px;
}

.os-summary-card {
    padding: 16px;
}

.os-summary-card.total {
    border-color: #b2ccff;
    background: #f5f8ff;
}

.timeline-list {
    display: grid;
    gap: 12px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px #eaf1ff;
}

.timeline-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.timeline-item p {
    margin: 4px 0 0;
}

.alert-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.alert-tile {
    padding: 14px;
    color: var(--text);
}

.alert-tile strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
}

.alert-tile.is-hot {
    border-color: #fedf89;
    background: #fffaeb;
}

.os-stock-alert {
    min-height: 24px;
}

.os-stock-alert .alert {
    margin: 0;
}

.os-piece-total {
    color: var(--muted);
}

.os-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.os-form-section {
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.os-form-section h3 {
    margin: 0 0 14px;
    color: #344054;
    font-size: 15px;
    font-weight: 800;
}

.os-whatsapp-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    border-color: #abefc6;
    background: #f6fef9;
}

.os-whatsapp-panel h3 {
    margin: 0 0 4px;
    color: #05603a;
    font-size: 16px;
    font-weight: 800;
}

.quick-form-panel {
    max-width: 920px;
}

.finance-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -6px 0 18px;
}

.finance-nav a {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: #344054;
    font-size: 14px;
    font-weight: 750;
}

.finance-nav a:hover,
.finance-nav a.active {
    border-color: #b2ccff;
    background: #eff4ff;
    color: var(--primary);
}

.finance-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
    gap: 18px;
}

.finance-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(28px, 1fr));
    gap: 10px;
    min-height: 230px;
    align-items: end;
}

.finance-chart-col {
    display: grid;
    gap: 8px;
    text-align: center;
}

.finance-bars {
    height: 180px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.finance-bar {
    width: 10px;
    min-height: 4px;
    border-radius: 999px 999px 3px 3px;
}

.finance-bar.expected,
.finance-legend i.expected {
    background: #93c5fd;
}

.finance-bar.received,
.finance-legend i.received {
    background: #22c55e;
}

.finance-legend {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.finance-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.finance-legend i {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 999px;
}

.finance-list {
    display: grid;
    gap: 10px;
}

.finance-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.finance-list > div:last-child {
    border-bottom: 0;
}

.finance-list span {
    color: var(--muted);
}

.category-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.category-preview i {
    width: 18px;
    height: 18px;
    display: inline-block;
    border: 1px solid rgba(16, 24, 40, .12);
    border-radius: 999px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf1ff;
    color: var(--primary);
    font-size: 22px;
    flex: 0 0 auto;
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.metric-card strong {
    display: block;
    margin-top: 3px;
    font-size: 26px;
    line-height: 1.1;
}

.content-panel {
    padding: 22px;
}

.empty-state {
    text-align: center;
    padding: 56px 24px;
}

.empty-icon {
    width: 62px;
    height: 62px;
    border-radius: 8px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf1ff;
    color: var(--primary);
    font-size: 28px;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, .14), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, #eef6ff 100%);
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
    align-items: stretch;
}

.login-panel {
    position: relative;
    overflow: hidden;
    color: #0f172a;
    padding: clamp(32px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, .08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(37, 99, 235, .08) 1px, transparent 1px);
    background-size: 48px 48px;
}

.login-panel::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -160px;
    width: 440px;
    height: 440px;
    border-radius: 999px;
    background: rgba(56, 189, 248, .18);
    pointer-events: none;
}

.login-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    gap: 14px;
    align-items: center;
    width: fit-content;
    color: #0f172a;
}

.login-brand:hover {
    color: #0f172a;
}

.login-brand h1,
.login-copy h2,
.login-card-title h2 {
    margin: 0;
}

.login-brand h1 {
    font-size: 20px;
    font-weight: 850;
}

.login-brand p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 14px;
}

.login-copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.login-copy h2 {
    max-width: 560px;
    color: #0f172a;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.06;
    font-weight: 850;
    letter-spacing: 0;
}

.login-copy p {
    max-width: 520px;
    margin: 18px 0 0;
    color: #475569;
    font-size: clamp(1rem, 1.3vw, 1.14rem);
}

.login-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.login-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 999px;
    background: rgba(255,255,255,.76);
    color: #334155;
    font-size: 13px;
    font-weight: 750;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.login-highlights i {
    color: #2563eb;
}

.login-card {
    align-self: center;
    width: min(460px, calc(100% - 48px));
    margin: 32px auto;
    padding: clamp(26px, 4vw, 38px);
}

.login-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: #64748b;
    font-size: 14px;
    font-weight: 750;
}

.login-back:hover {
    color: var(--primary);
}

.login-card-title {
    margin-bottom: 26px;
}

.login-card-title h2 {
    color: #0f172a;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 850;
}

.login-card-title p {
    margin: 8px 0 0;
    color: #64748b;
}

.login-card .form-label {
    color: #334155;
    font-size: 14px;
    font-weight: 750;
}

.login-input-group {
    position: relative;
}

.login-input-group i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    transform: translateY(-50%);
    color: #94a3b8;
}

.login-input-group .form-control {
    min-height: 52px;
    padding-left: 46px;
    border-color: #dbe4ef;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 15px;
}

.login-input-group .form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.login-submit {
    min-height: 50px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 18px 34px rgba(37, 99, 235, .28);
    font-size: 15px;
    font-weight: 850;
}

.login-note {
    margin: 18px 0 0;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.login-page {
    background:
        radial-gradient(circle at 16% 18%, rgba(21, 94, 239, .12), transparent 24rem),
        radial-gradient(circle at 86% 78%, rgba(14, 165, 233, .10), transparent 22rem),
        linear-gradient(135deg, #f8fafc 0%, #eef4fb 52%, #f9fbff 100%);
}

.login-wrap {
    grid-template-columns: minmax(0, .98fr) minmax(390px, .86fr);
}

.login-panel {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(21, 94, 239, .055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(21, 94, 239, .055) 1px, transparent 1px),
        linear-gradient(135deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .18));
    background-size: 46px 46px, 46px 46px, auto;
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 30px;
    border: 1px solid rgba(21, 94, 239, .09);
    border-radius: 18px;
    pointer-events: none;
}

.login-panel::after {
    right: -150px;
    bottom: -150px;
    width: 390px;
    height: 390px;
    background: linear-gradient(135deg, rgba(21, 94, 239, .12), rgba(14, 165, 233, .18));
    filter: blur(2px);
}

.login-brand .brand-mark {
    background: linear-gradient(135deg, #155eef, #0ea5e9);
    color: #fff;
    box-shadow: 0 18px 34px rgba(21, 94, 239, .18);
}

.login-brand h1 {
    font-size: 1.22rem;
}

.login-brand p {
    font-size: .86rem;
}

.login-copy h2 {
    max-width: 540px;
    font-size: clamp(2rem, 3.4vw, 3.25rem);
    line-height: 1.08;
}

.login-copy p {
    max-width: 500px;
    font-size: clamp(.98rem, 1.15vw, 1.1rem);
    line-height: 1.68;
}

.login-benefits {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    max-width: 520px;
}

.login-benefits div {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 10px 12px;
    border: 1px solid rgba(21, 94, 239, .10);
    border-radius: 8px;
    background: rgba(255,255,255,.72);
    color: #344054;
    font-size: .92rem;
    font-weight: 700;
    box-shadow: 0 12px 26px rgba(16, 24, 40, .045);
}

.login-benefits i {
    color: var(--success);
}

.login-card {
    width: min(440px, calc(100% - 48px));
    border: 1px solid rgba(207, 216, 230, .78);
    border-radius: 16px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 24px 70px rgba(16, 24, 40, .14);
    backdrop-filter: blur(12px);
}

.login-card-title h2 {
    font-size: clamp(1.65rem, 2.4vw, 2.05rem);
}

.login-alert {
    display: flex;
    align-items: flex-start;
    border-radius: 8px;
    font-size: .92rem;
}

.login-input-group .form-control {
    padding-right: 50px;
    border-radius: 8px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-input-group .form-control:focus {
    background: #fff;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    transform: translateY(-50%);
}

.login-password-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.login-password-toggle i {
    position: static;
    transform: none;
    color: inherit;
}

.login-form-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 18px;
    font-size: .9rem;
    font-weight: 750;
}

.login-form-links a:last-child {
    color: #64748b;
}

.login-submit {
    position: relative;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 20px 40px rgba(37, 99, 235, .34);
}

.login-submit-loading {
    display: none;
}

.login-submit.is-loading .login-submit-label {
    display: none;
}

.login-submit.is-loading .login-submit-loading {
    display: inline-flex;
    align-items: center;
}

.login-mobile-benefits {
    display: none;
}

.password-rules {
    margin: -2px 0 16px;
    color: #64748b;
    font-size: .88rem;
    font-weight: 650;
}

.simple-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.simple-card {
    width: min(520px, 100%);
    padding: 32px;
    text-align: center;
}

.sidebar-backdrop {
    display: none;
}

/* Montora Design System */
.page-header,
.page-title {
    padding: 2px 0;
}

.page-title h2,
.page-header h2 {
    color: #101828;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.2;
}

.page-subtitle {
    max-width: 760px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .95rem;
}

.ds-card,
.content-panel,
.metric-card,
.os-info-card,
.os-summary-card,
.alert-tile,
.simple-card {
    border-color: var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.content-panel,
.ds-card {
    background: var(--surface);
}

.content-panel h3,
.ds-card-title {
    margin: 0 0 14px;
    color: #1d2939;
    font-size: 1.05rem;
    font-weight: 800;
}

.ds-card-subtitle {
    margin: -8px 0 14px;
    color: var(--muted);
    font-size: .9rem;
}

.metric-card {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.metric-card:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.metric-icon {
    background: var(--primary-soft);
}

.btn {
    min-height: 38px;
    border-radius: var(--radius);
    font-size: .93rem;
    font-weight: 750;
}

.btn-sm {
    min-height: 32px;
    font-size: .84rem;
}

.btn-primary {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 8px 18px rgba(21, 94, 239, .14);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: #b2ccff;
    background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.btn-outline-secondary {
    color: #475467;
    border-color: var(--line-strong);
    background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    border-color: #98a2b3;
    background: #f9fafb;
    color: #344054;
}

.btn-outline-danger {
    border-color: #fecdca;
    color: var(--danger);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: var(--danger-soft);
    color: #912018;
}

.btn-outline-success {
    border-color: #abefc6;
    color: var(--success);
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background: var(--success-soft);
    color: #05603a;
}

.alert {
    border-radius: var(--radius);
    border-width: 1px;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    border-color: #abefc6;
    background: var(--success-soft);
    color: #05603a;
}

.alert-danger {
    border-color: #fecdca;
    background: var(--danger-soft);
    color: #912018;
}

.alert-info {
    border-color: #bae6fd;
    background: var(--info-soft);
    color: #075985;
}

.form-label {
    margin-bottom: 6px;
    color: #344054;
    font-size: .86rem;
    font-weight: 750;
}

.form-control,
.form-select {
    min-height: 40px;
    border-color: var(--line-strong);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .94rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #84adff;
    box-shadow: 0 0 0 4px rgba(21, 94, 239, .12);
}

textarea.form-control {
    min-height: 104px;
}

.filter-bar {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.filter-bar .btn,
.action-bar .btn {
    white-space: nowrap;
}

.action-bar,
.quick-actions:not(td) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

td.quick-actions {
    white-space: nowrap;
}

td.quick-actions > a,
td.quick-actions > form {
    margin: 2px;
}

.quick-actions form {
    margin: 0;
}

.quick-actions .form-select-sm {
    min-width: 142px;
}

.table-responsive {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.table {
    margin-bottom: 0;
    color: var(--text);
    font-size: .92rem;
}

.table thead th {
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    color: #475467;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.table tbody td {
    border-color: var(--line);
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    background: #f8fbff;
}

.status-badge,
.badge {
    letter-spacing: 0;
}

.empty-state {
    border: 1px dashed var(--line-strong);
    background: linear-gradient(180deg, #fff, #fbfcfe);
}

.breadcrumb-lite {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: .84rem;
}

.breadcrumb-lite a {
    color: var(--muted);
}

.breadcrumb-lite a:hover {
    color: var(--primary);
}

.section-stack {
    display: grid;
    gap: 16px;
}

.priority-panel h3 {
    margin-bottom: 0;
}

.alert-tile {
    position: relative;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.alert-tile:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.alert-tile.is-critical {
    border-color: #fecdca;
    background: var(--danger-soft);
}

.alert-tile.is-warning,
.alert-tile.is-hot {
    border-color: #fedf89;
    background: var(--warning-soft);
}

.alert-tile.is-info {
    border-color: #bae6fd;
    background: var(--info-soft);
}

.os-form-section {
    background: var(--surface-soft);
}

.os-form-section h3 {
    color: #1d2939;
    font-size: .98rem;
}

.finance-nav {
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.audit-json {
    min-height: 180px;
    max-height: 420px;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0f172a;
    color: #e2e8f0;
    font-size: .82rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-row {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.notification-row.unread {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.notification-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf1ff;
    color: var(--primary);
    flex: 0 0 auto;
}

.notification-row-body {
    min-width: 0;
    flex: 1;
}

.notification-row-body p {
    color: var(--muted);
    margin: 6px 0 10px;
}

.file-panel .file-upload-form {
    min-width: min(100%, 620px);
}

.file-panel .input-group {
    gap: 6px;
}

.file-panel .input-group > .form-control,
.file-panel .input-group > .btn {
    border-radius: 8px !important;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.file-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.file-preview {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef2ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview i {
    font-size: 1.8rem;
}

.file-preview.pdf {
    color: #dc2626;
    background: #fef2f2;
    flex-direction: column;
    gap: 2px;
}

.file-preview.generic {
    background: #f8fafc;
    color: #475569;
    flex-direction: column;
}

.file-meta {
    min-width: 0;
}

.file-meta strong,
.file-meta span,
.file-meta small {
    display: block;
}

.file-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .95rem;
}

.file-meta span,
.file-meta small {
    color: var(--muted);
    font-size: .82rem;
    margin-top: 2px;
}

.file-actions {
    grid-column: 2;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.file-empty {
    padding: 32px 16px;
}

.agenda-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.agenda-tabs a {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
}

.agenda-tabs a.active,
.agenda-tabs a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

.agenda-list {
    display: grid;
    gap: 12px;
}

.agenda-event-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.agenda-date {
    width: 74px;
    min-height: 64px;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.agenda-date strong {
    font-size: 1rem;
}

.agenda-date span {
    color: #1e40af;
    font-size: .86rem;
}

.agenda-event-body h3 {
    margin: 0;
    font-size: 1rem;
}

.agenda-event-body p {
    margin: 5px 0 8px;
    color: var(--muted);
}

.agenda-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: .86rem;
}

.agenda-meta a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.agenda-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.agenda-mini-list {
    display: grid;
    gap: 8px;
}

.agenda-mini-list article {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.agenda-mini-list span {
    color: var(--muted);
}

.agenda-mini-list a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.timeline-panel h3 {
    font-size: 1.08rem;
}

.timeline-360-list {
    display: grid;
    gap: 12px;
    position: relative;
}

.timeline-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.timeline-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.timeline-card-body strong {
    display: block;
    color: var(--text);
    font-size: .98rem;
}

.timeline-card-body time {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.timeline-card-body p {
    margin: 5px 0 8px;
    color: #475467;
    font-size: .92rem;
}

.timeline-card-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--muted);
    font-size: .82rem;
}

.timeline-card-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.timeline-card-meta a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.timeline-blue .timeline-card-icon {
    color: #1d4ed8;
    background: #eff6ff;
}

.timeline-green .timeline-card-icon {
    color: #047857;
    background: #ecfdf3;
}

.timeline-amber .timeline-card-icon {
    color: #b45309;
    background: #fffbeb;
}

.timeline-purple .timeline-card-icon {
    color: #7c3aed;
    background: #f5f3ff;
}

.timeline-red .timeline-card-icon {
    color: #b42318;
    background: #fef3f2;
}

.timeline-slate .timeline-card-icon {
    color: #334155;
    background: #f1f5f9;
}

.timeline-gray .timeline-card-icon {
    color: #475467;
    background: #f8fafc;
}

.timeline-empty {
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: #fbfcfe;
}

@media (max-width: 1100px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .os-overview-grid,
    .alert-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .os-workbench {
        grid-template-columns: 1fr;
    }

    .finance-metrics,
    .finance-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(16,24,40,.48);
        z-index: 20;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    .login-wrap {
        grid-template-columns: 1fr;
    }

    .login-panel {
        min-height: auto;
        gap: 22px;
        padding: 24px 20px 26px;
    }

    .login-panel::before,
    .login-panel::after,
    .login-copy,
    .login-benefits {
        display: none;
    }

    .login-card {
        width: calc(100% - 32px);
        margin: 18px auto 24px;
        padding: 24px 20px;
    }

    .login-card-title {
        margin-bottom: 22px;
    }

    .login-card-title h2 {
        font-size: clamp(1.55rem, 7vw, 1.9rem);
    }

    .login-highlights {
        display: grid;
        gap: 8px;
    }

    .login-form-links {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .login-mobile-benefits {
        display: grid;
        gap: 8px;
        margin-top: 18px;
    }

    .login-mobile-benefits span {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #475569;
        font-size: .88rem;
        font-weight: 700;
    }

    .login-mobile-benefits i {
        color: var(--primary);
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .os-overview-grid,
    .alert-grid {
        grid-template-columns: 1fr;
    }

    .page-title,
    .os-title {
        align-items: stretch;
        flex-direction: column;
    }

    .os-actions {
        justify-content: stretch;
    }

    .os-actions .btn {
        flex: 1 1 160px;
    }

    .os-whatsapp-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .finance-chart {
        overflow-x: auto;
        grid-template-columns: repeat(12, 42px);
        padding-bottom: 4px;
    }

    .app-content,
    .app-header,
    .app-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .content-panel,
    .os-form-section {
        padding: 16px;
    }

    .filter-bar {
        padding: 12px;
    }

    .action-bar,
    .quick-actions:not(td) {
        justify-content: stretch;
    }

    .action-bar .btn,
    .quick-actions:not(td) .btn,
    .quick-actions:not(td) form,
    .quick-actions:not(td) .form-select-sm {
        width: 100%;
    }

    .quick-actions:not(td) form {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .table {
        min-width: 720px;
    }

    .page-title h2,
    .page-header h2 {
        font-size: 1.32rem;
    }

    .timeline-card {
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 12px;
    }

    .timeline-card-icon {
        width: 36px;
        height: 36px;
    }
}
