.user-mini {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    border: 1px solid #f1f1f1;
    border-radius: 100px;
    flex-direction: row-reverse;
    background: #f7f7f7;
}:root {
    --bg0: #f5f7fb;
    --bg1: #ffffff;

    --card: #ffffff;
    --card2: #ffffff;

    --line: rgba(15, 23, 42, .10);
    --text: #0f172a;
    --muted: #64748b;

    --blue: #2563eb;   
    --blue2: #0ea5e9; 

    --good: #16a34a;  
    --warn: #f59e0b; 
    --bad: #ef4444;

    --r1: 14px;
    --r2: 18px;

    --shadow: 0 10px 26px rgba(15, 23, 42, .08);
    --shadow2: 0 6px 14px rgba(15, 23, 42, .07);

    --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    font-family: 'Calibri';
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1100px 520px at 14% 0%, rgba(37, 99, 235, .06), transparent 56%),
        radial-gradient(900px 520px at 86% 10%, rgba(245, 158, 11, .06), transparent 58%),
        var(--bg0);
}

/* ---------- LAYOUT ---------- */
.app {
    display: flex;
    min-height: 100vh
}

.sidebar {
    width: 330px;
    padding: 14px;
    border-right: 1px solid var(--line);
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}

    .sidebar.collapsed {
        width: 78px
    }

        .sidebar.collapsed .sb-title,
        .sidebar.collapsed .sb-item span:not(.sb-ico),
        .sidebar.collapsed .sb-sub {
            display: none
        }

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-title {
    margin: 0;
    font-size: 34px;
    letter-spacing: -.5px
}

.main {
    padding: 22px;
    display: grid;
    gap: 16px;
    background: radial-gradient(1100px 520px at 14% 0%, rgba(37, 99, 235, .06), transparent 56%), radial-gradient(900px 520px at 86% 10%, rgba(245, 158, 11, .06), transparent 58%), var(--bg0);
}

/* ---------- SIDEBAR ---------- */
.sb-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px 16px
}

.sb-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: url(../img/favicon.png);
    background-size: cover;
    box-shadow: var(--shadow2);
    filter: invert(1);
    font-weight: 900;
}

.sb-title .sb-name {
    font-weight: 900;
    line-height: 1.05
}

.sb-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px
}

.sb-toggle {
    margin-left: auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15,23,42,.03);
    color: var(--text);
    cursor: pointer;
    display: none;
}

    .sb-toggle:hover {
        background: rgba(15,23,42,.06)
    }

.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px
}

.sb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    color: var(--text);
    text-decoration: none;
    background: transparent;
}
.sb-item:hover {
    background: rgba(15,23,42,.04);
    border-color: rgba(15,23,42,.10);
}
.sb-item.danger:hover {
    background: rgba(239,68,68,.06);
    border-color: rgba(239,68,68,.20);
}

.sb-ico {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(15,23,42,.05);
    color: var(--text);
}

/* ---------- USER MINI ---------- */
.user-mini {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    border: 1px solid #f1f1f1;
    border-radius: 100px;
    flex-direction: row-reverse;
    background: #f7f7f7;
}

.user-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #00f359;
    box-shadow: 0 0 0 4px rgb(0 255 29 / 14%);
}

.user-name {
    font-weight: 800;
    text-align: right
}

.user-email {
    font-size: 12px;
    color: var(--muted);
    text-align: right
}

/* ---------- COMPONENTS ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

[class^="col-"],
[class*=" col-"]{
    min-width: 0;
}
.col-1{ grid-column: span 1; }
.col-2{ grid-column: span 2; }
.col-3{ grid-column: span 3; }
.col-4{ grid-column: span 4; }
.col-5{ grid-column: span 5; }
.col-6{ grid-column: span 6; }
.col-7{ grid-column: span 7; }
.col-8{ grid-column: span 8; }
.col-9{ grid-column: span 9; }
.col-10{ grid-column: span 10; }
.col-11{ grid-column: span 11; }
.col-12{ grid-column: span 12; }

@media (max-width: 980px){
  .col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{ grid-column: span 12; }
}

.card {
    grid-column: span 12;
    border: 1px solid var(--line);
    border-radius: var(--r2);
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-hd {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    background: rgba(15,23,42,.015);
}

.card-bd {
    padding: 16px 18px
}

.h2 {
    font-size: 18px;
    font-weight: 900;
    margin-top: 2px
}

.muted {
    color: var(--muted)
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(15,23,42,.03);
    font-size: 12px;
    white-space: nowrap;
    color: var(--text);
}
.pill.warn {
    border-color: rgba(245,158,11,.35);
    background: rgba(245,158,11,.14);
}
.pill.aberto {
    border-color: rgba(37,99,235,.30);
    background: rgba(37,99,235,.16);
}
.pill.ocorrencia {
    border-color: rgba(245,158,11,.35);
    background: rgba(245,158,11,.16);
}
.pill.aguardando {
    border-color: rgba(234,88,12,.30);
    background: rgba(234,88,12,.14);
}
.pill.finalizado {
    border-color: rgba(22,163,74,.30);
    background: rgba(22,163,74,.14);
}

.quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: .15s ease;
    box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
.btn:hover {
    transform: translateY(-1px);
    background: rgb(234 234 234 / 15%);
    color: #bbbbbb;
}

.btn-primary {
    border-color: rgba(15,23,42,.18);
    background: #111827;
    color: #ffffff;
}
.btn-primary:hover{ background: #0b1220; }

.btn-sm {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12px
}

.alert {
    border-radius: 16px;
    padding: 14px 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
}

.alert-warn {
    border-color: rgba(245,158,11,.30);
    background: rgba(245,158,11,.10);
}


.risk-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:.85rem;
  border:1px solid rgba(0,0,0,.10);
}
.risk-badge::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
  box-shadow:0 0 0 3px rgba(0,0,0,.04) inset;
}

/* cores “vivas” do risco */
.risk-badge.azul{ background:rgba(59,130,246,.18); color:#1d4ed8; border-color:rgba(29,78,216,.22); }
.risk-badge.azul::before{ background:#3b82f6; }

.risk-badge.verde{ background:rgba(34,197,94,.18); color:#15803d; border-color:rgba(21,128,61,.22); }
.risk-badge.verde::before{ background:#22c55e; }

.risk-badge.amarelo{ background:rgba(245,158,11,.20); color:#b45309; border-color:rgba(180,83,9,.22); }
.risk-badge.amarelo::before{ background:#f59e0b; }

.risk-badge.vermelho{ background:rgba(239,68,68,.18); color:#b91c1c; border-color:rgba(185,28,28,.22); }
.risk-badge.vermelho::before{ background:#ef4444; }

.risk-badge.cinza{ background:rgba(148,163,184,.16); color:#475569; border-color:rgba(71,85,105,.18); }
.risk-badge.cinza::before{ background:#94a3b8; }

/* ---------- FORMS (área logada) ---------- */
.main label{
    display:block;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    margin: 2px 0 6px;
}

.main input,
.main select,
.main textarea{
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
    outline: none;
}

.main input::placeholder,
.main textarea::placeholder{
    color: #94a3b8;
    opacity: 1;
}

.main input:focus,
.main select:focus,
.main textarea:focus{
    border-color: rgba(15,23,42,.25);
    box-shadow: 0 0 0 5px rgba(15,23,42,.08);
}

.hr{
    height: 1px;
    background: rgba(15,23,42,.10);
    border: 0;
    margin: 16px 0;
}

/* ---------- STATS ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px
}

.stat {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15,23,42,.04);
}

.stat-k {
    font-size: 12px;
    color: var(--muted)
}

.stat-v {
    font-size: 26px;
    font-weight: 900;
    margin-top: 4px
}

/* ---------- TABLE ---------- */
.table-wrap {
    width: 100%;
    overflow: auto;
    border-radius: 16px;
    border: 1px solid var(--line)
}

.table,
.table-wrap table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1200px;
}

    .table thead th,
    .table-wrap table thead th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        border-bottom: 1px solid var(--line);
        padding: 14px 16px;
        font-size: 12.5px;
        text-align: left;
        white-space: nowrap;
    }

    .table tbody td,
    .table-wrap table tbody td {
        border-bottom: 1px solid rgba(15,23,42,.06);
        padding: 14px 16px;
        font-size: 13.5px;
        line-height: 1.35;
        white-space: nowrap;
    }

    .table tbody tr:hover,
    .table-wrap table tbody tr:hover {
        background: rgba(15,23,42,.03)
    }

/* Tabela específica: Chamados (SAMU / Meus) */
.table-chamados {
    min-width: 1280px;
}

.table-chamados .col-retirado,
.table-chamados .col-destino {
    white-space: normal;
    min-width: 260px;
    max-width: 520px;
}

.table-chamados .col-data {
    width: 170px;
}

.table-chamados .col-id {
    width: 70px;
}

.table-chamados .col-risco {
    width: 140px;
}

.table-chamados .col-acao {
    width: 140px;
}

/* ---------- BADGE (ID / RISCO) ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(15,23,42,.03);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .01em;
    color: var(--text);
}

.badge.azul,
.badge.verde,
.badge.amarelo,
.badge.vermelho,
.badge.cinza{
    justify-content: flex-start;
    gap: 8px;
    padding: 7px 12px;
    font-weight: 900;
    border: 1px solid rgba(15,23,42,.12);
}
.badge.azul::before,
.badge.verde::before,
.badge.amarelo::before,
.badge.vermelho::before,
.badge.cinza::before{
    content:'';
    width:8px;
    height:8px;
    border-radius:999px;
    display:inline-block;
    box-shadow: 0 0 0 4px rgba(100,116,139,.18);
}

/* cores vivas (fallback para páginas antigas que ainda usam .badge.color) */
.badge.azul{ border-color: rgba(37,99,235,.28); background: rgba(37,99,235,.16); color:#1d4ed8; }
.badge.azul::before{ background:#2563eb; box-shadow:0 0 0 4px rgba(37,99,235,.22); }

.badge.verde{ border-color: rgba(22,163,74,.28); background: rgba(22,163,74,.14); color:#166534; }
.badge.verde::before{ background:#16a34a; box-shadow:0 0 0 4px rgba(22,163,74,.22); }

.badge.amarelo{ border-color: rgba(245,158,11,.32); background: rgba(245,158,11,.16); color:#92400e; }
.badge.amarelo::before{ background:#f59e0b; box-shadow:0 0 0 4px rgba(245,158,11,.24); }

.badge.vermelho{ border-color: rgba(239,68,68,.30); background: rgba(239,68,68,.16); color:#991b1b; }
.badge.vermelho::before{ background:#ef4444; box-shadow:0 0 0 4px rgba(239,68,68,.22); }

.badge.cinza{ border-color: rgba(100,116,139,.22); background: rgba(100,116,139,.10); color:#334155; }
.badge.cinza::before{ background:rgba(100,116,139,.65); box-shadow:0 0 0 4px rgba(100,116,139,.18); }


/* ---------- STATUS (cores por status) ---------- */
.status-badge,
.st-pill{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(15,23,42,.03);
    color: var(--text);
    white-space: nowrap;

}
.status-badge::before,
.st-pill::before{
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(100,116,139,.55);
    box-shadow: 0 0 0 4px rgba(100,116,139,.18);
}

.st-open{
    border-color: rgba(37,99,235,.28);
    background: rgba(37,99,235,.16);
    color: #1d4ed8;
    text-transform: uppercase;
}
.st-open::before{ background:#2563eb; box-shadow:0 0 0 4px rgba(37,99,235,.22); }

.st-occ{
    border-color: rgba(245,158,11,.32);
    background: rgba(245,158,11,.20);
    color: #92400e;
    text-transform: uppercase;
}
.st-occ::before{ background:#f59e0b; box-shadow:0 0 0 4px rgba(245,158,11,.24); }

.st-wait{
    border-color: rgba(234,88,12,.28);
    background: rgba(234,88,12,.18);
    color: #9a3412;
    text-transform: uppercase;
}
.st-wait::before{ background:#ea580c; box-shadow:0 0 0 4px rgba(234,88,12,.22); }

.st-done{
    border-color: rgba(22,163,74,.28);
    background: rgba(22,163,74,.18);
    color: #166534;
    text-transform: uppercase;
}
.st-done::before{ background:#16a34a; box-shadow:0 0 0 4px rgba(22,163,74,.22); }

.st-neutral{
    border-color: rgba(100,116,139,.22);
    background: rgba(100,116,139,.10);
    color: #334155;
}
.st-neutral::before{ background:rgba(100,116,139,.65); box-shadow:0 0 0 4px rgba(100,116,139,.18); }

/* compat: páginas antigas usam .btn.small.primary */
.btn.small { padding: 8px 10px; border-radius: 12px; font-size: 12px; }
.btn.primary {
    border-color: rgba(15,23,42,.18);
    background: #0f172a;
    color: #ffffff;
}
.btn.ok {
    border-color: rgba(22,163,74,.25);
    background: rgba(22,163,74,.12);
    color: #14532d;
}
.btn.danger {
    border-color: rgba(239,68,68,.25);
    background: rgba(239,68,68,.10);
    color: #7f1d1d;
}

/* ---------- ROW ACTIONS (listas/tabelas) ---------- */
.row-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}


.form-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding-top: 8px;
    flex-wrap: wrap;
}


.main textarea{
    resize: vertical;
    min-height: 110px;
}

.main textarea[rows="4"]{ min-height: 110px; }
.main textarea[rows="3"]{ min-height: 86px; }

/* ---------- CIDS ---------- */
.cids-top{
    display:grid;
    grid-template-columns: 1.15fr .85fr;
    gap:16px;
}
@media (max-width: 980px){
    .cids-top{ grid-template-columns: 1fr; }
}

.cids-form .hint{
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.table.table-cids,
.table-wrap table.table-cids{
    min-width: 860px;
}

.table-cids .col-codigo{ width: 120px; }
.table-cids .col-acoes{ width: 220px; }
.table-cids td.col-desc{ white-space: normal; min-width: 420px; }

.muted-sm{ color: var(--muted); font-size: 12px; }
.btn.ghost{ background: rgba(255,255,255,.03); }


/* ---------- CHAMADO DETALHE (ver/editar) ---------- */
.ch-hero{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    width:100%;
}
.ch-hero .sub{
    margin-top:10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 980px;
}
@media (max-width: 980px){
    .ch-hero{flex-direction:column; align-items:stretch;}
    .ch-hero .sub{white-space: normal; max-width: 100%;}
}

.view-grid{
    display:grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.vcard{
    grid-column: span 6;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.92);
    box-shadow: 0 8px 18px rgba(15,23,42,.06);
    overflow:hidden;
}
.vcard.full{grid-column: span 12;}
.vcard .hd{
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(15,23,42,.015);
    font-weight: 900;
    font-family: 'Calibri';
}
.vcard .bd{ padding: 12px 14px; }

.kv{
    display:grid;
    grid-template-columns: 220px 1fr;
    gap: 10px 14px;
    font-family: 'Calibri';
}
.kv .k{
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    font-family: 'Calibri';
}
.kv .v{
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    word-break: break-word;
    font-family: 'Calibri';
}
@media (max-width: 840px){
    .vcard{grid-column: span 12;}
    .kv{ grid-template-columns: 1fr; }
}

/* ---------- Autocomplete (CID) ---------- */
.ac{ position: relative; }
.ac-list{
    position:absolute;
    left:0;
    right:0;
    top: calc(100% + 6px);
    z-index: 1000;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.14);
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 44px rgba(15,23,42,.16);
    overflow: auto;
    max-height: 280px;
    display:none;
}
.ac-item{
    display:flex;
    gap:12px;
    padding: 10px 12px;
    cursor:pointer;
    border-bottom: 1px solid rgba(15,23,42,.06);
}
.ac-item:last-child{ border-bottom:0; }
.ac-item:hover{ background: rgba(15,23,42,.03); }
.ac-code{
    min-width: 64px;
    font-weight: 900;
    color: var(--text);
}
.ac-desc{
    color: #475569;
    font-size: 12px;
    line-height: 1.25;
}
.ac-empty{
    padding: 10px 12px;
    color: var(--muted);
    font-size: 12px;
}


/* ---------- TOOLTIP "i" ---------- */
.info-ico {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(15,23,42,.03);
    color: #334155;
    font-weight: 900;
    cursor: help;
}

.tip {
    position: fixed;
    z-index: 9999;
    max-width: 380px;
    padding: 12px 12px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.12);
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(15,23,42,.16);
    pointer-events: none;
    color: var(--text);
}

    .tip .t {
        font-weight: 900;
        margin-bottom: 6px
    }

    .tip .d {
        font-size: 12px;
        color: #475569;
        line-height: 1.35
    }

    .tip.verde {
        border-color: rgba(34,197,94,.35)
    }

    .tip.azul {
        border-color: rgba(42,168,255,.35)
    }

    .tip.amarelo {
        border-color: rgba(245,158,11,.35)
    }

    .tip.laranja {
        border-color: rgba(245,158,11,.35)
    }

    .tip.vermelho {
        border-color: rgba(239,68,68,.35)
    }

/* ---------- PAGINA LOGIN ---------- */

body.auth-page {
    color: #0f172a;
    background: url(../img/background_fuabc.png);
    background-size: cover;
    height: 100vh;
    background-position: bottom;
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
}

.auth-card {
    width: min(450px, 100%);
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 18px 60px rgba(15, 23, 42, .10);
    padding: 20px;
    overflow: hidden;
    transition: max-height .22s ease, box-shadow .22s ease, transform .22s ease;
    min-height: 550px;
}

body.auth-page[data-auth-view="forgot"] .auth-card {
    max-height: 690px;
}

.auth-hero {
    margin-bottom: 18px;
}

.auth-app {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 2.1px;
}

.auth-app-sub {
    margin-top: 2px;
    font-size: 20px;
    letter-spacing: 10px;
    text-transform: uppercase;
    color: red;
    font-weight: 800;
}

.auth-desc {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.6;
    color: #475569;
}

.auth-body {
    display: block;
}


.auth-pane[hidden] {
    display: none !important;
}

.auth-pane {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.auth-field label {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.auth-field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 15px;
    color: #334155;
    caret-color: #0f172a;
    opacity: 1;
    -webkit-text-fill-color: #8a8a8a;
    outline: none;
    transition: .15s ease;
}

.auth-field input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #334155 !important;
    transition: background-color 999999s ease-in-out 0s;
    caret-color: #0f172a;
}

.auth-field input:focus {
    border-color: rgba(15, 23, 42, .25);
    box-shadow: 0 0 0 5px rgba(15, 23, 42, .08);
}

.auth-cloudflare {
    margin: 6px 0 2px;
}

.auth-cloudflare-box {
    height: 74px;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 800;
    font-size: 13px;
}

.auth-btn {
    width: 100%;
    border-radius: 16px;
    padding: 14px 16px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: .15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-btn-primary {
    background: #0f172a;
    color: #ffffff;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .18);
}

.auth-btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0;
}

.auth-btn-secondary:hover {
    transform: translateY(-1px);
    background: #eef2f7;
}

.auth-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0 4px;
}

.auth-forgot-title {
    font-weight: 900;
    color: #0f172a;
}

.auth-help {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin: 10px;
    text-align: center;
}

.auth-alert {
    border-radius: 16px;
    padding: 14px 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
}

.auth-alert-title {
    font-weight: 900;
    margin-bottom: 6px;
}

.auth-alert ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.auth-alert-error {
    border-color: rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .06);
}

.auth-alert-ok {
    border-color: rgb(0 255 94 / 25%);
    background: rgb(13 255 0 / 19%);
    margin: 10px 0;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 22px;
        border-radius: 20px;
    }
    .auth-app {
        font-size: 34px;
    }
}

/* =========================================================
   MODAL (popup de visualização do chamado no dashboard)
   ========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

    .modal.is-open {
        display: block;
    }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 700px at 30% 10%, rgba(0,160,237,.18), transparent 60%), radial-gradient(900px 600px at 80% 30%, rgba(120,90,255,.12), transparent 55%), rgba(0,0,0,.60);
    backdrop-filter: blur(8px);
}

.modal-dialog {
    position: relative;
    width: min(1060px, calc(100vw - 28px));
    height: min(86vh, 880px);
    margin: 18px auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(10,18,36,.98), rgba(8,14,28,.98));
    box-shadow: 0 40px 120px rgba(0,0,0,.70), inset 0 1px 0 rgba(255,255,255,.06);
    transform: translateY(14px) scale(.99);
    opacity: 0;
    transition: .18s ease;
}

.modal.is-open .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-hd {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(10,18,36,.98), rgba(10,18,36,.86));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.modal-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .2px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.modal-sub {
    margin-top: 6px;
    font-size: 13px;
    opacity: .86;
    line-height: 1.35;
}

.modal-x {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    font-size: 20px;
}

    .modal-x:hover {
        background: rgba(255,255,255,.10);
        transform: translateY(-1px);
    }

.modal-bd {
    padding: 16px 18px 18px;
    overflow: auto;
}

    /* scrollbar (Chrome/Edge) */
    .modal-bd::-webkit-scrollbar {
        width: 10px;
    }

    .modal-bd::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.12);
        border-radius: 999px;
        border: 2px solid rgba(0,0,0,0);
        background-clip: padding-box;
    }

        .modal-bd::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,.18);
        }

.modal-ft {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(0deg, rgba(10,18,36,.98), rgba(10,18,36,.86));
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* topo dentro do body */
.modal-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

/* chips */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    font-size: 12px;
    font-weight: 800;
    opacity: .95;
}

    .chip .dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: rgba(255,255,255,.35);
    }

    /* status colors */
    .chip.status-aberto {
        border-color: rgba(52,152,219,.28);
    }

        .chip.status-aberto .dot {
            background: rgba(52,152,219,.95);
        }

    .chip.status-ocorrencia {
        border-color: rgba(241,196,15,.28);
    }

        .chip.status-ocorrencia .dot {
            background: rgba(241,196,15,.95);
        }

    .chip.status-aguardando {
        border-color: rgba(155,89,182,.28);
    }

        .chip.status-aguardando .dot {
            background: rgba(155,89,182,.95);
        }

    .chip.status-finalizado {
        border-color: rgba(46,204,113,.28);
    }

        .chip.status-finalizado .dot {
            background: rgba(46,204,113,.95);
        }

    /* risco */
    .chip.risco-verde {
        border-color: rgba(46,204,113,.28);
    }

        .chip.risco-verde .dot {
            background: rgba(46,204,113,.95);
        }

    .chip.risco-laranja {
        border-color: rgba(243,156,18,.28);
    }

        .chip.risco-laranja .dot {
            background: rgba(243,156,18,.95);
        }

    .chip.risco-vermelho {
        border-color: rgba(231,76,60,.28);
    }

        .chip.risco-vermelho .dot {
            background: rgba(231,76,60,.95);
        }

/* grid em cards */
.modal-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 14px;
}

.panel {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(15,23,42,.03);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    overflow: hidden;
}

.panel-hd {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.panel-title {
    font-weight: 900;
    letter-spacing: .2px;
    font-size: 13px;
    opacity: .95;
}

.panel-bd {
    padding: 12px 14px;
}

/* lista key/value bonita */
.kv {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 10px 14px;
    align-items: start;
}

    .kv dt {
        opacity: .78;
        font-size: 12.5px;
    }

    .kv dd {
        margin: 0;
        font-size: 13px;
        white-space: pre-wrap;
    }

/* separador suave */
.hr-soft {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 12px 0;
}


.modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .modal-table th, .modal-table td {
        padding: 10px 10px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        vertical-align: top;
    }

    .modal-table th {
        text-align: left;
        font-size: 12px;
        opacity: .85;
        font-weight: 900;
    }

    .modal-table tr:hover td {
        background: rgba(255,255,255,.03);
    }

@media (max-width: 880px) {
    .modal-dialog {
        height: min(90vh, 920px);
    }

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

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

        .kv dt {
            font-weight: 900;
            opacity: .92;
        }
}


/* ---------- RESPONSIVO ---------- */
@media (max-width: 980px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 50;
        transform: translateX(0)
    }

    .content {
        margin-left: 0
    }

    .page-title {
        font-size: 26px
    }

    .stats {
        grid-template-columns: repeat(2,1fr)
    }
}


.card{
  background:#ffffff;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
}
.card-hd{
  background:#fbfcfe;
}
.btn,
.btn.primary,
.btn.btn-primary,
.btn.btn-sm{
  min-height:42px;
  font-weight:800;
}

.btn,
.btn.btn-sm{
  color:#0f172a;
}

.btn-primary, .btn.primary, .btn.btn-primary {
    background: #0032a9;
    color: #ffffff;
    border-color: #184cc8;
}

.btn-primary:hover, .btn.primary:hover, .btn.btn-primary:hover {
    color: #ffffff;
    background: #0943cc;
}

.main input,
.main select,
.main textarea{
  background:#ffffff;
  color:#0f172a;
  border:1px solid rgba(15,23,42,.14);
  min-height:48px;
}

.main input[disabled],
.main select[disabled],
.main textarea[disabled]{
  background:#f8fafc;
  color:#0f172a;
  opacity:1;
}
.main select option{
  color:#0f172a;
  background:#ffffff;
}
.main input[type="password"]{
  letter-spacing:.03em;
}
.h2{margin:0;}
.form-actions .btn + .btn,
.quick .btn + .btn,
.row-actions .btn + .btn,
.row-actions form + .btn,
.row-actions form + form{margin-left:0;}
.row-actions form{margin:0;}
.status-badge.st-neutral{ text-transform:none; }

/* ===== Timeline ===== */
.timeline-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
}
.timeline-modal.is-open{ display:block; }
.timeline-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.32);
  backdrop-filter:blur(6px);
}
.timeline-modal-dialog{
  position:relative;
  width:min(1200px, calc(100vw - 28px));
  max-height:min(90vh, 920px);
  margin:18px auto;
  border-radius:24px;
  border:1px solid rgba(15,23,42,.10);
  background:#ffffff;
  box-shadow:0 32px 90px rgba(15,23,42,.18);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.timeline-modal-hd{
  padding:16px 18px;
  border-bottom:1px solid rgba(15,23,42,.10);
  background:#fbfcfe;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.timeline-modal-title{
  font-size:20px;
  font-weight:900;
}
.timeline-modal-sub{
  margin-top:6px;
  color:#64748b;
  font-size:13px;
  line-height:1.4;
}
.timeline-modal-bd{
  padding:20px;
  overflow:auto;
  background:#ffffff;
}
.timeline-shell{
  overflow:auto;
  padding-bottom:8px;
  margin-bottom:20px;
  height: 400px;
  align-content: center;
}
.timeline-track{
  display:flex;
  align-items:center;
  min-width:max-content;
  padding:110px 40px 110px;
  position:relative;
}
.timeline-track::before{
  content:"";
  position:absolute;
  left:40px;
  right:40px;
  top:50%;
  height:4px;
  background:#d7dee8;
  transform:translateY(-50%);
  border-radius:999px;
}
.timeline-node{
  position:relative;
  width:260px;
  min-width:260px;
  flex:0 0 260px;
  display:flex;
  justify-content:center;
}
.timeline-card{
  position:absolute;
  width:220px;
  border:1px solid rgba(15,23,42,.12);
  border-radius:22px;
  background:#ffffff;
  padding:12px 14px;
  text-align:center;
  box-shadow:0 10px 26px rgba(15,23,42,.08);
}
.timeline-node.top .timeline-card{ bottom:42px; }
.timeline-node.bottom .timeline-card{ top:42px; }
.timeline-person{
  font-size:12px;
  font-weight:900;
  color:#475569;
  text-transform:uppercase;
}
.timeline-date{
  font-size:12px;
  color:#64748b;
  margin-top:4px;
}
.timeline-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:10px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  font-size:12px;
  font-weight:900;
}
.timeline-text{
  margin-top:8px;
  font-size:12px;
  color:#334155;
  line-height:1.4;
}
.timeline-stem{
  position:absolute;
  width:2px;
  height:34px;
  background:#cbd5e1;
}
.timeline-node.top .timeline-stem{ top:50%; margin-top:-34px; }
.timeline-node.bottom .timeline-stem{ top:50%; }
.timeline-dot{
  position:relative;
  z-index:2;
  width:18px;
  height:18px;
  border-radius:999px;
  border:4px solid #ffffff;
  box-shadow:0 0 0 2px #cbd5e1;
  background:#94a3b8;
}
.timeline-card.blue,.timeline-badge.blue{ border-color:rgba(37,99,235,.22); }
.timeline-badge.blue{ background:rgba(37,99,235,.12); color:#1d4ed8; }
.timeline-dot.blue{ background:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.24); }
.timeline-card.green,.timeline-badge.green{ border-color:rgba(22,163,74,.22); }
.timeline-badge.green{ background:rgba(22,163,74,.12); color:#166534; }
.timeline-dot.green{ background:#16a34a; box-shadow:0 0 0 2px rgba(22,163,74,.24); }
.timeline-card.yellow,.timeline-badge.yellow{ border-color:rgba(245,158,11,.22); }
.timeline-badge.yellow{ background:rgba(245,158,11,.14); color:#92400e; }
.timeline-dot.yellow{ background:#f59e0b; box-shadow:0 0 0 2px rgba(245,158,11,.24); }
.timeline-card.red,.timeline-badge.red{ border-color:rgba(239,68,68,.22); }
.timeline-badge.red{ background:rgba(239,68,68,.12); color:#991b1b; }
.timeline-dot.red{ background:#ef4444; box-shadow:0 0 0 2px rgba(239,68,68,.24); }
.timeline-card.gray,.timeline-badge.gray{ border-color:rgba(100,116,139,.20); }
.timeline-badge.gray{ background:rgba(148,163,184,.14); color:#334155; }
.timeline-dot.gray{ background:#94a3b8; box-shadow:0 0 0 2px rgba(148,163,184,.24); }
.timeline-info-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:16px;
}
.timeline-info-card{
  border:1px solid rgba(15,23,42,.10);
  border-radius:20px;
  background:#ffffff;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
  overflow:hidden;
}
.timeline-info-title{
  padding:12px 14px;
  border-bottom:1px solid rgba(15,23,42,.10);
  background:#fbfcfe;
  font-weight:900;
}
.timeline-mini-row{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:12px;
  padding:10px 14px;
  border-bottom:1px solid rgba(15,23,42,.06);
}
.timeline-mini-row:last-child{ border-bottom:0; }
.timeline-mini-label{
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.timeline-mini-value{
  color:#0f172a;
  font-size:13px;
  line-height:1.45;
  word-break:break-word;
}
.timeline-empty{
  padding:16px;
  border:1px dashed rgba(15,23,42,.16);
  border-radius:16px;
  color:#64748b;
  text-align:center;
  background:#f8fafc;
}

@media (max-width: 980px){
  .timeline-info-grid{ grid-template-columns:1fr; }
  .timeline-mini-row{ grid-template-columns:1fr; }
  .timeline-modal-dialog{ width:min(100vw - 16px, 1200px); margin:8px auto; }
  .timeline-modal-bd{ padding:14px; }
  .timeline-track{ padding:40px 22px 20px; }
  .timeline-track::before{ left:30px; right:30px; top:72px; }
  .timeline-node{ width:230px; min-width:230px; flex-basis:230px; }
  .timeline-card{ position:relative; width:200px; bottom:auto !important; top:auto !important; margin-bottom:20px; }
  .timeline-node{ flex-direction:column; }
  .timeline-stem{ height:20px; top:auto !important; margin:0 !important; }
}
