/* ============================================================
   Top Cintos · Sesmt Digital
   Design System (portado da base Lightbury, identidade Top Cintos)
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
    /* Brand — navy #002C4A + laranja de segurança #F4761A, a mesma dupla da
       tela de login e do site institucional (topcintos.com.br). */
    --sc-primary: #002C4A;
    --sc-primary-hover: #001E33;
    --sc-primary-light: #E1EAF1;
    --sc-primary-subtle: #BFD2E0;
    /* Componentes RGB para montar rgba() sem repetir o hex pelo arquivo. */
    --sc-primary-rgb: 0, 44, 74;

    --sc-secondary: #F4761A;          /* laranja da marca */
    --sc-secondary-hover: #D8620C;
    --sc-secondary-light: #FDEBDB;
    --sc-accent: #F4761A;
    --sc-accent-rgb: 244, 118, 26;

    /* Surfaces */
    --sc-bg: #f8fafc;                 /* Slate 50 */
    --sc-bg-sidebar: #001A2C;         /* navy profundo da marca */
    --sc-bg-sidebar-hover: #013A5E;
    --sc-card: #ffffff;
    --sc-card-hover: #f8fafc;

    /* Text */
    --sc-text: #334155;               /* Slate 700 */
    --sc-text-heading: #0f172a;       /* Slate 900 */
    --sc-text-light: #ffffff;
    --sc-text-muted: #64748b;         /* Slate 500 */
    --sc-text-sidebar: #94a3b8;       /* Slate 400 */
    --sc-text-sidebar-active: #ffffff;

    /* Borders & Shadows */
    --sc-border: #e2e8f0;             /* Slate 200 */
    --sc-border-light: #f1f5f9;       /* Slate 100 */
    --sc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --sc-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --sc-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --sc-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --sc-shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);

    /* Status */
    --sc-success: #16a34a;
    --sc-danger: #dc2626;
    --sc-warning: #d97706;
    --sc-info: #0891b2;

    /* Layout */
    --sc-radius: 1rem;
    --sc-radius-sm: 0.5rem;
    --sc-radius-md: 0.75rem;
    --sc-radius-lg: 1.5rem;
    --sc-sidebar-width: 260px;
    --sc-header-height: 72px;

    --sc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Dark mode ──────────────────────────────────────────── */
[data-theme="dark"] {
    --sc-bg: #0f172a;
    --sc-bg-sidebar: #00121F;
    --sc-bg-sidebar-hover: #013A5E;
    --sc-card: #1e293b;
    --sc-card-hover: #334155;

    --sc-text: #cbd5e1;
    --sc-text-heading: #f1f5f9;
    --sc-text-muted: #94a3b8;
    --sc-text-sidebar: #94a3b8;
    --sc-text-sidebar-active: #ffffff;

    --sc-border: #334155;
    --sc-border-light: #1e293b;
    --sc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --sc-shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
    --sc-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --sc-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --sc-shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #0f172a;
    border-color: var(--sc-primary);
    color: #f1f5f9;
}
[data-theme="dark"] .text-muted { color: #94a3b8 !important; }
[data-theme="dark"] .bg-white { background-color: #1e293b !important; }
[data-theme="dark"] .border-bottom { border-color: #334155 !important; }
[data-theme="dark"] .dropdown-menu {
    background-color: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .dropdown-item { color: #cbd5e1; }
[data-theme="dark"] .dropdown-item:hover { background-color: #334155; color: #f1f5f9; }
[data-theme="dark"] .modal-content { background-color: #1e293b; border-color: #334155; color: #cbd5e1; }

/* ── Base ───────────────────────────────────────────────── */
@keyframes scFadeInScale {
    from { opacity: 0; }
    to { opacity: 1; }
}

* { box-sizing: border-box; }

/* O [hidden] do HTML vale display:none pela folha do navegador, que perde para
   qualquer regra de classe com display — e várias aqui têm (.sc-notif-dropdown,
   .sc-badge-dot, .sc-notif-empty). Sem isto o dropdown do sino, o badge de não
   lidas e o estado vazio ficam visíveis para sempre, porque o JS só alterna o
   atributo. Herdado da Lightbury, que tem o mesmo sintoma. */
[hidden] { display: none !important; }

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--sc-bg);
    color: var(--sc-text);
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--sc-text-heading);
    letter-spacing: -0.015em;
}

a { color: var(--sc-primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--sc-primary-hover); }

/* ── Layout ─────────────────────────────────────────────── */
.sc-wrapper {
    display: flex;
    min-height: 100vh;
}

.sc-main {
    flex: 1;
    margin-left: var(--sc-sidebar-width);
    transition: var(--sc-transition);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sc-content {
    padding: 2.5rem;
    padding-bottom: 6rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    animation: scFadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sc-sidebar-width);
    background: var(--sc-bg-sidebar);
    color: var(--sc-text-sidebar);
    z-index: 1040;
    transition: var(--sc-transition);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}
.sc-sidebar::-webkit-scrollbar { width: 4px; }
.sc-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.sc-sidebar::-webkit-scrollbar-track { background: transparent; }

.sc-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    transition: var(--sc-transition);
    color: inherit;
}
.sc-sidebar-brand:hover { background: rgba(255,255,255,0.02); color: inherit; }

.sc-brand-logo {
    width: 44px;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.sc-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.sc-brand-text strong {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: -0.01em;
}
.sc-brand-text small {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.02em;
    margin-top: 2px;
}

.sc-nav {
    list-style: none;
    padding: 1.25rem 0.75rem;
    margin: 0;
    flex: 1;
}

.sc-nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3);
    padding: 0.75rem 0.75rem 0.5rem;
    font-weight: 600;
}

.sc-nav-item { list-style: none; }

.sc-nav-item > a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    color: var(--sc-text-sidebar);
    text-decoration: none;
    transition: var(--sc-transition);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--sc-radius-md);
    margin-bottom: 0.15rem;
    position: relative;
}

.sc-nav-item > a:hover {
    background: var(--sc-bg-sidebar-hover);
    color: var(--sc-text-light);
}

/* Item ativo em laranja: é o sinal de marca mais visível do sistema e amarra
   a sidebar à identidade da tela de login. */
.sc-nav-item > a.active {
    background: rgba(var(--sc-accent-rgb), 0.14);
    color: #FFC79A;
}

.sc-nav-item > a.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background: var(--sc-accent);
    border-radius: 0 4px 4px 0;
}

.sc-nav-item > a i {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

/* Fase 1: itens de menu ainda sem página — desabilitados com badge "em breve". */
.sc-nav-item > a.sc-nav-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.sc-nav-badge {
    margin-left: auto;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.sc-sidebar-foot {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sc-user-chip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.sc-user-chip:hover { color: inherit; }

.sc-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: var(--sc-primary-light);
    color: var(--sc-primary-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sc-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}
.sc-user-info strong {
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-user-info small {
    color: var(--sc-text-sidebar);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Header ─────────────────────────────────────────────── */
.sc-header {
    height: var(--sc-header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: var(--sc-transition);
    gap: 1rem;
}

[data-theme="dark"] .sc-header {
    background: rgba(15, 23, 42, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.sc-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.sc-header-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--sc-text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Busca global do header: apenas o gatilho visual do command palette
   (~/js/command-palette.js). O input é readonly — o clique abre o modal. */
.sc-search {
    position: relative;
    width: 320px;
    max-width: 100%;
}
.sc-search .sc-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--sc-text-muted);
    pointer-events: none;
}
.sc-search input {
    width: 100%;
    padding: 0.55rem 3.5rem 0.55rem 2.5rem;
    border-radius: 2rem;
    border: 1px solid var(--sc-border);
    background: var(--sc-border-light);
    font-size: 0.875rem;
    color: var(--sc-text);
    cursor: pointer;
    transition: var(--sc-transition);
}
.sc-search input:focus {
    outline: none;
    background: var(--sc-card);
    border-color: var(--sc-primary);
    box-shadow: 0 0 0 3px rgba(var(--sc-primary-rgb), 0.12);
}
.sc-search kbd {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--sc-border);
    border-radius: 4px;
    background: var(--sc-card);
    color: var(--sc-text-muted);
    pointer-events: none;
}

.sc-sidebar-toggle {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--sc-text-muted);
    display: none;
    cursor: pointer;
}
.sc-sidebar-toggle i { width: 1.5rem; height: 1.5rem; }

.sc-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sc-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sc-border-light);
    border: none;
    color: var(--sc-text-muted);
    cursor: pointer;
    transition: var(--sc-transition);
    position: relative;
}
.sc-icon-btn:hover {
    background: var(--sc-primary-light);
    color: var(--sc-primary);
}
.sc-icon-btn i { width: 1.15rem; height: 1.15rem; }

/* ── Page header ────────────────────────────────────────── */
.sc-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.sc-page-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.sc-page-head h1 { margin: 0 0 0.25rem; }
.sc-page-head p { margin: 0; color: var(--sc-text-muted); }
.sc-page-head .sc-btn { flex: 0 0 auto; align-self: center; }

/* ── Cards ──────────────────────────────────────────────── */
.sc-card {
    background: var(--sc-card);
    border-radius: var(--sc-radius);
    box-shadow: var(--sc-shadow);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--sc-transition);
    overflow: hidden;
    padding: 1.5rem;
}
.sc-card:hover { box-shadow: var(--sc-shadow-hover); }

.sc-card > .sc-table-wrapper,
.sc-card > .digitacao-table {
    margin: 0 -1.5rem -1.5rem;
    border-radius: 0 0 var(--sc-radius) var(--sc-radius);
}

/* Layout 2 colunas usado em telas de detalhes (lista grande à esquerda, metadados à direita) */
.sc-detalhes-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: start;
}

/* Metadados da OF: leitura horizontal no desktop e empilhamento progressivo. */
.sc-detalhes-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}
.sc-detalhes-info-grid > .sc-card { margin-bottom: 0 !important; }
.sc-detalhes-info-full { grid-column: 1 / -1; }

@media (max-width: 1050px) {
    .sc-detalhes-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .sc-detalhes-grid { grid-template-columns: 1fr; }
    .sc-detalhes-info-grid { grid-template-columns: 1fr; }
}

/* Metadados: dt/dd compactos, label cinza em cima do valor */
.sc-meta-list {
    margin: 0;
    display: grid;
    gap: 0.85rem;
}
.sc-meta-list dt {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--sc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0;
}
.sc-meta-list dd {
    margin: 0.15rem 0 0;
    font-size: 0.95rem;
    color: var(--sc-text);
}

/* Lista sem marcadores para instrumentos / itens auxiliares */
.sc-meta-list-bare {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.sc-card-header {
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sc-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--sc-text-heading);
}

.sc-card-body { padding: 1.5rem 1.75rem; }
.sc-card:has(> .sc-card-header) { padding: 0; }

[data-theme="dark"] .sc-card { border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .sc-card-header { border-bottom-color: rgba(255,255,255,0.06); }

/* ── Stat Cards ─────────────────────────────────────────── */
.sc-stat-card {
    padding: 1.5rem;
    border-radius: var(--sc-radius);
    background: var(--sc-card);
    box-shadow: var(--sc-shadow);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--sc-transition);
    position: relative;
    overflow: hidden;
}

.sc-stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--sc-primary);
}
.sc-stat-card.success::after { background: var(--sc-success); }
.sc-stat-card.danger::after { background: var(--sc-danger); }
.sc-stat-card.warning::after { background: var(--sc-warning); }
.sc-stat-card.info::after { background: var(--sc-info); }

.sc-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sc-shadow-hover);
}

.sc-stat-card .sc-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--sc-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-hover));
    box-shadow: 0 4px 12px rgba(var(--sc-primary-rgb), 0.25);
    margin-bottom: 1rem;
}
.sc-stat-card .sc-stat-icon i { width: 1.5rem; height: 1.5rem; }
.sc-stat-card.success .sc-stat-icon { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25); }
.sc-stat-card.danger .sc-stat-icon { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25); }
.sc-stat-card.warning .sc-stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25); }
.sc-stat-card.info .sc-stat-icon { background: linear-gradient(135deg, #06b6d4, #0891b2); box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25); }

.sc-stat-card .sc-stat-label {
    font-size: 0.85rem;
    color: var(--sc-text-muted);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.sc-stat-card .sc-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sc-text-heading);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* ── Tables ─────────────────────────────────────────────── */
.sc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.sc-table thead th {
    background: rgba(248, 250, 252, 0.5);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sc-text-muted);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--sc-border);
    text-align: left;
}

.sc-table tbody td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--sc-border-light);
    vertical-align: middle;
    font-size: 0.875rem;
    color: var(--sc-text);
}

.sc-table tbody tr { transition: var(--sc-transition); }
.sc-table tbody tr:hover { background: var(--sc-card-hover); }
.sc-table tbody tr:last-child td { border-bottom: none; }

[data-theme="dark"] .sc-table thead th {
    background-color: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}
[data-theme="dark"] .sc-table tbody td { border-color: #1e293b; color: #cbd5e1; }
[data-theme="dark"] .sc-table tbody tr:hover { background-color: #334155; }

.sc-table-wrapper {
    overflow-x: auto;
    border-radius: var(--sc-radius-md);
    border: 1px solid var(--sc-border);
    background: var(--sc-card);
}

.sc-table .row-warning td { background: rgba(217, 119, 6, 0.06); }
.sc-table .row-danger td { background: rgba(220, 38, 38, 0.06); }

/* ── Badges ─────────────────────────────────────────────── */
.sc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    gap: 0.3rem;
}
.sc-badge.success { background: #dcfce7; color: #15803d; }
.sc-badge.danger { background: #fee2e2; color: #991b1b; }
.sc-badge.warning { background: #fef3c7; color: #92400e; }
.sc-badge.info { background: var(--sc-primary-light); color: var(--sc-primary); }
.sc-badge.muted { background: #f1f5f9; color: #475569; }

/* ── Buttons ────────────────────────────────────────────── */
.sc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    border-radius: var(--sc-radius-md);
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--sc-transition);
    text-decoration: none;
    line-height: 1.25;
    background: transparent;
    color: var(--sc-text);
}

.sc-btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8125rem; }
.sc-btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

.sc-btn-primary {
    background: var(--sc-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(var(--sc-primary-rgb), 0.2);
}
.sc-btn-primary:hover {
    background: var(--sc-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--sc-primary-rgb), 0.35);
}

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

.sc-btn-ghost {
    background: transparent;
    color: var(--sc-text);
    border-color: transparent;
}
.sc-btn-ghost:hover { background: var(--sc-border-light); }

.sc-btn-danger { background: var(--sc-danger); color: #fff; }
.sc-btn-danger:hover { background: #b91c1c; color: #fff; }

.sc-btn i { width: 1rem; height: 1rem; }

/* ── Toast ──────────────────────────────────────────────── */
.sc-toast {
    padding: 0.85rem 1.25rem;
    background: var(--sc-card);
    border-left: 4px solid var(--sc-primary);
    border-radius: var(--sc-radius-sm);
    box-shadow: var(--sc-shadow-md);
    margin-bottom: 1.5rem;
    color: var(--sc-text);
    font-size: 0.9rem;
}

/* ── Footer ─────────────────────────────────────────────── */
.sc-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--sc-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--sc-text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ── Forms ──────────────────────────────────────────────── */
.sc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.sc-field { display: flex; flex-direction: column; gap: 0.35rem; }
.sc-field label {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--sc-text-muted);
}
.sc-field > input,
.sc-field > select,
.sc-field > textarea {
    height: 42px;
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius-sm);
    padding: 0 0.85rem;
    background: var(--sc-card);
    color: var(--sc-text);
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--sc-transition);
}
.sc-field > textarea { height: auto; min-height: 88px; padding: 0.7rem 0.85rem; }
.sc-field > input:focus,
.sc-field > select:focus,
.sc-field > textarea:focus {
    outline: none;
    border-color: var(--sc-primary);
    box-shadow: 0 0 0 3px rgba(var(--sc-primary-rgb), 0.15);
}
.sc-form-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--sc-border);
}

/* ── KPI cards ──────────────────────────────────────────── */
.sc-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.sc-kpi {
    position: relative;
    padding: 1.25rem 1.35rem;
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius-md);
    overflow: hidden;
    box-shadow: var(--sc-shadow-sm);
    transition: var(--sc-transition);
}
.sc-kpi:hover { box-shadow: var(--sc-shadow-hover); transform: translateY(-2px); }
.sc-kpi::before {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--sc-primary), var(--sc-info));
}
.sc-kpi .label {
    font-size: 0.72rem;
    color: var(--sc-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}
.sc-kpi .value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.35rem;
    color: var(--sc-text-heading);
}
.sc-kpi .sub {
    font-size: 0.72rem;
    color: var(--sc-text-muted);
    margin-top: 0.25rem;
}
.sc-kpi.warn::before { background: var(--sc-warning); }
.sc-kpi.danger::before { background: var(--sc-danger); }
.sc-kpi.success::before { background: var(--sc-success); }

/* ── Skeleton ───────────────────────────────────────────── */
.sc-skeleton {
    background: linear-gradient(90deg, var(--sc-border-light) 0%, var(--sc-border) 50%, var(--sc-border-light) 100%);
    background-size: 200% 100%;
    animation: scShimmer 1.4s infinite;
    border-radius: 6px;
}
@keyframes scShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ── Empty state ────────────────────────────────────────── */
.sc-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--sc-text-muted);
}
.sc-empty svg { margin-bottom: 0.75rem; width: 84px; height: 84px; opacity: 0.5; }
.sc-empty h3 { margin: 0 0 0.35rem; color: var(--sc-text); font-weight: 600; font-size: 1rem; }

/* ── Chips ──────────────────────────────────────────────── */
.sc-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--sc-border-light);
    color: var(--sc-text-muted);
}
.sc-chip.success { background: #dcfce7; color: #166534; }
.sc-chip.danger  { background: #fee2e2; color: #991b1b; }
.sc-chip.warning { background: #fef3c7; color: #92400e; }
.sc-chip.info    { background: var(--sc-primary-light); color: var(--sc-primary); }

[data-theme="dark"] .sc-chip.success { background: rgba(22, 163, 74, 0.2); color: #86efac; }
[data-theme="dark"] .sc-chip.danger  { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }
[data-theme="dark"] .sc-chip.warning { background: rgba(217, 119, 6, 0.2); color: #fcd34d; }
[data-theme="dark"] .sc-chip.info    { background: rgba(90, 130, 180, 0.22); color: #a9c4e4; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .sc-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sc-wrapper.sc-sidebar-open .sc-sidebar {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0,0,0,0.4);
    }
    .sc-main { margin-left: 0; }
    .sc-sidebar-toggle { display: inline-flex; }
    .sc-content { padding: 1.5rem; }
    .sc-header { padding: 0 1.25rem; }
    .sc-search { width: auto; flex: 1; }
}

@media (max-width: 576px) {
    .sc-footer { padding: 1rem 1.25rem; }
    .sc-header-title { font-size: 0.85rem; }
    .sc-search kbd { display: none; }
}

/* ── Autenticação (Login / Acesso negado) ───────────────── */
/* Bloco enxuto — a origem (Lightbury) usava um split-screen que não foi
   portado; aqui é um card único centrado sobre o fundo da aplicação. */
.sc-auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background:
        radial-gradient(900px 480px at 80% -10%, var(--sc-primary-light), transparent),
        var(--sc-bg);
}
.sc-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    box-shadow: var(--sc-shadow-md);
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.sc-auth-brand-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--sc-text-heading);
}
.sc-auth-brand-title em {
    font-style: normal;
    color: var(--sc-primary);
    font-weight: 600;
}
.sc-auth-brand-sub { margin: 0.25rem 0 0; color: var(--sc-text-muted); font-size: 0.875rem; }
.sc-auth-form { display: flex; flex-direction: column; gap: 1rem; }
.sc-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.sc-form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    color: var(--sc-text-muted);
}
.sc-form-check input { accent-color: var(--sc-primary); }
.sc-link-disabled {
    color: var(--sc-text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}
.sc-link-disabled:hover { color: var(--sc-text-muted); }
.sc-btn-block { width: 100%; justify-content: center; }
.sc-alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--sc-radius-sm);
    font-size: 0.85rem;
    border: 1px solid var(--sc-border);
}
.sc-alert i { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.sc-alert.danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}
[data-theme="dark"] .sc-alert.danger {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.35);
    color: #fca5a5;
}
.sc-auth-foot-note { margin: 0; font-size: 0.8rem; color: var(--sc-text-muted); text-align: center; }
.sc-login-demo {
    font-size: 0.78rem;
    color: var(--sc-text-muted);
    background: var(--sc-border-light);
    border-radius: var(--sc-radius-sm);
    padding: 0.75rem 0.9rem;
    line-height: 1.7;
}
.sc-login-demo code { color: var(--sc-primary); }
.sc-auth-page-foot { font-size: 0.78rem; color: var(--sc-text-muted); }
.sc-auth-denied-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: var(--sc-danger);
}
.sc-auth-denied-icon i { width: 2rem; height: 2rem; }
[data-theme="dark"] .sc-auth-denied-icon { background: rgba(220, 38, 38, 0.15); }
.sc-auth-denied-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

/* ── Logout (chip do usuário na sidebar) ────────────────── */
.sc-logout-btn {
    color: var(--sc-text-sidebar);
    border-radius: var(--sc-radius-sm);
    padding: 0.45rem;
    display: inline-flex;
    transition: var(--sc-transition);
    background: transparent;
    border: none;
    cursor: pointer;
}
.sc-logout-btn:hover { color: var(--sc-danger); background: rgba(220, 38, 38, 0.1); }
.sc-logout-btn i { width: 1.15rem; height: 1.15rem; }

/* ─────────────────────────────────────────────────────────────────────────────
   Blocos restaurados da origem Lightbury para as páginas de Cadastros
   (Fase 2): variantes de alerta, dropzone de upload, hint/tooltip, campo
   derivado, prévia da logo e paginação.
   ──────────────────────────────────────────────────────────────────────────── */

/* Variantes de alerta além de .danger (já definido acima) */
.sc-alert.info { background: var(--sc-primary-light); color: var(--sc-primary-hover); border: 1px solid rgba(var(--sc-primary-rgb), 0.2); }
.sc-alert.warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.sc-alert.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
[data-theme="dark"] .sc-alert.info { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.35); color: #93c5fd; }
[data-theme="dark"] .sc-alert.warning { background: rgba(217, 119, 6, 0.15); border-color: rgba(217, 119, 6, 0.35); color: #fcd34d; }
[data-theme="dark"] .sc-alert.success { background: rgba(22, 163, 74, 0.15); border-color: rgba(22, 163, 74, 0.35); color: #86efac; }

/* Dropzone para upload de arquivo (drag & drop) */
.sc-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 150px;
    padding: 1.25rem 1rem;
    border: 2px dashed var(--sc-border);
    border-radius: var(--sc-radius-md);
    background: var(--sc-card);
    cursor: pointer;
    text-align: center;
    transition: var(--sc-transition);
}
.sc-dropzone:hover,
.sc-dropzone.is-dragover {
    border-color: var(--sc-primary);
    background: rgba(var(--sc-primary-rgb), 0.04);
}
.sc-dropzone.is-dragover {
    box-shadow: 0 0 0 4px rgba(var(--sc-primary-rgb), 0.10);
}
.sc-dropzone-input {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    border: 0;
}
.sc-dropzone-icon {
    width: 38px;
    height: 38px;
    color: var(--sc-text-muted);
    margin-bottom: 0.15rem;
}
.sc-dropzone:hover .sc-dropzone-icon,
.sc-dropzone.is-dragover .sc-dropzone-icon {
    color: var(--sc-primary);
}
.sc-dropzone-title {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--sc-text);
}
.sc-dropzone-sub {
    font-size: 0.8rem;
    color: var(--sc-text-muted);
}
.sc-dropzone-chips {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.3rem;
}
.sc-dropzone-chip {
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--sc-border-light, rgba(148, 163, 184, 0.15));
    border: 1px solid var(--sc-border);
    color: var(--sc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.sc-dropzone-file {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--sc-primary);
    word-break: break-all;
}
[data-theme="dark"] .sc-dropzone {
    background: #0f172a;
    border-color: #334155;
}
[data-theme="dark"] .sc-dropzone:hover,
[data-theme="dark"] .sc-dropzone.is-dragover {
    background: #1e293b;
}

/* ---------------------------------------------------------------------------
   Seletor de cor com estado vazio de verdade.

   O <input type="color"> nativo nunca fica vazio: sem valor ele mostra preto, e
   o usuário não distingue "não escolhi" de "escolhi preto". Aqui o valor real
   mora num hidden ([data-cor-valor]) e o input nativo vira só o seletor —
   invisível, cobrindo o quadro. Sem escolha, o quadro fica hachurado.
   Uso e comportamento: wwwroot/js/cor-swatch.js.
   --------------------------------------------------------------------------- */
.sc-cor {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.sc-cor-swatch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--sc-border);
    background: var(--cor, transparent);
    cursor: pointer;
    flex: none;
}
.sc-cor-swatch:focus-within {
    outline: 2px solid var(--sc-primary);
    outline-offset: 2px;
}
/* Estado vazio: borda tracejada + hachura diagonal, para não parecer preto. */
.sc-cor-swatch[data-vazio] {
    border-style: dashed;
    background: repeating-linear-gradient(
        135deg,
        transparent 0 5px,
        var(--sc-border) 5px 6px
    );
}
/* O seletor nativo cobre o quadro inteiro, invisível: o clique cai nele. */
.sc-cor-swatch input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    opacity: 0;
    cursor: pointer;
}
.sc-cor-legenda {
    font-size: 0.78rem;
    color: var(--sc-text-muted);
}
.sc-cor-legenda[data-erro] {
    color: var(--sc-danger, #b91c1c);
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Ícone de ajuda ao lado do label, com tooltip no hover/foco.
   Uso: <label>Texto <span class="sc-hint" data-hint="explicação" tabindex="0">
   --------------------------------------------------------------------------- */
.sc-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    margin-left: 5px;
    border-radius: 50%;
    border: 1px solid var(--sc-border);
    color: var(--sc-text-muted);
    font-size: 0.62rem;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    cursor: help;
    position: relative;
    vertical-align: middle;
    transition: var(--sc-transition);
}
.sc-hint::before { content: "i"; }
.sc-hint:hover,
.sc-hint:focus-visible {
    border-color: var(--sc-primary);
    color: var(--sc-primary);
    outline: none;
}
/* O balão vive no <body> e é posicionado por wwwroot/js/hints.js. */
.sc-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1080;
    width: max-content;
    max-width: 300px;
    padding: 0.5rem 0.65rem;
    border-radius: var(--sc-radius-sm);
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.sc-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}
.sc-tooltip::after {
    content: "";
    position: absolute;
    left: var(--seta, 50%);
    margin-left: -5px;
    border: 5px solid transparent;
}
.sc-tooltip:not(.is-below)::after {
    top: 100%;
    border-top-color: #0f172a;
}
.sc-tooltip.is-below::after {
    bottom: 100%;
    border-bottom-color: #0f172a;
}
[data-theme="dark"] .sc-tooltip {
    background: #1e293b;
    border: 1px solid #334155;
}
[data-theme="dark"] .sc-tooltip:not(.is-below)::after { border-top-color: #1e293b; }
[data-theme="dark"] .sc-tooltip.is-below::after { border-bottom-color: #1e293b; }

/* Campo somente leitura que exibe um valor travado ou derivado pelo sistema. */
.sc-field-derivado {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 42px;
    padding: 0 0.85rem;
    border: 1px dashed var(--sc-border);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-bg-subtle, rgba(148, 163, 184, 0.08));
    color: var(--sc-text);
    font-size: 0.875rem;
    overflow: hidden;
}
.sc-field-derivado i {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    color: var(--sc-text-muted);
}
.sc-field-derivado span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Prévia da logo já enviada, acima do dropzone de substituição. */
.sc-logo-atual {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.6rem;
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-card);
}
.sc-logo-atual img {
    max-height: 48px;
    max-width: 160px;
    object-fit: contain;
}
.sc-logo-atual-titulo {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--sc-text-muted);
    margin-bottom: 0.3rem;
}

/* ── Digitação (grade de inspeção) ──────────────────────────
   Restaurado da origem Lightbury e adaptado: a grade não tem mais inputs de
   corrente (ensaio elétrico) — aqui são o select Aprovado/Reprovado e o campo
   de observação. Paleta navy da marca (#002C4A). */
.digitacao-table input[type="text"] {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--sc-text);
}
.digitacao-table input[type="text"]:focus {
    outline: none;
    border-color: var(--sc-primary);
    background: var(--sc-primary-light);
    box-shadow: 0 0 0 3px rgba(var(--sc-primary-rgb), 0.12);
}
[data-theme="dark"] .digitacao-table input[type="text"]:focus {
    background: rgba(90, 130, 180, 0.15);
}
.digitacao-table .sel-resultado {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--sc-border);
    cursor: pointer;
    font-weight: 600;
    padding: 0.3rem 1.4rem 0.3rem 0.6rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}
.digitacao-table .sel-resultado:focus {
    outline: none;
    border-color: var(--sc-primary);
    box-shadow: 0 0 0 3px rgba(var(--sc-primary-rgb), 0.12);
}

/* ── Pagination ─────────────────────────────────────────── */
.sc-pager-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.sc-pager-info {
    color: var(--sc-text-muted);
    font-size: 0.78rem;
}
.sc-pager-info strong { color: var(--sc-text); font-weight: 600; }
.sc-pager {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.sc-pager-wrap > .sc-pager { margin-top: 0; }
.sc-pager a,
.sc-pager > span {
    padding: 0.4rem 0.7rem;
    border-radius: var(--sc-radius-sm);
    border: 1px solid var(--sc-border);
    font-size: 0.78rem;
    color: var(--sc-text-muted);
    background: var(--sc-card);
}
.sc-pager a:hover { background: var(--sc-card-hover); }
.sc-pager .active {
    background: var(--sc-primary);
    color: #fff;
    border-color: var(--sc-primary);
}

/* ── Validate portal (validação pública de certificados) ── */
.sc-validate-card { max-width: 680px; margin: 2rem auto; }
.sc-validate-head {
    text-align: center;
    padding: 1.6rem 1.25rem;
    background: linear-gradient(135deg, var(--sc-primary), var(--sc-info));
    color: #fff;
    border-radius: var(--sc-radius-lg) var(--sc-radius-lg) 0 0;
}
.sc-validate-head h1 { margin: 0 0 0.25rem; font-size: 1.4rem; color: #fff; }
.sc-validate-big { text-align: center; padding: 1.4rem; }
.sc-validate-big .tag {
    display: inline-block;
    padding: 0.65rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.05em;
}

/* ── Notificações (sino do header + dropdown) — portado da Lightbury ── */
.sc-badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--sc-danger);
    color: #fff;
    border-radius: 9px;
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sc-notif-container {
    position: relative;
}

.sc-notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    box-shadow: var(--sc-shadow-lg);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sc-notif-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sc-border-light);
    font-size: 0.95rem;
    color: var(--sc-text-heading);
}

.sc-notif-link-btn {
    background: none;
    border: 0;
    color: var(--sc-primary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.sc-notif-link-btn:hover { text-decoration: underline; }

.sc-notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 360px;
}

.sc-notif-item {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--sc-border-light);
    transition: background 0.15s;
}

.sc-notif-item:hover { background: var(--sc-card-hover); }
.sc-notif-item--lida { opacity: 0.6; }

.sc-notif-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.sc-notif-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-notif-icon i {
    width: 18px;
    height: 18px;
}

.sc-notif-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sc-notif-body strong {
    font-size: 0.875rem;
    color: var(--sc-text-heading);
    line-height: 1.2;
}

.sc-notif-msg {
    font-size: 0.8125rem;
    color: var(--sc-text);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sc-notif-ago {
    font-size: 0.7rem;
    color: var(--sc-text-muted);
}

.sc-notif-dismiss {
    flex-shrink: 0;
    background: none;
    border: 0;
    color: var(--sc-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    align-self: flex-start;
}

.sc-notif-dismiss:hover { background: var(--sc-border-light); color: var(--sc-text-heading); }
.sc-notif-dismiss i { width: 14px; height: 14px; }

.sc-notif-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--sc-text-muted);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sc-notif-empty i { width: 28px; height: 28px; opacity: 0.6; }

/* ── Requisitos de senha (ResetPassword / Minha Conta) — portado da Lightbury ── */
.sc-account-pwhints {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    font-size: 0.75rem;
    color: var(--sc-text-muted);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem 0.85rem;
}
.sc-account-pwhints li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.sc-account-pwhints li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sc-text-muted);
    opacity: 0.55;
    flex-shrink: 0;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.sc-account-pwhints li.is-valid { color: var(--sc-success); }
.sc-account-pwhints li.is-valid::before {
    background: var(--sc-success);
    opacity: 1;
}
.sc-account-pwhints li.is-invalid { color: var(--sc-danger); }
.sc-account-pwhints li.is-invalid::before {
    background: var(--sc-danger);
    opacity: 1;
}

@media (max-width: 576px) {
    .sc-account-pwhints { grid-template-columns: 1fr; }
    .sc-notif-dropdown { width: calc(100vw - 32px); right: -8px; }
}
