:root{--bg:#08111f;--panel:#111c2f;--panel2:#16243b;--line:#223554;--text:#eaf2ff;--muted:#8fa4c1;--blue:#2478ff;--green:#22c55e;--red:#ef4444;--orange:#f59e0b;--cyan:#38bdf8}*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:radial-gradient(circle at 20% 0,#123e7c 0,#08111f 38%,#060b14 100%);color:var(--text);min-height:100vh}a{color:inherit}.shell{display:flex;min-height:100vh}.side{width:250px;background:rgba(10,18,32,.82);backdrop-filter:blur(14px);border-right:1px solid var(--line);padding:22px;position:fixed;inset:0 auto 0 0}.logo{font-size:22px;font-weight:900;letter-spacing:.2px;margin-bottom:26px}.logo span{color:var(--blue)}.menu a{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--muted);padding:13px 14px;border-radius:14px;margin:6px 0;font-weight:700}.menu a:hover,.menu a.active{background:linear-gradient(135deg,#1a3765,#12223b);color:#fff}.main{margin-left:250px;width:calc(100% - 250px);padding:24px 28px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.userpill{background:rgba(255,255,255,.06);border:1px solid var(--line);padding:10px 14px;border-radius:999px;color:var(--muted)}h1{margin:0 0 5px;font-size:30px}.sub{color:var(--muted);margin:0}.grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:16px;margin:20px 0}.stat{background:linear-gradient(180deg,rgba(28,44,72,.9),rgba(15,26,45,.9));border:1px solid var(--line);border-radius:22px;padding:20px;box-shadow:0 18px 45px rgba(0,0,0,.25)}.stat b{display:block;font-size:13px;color:var(--muted);margin-bottom:14px}.stat strong{font-size:34px}.card{background:rgba(14,24,42,.9);border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:0 24px 70px rgba(0,0,0,.28);margin-bottom:18px}.card h2{margin-top:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:980px}th,td{padding:14px 13px;border-bottom:1px solid var(--line);font-size:14px;text-align:left;white-space:nowrap}th{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em;background:rgba(255,255,255,.03)}tr:hover td{background:rgba(255,255,255,.025)}.badge{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;font-weight:800;font-size:12px}.badge:before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}.running{background:rgba(34,197,94,.12);color:#56f08a}.stopped{background:rgba(239,68,68,.12);color:#ff7777}.error{background:rgba(245,158,11,.14);color:#ffc45a}.unknown{background:rgba(148,163,184,.14);color:#cbd5e1}.btn{border:0;border-radius:11px;padding:9px 13px;text-decoration:none;color:#fff;cursor:pointer;font-weight:800;display:inline-block}.btn-blue{background:linear-gradient(135deg,#2583ff,#0b5fe8)}.btn-green{background:#16a34a}.btn-red{background:#ef4444}.btn-orange{background:#f59e0b}.btn-gray{background:#475569}.actions form{display:inline}.input,select{width:100%;padding:12px 13px;border:1px solid var(--line);border-radius:13px;background:#0b1424;color:var(--text);margin:7px 0 14px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:14px}.flash{background:rgba(36,120,255,.16);border:1px solid rgba(36,120,255,.4);padding:13px 15px;border-radius:14px;margin-bottom:16px}.login{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:min(430px,100%);background:rgba(12,22,39,.9);border:1px solid var(--line);border-radius:28px;padding:30px;box-shadow:0 30px 90px rgba(0,0,0,.38)}.login-card h1{font-size:26px}.small{font-size:12px;color:var(--muted)}.danger{background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.25);color:#fecaca;padding:12px;border-radius:14px}.hero{min-height:150px;border-radius:28px;padding:28px;background:linear-gradient(135deg,rgba(37,99,235,.72),rgba(14,24,42,.35)),url('/assets/hero-bg.png');background-size:cover;background-position:center;box-shadow:0 30px 80px rgba(0,0,0,.25);border:1px solid rgba(96,165,250,.28);margin-bottom:18px}.hero h1{font-size:38px}.progress{height:9px;background:#243754;border-radius:999px;overflow:hidden;min-width:90px}.progress i{display:block;height:100%;background:linear-gradient(90deg,#38bdf8,#2478ff)}@media(max-width:900px){.side{position:relative;width:100%;height:auto}.shell{display:block}.main{margin:0;width:100%;padding:16px}.grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}}@media(max-width:520px){.grid{grid-template-columns:1fr}.hero h1{font-size:28px}}

.hero-dashboard {
    min-height: 310px;
    border-radius: 24px;
    margin: 22px 0;
    padding: 28px;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(90deg, rgba(4,12,28,.95) 0%, rgba(8,26,55,.86) 48%, rgba(5,34,85,.55) 100%),
        url('/assets/hero-bg.png') center right / cover no-repeat;
    border: 1px solid rgba(78,139,255,.28);
    box-shadow: 0 24px 70px rgba(0, 85, 255, .18);
}

.hero-dashboard:after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 110px;
    background: linear-gradient(0deg, rgba(23,107,255,.45), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.eyebrow {
    color: #8ebcff;
    margin: 0 0 8px;
    font-weight: 600;
}

.hero-dashboard h1 {
    margin: 0;
    font-size: 42px;
    letter-spacing: -1px;
}

.hero-sub {
    color: #9fb8db;
    margin-top: 10px;
    max-width: 520px;
}

.hero-stats {
    display: flex;
    gap: 14px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.hero-card {
    min-width: 150px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(12, 25, 50, .78);
    border: 1px solid rgba(85, 137, 240, .22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.hero-card span {
    display: block;
    color: #b9d1ff;
    font-size: 13px;
    margin-bottom: 8px;
}

.hero-card strong {
    display: block;
    font-size: 34px;
    line-height: 1;
}

.hero-card small {
    color: #8197b8;
}

.pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pill-running {
    background: rgba(28, 190, 99, .16);
    color: #38e28b;
    border: 1px solid rgba(56, 226, 139, .25);
}

.pill-stopped {
    background: rgba(255, 80, 80, .14);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, .25);
}

.pill-error,
.pill-unknown {
    background: rgba(255, 176, 32, .14);
    color: #ffbd4a;
    border: 1px solid rgba(255, 189, 74, .25);
}

.pill-running {
    animation: pulseRunning 1.8s infinite;
}

.pill-stopped {
    animation: pulseStopped 2.2s infinite;
}

@keyframes pulseRunning {
    0% { box-shadow: 0 0 0 0 rgba(56,226,139,.35); }
    70% { box-shadow: 0 0 0 8px rgba(56,226,139,0); }
    100% { box-shadow: 0 0 0 0 rgba(56,226,139,0); }
}

@keyframes pulseStopped {
    0% { box-shadow: 0 0 0 0 rgba(255,107,107,.3); }
    70% { box-shadow: 0 0 0 8px rgba(255,107,107,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.actions form {
    margin: 0;
}

.actions .btn {
    min-width: 38px;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0;
    font-weight: 700;
    border: 1px solid rgba(120, 170, 255, .18);
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0,0,0,.26);
    border-color: rgba(160, 200, 255, .35);
}

.actions .btn-green {
    background: linear-gradient(135deg, #1ecb73, #0f9f58);
}

.actions .btn-red {
    background: linear-gradient(135deg, #ff5a66, #d93246);
}

.actions .btn-orange {
    background: linear-gradient(135deg, #ffb02e, #f08a00);
}

.actions .btn-green::before {
    content: "▶";
    font-size: 14px;
}

.actions .btn-red::before {
    content: "■";
    font-size: 13px;
}

.actions .btn-orange::before {
    content: "↻";
    font-size: 16px;
}


.audit-active-card {
    border: 1px solid rgba(34, 197, 94, .55) !important;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, .18), 0 18px 50px rgba(34, 197, 94, .08) !important;
}

.audit-active-card h2 {
    color: #35e889;
}

.audit-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    background: rgba(148,163,184,.12);
    color: #cbd5e1;
    border: 1px solid rgba(148,163,184,.24);
}

.audit-green {
    color: #38e28b;
    background: rgba(34,197,94,.14);
    border-color: rgba(34,197,94,.35);
}

.audit-red {
    color: #ff6b6b;
    background: rgba(239,68,68,.14);
    border-color: rgba(239,68,68,.35);
}

.audit-orange {
    color: #ffbd4a;
    background: rgba(245,158,11,.14);
    border-color: rgba(245,158,11,.35);
}

.audit-gray {
    color: #cbd5e1;
    background: rgba(148,163,184,.12);
    border-color: rgba(148,163,184,.24);
}

/* Audit table wrapping */
.card {
    overflow-x: auto;
}

.card table {
    width: 100%;
    table-layout: fixed;
}

.card table th,
.card table td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.card table td.small,
.card table th:last-child,
.card table td:last-child {
    max-width: 360px;
    font-size: 12px;
    line-height: 1.45;
    color: #9fb8db;
}

.audit-active-card table td:nth-child(3),
.audit-active-card table th:nth-child(3) {
    max-width: 520px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}


/* Modern sidebar icons */
.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu a i {
    width: 20px;
    min-width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: .95;
}

.menu a span {
    display: inline-block;
}

.menu a.active i {
    color: #5aa7ff;
}

.menu a:nth-child(1) i { color: #5aa7ff; }
.menu a:nth-child(2) i { color: #38bdf8; }
.menu a:nth-child(3) i { color: #35e889; }
.menu a:nth-child(4) i { color: #c084fc; }
.menu a:nth-child(5) i { color: #f59e0b; }

.menu a.logout-link i {
    color: #fb7185;
}

