/* ============================================
   FORM BTS - Buku Tahunan Sekolah
   Premium Dark Theme Stylesheet
   ============================================ */

/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent: #8b5cf6;
    --accent-light: #a78bfa;

    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --surface: #1e293b;
    --surface-light: #334155;
    --surface-hover: #3b4a63;
    --border: rgba(99, 102, 241, 0.15);
    --border-light: rgba(148, 163, 184, 0.1);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);

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

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    --sidebar-width: 260px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-light); }

img { max-width: 100%; height: auto; }

code {
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary-light);
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }

/* ===== CONTAINER ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* ===== CARDS ===== */
.card {
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 i { color: var(--primary-light); font-size: 0.9rem; }

.card-body { padding: 20px; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 6px 25px var(--primary-glow); color: white; }

.btn-success {
    background: linear-gradient(135deg, var(--success), #34d399);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #f87171);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(99,102,241,0.05); }

.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

.btn-icon { transition: transform 0.3s; }
.btn:hover .btn-icon { transform: translateX(4px); }

/* Icon buttons */
.btn-icon-sm {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.8rem;
}
.btn-edit { background: var(--info-bg); color: var(--info); }
.btn-edit:hover { background: var(--info); color: white; }
.btn-delete { background: var(--danger-bg); color: var(--danger); }
.btn-delete:hover { background: var(--danger); color: white; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label i { margin-right: 4px; color: var(--primary-light); }

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-dark);
}

.form-textarea { resize: vertical; min-height: 60px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.char-counter.warning { color: var(--warning); }
.char-counter.danger { color: var(--danger); }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.alert i { margin-top: 2px; flex-shrink: 0; }

.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.alert-error { background: var(--danger-bg); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.alert-info { background: var(--info-bg); color: #93c5fd; border: 1px solid rgba(59,130,246,0.2); }

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, #0f172a 30%, #1a1a4e 60%, #2d1b69 100%);
    position: relative;
    overflow: hidden;
}

.login-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px; height: 400px;
    background: var(--primary);
    top: -100px; right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px; height: 300px;
    background: var(--accent);
    bottom: -80px; left: -80px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px; height: 200px;
    background: #ec4899;
    top: 50%; left: 30%;
    animation-delay: -10s;
}

.shape-4 {
    width: 150px; height: 150px;
    background: #06b6d4;
    bottom: 30%; right: 20%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

.login-container {
    text-align: center;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    padding: 40px 32px;
    text-align: center;
}

.login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 3s ease-in-out infinite;
}

.admin-icon {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: 0 0 50px var(--primary-glow); }
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.login-form { text-align: left; }
.login-form .form-group { margin-bottom: 20px; }

.login-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.admin-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.admin-link:hover { color: var(--primary-light); }

.login-copyright {
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 20px;
}

/* ===== SISWA PAGE ===== */
.siswa-page { min-height: 100vh; padding-bottom: 40px; }

.siswa-header {
    background: linear-gradient(135deg, var(--bg-darker), var(--surface));
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-user {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.siswa-content { padding-top: 24px; }

.form-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}

/* Photo Upload */
.foto-upload-area {
    width: 100%;
    aspect-ratio: 3/4;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
}

.foto-upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.foto-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: var(--shadow-glow);
}

.foto-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.foto-placeholder i {
    font-size: 3rem;
    margin-bottom: 12px;
    color: var(--primary-light);
    opacity: 0.5;
}

.foto-placeholder p {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.foto-placeholder span { font-size: 0.72rem; }

.foto-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info items (read only) */
.info-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.info-item label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
    display: block;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== ADMIN LAYOUT ===== */
.admin-body {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-darker);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo i {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.sidebar-logo h2 {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo span {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.sidebar-nav a i { width: 20px; text-align: center; }

.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

.nav-logout { color: var(--danger) !important; }
.nav-logout:hover { background: var(--danger-bg) !important; }

/* Admin Main */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.admin-header-right { display: flex; align-items: center; gap: 16px; }

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.admin-content {
    flex: 1;
    padding: 24px;
}

/* ===== PAGE TITLE ===== */
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title h1 i { color: var(--primary-light); }

.page-title p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== PROGRESS BAR ===== */
.progress-bar-container {
    height: 10px;
    background: var(--surface);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text { font-size: 0.8rem; color: var(--text-muted); }

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
}

.action-btn:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

.action-btn i { font-size: 1.5rem; color: var(--primary-light); }

.action-btn-danger { border-color: rgba(239,68,68,0.2); }
.action-btn-danger:hover { border-color: var(--danger); }
.action-btn-danger i { color: var(--danger); }

/* Recent List */
.recent-list { display: flex; flex-direction: column; gap: 8px; }

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: var(--transition);
}

.recent-item:hover { background: var(--surface-light); }

.recent-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow: hidden;
}

.recent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-info { flex: 1; min-width: 0; }
.recent-info strong { font-size: 0.85rem; display: block; }
.recent-info span { font-size: 0.72rem; color: var(--text-muted); }

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.empty-state i { font-size: 2rem; margin-bottom: 8px; opacity: 0.3; display: block; }
.empty-state p { font-size: 0.85rem; }

/* ===== FILTER FORM ===== */
.filter-form .filter-group {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-form .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }

/* ===== DATA TABLE ===== */
.table-responsive { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr { transition: var(--transition-fast); }
.data-table tbody tr:hover { background: rgba(99, 102, 241, 0.03); }

.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    overflow: hidden;
}

.table-avatar img { width: 100%; height: 100%; object-fit: cover; }

.table-actions { display: flex; gap: 4px; }

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

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

.modal {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 20px; }
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===== IMPORT RESULT ===== */
.import-result-card { border: 1px solid var(--primary); }

.import-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.import-stat {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.import-stat.success { background: var(--success-bg); color: var(--success); }
.import-stat.warning { background: var(--warning-bg); color: var(--warning); }
.import-stat.danger { background: var(--danger-bg); color: var(--danger); }
.import-stat strong { display: block; font-size: 1.3rem; margin-bottom: 2px; }

.import-detail { margin-top: 12px; }
.import-detail h4 {
    font-size: 0.82rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.import-detail ul {
    list-style: none;
    padding: 0;
}
.import-detail li {
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--border);
    margin-bottom: 4px;
    background: var(--surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ===== ANIMATIONS ===== */
.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

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

.animate-slide-down {
    animation: slideDown 0.4s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3s forwards;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .header-left { justify-content: center; }
    
    /* Admin responsive */
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active { transform: translateX(0); }
    .sidebar-close { display: block; }
    .sidebar-toggle { display: block; }
    .admin-main { margin-left: 0; }
    
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .action-buttons { grid-template-columns: 1fr 1fr; }
    .page-title { flex-direction: column; align-items: flex-start; }
    
    .filter-form .filter-group { flex-direction: column; }
    .filter-form .form-group { min-width: 100%; }

    .detail-layout { flex-direction: column; }
    .detail-photo-col { display: flex; justify-content: center; }
    .detail-photo { width: 150px; height: 180px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .login-card { padding: 30px 20px; }
    .admin-content { padding: 16px; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-item.full-width { grid-column: 1; }
}

/* ===== DETAIL MODAL ===== */
.modal-lg { max-width: 700px; }

.detail-layout {
    display: flex;
    gap: 24px;
}

.detail-photo-col { flex-shrink: 0; }

.detail-photo {
    width: 160px;
    height: 200px;
    border-radius: var(--radius-md);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info-col { flex: 1; min-width: 0; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-item {
    padding: 8px 0;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 3px;
}

.detail-item span {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.detail-kesan {
    padding: 10px 14px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* View button style */
.btn-view { background: rgba(139,92,246,0.1); color: var(--accent); }
.btn-view:hover { background: var(--accent); color: white; }

/* Table cell wrapping for long content */
.cell-wrap {
    max-width: 180px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.cell-kesan {
    max-width: 200px;
    font-style: italic;
    color: var(--text-secondary);
}
