/* ============================================
   PORTAL SPPG JATIAN - MAIN STYLESHEET
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #f1f5f9;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ============================================
   HEADER
   ============================================ */
/* ============================================
   HEADER DENGAN LOGO (GLOW HITAM)
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0px 24px;
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Logo Kiri - Tanpa Container, Glow Hitam */
.header-logo-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-logo-left .logo-img {
    width: 120px;
    height: 40px;
    object-fit: contain;
    /* Tanpa background, tanpa border */
    transition: transform 0.2s;
}

.header-logo-left .logo-img:hover {
    transform: scale(1.05);
}

/* Judul Tengah */
.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* Sembunyikan logo icon lama */
.logo-icon { display: none; }
.logo { display: none; }

/* Tombol Menu Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn i { width: 24px; height: 24px; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .header { padding: 10px 16px; }
    .header-content { gap: 10px; }
    
    .header-logo-left .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .header-title h1 {
        font-size: 0.95rem;
    }
    
    .mobile-menu-btn { display: block; }
}

@media (max-width: 480px) {
    .header-logo-left .logo-img {
        width: 35px;
        height: 35px;
    }
    .header-title h1 { font-size: 0.8rem; }
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    overflow-x: auto;
}

.nav-item {
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-link i {
    width: 18px;
    height: 18px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn i {
    width: 24px;
    height: 24px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 1.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.page-header h2 i {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.page-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.section-title h3 {
    font-size: 1.1rem;
    color: var(--text);
}

.section-title i {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.section-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ============================================
   EXAMPLE BOX - BIRU DENGAN BACKGROUND
   ============================================ */
.example-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #3b82f6;
    border-left: 5px solid #2563eb;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    overflow: hidden;
}

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 2px solid #1d4ed8;
}

.example-header:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.example-header h3 {
    font-size: 1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.example-header i {
    width: 20px;
    height: 20px;
    color: white;
}

.toggle-icon {
    transition: transform 0.3s;
    color: white;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.example-content {
    display: none;
    padding: 20px;
    background: white;
}

.example-content.open {
    display: block;
}

.example-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.example-table th,
.example-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #dbeafe;
}

.example-table th {
    background: #eff6ff;
    font-weight: 600;
    color: #1e40af;
    font-size: 0.85rem;
    border-bottom: 2px solid #3b82f6;
}

.example-table td {
    font-size: 0.9rem;
    color: #1e3a8a;
}

.example-table code {
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #1e40af;
    border: 1px solid #93c5fd;
    font-weight: 600;
}

.example-content .btn-outline {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    font-weight: 600;
}

.example-content .btn-outline:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* ============================================
   FORMS
   ============================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: white;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.input-with-prefix {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-with-prefix:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-prefix {
    padding: 10px 12px;
    background: var(--bg);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    border-right: 1.5px solid var(--border);
}

.input-with-prefix input {
    border: none;
    flex: 1;
    padding: 10px 12px;
}

.input-with-prefix input:focus {
    box-shadow: none;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: white;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg);
    border-color: var(--text-light);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-sm i {
    width: 14px;
    height: 14px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg);
    color: var(--text);
}

.btn-icon i {
    width: 18px;
    height: 18px;
}

.btn-icon.delete:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* ============================================
   UPLOAD ZONE
   ============================================ */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
    background: var(--bg);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 12px;
}

.upload-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.upload-subtext {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.file-label {
    cursor: pointer;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 12px;
}

/* ============================================
   FILE PREVIEW
   ============================================ */
.file-preview {
    margin-top: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.file-info i {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.file-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-light);
}

.file-info .btn-icon {
    margin-left: auto;
}

.excel-preview {
    margin-bottom: 20px;
}

.excel-preview h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.preview-count {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
    margin-top: 8px;
}

/* ============================================
   TEMPLATE PREVIEW
   ============================================ */
.template-preview {
    margin: 20px 0;
    overflow-x: auto;
}

.template-preview h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 10px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.preview-table th {
    background: var(--primary);
    color: white;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.preview-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

/* ============================================
   SCHOOL INFO DISPLAY
   ============================================ */
.school-info {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

.school-info p {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.school-info p:last-child {
    margin-bottom: 0;
}

.school-info strong {
    color: var(--primary-dark);
}

/* ============================================
   FILES LIST
   ============================================ */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.file-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.file-item i:first-child {
    width: 32px;
    height: 32px;
    color: var(--success);
    flex-shrink: 0;
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.file-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================
   SECURITY BAR
   ============================================ */
.security-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.security-bar.unlocked {
    background: var(--success-light);
    border-color: var(--success);
}

.security-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text);
}

.security-info i {
    width: 20px;
    height: 20px;
    color: var(--success);
}

.security-bar.unlocked .security-info i {
    color: var(--success);
}

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

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

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.stat-card i {
    width: 40px;
    height: 40px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.stat-clickable {
    cursor: pointer;
}

.stat-clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-clickable.active {
    border-color: var(--primary);
    border-width: 2px;
    background: var(--primary-light);
}

.stat-clickable.active i {
    background: var(--primary);
    color: white;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   DATA TABLE
   ============================================ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

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

.data-table th {
    background: var(--bg);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

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

.data-table tbody tr:hover {
    background: var(--primary-light);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--text-light);
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.action-btns {
    display: flex;
    gap: 4px;
}

/* ============================================
   MASKED DATA
   ============================================ */
.masked-data {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.masked-data .data-value {
    letter-spacing: 1px;
}

.reveal-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reveal-btn:hover {
    background: var(--bg);
    color: var(--primary);
}

.reveal-btn i {
    width: 16px;
    height: 16px;
}

/* ============================================
   MODAL OVERLAY (VERIFIKASI KEAMANAN)
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.modal-header .btn-icon {
    padding: 6px;
}

.modal-header .btn-icon:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body .form-actions {
    margin-top: 20px;
    padding-top: 16px;
}

/* Password Modal Specific */
.password-modal {
    max-width: 420px;
}

.password-info {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-dark);
    font-size: 0.85rem;
}

.password-info i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--primary);
}

.password-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
}

.password-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.toggle-password:hover {
    background: var(--bg);
    color: var(--text);
}

.toggle-password i {
    width: 18px;
    height: 18px;
}

.password-error {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--danger-light);
    color: var(--danger);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-top: 10px;
    animation: shake 0.4s;
}

.password-error.show {
    display: flex;
}

.password-error i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    background: var(--text);
    color: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 420px;
    white-space: pre-wrap;
    word-break: break-word;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast i[data-lucide] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.toast-close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.toast-close-btn i {
    width: 18px;
    height: 18px;
    margin-top: 0;
}

/* ============================================
   RUNNING TEXT MAINTENANCE BANNER
   ============================================ */
.maintenance-banner {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: white;
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 98;
}

.maintenance-text {
    display: inline-block;
    padding-left: 100%;
    animation: scrollText 25s linear infinite;
}

.maintenance-banner:hover .maintenance-text {
    animation-play-state: paused;
}

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

/* ============================================
   UPLOAD NOTICE (VERSI PADAT & RAPAT)
   ============================================ */
.upload-notice {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: var(--radius, 8px);
    padding: 12px 18px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
    font-family: system-ui, -apple-system, sans-serif;
    position: relative;
}

/* Tombol Silang Pojok Kanan Atas */
.btn-close-notice {
    position: absolute;
    right: 12px;
    top: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #78350f;
    font-weight: bold;
    line-height: 1;
    padding: 0;
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(245, 158, 11, 0.3);
}

.notice-header i, 
.notice-header svg {
    width: 20px;
    height: 20px;
    color: #d97706;
    flex-shrink: 0;
}

.notice-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #78350f;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Header Khusus Validasi Bawah (Aksen Merah) */
.notice-header.header-danger {
    border-bottom: 2px solid rgba(220, 38, 38, 0.2);
}
.notice-header.header-danger h4 {
    color: #991b1b;
}
.notice-header.header-danger i,
.notice-header.header-danger svg {
    color: #dc2626;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-list li {
    padding: 4px 0;
    padding-left: 24px;
    position: relative;
    color: #92400e;
    font-size: 0.85rem;
    line-height: 1.5;
}

.notice-list li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
    top: 4px;
    font-size: 0.85rem;
}

.notice-list li strong {
    color: #78350f;
    font-weight: 700;
}

/* Teks List Bagian Validasi Bawah */
.notice-list.list-danger li {
    color: #7f1d1d;
}

/* Sub-list Kode Kelas dibuat Horizontal (Grid) */
.notice-sublist {
    list-style: none;
    padding-left: 0;
    margin-top: 4px;
    margin-bottom: 2px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 4px; 
}

.notice-sublist li {
    padding: 2px 0;
    padding-left: 14px;
    color: #78350f;
    font-size: 0.8rem;
}

.notice-sublist li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 2px;
    color: #d97706;
    font-weight: bold;
}

/* Styling Code Atas (Kuning) */
.notice-list code {
    background: rgba(255, 255, 255, 0.7);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-family: monospace;
}

/* Styling Code Validasi Bawah (Merah) */
.notice-list.list-danger code {
    background: rgba(255, 255, 255, 0.7);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Garis Pembatas Putus-putus */
.upload-notice hr {
    border: 0;
    border-top: 1px dashed rgba(217, 119, 6, 0.5);
    margin: 10px 0;
}

/* ============================================
   FLOATING NEWS SIDEBAR
   ============================================ */
.floating-news-sidebar {
    position: fixed;
    top: 100px;
    right: 0;
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px 0 0 12px;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    border-right: none;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 400px;
}

.sidebar-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 12px 15px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sidebar-header i {
    width: 18px;
    height: 18px;
}

.sidebar-scroll {
    overflow: hidden;
    padding: 10px;
    background: #f8fafc;
}

.sidebar-scroll ul {
    list-style: none;
    padding: 0;
    margin: 0;
    animation: scrollVertical 20s linear infinite;
}

.sidebar-scroll li {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.4;
}

.sidebar-scroll li:last-child {
    border-bottom: none;
}

.sidebar-scroll li b {
    color: var(--primary-dark);
}

@keyframes scrollVertical {
    0% { transform: translateY(100%); }
    100% { transform: translateY(-200%); }
}

.floating-news-sidebar:hover .sidebar-scroll ul {
    animation-play-state: paused;
}

/* ============================================
   LOADING & UTILITIES
   ============================================ */
.loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.loading-placeholder i {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .header-content { padding: 0 16px; }
    .logo h1 { font-size: 1rem; }
    .mobile-menu-btn { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        padding: 12px 0;
    }
    .nav-menu.open { display: flex; }
    .nav-link {
        padding: 12px 20px;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    .nav-link.active {
        border-bottom: none;
        border-left-color: var(--primary);
        background: var(--primary-light);
    }
    .main-content { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box { min-width: auto; }
    .security-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .security-actions { width: 100%; }
    .security-actions button { flex: 1; }
    .form-actions {
        flex-direction: column;
    }
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
    .floating-news-sidebar { display: none; }
    .maintenance-banner {
        font-size: 0.85rem;
        padding: 10px 0;
    }
    .maintenance-text { animation-duration: 18s; }
    .upload-notice { padding: 16px; }
    .notice-list li { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .logo h1 { font-size: 0.9rem; }
    .page-header h2 { font-size: 1.2rem; }
    .card { padding: 16px; }
    .stat-card { padding: 16px; }
    .stat-number { font-size: 1.5rem; }
}