/* Sentinel web dashboard — trimmed from the Sentinel UI mockup's design tokens. */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #EF4444;
    --accent-b: #FF5D5D;
    --accent-d: rgba(239, 68, 68, 0.14);
    --success: #39D07A;
    --danger: #EF4444;

    --bg: #0D0D10;
    --side: #0A0A0D;
    --panel: #16161B;
    --hover: #1D1D24;
    --tx: #E9E9EE;
    --tx2: #9A9AA5;
    --tx3: #65656F;

    --l07: rgba(255, 255, 255, 0.07);
    --l13: rgba(255, 255, 255, 0.13);

    --card-radius: 7px;
    --btn-radius: 5px;
    --row-height: 44px;
    --section-pad: 22px;
    --sidebar-width: 200px;
    --ease-out: 140ms ease-out;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Mulish', 'Muli', sans-serif;
    background: var(--bg);
    color: var(--tx);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ─── SIDEBAR ─── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--side);
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 28px 0 20px 0;
    border-right: 1px solid var(--l07);
    user-select: none;
}

.sidebar-brand, .brand {
    padding: 0 24px 32px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.wordmark {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--tx);
}
.wordmark span {
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    height: var(--row-height);
    border-radius: var(--btn-radius);
    color: var(--tx2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background var(--ease-out), color var(--ease-out);
    position: relative;
}

.sidebar-nav a .nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav a:hover {
    background: var(--hover);
    color: var(--tx);
}

.sidebar-nav a.active {
    background: var(--accent-d);
    color: var(--accent);
}

.sidebar-footer {
    padding: 16px 24px 0 24px;
    border-top: 1px solid var(--l07);
    margin-top: 8px;
    font-size: 12px;
    color: var(--tx3);
}

/* ─── MAIN ─── */
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 28px 40px 40px 40px;
    position: relative;
    z-index: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--l07);
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.page-header h1 small {
    font-weight: 400;
    font-size: 14px;
    color: var(--tx2);
    margin-left: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions .avatar {
    border-radius: 50%;
    display: block;
}

.status-label {
    font-size: 13px;
    color: var(--tx2);
    font-weight: 500;
}

/* ─── STATS ─── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--panel);
    border-radius: var(--card-radius);
    padding: 18px 20px;
    border: 1px solid transparent;
    transition: background var(--ease-out), transform var(--ease-out);
}

.stat-card:hover {
    background: var(--hover);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--tx3);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.accent-stat {
    color: var(--accent);
}

/* ─── SECTION CARD ─── */
.section-card {
    background: var(--panel);
    border-radius: var(--card-radius);
    padding: var(--section-pad);
    margin-bottom: 24px;
    border: 1px solid var(--l07);
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-accent {
    color: var(--accent);
}

/* ─── LICENCE LIST ─── */
.licence-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.licence-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: var(--btn-radius);
    background: var(--bg);
    border: 1px solid var(--l07);
}

.licence-key {
    font-family: 'Mulish', monospace;
    font-size: 13px;
    color: var(--tx);
}

.licence-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.licence-expiry {
    font-size: 12px;
    color: var(--tx3);
}

/* ─── ADMIN ─── */
.flash {
    background: var(--accent-d);
    color: var(--tx);
    border: 1px solid var(--l07);
    border-radius: var(--btn-radius);
    padding: 10px 16px;
    font-size: 13px;
    margin-bottom: 20px;
}

.create-form, .inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-input {
    background: var(--bg);
    border: 1px solid var(--l07);
    border-radius: var(--btn-radius);
    color: var(--tx);
    font-family: inherit;
    font-size: 13px;
    padding: 0 12px;
    height: 34px;
}

.mini-input:focus {
    outline: none;
    border-color: var(--l13);
}

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

.admin-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--tx3);
    padding: 8px 10px;
    border-bottom: 1px solid var(--l07);
}

.admin-table td {
    padding: 10px;
    border-bottom: 1px solid var(--l07);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-actions {
    white-space: nowrap;
}

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

.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: capitalize;
}

.badge-success {
    background: rgba(57, 208, 122, 0.16);
    color: var(--success);
}

.badge-danger {
    background: var(--accent-d);
    color: var(--danger);
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    height: var(--row-height);
    border-radius: var(--btn-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background var(--ease-out), transform var(--ease-out), box-shadow var(--ease-out);
    background: var(--l07);
    color: var(--tx);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    background: var(--l13);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-b);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

/* ─── LANDING ─── */
.landing-body {
    align-items: center;
    justify-content: center;
}

.landing-card {
    position: relative;
    z-index: 1;
    background: var(--panel);
    border: 1px solid var(--l07);
    border-radius: var(--card-radius);
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
    max-width: 360px;
}

.landing-card .brand {
    padding: 0;
}

.landing-card .tagline {
    color: var(--tx2);
    font-size: 14px;
}

.btn-discord {
    width: 100%;
}

.text-accent {
    color: var(--accent);
}
.text-muted {
    color: var(--tx2);
    font-size: 13px;
}

code {
    background: var(--bg);
    border: 1px solid var(--l07);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 60px;
    }
    .sidebar-brand .wordmark, .sidebar-footer {
        display: none;
    }
    .sidebar-brand {
        padding: 0 16px 24px 16px;
        justify-content: center;
    }
    .sidebar-nav a span:not(.nav-icon) {
        display: none;
    }
    .sidebar-nav a {
        justify-content: center;
        padding: 0;
    }
    .main {
        padding: 20px 18px 30px 18px;
    }
    .stats-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
