:root {
    --bg: #0b1220;
    --panel: #172235;
    --panel2: #111a2b;
    --text: #e5eefc;
    --muted: #91a4bf;
    --line: #2a3a55;
    --blue: #38bdf8;
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family:
        Inter,
        Segoe UI,
        Arial,
        sans-serif;
    background: linear-gradient(135deg, #07101d, #0b1728);
    color: var(--text);
}
a {
    color: inherit;
}
.app-shell {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 260px;
    background: #0d1626;
    border-right: 1px solid var(--line);
    padding: 28px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
}
.logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #1687f2;
    display: grid;
    place-items: center;
    font-weight: 800;
}
.brand span,
.sidebar-footer span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}
.sidebar nav a {
    display: block;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 12px;
    color: #cbd5e1;
    margin-bottom: 8px;
}
.sidebar nav a:hover {
    background: #13243a;
    color: #fff;
}
.sidebar-footer {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}
.sidebar-footer a {
    display: block;
    margin-top: 14px;
    color: #cbd5e1;
    text-decoration: none;
}
.main-content {
    margin-left: 260px;
    padding: 32px;
    width: calc(100% - 260px);
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--blue);
    font-weight: 700;
    font-size: 12px;
}
h1 {
    font-size: 34px;
    margin: 6px 0 0;
}
.live-pill,
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    background: #0b3b2a;
    color: #86efac;
    border: 1px solid #166534;
    font-weight: 700;
    font-size: 13px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat-card,
.panel {
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
}
.stat-card span,
.stat-card small,
.panel p {
    color: var(--muted);
}
.stat-card strong {
    display: block;
    font-size: 30px;
    margin: 10px 0;
}
.stat-card.success strong {
    color: var(--green);
}
.stat-card.danger strong {
    color: var(--red);
}
.stat-card.warning strong {
    color: var(--orange);
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
    margin-bottom: 16px;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.panel h2 {
    margin: 0 0 4px;
    font-size: 20px;
}
.table-wrap {
    overflow: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.data-table th {
    color: #9fb1ca;
    font-size: 13px;
}
.data-table small {
    color: var(--muted);
}
.badge.online {
    background: #06351f;
    color: #86efac;
    border-color: #166534;
}
.badge.offline {
    background: #3a1010;
    color: #fecaca;
    border-color: #7f1d1d;
}
.badge.warning {
    background: #3c2705;
    color: #fde68a;
    border-color: #92400e;
}
.form-card {
    max-width: 1200px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.form-grid label {
    display: block;
    color: #cbd5e1;
    font-weight: 600;
}
.form-grid input,
.form-grid select,
textarea {
    width: 100%;
    margin-top: 6px;
    background: #0b1220;
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
}
.btn {
    background: #1687f2;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}
.btn.secondary {
    background: #26364f;
}
.btn.danger {
    background: #b91c1c;
}
.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.notice {
    padding: 12px 16px;
    border-radius: 12px;
    background: #0b3b2a;
    border: 1px solid #166534;
    color: #bbf7d0;
    margin-bottom: 14px;
}
@media (max-width: 1100px) {
    .stats-grid,
    .dashboard-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        width: 100%;
    }
    .app-shell {
        display: block;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(59,130,246,.4);

    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;

    transition: all .2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37,99,235,.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #fff;
    border: 1px solid rgba(59,130,246,.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37,99,235,.35);
}
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.action-buttons a {
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-info {
    background: #0b3b2a;
    color: #6fffb0;
    border: 1px solid #1d8f63;
}

.btn-info:hover {
    background: #125c42;
}

.btn-secondary {
    background: #1f2937;
    color: #fff;
    border: 1px solid #374151;
}

.btn-secondary:hover {
    background: #374151;
}

.btn-danger {
    background: #4a1010;
    color: #ff8a8a;
    border: 1px solid #7f1d1d;
}

.btn-danger:hover {
    background: #6b1515;
}
.action-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    align-items: flex-start !important;
}

.action-buttons a,
.action-buttons .btn-info,
.action-buttons .btn-secondary,
.action-buttons .btn-danger {
    display: inline-block !important;
    text-decoration: none !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.btn-info {
    background: #0ea5e9 !important;
    color: #ffffff !important;
}

.btn-secondary {
    background: #334155 !important;
    color: #ffffff !important;
}

.btn-danger {
    background: #dc2626 !important;
    color: #ffffff !important;
}
