:root {
    --icaft: #0b4f6c;
    --icaft-dark: #073b52;
    --icaft-accent: #16a3a3;
    --sidebar-w: 250px;
}

body { background: #eef2f5; }
a { cursor: pointer; }

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--icaft) 0%, var(--icaft-dark) 60%, #05293a 100%);
    padding: 1rem;
}
.login-card { background: #fff; border-radius: 16px; padding: 2.25rem; width: 100%; max-width: 400px; }
.brand-badge {
    width: 62px; height: 62px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    background: var(--icaft); color: #fff; font-size: 1.9rem;
}

/* ---------- Shell ---------- */
.topbar { background: var(--icaft); height: 54px; position: sticky; top: 0; z-index: 1030; }
.layout { display: flex; min-height: calc(100vh - 54px); }
.sidebar {
    width: var(--sidebar-w); background: var(--icaft-dark); color: #cfe3ea;
    display: flex; flex-direction: column; position: sticky; top: 54px; height: calc(100vh - 54px);
    overflow-y: auto; flex-shrink: 0;
}
.sidebar .nav-link {
    color: #cfe3ea; border-radius: 8px; padding: .55rem .8rem; margin-bottom: 2px;
    display: flex; align-items: center; gap: .65rem; font-size: .9rem;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .nav-link.active { background: var(--icaft-accent); color: #fff; font-weight: 600; }
.sidebar .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: #6d97a8; padding: .8rem .8rem .25rem; }
.content { flex: 1; padding: 1.4rem; overflow-x: hidden; min-width: 0; }

@media (max-width: 992px) {
    .sidebar { position: fixed; left: 0; z-index: 1040; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: translateX(0); }
}

/* ---------- UI bits ---------- */
.page-title { font-weight: 700; color: var(--icaft-dark); }
.stat-card { border: none; border-radius: 12px; }
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: 10px; display:flex; align-items:center; justify-content:center; font-size:1.3rem; }
.stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .78rem; color: #6c757d; }
.card { border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: #6c757d; }
.table td { vertical-align: middle; font-size: .88rem; }
.badge-nivel-Público { background:#198754; }
.badge-nivel-Interno { background:#0d6efd; }
.badge-nivel-Reservado { background:#fd7e14; }
.badge-nivel-Confidencial { background:#dc3545; }

/* CCD tree */
.ccd-tree { font-size: .9rem; }
.ccd-tree details { margin-left: .4rem; }
.ccd-tree summary { cursor: pointer; padding: .25rem 0; }
.ccd-node-sec { font-weight: 700; color: var(--icaft-dark); }
.ccd-node-dep { font-weight: 600; color: var(--icaft); }
.ccd-node-serie { color: #0d6efd; }
.ccd-leaf { margin-left: 2.2rem; color: #555; padding: .1rem 0; }

.wf-steps { display:flex; flex-wrap:wrap; gap:.35rem; }
.wf-step { padding:.15rem .5rem; border-radius: 20px; font-size:.75rem; background:#e9ecef; color:#555; }
.wf-step.done { background:#198754; color:#fff; }
.wf-step.current { background:var(--icaft-accent); color:#fff; font-weight:600; }
.code-pill { font-family: ui-monospace, monospace; font-size: .8rem; background:#eef2f5; padding:.1rem .4rem; border-radius:5px; }
.hash-mono { font-family: ui-monospace, monospace; font-size: .72rem; word-break: break-all; color:#6c757d; }
