:root {
    --bg-primary: #070b14;
    --bg-secondary: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.88);
    --bg-card-hover: rgba(24, 36, 61, 0.95);
    
    --border-color: rgba(56, 189, 248, 0.15);
    --border-tech: rgba(56, 189, 248, 0.35);
    --border-focus: #38bdf8;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-cyan: #38bdf8;
    
    --color-primary: #2563eb;
    --color-cyan: #38bdf8;
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.12);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.12);
    --color-danger: #f43f5e;
    --color-danger-bg: rgba(244, 63, 94, 0.12);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 15px 35px -5px rgba(0, 0, 0, 0.65);
    --shadow-cyan-glow: 0 0 25px rgba(56, 189, 248, 0.28);
    --shadow-blue-glow: 0 0 25px rgba(37, 99, 235, 0.35);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 90% 100%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.6) 0%, transparent 100%);
    background-size: 36px 36px, 36px 36px, auto, auto, auto;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ========================================================================= */
/* HEADER & TOPBAR                                                           */
/* ========================================================================= */
.kiosk-header {
    background: rgba(11, 18, 33, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-tech);
    padding: 0.85rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-school-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.45));
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-school-logo:hover {
    transform: scale(1.08) rotate(-2deg);
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.brand-info h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #ffffff;
    line-height: 1.2;
}

.tech-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.brand-sub {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.kiosk-status-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-pill {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-pill-tersedia {
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
}

.status-pill-dipinjam {
    border-color: rgba(244, 63, 94, 0.4);
    color: #f87171;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
    animation: pulse-ring 2s infinite;
}

.dot-red {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f43f5e;
    box-shadow: 0 0 6px #f43f5e;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
    70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.clock-pill {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.1);
}

.btn-icon-top {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-tech);
    color: var(--text-cyan);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.2s;
}

.btn-icon-top:hover {
    color: #fff;
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* ========================================================================= */
/* NAVIGATION TABS                                                           */
/* ========================================================================= */
.nav-tabs-wrapper {
    max-width: 1400px;
    margin: 1.25rem auto 0;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-tabs {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-tech);
    padding: 0.35rem;
    border-radius: var(--radius-lg);
    gap: 0.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.08);
}

.tab-btn.active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tab-badge {
    background: #ef4444;
    color: #fff;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.tech-hud-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.hud-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
}

/* ========================================================================= */
/* MAIN CONTENT LAYOUT                                                       */
/* ========================================================================= */
.main-content {
    max-width: 1400px;
    width: 100%;
    margin: 1.25rem auto;
    padding: 0 1.5rem 3rem;
    flex: 1;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.25s ease-out forwards;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================================================= */
/* CARDS & PANELS WITH STACKING CONTEXT FIX                                  */
/* ========================================================================= */
.card-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
    position: relative;
}

.card-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
}

/* SOLUSI KUNCI UNTUK DROPDOWN COLLISION / KARTU NABRAK:
   Card Step 1 HARUS memiliki z-index jauh lebih tinggi daripada Card Step 2! */
.card-step-1 {
    position: relative;
    z-index: 60 !important;
}

.card-step-2 {
    position: relative;
    z-index: 10 !important;
}

.card-step-3 {
    position: relative;
    z-index: 5 !important;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.95rem;
}

.card-title-row h2 {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #ffffff;
}

.step-badge {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
}

.tech-subtag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

/* ========================================================================= */
/* FORM PINJAM: STEP 1 (SEARCH SISWA DENGAN Z-INDEX MAKSIMAL)                */
/* ========================================================================= */
.search-siswa-wrap {
    position: relative;
    z-index: 100 !important;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-left {
    position: absolute;
    left: 1.25rem;
    font-size: 1.25rem;
    color: var(--text-cyan);
    pointer-events: none;
}

.input-kiosk {
    width: 100%;
    background: rgba(11, 18, 33, 0.95);
    border: 2px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.05rem 1rem 1.05rem 3.4rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.input-kiosk:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.4);
    background: rgba(11, 18, 33, 1);
}

.input-kiosk::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1rem;
}

/* DROPDOWN HASIL PENCARIAN (MELAYANG DI ATAS SEMUA ELEMEN) */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #0f172a;
    border: 2px solid #38bdf8;
    border-radius: var(--radius-lg);
    max-height: 420px;
    overflow-y: auto;
    z-index: 99999 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.3);
    display: none;
}

.search-item {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s ease;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover, .search-item.highlight {
    background: rgba(56, 189, 248, 0.18);
    padding-left: 1.6rem;
}

.search-item-main {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.search-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
}

.search-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
}

.search-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.2rem;
}

.badge-kelas {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 0.18rem 0.65rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Selected Student Card */
.selected-student-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 2px solid #38bdf8;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.25);
    animation: fadeIn 0.25s ease-out;
    position: relative;
}

.student-card-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.student-card-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.student-hud-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 800;
    color: #34d399;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.student-card-left h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
}

.student-card-left p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-nisn-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* ========================================================================= */
/* FORM PINJAM: STEP 2 (GRID LAPTOP TECH MODULE)                             */
/* ========================================================================= */
.laptop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.laptop-card {
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.laptop-card:hover:not(.disabled) {
    transform: translateY(-4px);
    border-color: #38bdf8;
    background: rgba(24, 36, 61, 0.95);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 18px rgba(56, 189, 248, 0.3);
}

.laptop-card.selected {
    border-color: #38bdf8;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(15, 23, 42, 0.98));
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4), 0 10px 30px rgba(37, 99, 235, 0.45);
}

.laptop-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(11, 18, 33, 0.7);
    border-style: dashed;
}

.laptop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.laptop-code-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.05em;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-status {
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
}

.badge-status.tersedia {
    background: var(--color-success-bg);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.45);
}

.badge-status.dipinjam {
    background: var(--color-danger-bg);
    color: #f87171;
    border: 1px solid rgba(244, 63, 94, 0.45);
}

.badge-status.perbaikan {
    background: var(--color-warning-bg);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

.laptop-body {
    margin: 0.6rem 0;
}

.laptop-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f1f5f9;
}

.laptop-spec {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    line-height: 1.45;
}

.laptop-borrower-info {
    margin-top: 0.85rem;
    background: rgba(11, 18, 33, 0.85);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    font-size: 0.84rem;
}

.laptop-borrower-name {
    font-weight: 700;
    color: #fca5a5;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.laptop-borrower-time {
    color: var(--text-muted);
    font-size: 0.76rem;
    margin-top: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
}

.laptop-select-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 0.95rem;
    transition: all 0.2s;
}

.laptop-card.selected .laptop-select-indicator {
    background: #38bdf8;
    color: #070b14;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.laptop-card:not(.selected):not(.disabled) .laptop-select-indicator {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================================================= */
/* FORM PINJAM: STEP 3 (KEBUTUHAN & KONDISI)                                 */
/* ========================================================================= */
.quick-chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.6rem 0 1rem;
}

.quick-chip {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-tech);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.quick-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #fff;
    border-color: #38bdf8;
}

.quick-chip.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.4), rgba(56, 189, 248, 0.3));
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.form-group {
    margin-bottom: 1.35rem;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.textarea-kiosk {
    width: 100%;
    background: rgba(11, 18, 33, 0.9);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.95rem 1.15rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    outline: none;
    resize: vertical;
    min-height: 90px;
    transition: border-color 0.2s;
}

.textarea-kiosk:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.select-kiosk {
    width: 100%;
    background: rgba(11, 18, 33, 0.9);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.95rem 1.15rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
}

.select-kiosk:focus {
    border-color: #38bdf8;
}

/* ========================================================================= */
/* BUTTONS                                                                   */
/* ========================================================================= */
.btn-kiosk-primary {
    background: linear-gradient(135deg, #1d4ed8, #0284c7);
    border: none;
    color: #ffffff;
    padding: 1.15rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
}

.btn-kiosk-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.65), 0 0 20px rgba(56, 189, 248, 0.4);
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.btn-kiosk-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-kiosk-success {
    background: linear-gradient(135deg, #059669, #10b981);
    border: none;
    color: #ffffff;
    padding: 1.15rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    transition: all 0.2s;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.btn-kiosk-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.65);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-tech);
    color: var(--text-primary);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #fff;
}

.btn-danger {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #f87171;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.15s;
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.3);
    color: #fff;
}

/* ========================================================================= */
/* TAB PENGEMBALIAN                                                          */
/* ========================================================================= */
.kembali-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.35rem;
}

.kembali-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(24, 36, 61, 0.95));
    border: 2px solid rgba(244, 63, 94, 0.4);
    border-radius: var(--radius-lg);
    padding: 1.45rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
}

.kembali-card:hover {
    border-color: #f43f5e;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(244, 63, 94, 0.25);
}

.kembali-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.95rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kembali-card-body h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
}

.kembali-card-body p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

.kembali-timer-pill {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.btn-kembali-action {
    background: linear-gradient(135deg, #059669, #10b981);
    border: none;
    color: #ffffff;
    padding: 0.95rem 1.35rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    width: 100%;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-kembali-action:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.55);
}

/* ========================================================================= */
/* TAB RIWAYAT: TABLE & FILTERS                                              */
/* ========================================================================= */
.table-responsive {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.custom-table th {
    background: rgba(11, 18, 33, 0.95);
    color: var(--text-cyan);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'JetBrains Mono', monospace;
    padding: 1rem 1.15rem;
    border-bottom: 2px solid rgba(56, 189, 248, 0.25);
}

.custom-table td {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}

.custom-table tr:hover td {
    background: rgba(56, 189, 248, 0.06);
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.input-filter {
    background: rgba(11, 18, 33, 0.9);
    border: 1px solid var(--border-tech);
    color: #fff;
    padding: 0.6rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
}

.input-filter:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* ========================================================================= */
/* MODAL OVERLAY                                                             */
/* ========================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 11, 20, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #0f172a;
    border: 2px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-xl);
    max-width: 580px;
    width: 100%;
    padding: 2.2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.25);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.85rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: #fff;
}

/* Success Modal Details */
.success-icon-wrap {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.18);
    border: 2px solid #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.7rem;
    margin: 0 auto 1.25rem;
    animation: bounce 0.6s ease;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-12px); }
    60% { transform: translateY(-6px); }
}

.modal-timer-countdown {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-left: 5px solid var(--color-cyan);
    color: #fff;
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    animation: slideIn 0.25s ease-out;
}

.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-danger); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.kiosk-footer {
    text-align: center;
    padding: 1.75rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.84rem;
    border-top: 1px solid var(--border-tech);
    background: rgba(11, 18, 33, 0.85);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container { flex-direction: column; align-items: flex-start; }
    .nav-tabs-wrapper { flex-direction: column; align-items: flex-start; }
    .laptop-grid { grid-template-columns: 1fr; }
    .card-panel { padding: 1.25rem; }
}
