/* ============================================================
   ADMIN DKV3 — DESIGN SYSTEM
   Tema: "meja kerja studio desain" — gelap, presisi, aksen
   registrasi cetak (crosshair) ala prepress/DKV.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #0b0e14;
    --surface: #12161f;
    --surface-2: #171c27;
    --surface-3: #1c2230;
    --border: #232838;
    --border-soft: #1a1f2c;
    --text: #e7e9ee;
    --text-muted: #8b93a7;
    --text-faint: #565f75;

    --accent: #7c6cf6;
    --accent-hover: #8f81f8;
    --accent-soft: rgba(124, 108, 246, 0.14);
    --accent-2: #f5b942;
    --accent-2-soft: rgba(245, 185, 66, 0.14);

    --danger: #f0576b;
    --danger-hover: #f2717f;
    --danger-soft: rgba(240, 87, 107, 0.13);

    --success: #33d17a;
    --success-soft: rgba(51, 209, 122, 0.13);

    --info: #4fb2e8;
    --info-soft: rgba(79, 178, 232, 0.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    background-image:
        radial-gradient(circle at 100% 0%, rgba(124, 108, 246, 0.06), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(245, 185, 66, 0.04), transparent 35%);
}

.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.01em; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

::selection { background: var(--accent); color: #0b0e14; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ============ REGISTRATION MARK (signature element) ============ */
.reg-mark { display: inline-block; position: relative; }
.reg-mark svg { display: block; }

/* ============ LAYOUT PRIMITIVES ============ */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}
.panel-soft {
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
}
.panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

/* ============ SIDEBAR NAV ============ */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.nav-link:hover {
    color: var(--text);
    background: var(--surface-2);
}
.nav-link.active {
    color: var(--text);
    background: var(--accent-soft);
    border-color: rgba(124, 108, 246, 0.35);
}
.nav-link.active .nav-icon { color: var(--accent); }
.nav-icon { width: 1.1rem; text-align: center; color: var(--text-faint); }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #0b0e14; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success { background: var(--success); color: #06170e; }
.btn-success:hover { filter: brightness(1.08); }
.btn-danger { background: var(--danger); color: #1a0508; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-ghost {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}
.btn-ghost:hover { background: var(--surface-3); border-color: var(--text-faint); }
.btn-icon-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 8px;
}

/* ============ FORM FIELDS ============ */
.field-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 0.4rem;
}
.field-input, .field-select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    color: var(--text);
    transition: border-color 0.15s ease;
}
.field-input::placeholder { color: var(--text-faint); }
.field-input:focus, .field-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============ TABLE ============ */
.data-grid { width: 100%; border-collapse: collapse; text-align: left; }
.data-grid thead th {
    position: sticky;
    top: 0;
    background: var(--surface);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-grid tbody td {
    padding: 0.85rem 1.1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-soft);
}
.data-grid tbody tr { transition: background 0.12s ease; }
.data-grid tbody tr:hover { background: var(--surface-2); }
.data-grid tbody tr:last-child td { border-bottom: none; }

/* ============ BADGES ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-3); color: var(--text-muted); }

.status-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ============ STAT CARD ============ */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
}
.stat-card.stat-rose { border-left-color: var(--danger); }
.stat-card.stat-sky { border-left-color: var(--info); }
.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1;
}

/* ============ LOGIN SCREEN ============ */
.login-canvas {
    background:
        radial-gradient(circle at 20% 15%, rgba(124, 108, 246, 0.10), transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(245, 185, 66, 0.07), transparent 40%),
        var(--bg);
}
.crosshair-grid {
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ============ MISC ============ */
.divider { height: 1px; background: var(--border); border: none; }
.truncate-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fade-in { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }