/* ===== Crew Schedule Portal — Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
    --primary-start: #7c3aed;
    --primary-mid: #6366f1;
    --primary-end: #3b82f6;
    --accent: #a78bfa;
    --accent-light: #c4b5fd;
    --bg-dark: #0f0d1a;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.12);
    --text-primary: #f1f0f5;
    --text-secondary: rgba(241, 240, 245, 0.65);
    --text-muted: rgba(241, 240, 245, 0.4);
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    --shift-pagi: #34d399;
    --shift-siang: #fbbf24;
    --shift-malam: #a78bfa;
    --shift-full: #60a5fa;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
    color-scheme: dark;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    text-transform: uppercase;
}

input:not([type="password"]),
select,
textarea,
button {
    text-transform: uppercase;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124, 58, 237, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 50% 100%, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ===== Header ===== */
.header {
    position: relative;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-mid), var(--primary-end));
    padding: 2.5rem 2rem 3rem;
    text-align: center;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: headerDots 20s linear infinite;
}

@keyframes headerDots {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

.header h1 {
    position: relative;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header p {
    position: relative;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.85;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* ===== Main Container ===== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== Search Section ===== */
.search-section {
    margin-top: -1rem;
    /* Slightly lower on all devices */
    position: relative;
    z-index: 2;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-base);
}

.search-input {
    width: 100%;
    padding: 16px 16px 16px 52px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    outline: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.search-input:focus~.search-icon {
    color: var(--accent);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-base);
    animation: fadeInUp 0.4s ease both;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(167, 139, 250, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.crew-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.gender-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gender-badge.male {
    background: rgba(96, 165, 250, 0.15);
    color: var(--info);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.gender-badge.female {
    background: rgba(244, 114, 182, 0.15);
    color: #f472b6;
    border: 1px solid rgba(244, 114, 182, 0.3);
}

/* ===== Stats Row ===== */
.stats-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-chip .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Tables ===== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead {
    background: rgba(255, 255, 255, 0.04);
}

th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    white-space: nowrap;
}

td {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    white-space: nowrap;
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

tbody tr.today-highlight {
    background: rgba(124, 58, 237, 0.1);
    border-left: 3px solid var(--accent);
}

tbody tr.today-highlight td:first-child {
    padding-left: 11px;
}

/* ===== Shift Badges ===== */
.shift-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.shift-badge.pagi {
    background: rgba(52, 211, 153, 0.15);
    color: var(--shift-pagi);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.shift-badge.siang {
    background: rgba(251, 191, 36, 0.15);
    color: var(--shift-siang);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.shift-badge.malam {
    background: rgba(167, 139, 250, 0.15);
    color: var(--shift-malam);
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.shift-badge.full {
    background: rgba(96, 165, 250, 0.15);
    color: var(--shift-full);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-light);
}

.btn-success {
    background: linear-gradient(135deg, #059669, var(--success));
    color: white;
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.25);
}

.btn-success:hover {
    box-shadow: 0 6px 25px rgba(52, 211, 153, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.btn-download {
    margin-top: 1rem;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease both;
}

/* ===== Dashboard Stats ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dash-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition-base);
}

.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(167, 139, 250, 0.2);
}

.dash-card .dash-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.dash-card .dash-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--primary-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-card .dash-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

/* ===== Dashboard Daily Stats ===== */
.daily-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dash-daily-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
}

.dash-daily-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(167, 139, 250, 0.2);
}

.dash-daily-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-daily-header .date {
    font-size: 1rem;
    color: var(--accent-light);
}

.dash-daily-header .total {
    font-size: 0.75rem;
    background: var(--accent);
    color: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 12px;
}

.dash-daily-body {
    padding: 0.75rem 1rem;
    flex: 1;
}

.dash-daily-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.dash-daily-row:last-child {
    border-bottom: none;
}

.dash-daily-pos {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dash-daily-count {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

/* ===== Modals ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #1a1730;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select option {
    background: #1a1730;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.toolbar-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== Login ===== */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s ease both;
}

.login-card .login-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-card .form-group {
    text-align: left;
}

.login-card .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.login-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #1a1730;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease both;
    min-width: 250px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.warning {
    border-left: 3px solid var(--warning);
}

.toast.info {
    border-left: 3px solid var(--info);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ===== Empty States ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.95rem;
}

.empty-state .empty-hint {
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer a:hover {
    color: var(--accent-light);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Responsive ===== */
/* Desktop / PC (Large) */
@media (min-width: 1025px) {
    html {
        font-size: 18px; /* Tampilan diperbesar di PC */
    }
    .container {
        max-width: 1200px; /* Container lebih lebar */
    }
}

/* Tablet (Portrait & small landscapes) */
@media (max-width: 1024px) {
    html {
        font-size: 15px; /* Sedikit lebih kecil dari PC */
    }
    .container {
        padding: 2rem 1.5rem;
    }
}

/* Mobile & Small Tablets */
@media (max-width: 768px) {
    html {
        font-size: 14px; /* Penyesuaian font di mobile */
    }
    
    .header {
        padding: 2rem 1rem 2.5rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .search-section {
        margin-top: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions {
        justify-content: flex-end;
    }

    .modal {
        padding: 1.5rem;
    }
}

/* Extra Small Devices (Phones) */
@media (max-width: 480px) {
    html {
        font-size: 13px; /* Lebih kecil lagi di hp */
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .search-input {
        padding: 14px 14px 14px 46px;
        font-size: 0.9rem;
    }

    .search-section {
        margin-top: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .dash-card {
        padding: 1rem;
    }

    .dash-card .dash-value {
        font-size: 1.5rem;
    }

    .stats-row {
        flex-direction: column;
    }
}

/* ===== Admin Search ===== */
.admin-search-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.admin-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
}

.admin-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: all var(--transition-base);
}

.admin-search-input::placeholder {
    color: var(--text-muted);
}

.admin-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

/* ===== Accordion ===== */
.accordion-item {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all var(--transition-base);
    animation: fadeInUp 0.3s ease both;
}

.accordion-item:hover {
    border-color: rgba(167, 139, 250, 0.2);
}

.accordion-item.open {
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: var(--shadow-md);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.accordion-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform var(--transition-base);
    display: inline-block;
}

.accordion-item.open .accordion-arrow {
    transform: rotate(180deg);
    color: var(--accent);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.25rem;
}

.accordion-item.open .accordion-body {
    max-height: 2000px;
    padding: 0 1.25rem 1.25rem;
}

.accordion-body .table-wrapper {
    margin-top: 0.5rem;
}

/* ===== Action table buttons ===== */
.action-btns {
    display: flex;
    gap: 6px;
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* File input styling */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}