/* ============================================================================
   admin.css — jFluxOS Admin Panel
   "C:\WINDOWS\SYSTEM32\admin.exe"
   Dark hacker aesthetic with Win98 chrome
   ============================================================================ */

/* --- CSS Variables --- */
:root {
    --adm-bg: #0d1117;
    --adm-bg-alt: #161b22;
    --adm-bg-card: #1c2129;
    --adm-bg-input: #0d1117;
    --adm-text: #c9d1d9;
    --adm-text-dim: #8b949e;
    --adm-text-bright: #f0f6fc;
    --adm-green: #4ADE80;
    --adm-green-dim: #22c55e;
    --adm-green-dark: #166534;
    --adm-green-glow: rgba(74, 222, 128, 0.15);
    --adm-red: #f85149;
    --adm-red-dark: #7f1d1d;
    --adm-yellow: #e3b341;
    --adm-blue: #58a6ff;
    --adm-teal: #2dd4bf;
    --adm-border: #30363d;
    --adm-border-light: #484f58;
    /* Win98 bevel colors */
    --w98-light: #DFDFDF;
    --w98-mid: #C0C0C0;
    --w98-dark: #808080;
    --w98-shadow: #404040;
    --w98-title-from: #000080;
    --w98-title-to: #1084d0;
    /* Sizing */
    --adm-radius: 0;
    --adm-font: Consolas, 'Courier New', monospace;
    --adm-transition: 150ms ease;
}

/* ============================================================================
   1. OVERLAY
   ============================================================================ */
/* Kein Backdrop — transparenter Container, Klicks fallen durch */
#admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    pointer-events: none;
}
#admin-overlay.active,
#admin-overlay.admin-visible {
    display: block;
}

/* ============================================================================
   2. MAIN WINDOW — schwebt frei, zentriert als Startposition
   ============================================================================ */
#admin-win {
    width: 90vw;
    max-width: 1400px;
    height: 85vh;
    max-height: 900px;
    background: var(--adm-bg);
    color: var(--adm-text);
    font-family: var(--adm-font);
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    /* Frei schwebend, per JS per drag verschiebbar */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: all;
    overflow: hidden;
    /* Win98 outset border */
    border-top: 2px solid var(--w98-light);
    border-left: 2px solid var(--w98-light);
    border-right: 2px solid var(--w98-shadow);
    border-bottom: 2px solid var(--w98-shadow);
    box-shadow:
        inset 1px 1px 0 var(--w98-mid),
        inset -1px -1px 0 var(--w98-dark),
        0 8px 32px rgba(0, 0, 0, 0.6);
}

/* CRT scan-line overlay */
#admin-win::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    mix-blend-mode: multiply;
}

/* ============================================================================
   3. TITLEBAR
   ============================================================================ */
.admin-titlebar {
    display: flex;
    align-items: center;
    height: 28px;
    min-height: 28px;
    padding: 0 3px;
    background: linear-gradient(90deg, var(--w98-title-from), var(--w98-title-to));
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    font-family: var(--adm-font);
    letter-spacing: 0.5px;
    user-select: none;
    cursor: default;
    position: relative;
    z-index: 11;
}

.admin-titlebar-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    image-rendering: pixelated;
}

.admin-titlebar-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 2px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.admin-titlebar-buttons {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

.admin-titlebar-btn {
    width: 18px;
    height: 16px;
    background: var(--w98-mid);
    border-top: 1px solid var(--w98-light);
    border-left: 1px solid var(--w98-light);
    border-right: 1px solid var(--w98-shadow);
    border-bottom: 1px solid var(--w98-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-family: var(--adm-font);
    color: #000;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.admin-titlebar-btn:active {
    border-top: 1px solid var(--w98-shadow);
    border-left: 1px solid var(--w98-shadow);
    border-right: 1px solid var(--w98-light);
    border-bottom: 1px solid var(--w98-light);
}

/* ============================================================================
   4. TABS — Win98 Property Sheet Style
   ============================================================================ */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 6px 8px 0 8px;
    background: var(--adm-bg);
    border-bottom: 2px solid var(--w98-mid);
    position: relative;
    z-index: 11;
}

.admin-tab {
    padding: 4px 14px 5px;
    font-family: var(--adm-font);
    font-size: 12px;
    color: var(--adm-text-dim);
    background: var(--adm-bg-alt);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    position: relative;
    top: 2px;
    /* Win98 tab bevel — inactive */
    border-top: 2px solid var(--w98-mid);
    border-left: 2px solid var(--w98-mid);
    border-right: 2px solid var(--w98-dark);
    border-bottom: none;
    border-radius: 0;
    margin-right: 1px;
    transition: color var(--adm-transition), background var(--adm-transition);
}

.admin-tab:hover {
    color: var(--adm-green);
    background: var(--adm-bg-card);
}

.admin-tab.active {
    color: var(--adm-green);
    background: var(--adm-bg);
    /* Merge with content area below */
    border-top: 2px solid var(--w98-light);
    border-left: 2px solid var(--w98-light);
    border-right: 2px solid var(--w98-shadow);
    border-bottom: 2px solid var(--adm-bg);
    margin-bottom: -2px;
    padding-bottom: 7px;
    z-index: 2;
}

/* ============================================================================
   5. CONTENT AREA
   ============================================================================ */
.admin-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    position: relative;
    z-index: 1;
}

.admin-tab-pane {
    display: none;
    animation: adm-pane-in 200ms ease;
}

.admin-tab-pane.active {
    display: block;
}

@keyframes adm-pane-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.admin-section-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--adm-green);
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--adm-border);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-section-title::before {
    content: '> ';
    color: var(--adm-green-dim);
}

/* ============================================================================
   6. STAT CARDS — Dashboard
   ============================================================================ */
.admin-stat-grid, .admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background: var(--adm-bg-card);
    border: 1px solid var(--adm-border);
    padding: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: border-color var(--adm-transition), box-shadow var(--adm-transition);
}

.admin-stat-card:hover {
    border-color: var(--adm-green);
    box-shadow: 0 0 12px var(--adm-green-glow);
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--adm-green), transparent);
    opacity: 0;
    transition: opacity var(--adm-transition);
}

.admin-stat-card:hover::before {
    opacity: 1;
}

.admin-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--adm-green);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px var(--adm-green-glow);
}

.admin-stat-label {
    font-size: 11px;
    color: var(--adm-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

.admin-stat-trend {
    font-size: 11px;
    margin-top: 4px;
}

.admin-stat-trend.up {
    color: var(--adm-green);
}

.admin-stat-trend.down {
    color: var(--adm-red);
}

/* ============================================================================
   7. CHART CONTAINERS
   ============================================================================ */
.admin-chart-wrap {
    background: var(--adm-bg-card);
    border: 1px solid var(--adm-border);
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}

.admin-chart-wrap canvas {
    width: 100% !important;
    max-height: 300px;
}

.admin-chart-title {
    font-size: 12px;
    color: var(--adm-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.admin-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

/* ============================================================================
   8. DATA TABLE
   ============================================================================ */
.admin-table-wrap {
    overflow-x: auto;
    margin-bottom: 16px;
    border: 1px solid var(--adm-border);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: var(--adm-font);
}

.admin-table thead th {
    background: var(--adm-green-dark);
    color: var(--adm-green);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 2px solid var(--adm-green);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.admin-table tbody td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--adm-border);
    color: var(--adm-text);
    vertical-align: middle;
}

.admin-table tbody tr {
    background: var(--adm-bg);
    transition: background var(--adm-transition);
}

.admin-table tbody tr:nth-child(even) {
    background: var(--adm-bg-alt);
}

.admin-table tbody tr:hover {
    background: rgba(74, 222, 128, 0.06);
}

.admin-table .col-mono {
    font-variant-numeric: tabular-nums;
}

.admin-table .col-right {
    text-align: right;
}

/* ============================================================================
   9. BUTTONS — Win98 + Green Accent
   ============================================================================ */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 16px;
    min-height: 26px;
    font-family: var(--adm-font);
    font-size: 12px;
    color: var(--adm-text-bright);
    background: var(--adm-bg-card);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    /* Win98 outset */
    border-top: 2px solid var(--w98-light);
    border-left: 2px solid var(--w98-light);
    border-right: 2px solid var(--w98-shadow);
    border-bottom: 2px solid var(--w98-shadow);
    transition: color var(--adm-transition);
}

.admin-btn:hover {
    color: var(--adm-green);
}

.admin-btn:active {
    border-top: 2px solid var(--w98-shadow);
    border-left: 2px solid var(--w98-shadow);
    border-right: 2px solid var(--w98-light);
    border-bottom: 2px solid var(--w98-light);
    padding: 5px 15px 3px 17px;
}

.admin-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: var(--adm-text-dim);
}

.admin-btn.primary {
    background: var(--adm-green-dark);
    color: var(--adm-green);
}

.admin-btn.primary:hover {
    color: var(--adm-text-bright);
    background: var(--adm-green-dim);
}

/* 10. Danger button */
.admin-btn.danger {
    color: var(--adm-red);
}

.admin-btn.danger:hover {
    background: var(--adm-red-dark);
    color: #fca5a5;
}

.admin-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Small variant */
.admin-btn.sm {
    padding: 2px 10px;
    min-height: 20px;
    font-size: 11px;
}

/* ============================================================================
   11. INPUTS
   ============================================================================ */
.admin-input {
    font-family: var(--adm-font);
    font-size: 12px;
    color: var(--adm-text);
    background: var(--adm-bg-input);
    padding: 5px 8px;
    min-height: 26px;
    width: 100%;
    box-sizing: border-box;
    /* Win98 inset */
    border-top: 2px solid var(--w98-dark);
    border-left: 2px solid var(--w98-dark);
    border-right: 2px solid var(--w98-light);
    border-bottom: 2px solid var(--w98-light);
    outline: none;
    transition: box-shadow var(--adm-transition);
}

.admin-input:focus {
    box-shadow: 0 0 0 1px var(--adm-green), 0 0 8px var(--adm-green-glow);
}

.admin-input::placeholder {
    color: var(--adm-text-dim);
    opacity: 0.6;
}

.admin-input-group {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
}

.admin-input-label {
    font-size: 11px;
    color: var(--adm-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.admin-select {
    font-family: var(--adm-font);
    font-size: 12px;
    color: var(--adm-text);
    background: var(--adm-bg-input);
    padding: 4px 24px 4px 8px;
    min-height: 26px;
    border-top: 2px solid var(--w98-dark);
    border-left: 2px solid var(--w98-dark);
    border-right: 2px solid var(--w98-light);
    border-bottom: 2px solid var(--w98-light);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath d='M0 0l4 6 4-6z' fill='%23c9d1d9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

textarea.admin-input {
    min-height: 80px;
    resize: vertical;
}

/* ============================================================================
   12. TOGGLE SWITCH
   ============================================================================ */
.admin-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
    cursor: pointer;
}

.admin-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.admin-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--adm-bg-alt);
    border: 1px solid var(--adm-border-light);
    transition: background var(--adm-transition), border-color var(--adm-transition);
}

.admin-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--adm-text-dim);
    transition: transform var(--adm-transition), background var(--adm-transition);
}

.admin-toggle input:checked + .admin-toggle-track {
    background: var(--adm-green-dark);
    border-color: var(--adm-green);
}

.admin-toggle input:checked + .admin-toggle-track .admin-toggle-thumb {
    transform: translateX(18px);
    background: var(--adm-green);
}

.admin-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--adm-border);
}

.admin-toggle-label {
    font-size: 12px;
    color: var(--adm-text);
}

.admin-toggle-desc {
    font-size: 11px;
    color: var(--adm-text-dim);
    margin-top: 2px;
}

/* ============================================================================
   13. EVENT FEED — Live Log
   ============================================================================ */
.admin-event-feed {
    background: #000;
    border: 1px solid var(--adm-border);
    font-family: var(--adm-font);
    font-size: 11px;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    color: var(--adm-green);
}

.admin-event-feed .event-line {
    display: flex;
    gap: 8px;
    padding: 1px 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
}

.admin-event-feed .event-time {
    color: var(--adm-text-dim);
    flex-shrink: 0;
    min-width: 70px;
}

.admin-event-feed .event-type {
    flex-shrink: 0;
    min-width: 60px;
    font-weight: bold;
}

.admin-event-feed .event-type.open    { color: var(--adm-green); }
.admin-event-feed .event-type.close   { color: var(--adm-red); }
.admin-event-feed .event-type.login   { color: var(--adm-blue); }
.admin-event-feed .event-type.error   { color: var(--adm-red); }
.admin-event-feed .event-type.system  { color: var(--adm-yellow); }

.admin-event-feed .event-msg {
    color: var(--adm-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Blinking cursor at bottom of feed */
.admin-event-feed::after {
    content: '_';
    color: var(--adm-green);
    animation: adm-blink 800ms step-end infinite;
}

@keyframes adm-blink {
    50% { opacity: 0; }
}

/* ============================================================================
   14. LOGIN FORM
   ============================================================================ */
.admin-login {
    width: 320px;
    max-width: 90vw;
    background: var(--adm-bg);
    padding: 24px;
    text-align: center;
    /* Win98 outset */
    border-top: 2px solid var(--w98-light);
    border-left: 2px solid var(--w98-light);
    border-right: 2px solid var(--w98-shadow);
    border-bottom: 2px solid var(--w98-shadow);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.admin-login-title {
    font-family: var(--adm-font);
    font-size: 14px;
    color: var(--adm-green);
    margin-bottom: 4px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.admin-login-subtitle {
    font-size: 11px;
    color: var(--adm-text-dim);
    margin-bottom: 20px;
}

.admin-login .admin-input {
    margin-bottom: 10px;
    text-align: left;
}

.admin-login .admin-btn {
    width: 100%;
    margin-top: 6px;
}

.admin-login-error {
    font-size: 11px;
    color: var(--adm-red);
    margin-top: 10px;
    display: none;
}

.admin-login-error.visible {
    display: block;
}

/* ASCII art or logo in login */
.admin-login-ascii {
    font-size: 9px;
    line-height: 1.15;
    color: var(--adm-green-dim);
    margin-bottom: 16px;
    white-space: pre;
    opacity: 0.7;
}

/* ============================================================================
   15. BADGES
   ============================================================================ */
.admin-badge {
    display: inline-block;
    font-family: var(--adm-font);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border: 1px solid;
}

.admin-badge.online {
    color: var(--adm-green);
    border-color: var(--adm-green-dark);
    background: rgba(74, 222, 128, 0.1);
}

.admin-badge.maintenance {
    color: var(--adm-yellow);
    border-color: rgba(227, 179, 65, 0.4);
    background: rgba(227, 179, 65, 0.1);
}

.admin-badge.beta {
    color: var(--adm-blue);
    border-color: rgba(88, 166, 255, 0.4);
    background: rgba(88, 166, 255, 0.1);
}

.admin-badge.offline {
    color: var(--adm-red);
    border-color: rgba(248, 81, 73, 0.4);
    background: rgba(248, 81, 73, 0.1);
}

.admin-badge.admin {
    color: var(--adm-teal);
    border-color: rgba(45, 212, 191, 0.4);
    background: rgba(45, 212, 191, 0.1);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.admin-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-row.between {
    justify-content: space-between;
}

.admin-col { flex: 1; }

.admin-mt  { margin-top: 12px; }
.admin-mb  { margin-bottom: 12px; }
.admin-muted { color: var(--adm-text-dim); }
.admin-green { color: var(--adm-green); }
.admin-red   { color: var(--adm-red); }

.admin-divider {
    border: none;
    border-top: 1px solid var(--adm-border);
    margin: 16px 0;
}

.admin-mono {
    font-family: var(--adm-font);
    font-variant-numeric: tabular-nums;
}

/* Fieldset — Win98 groupbox */
.admin-fieldset {
    border: 1px solid var(--adm-border-light);
    padding: 12px;
    margin-bottom: 16px;
}

.admin-fieldset legend {
    font-size: 11px;
    color: var(--adm-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 6px;
}

/* ============================================================================
   SCROLLBAR — Dark Theme
   ============================================================================ */
.admin-content::-webkit-scrollbar,
.admin-event-feed::-webkit-scrollbar,
.admin-table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.admin-content::-webkit-scrollbar-track,
.admin-event-feed::-webkit-scrollbar-track,
.admin-table-wrap::-webkit-scrollbar-track {
    background: var(--adm-bg);
}

.admin-content::-webkit-scrollbar-thumb,
.admin-event-feed::-webkit-scrollbar-thumb,
.admin-table-wrap::-webkit-scrollbar-thumb {
    background: var(--adm-border-light);
    border: 2px solid var(--adm-bg);
}

.admin-content::-webkit-scrollbar-thumb:hover,
.admin-event-feed::-webkit-scrollbar-thumb:hover,
.admin-table-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--adm-text-dim);
}

.admin-content::-webkit-scrollbar-corner,
.admin-event-feed::-webkit-scrollbar-corner,
.admin-table-wrap::-webkit-scrollbar-corner {
    background: var(--adm-bg);
}

/* Firefox */
.admin-content,
.admin-event-feed,
.admin-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: var(--adm-border-light) var(--adm-bg);
}

/* ============================================================================
   STATUS BAR (bottom of window)
   ============================================================================ */
.admin-statusbar {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 22px;
    min-height: 22px;
    padding: 0 4px;
    background: var(--adm-bg-alt);
    font-size: 11px;
    color: var(--adm-text-dim);
    border-top: 1px solid var(--adm-border);
    position: relative;
    z-index: 11;
}

.admin-statusbar-cell {
    padding: 0 8px;
    /* Win98 inset */
    border-top: 1px solid var(--w98-dark);
    border-left: 1px solid var(--w98-dark);
    border-right: 1px solid var(--w98-light);
    border-bottom: 1px solid var(--w98-light);
    height: 16px;
    line-height: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-statusbar-cell:first-child {
    flex: 1;
}

.admin-statusbar-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.admin-statusbar-dot.green  { background: var(--adm-green); box-shadow: 0 0 4px var(--adm-green); }
.admin-statusbar-dot.yellow { background: var(--adm-yellow); }
.admin-statusbar-dot.red    { background: var(--adm-red); }

/* ============================================================================
   LOADING / SKELETON
   ============================================================================ */
.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px;
    color: var(--adm-green);
    font-size: 13px;
}

.admin-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--adm-border);
    border-top-color: var(--adm-green);
    border-radius: 50%;
    animation: adm-spin 600ms linear infinite;
}

@keyframes adm-spin {
    to { transform: rotate(360deg); }
}

.admin-skeleton {
    background: linear-gradient(90deg,
        var(--adm-bg-card) 25%,
        var(--adm-bg-alt) 50%,
        var(--adm-bg-card) 75%
    );
    background-size: 200% 100%;
    animation: adm-shimmer 1.5s infinite;
    height: 16px;
    margin-bottom: 8px;
}

@keyframes adm-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================================
   TOOLTIP
   ============================================================================ */
[data-adm-tip] {
    position: relative;
}

[data-adm-tip]:hover::after {
    content: attr(data-adm-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: #000;
    color: var(--adm-green);
    font-family: var(--adm-font);
    font-size: 10px;
    white-space: nowrap;
    border: 1px solid var(--adm-border);
    z-index: 100;
    pointer-events: none;
}

/* ============================================================================
   CONFIRMATION DIALOG
   ============================================================================ */
.admin-confirm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.admin-confirm-box {
    background: var(--adm-bg);
    border-top: 2px solid var(--w98-light);
    border-left: 2px solid var(--w98-light);
    border-right: 2px solid var(--w98-shadow);
    border-bottom: 2px solid var(--w98-shadow);
    padding: 20px;
    max-width: 400px;
    text-align: center;
}

.admin-confirm-msg {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--adm-text);
}

/* ============================================================================
   RESPONSIVE — Tablet
   ============================================================================ */
@media (max-width: 1024px) {
    .admin-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-chart-row {
        grid-template-columns: 1fr;
    }

    #admin-win {
        width: 96vw;
        height: 90vh;
    }
}

/* ============================================================================
   RESPONSIVE — Mobile
   ============================================================================ */
@media (max-width: 640px) {
    #admin-win {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
    }

    .admin-tabs {
        flex-direction: column;
        padding: 4px;
        gap: 2px;
        border-bottom: none;
    }

    .admin-tab {
        top: 0;
        border: 1px solid var(--adm-border);
        margin-right: 0;
        text-align: center;
    }

    .admin-tab.active {
        border: 1px solid var(--adm-green);
        background: var(--adm-bg-card);
        margin-bottom: 0;
        padding-bottom: 5px;
    }

    .admin-stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .admin-stat-number {
        font-size: 24px;
    }

    .admin-content {
        padding: 10px;
    }

    .admin-chart-row {
        grid-template-columns: 1fr;
    }

    .admin-event-feed {
        font-size: 10px;
        max-height: 200px;
    }

    .admin-event-feed .event-line {
        flex-wrap: wrap;
    }

    .admin-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-btn-group {
        flex-direction: column;
    }

    .admin-btn-group .admin-btn {
        width: 100%;
    }

    .admin-login {
        width: 100%;
        max-width: none;
        border: none;
        box-shadow: none;
    }

    .admin-table {
        font-size: 11px;
    }

    .admin-table thead th,
    .admin-table tbody td {
        padding: 5px 6px;
    }
}

/* ============================================================================
   PRINT (hide everything)
   ============================================================================ */
@media print {
    #admin-overlay {
        display: none !important;
    }
}
