/* ═══════════════════════════════════════════════════════
   GLOBAL LABS — NEON CYBER THEME
   File: global.css
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
    --cyan:        #00f0ff;
    --cyan-dim:    rgba(0, 240, 255, 0.15);
    --cyan-glow:   rgba(0, 240, 255, 0.25);
    --purple:      #a855f7;
    --purple-dim:  rgba(168, 85, 247, 0.15);
    --gold:        #ffd700;
    --gold-dark:   #b8860b;
    --green:       #22c55e;
    --green-dim:   rgba(34, 197, 94, 0.12);
    --red:         #ef4444;
    --red-dim:     rgba(239, 68, 68, 0.12);
    --blue:        #3b82f6;
    --blue-dim:    rgba(59, 130, 246, 0.12);
    --orange:      #f97316;
    --orange-dim:  rgba(249, 115, 22, 0.12);
    --bg-deep:     #060612;
    --bg-primary:  #080818;
    --bg-card:     rgba(10, 10, 28, 0.92);
    --bg-input:    rgba(5, 5, 20, 0.7);
    --border:      rgba(0, 240, 255, 0.12);
    --border-focus:rgba(0, 240, 255, 0.5);
    --text-primary:#e8e8ff;
    --text-secondary:#7a7a9e;
    --text-dim:    #50506e;
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   20px;
    --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.08), 0 0 60px rgba(0, 240, 255, 0.04);
    --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.4);
    --font-display:'Orbitron', sans-serif;
    --font-body:   'Rajdhani', sans-serif;
    --font-mono:   'Share Tech Mono', monospace;
    --transition:  all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    font-weight: 500;
}

#starfield {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

.page-wrapper { position: relative; z-index: 1; min-height: 100vh; }

.login-wrapper {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 32px; width: 100%; max-width: 420px;
    box-shadow: var(--shadow-card), var(--shadow-neon);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    text-align: center; animation: fadeInUp 0.6s ease-out;
}

.login-card .logo-icon {
    font-size: 3rem; margin-bottom: 8px; display: block;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.4));
}

.gold-title {
    font-family: var(--font-display); font-weight: 900; font-size: 2rem;
    background: linear-gradient(90deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c, #bf953f);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 3s linear infinite;
    letter-spacing: 3px; text-transform: uppercase; line-height: 1.3;
}

.gold-title-lg { font-size: 1.6rem; }

@keyframes goldShine { to { background-position: 200% center; } }

.login-subtitle {
    font-family: var(--font-mono); color: var(--text-secondary);
    font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase;
    margin-top: 4px; margin-bottom: 32px;
}

.form-group { margin-bottom: 20px; text-align: left; }

.form-label {
    display: block; font-family: var(--font-display);
    font-size: 0.7rem; font-weight: 600; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--cyan); margin-bottom: 8px;
}

.cyber-input {
    width: 100%; padding: 14px 16px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: var(--font-mono); font-size: 1rem;
    outline: none; transition: var(--transition);
}

.cyber-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1), 0 0 15px rgba(0, 240, 255, 0.1);
}

.cyber-input::placeholder { color: var(--text-dim); }
.cyber-input[type="date"], .cyber-input[type="month"] { color-scheme: dark; }

.cyber-select {
    width: 100%; padding: 14px 16px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: var(--font-mono); font-size: 1rem;
    outline: none; transition: var(--transition);
    cursor: pointer; -webkit-appearance: none; appearance: none;
}

.cyber-select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.neon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 14px 32px;
    background: linear-gradient(135deg, rgba(0,240,255,0.08), rgba(168,85,247,0.08));
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: var(--radius-sm); color: var(--cyan);
    font-family: var(--font-display); font-size: 0.85rem;
    font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    cursor: pointer; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
}

.neon-btn:hover {
    background: linear-gradient(135deg, rgba(0,240,255,0.18), rgba(168,85,247,0.18));
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.2); transform: translateY(-2px);
}

.neon-btn:active { transform: translateY(0); }
.neon-btn-full { width: 100%; }
.neon-btn-sm { padding: 8px 16px; font-size: 0.7rem; letter-spacing: 1px; }

.neon-btn-gold {
    border-color: rgba(255, 215, 0, 0.4); color: var(--gold);
    background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,140,0,0.08));
}
.neon-btn-gold:hover {
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,140,0,0.15));
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.15);
}

.neon-btn-green {
    border-color: rgba(34, 197, 94, 0.4); color: var(--green);
    background: rgba(34, 197, 94, 0.06);
}
.neon-btn-green:hover { background: rgba(34, 197, 94, 0.15); box-shadow: 0 0 25px rgba(34, 197, 94, 0.15); }

.neon-btn-red {
    border-color: rgba(239, 68, 68, 0.4); color: var(--red);
    background: rgba(239, 68, 68, 0.06);
}
.neon-btn-red:hover { background: rgba(239, 68, 68, 0.15); box-shadow: 0 0 25px rgba(239, 68, 68, 0.15); }

.neon-btn-purple {
    border-color: rgba(168, 85, 247, 0.4); color: var(--purple);
    background: rgba(168, 85, 247, 0.06);
}
.neon-btn-purple:hover { background: rgba(168, 85, 247, 0.15); box-shadow: 0 0 25px rgba(168, 85, 247, 0.15); }

.dashboard-wrapper { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }

.dash-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px; padding: 24px 28px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); margin-bottom: 24px;
    box-shadow: var(--shadow-card); animation: fadeInUp 0.5s ease-out;
}

.dash-header-info h1 {
    font-family: var(--font-display); font-weight: 800;
    font-size: 1.4rem; letter-spacing: 1px; margin-bottom: 2px;
}

.dash-divisi { font-family: var(--font-mono); color: var(--cyan); font-size: 0.85rem; letter-spacing: 1px; }
.dash-ref { font-family: var(--font-mono); color: var(--text-secondary); font-size: 0.8rem; margin-top: 2px; }
.dash-ref span { color: var(--gold); font-weight: 600; }

.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 24px; animation: fadeInUp 0.6s ease-out;
}

.stats-grid-5 { grid-template-columns: repeat(5, 1fr); }

.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 24px 20px;
    text-align: center; box-shadow: var(--shadow-card);
    transition: var(--transition); position: relative; overflow: hidden;
}

.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 3px; border-radius: 3px 3px 0 0;
}

.stat-card.stat-total::before  { background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.stat-card.stat-id::before     { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.stat-card.stat-in::before     { background: linear-gradient(90deg, var(--green), #10b981); }
.stat-card.stat-out::before    { background: linear-gradient(90deg, var(--red), #f97316); }
.stat-card.stat-profit::before { background: linear-gradient(90deg, var(--gold), #f59e0b); }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card), var(--shadow-neon);
}

.stat-icon { font-size: 1.6rem; margin-bottom: 6px; }

.stat-value {
    font-family: var(--font-display); font-size: 1.6rem;
    font-weight: 800; line-height: 1.2;
}

.stat-total .stat-value  { color: var(--cyan); }
.stat-id .stat-value     { color: var(--blue); }
.stat-in .stat-value     { color: var(--green); }
.stat-out .stat-value    { color: var(--red); }
.stat-profit .stat-value { color: var(--gold); }

.stat-label {
    font-family: var(--font-display); font-size: 0.65rem;
    font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text-secondary); margin-top: 6px;
}

.stat-desc {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-dim);
    margin-top: 3px;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.filter-section {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    padding: 20px 24px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    margin-bottom: 24px; box-shadow: var(--shadow-card);
    animation: fadeInUp 0.7s ease-out;
}

.filter-section .cyber-input,
.filter-section .cyber-select {
    flex: 1; min-width: 140px; padding: 11px 14px; font-size: 0.9rem;
}

.filter-section .neon-btn { padding: 11px 24px; font-size: 0.75rem; }

.filter-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

.table-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow-card); animation: fadeInUp 0.8s ease-out;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.data-table { width: 100%; border-collapse: collapse; min-width: 700px; }

.data-table thead th {
    background: rgba(0, 240, 255, 0.06); padding: 16px 18px;
    text-align: left; font-family: var(--font-display);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--cyan);
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    white-space: nowrap; position: sticky; top: 0;
    cursor: pointer; user-select: none; transition: background 0.2s;
}

.data-table thead th:hover { background: rgba(0, 240, 255, 0.1); }
.data-table thead th .sort-icon { margin-left: 4px; opacity: 0.5; font-size: 0.6rem; }
.data-table thead th.sort-active .sort-icon { opacity: 1; color: var(--gold); }

.data-table tbody td {
    padding: 14px 18px; font-family: var(--font-mono);
    font-size: 0.88rem; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.data-table tbody tr { transition: background 0.2s ease; }
.data-table tbody tr:hover { background: rgba(0, 240, 255, 0.04); }
.data-table tbody tr:last-child td { border-bottom: none; }

.no-data {
    text-align: center; padding: 60px 20px;
    color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.95rem;
}
.no-data .no-data-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }

.emp-table { width: 100%; border-collapse: collapse; min-width: 650px; }

.emp-table thead th {
    background: rgba(0, 240, 255, 0.06); padding: 14px 16px;
    text-align: left; font-family: var(--font-display);
    font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--cyan);
    border-bottom: 1px solid rgba(0, 240, 255, 0.15); white-space: nowrap;
}

.emp-table tbody td {
    padding: 14px 16px; font-size: 0.92rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04); vertical-align: middle;
}

.emp-table tbody tr:hover { background: rgba(0, 240, 255, 0.03); }

.pin-badge {
    display: inline-block; padding: 4px 12px;
    background: rgba(255, 215, 0, 0.1); border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 6px; font-family: var(--font-mono);
    font-size: 0.85rem; color: var(--gold); font-weight: 700; letter-spacing: 2px;
}

.ref-badge {
    display: inline-block; padding: 4px 12px;
    background: var(--cyan-dim); border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 6px; font-family: var(--font-mono);
    font-size: 0.85rem; color: var(--cyan); font-weight: 600;
}

.profit-badge {
    display: inline-block; padding: 4px 12px;
    border-radius: 6px; font-family: var(--font-mono);
    font-size: 0.85rem; font-weight: 700;
}

.profit-badge.positive {
    background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.25); color: var(--green);
}
.profit-badge.negative {
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.25); color: var(--red);
}
.profit-badge.zero {
    background: rgba(122, 122, 158, 0.1); border: 1px solid rgba(122, 122, 158, 0.25); color: var(--text-secondary);
}

.actions-cell { display: flex; gap: 8px; }

.tab-nav {
    display: flex; gap: 0; margin-bottom: 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow-card); animation: fadeInUp 0.5s ease-out;
}

/* ── NEW Badge ── */
.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    margin-left: 8px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cyan);
    animation: badgeGlow 2s ease-in-out infinite;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 1.6;
}

.badge-new::before {
    content: '✦';
    font-size: 0.45rem;
}

@keyframes badgeGlow {
    0%, 100% {
        box-shadow: 0 0 4px rgba(0, 240, 255, 0.2);
        border-color: rgba(0, 240, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 12px rgba(0, 240, 255, 0.4), 0 0 20px rgba(168, 85, 247, 0.15);
        border-color: rgba(0, 240, 255, 0.7);
    }
}

.tab-btn {
    flex: 1; padding: 16px 20px; background: transparent;
    border: none; color: var(--text-secondary);
    font-family: var(--font-display); font-size: 0.72rem;
    font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    cursor: pointer; transition: var(--transition); position: relative; text-align: center;
}

.tab-btn:hover { color: var(--text-primary); background: rgba(0, 240, 255, 0.04); }
.tab-btn.active { color: var(--cyan); background: rgba(0, 240, 255, 0.08); }
.tab-btn.active::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 100%; height: 2px; background: var(--cyan);
}

.tab-content { display: none; animation: fadeInUp 0.4s ease-out; }
.tab-content.active { display: block; }

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 1000; align-items: center; justify-content: center;
    padding: 20px; animation: fadeIn 0.3s ease;
}

.modal-overlay.active { display: flex; }

.modal-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 36px 28px;
    width: 100%; max-width: 480px;
    box-shadow: var(--shadow-card), var(--shadow-neon);
    animation: modalSlideIn 0.4s ease-out; max-height: 90vh; overflow-y: auto;
}

.modal-title {
    font-family: var(--font-display); font-size: 1rem; font-weight: 700;
    color: var(--cyan); letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}

.modal-actions { display: flex; gap: 12px; margin-top: 28px; justify-content: flex-end; }

.alert {
    padding: 14px 20px; border-radius: var(--radius-sm);
    font-family: var(--font-mono); font-size: 0.88rem;
    margin-bottom: 20px; animation: fadeInUp 0.4s ease-out;
    display: flex; align-items: center; gap: 10px;
}

.alert-success { background: var(--green-dim); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--green); }
.alert-error { background: var(--red-dim); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--red); }
.alert-info { background: var(--blue-dim); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--blue); }

.spinner-container {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 60px 20px; gap: 16px;
}

.spinner {
    width: 44px; height: 44px; border: 3px solid var(--cyan-dim);
    border-top-color: var(--cyan); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-text { font-family: var(--font-mono); color: var(--text-secondary); font-size: 0.85rem; letter-spacing: 1px; }

.link-subtle {
    color: var(--text-secondary); text-decoration: none;
    font-family: var(--font-mono); font-size: 0.82rem; transition: color 0.3s;
}
.link-subtle:hover { color: var(--cyan); }

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-cyan { color: var(--cyan); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-dim { color: var(--text-secondary); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, 0.35); }

@media (max-width: 768px) {
    .gold-title { font-size: 1.4rem; letter-spacing: 2px; }
    .gold-title-lg { font-size: 1.2rem; }
    .login-card { padding: 32px 24px; }
    .dash-header { flex-direction: column; align-items: flex-start; padding: 20px; }
    .dash-header-info h1 { font-size: 1.1rem; }
    .stats-grid, .stats-grid-5 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 18px 16px; }
    .stat-value { font-size: 1.2rem; }
    .filter-section { flex-direction: column; padding: 16px; }
    .filter-section .cyber-input, .filter-section .cyber-select { min-width: 100%; }
    .filter-section .neon-btn { width: 100%; }
    .filter-divider { width: 100%; height: 1px; }
    .dashboard-wrapper { padding: 12px 10px 40px; }
    .modal-box { padding: 28px 20px; }
    .modal-actions { flex-direction: column; }
    .modal-actions .neon-btn { width: 100%; }
    .actions-cell { flex-direction: column; gap: 6px; }
    .tab-btn { padding: 12px 10px; font-size: 0.62rem; letter-spacing: 1px; }
}

@media (max-width: 480px) {
    .stats-grid, .stats-grid-5 { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.3rem; }
}

@media (min-width: 1025px) {
    .gold-title { font-size: 2.2rem; }
    .dashboard-wrapper { padding: 30px 24px 60px; }
}