/* ========================================
   PORTAL DATABASE MAHASISWA
   Premium Dark Theme with Glassmorphism
   ======================================== */

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

/* ── CSS Variables ── */
:root {
    --bg-primary: #f0fdfa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.90);
    --bg-glass-hover: rgba(204, 251, 241, 0.7);
    --bg-input: #f8fafc;
    --bg-input-focus: #ffffff;

    --border-glass: #ccfbf1;
    --border-focus: #00b9ad;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #686969;
    --text-accent: #00b9ad;

    --accent-primary: #00b9ad;
    --accent-secondary: #60c0d0;
    --accent-lime: #cddc29;
    --accent-gradient: linear-gradient(135deg, #00b9ad 0%, #60c0d0 50%, #cddc29 100%);
    --accent-glow: rgba(0, 185, 173, 0.2);

    --success: #00b9ad;
    --success-bg: rgba(0, 185, 173, 0.12);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #60c0d0;
    --info-bg: rgba(96, 192, 208, 0.12);

    --shadow-sm: 0 1px 3px rgba(0, 185, 173, 0.08);
    --shadow-md: 0 4px 14px rgba(0, 185, 173, 0.12);
    --shadow-lg: 0 10px 30px rgba(0, 185, 173, 0.16);
    --shadow-glow: 0 0 30px rgba(0, 185, 173, 0.25);

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

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Animated Background ── */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

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

.bg-animation .orb:nth-child(1) {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.15);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bg-animation .orb:nth-child(2) {
    width: 350px;
    height: 350px;
    background: rgba(139, 92, 246, 0.12);
    bottom: -80px;
    left: -80px;
    animation-delay: -7s;
}

.bg-animation .orb:nth-child(3) {
    width: 250px;
    height: 250px;
    background: rgba(59, 130, 246, 0.1);
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ── App Wrapper ── */
#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.6s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.login-logo .logo-icon img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

.form-input-icon {
    position: relative;
}

.form-input-icon .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.form-input-icon .form-input {
    padding-left: 42px;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-select:focus {
    background-color: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #0ea472;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: #111;
}
.btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}
.btn-ghost:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ── Error Message ── */
.login-error {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #fca5a5;
    font-size: 13px;
    display: none;
    animation: shake 0.4s ease;
}

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

/* ════════════════════════════════════════
   MAIN LAYOUT (After Login)
   ════════════════════════════════════════ */

/* ── Sidebar ── */
.main-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-glass);
}

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

.sidebar-header .brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-header .brand-icon img {
    height: 38px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.sidebar-header .brand-text h2 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-header .brand-text span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

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

.sidebar-nav .nav-section {
    margin-bottom: 24px;
}

.sidebar-nav .nav-section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
    font-weight: 400;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--text-accent);
    font-weight: 500;
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-glass);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.user-details .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-details .user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Content Area ── */
.content-area {
    flex: 1;
    margin-left: 260px;
    padding: 0;
    min-height: 100vh;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-glass);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.content-header h1 {
    font-size: 22px;
    font-weight: 700;
}

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

.content-body {
    padding: 32px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

/* ════════════════════════════════════════
   DASHBOARD STATS
   ════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.stat-card .stat-icon.purple {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
}
.stat-card .stat-icon.green {
    background: var(--success-bg);
    color: var(--success);
}
.stat-card .stat-icon.blue {
    background: var(--info-bg);
    color: var(--info);
}
.stat-card .stat-icon.orange {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ════════════════════════════════════════
   DATA TABLE
   ════════════════════════════════════════ */
.table-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    flex-wrap: wrap;
    gap: 12px;
}

.table-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    padding: 9px 14px 9px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    width: 260px;
    outline: none;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead th {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-glass);
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-glass-hover);
}

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

.data-table tbody td {
    padding: 12px 16px;
    color: var(--text-primary);
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table .actions-cell {
    display: flex;
    gap: 6px;
}

.data-table .action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-fast);
    background: var(--bg-glass);
    color: var(--text-secondary);
}

.data-table .action-btn:hover {
    transform: scale(1.1);
}

.data-table .action-btn.edit:hover {
    background: var(--info-bg);
    color: var(--info);
}

.data-table .action-btn.delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.data-table .action-btn.view:hover {
    background: var(--success-bg);
    color: var(--success);
}

/* ── Badge ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-male {
    background: var(--info-bg);
    color: var(--info);
}

.badge-female {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
}

.badge-class {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
}

/* ── Pagination ── */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
    flex-wrap: wrap;
    gap: 12px;
}

.table-footer .showing-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.pagination button.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ════════════════════════════════════════
   MODAL
   ════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

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

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px;
    border-top: 1px solid var(--border-glass);
}

/* ── Form Grid in Modal ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.form-section-title {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-accent);
    padding: 8px 0 4px;
    margin-top: 8px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ════════════════════════════════════════
   STUDENT PROFILE PAGE
   ════════════════════════════════════════ */
.profile-header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.profile-info h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-info .profile-nim {
    color: var(--text-accent);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.profile-info .profile-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-info .profile-meta span {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Profile Cards ── */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.profile-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.profile-card-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-card-body {
    padding: 20px 24px;
}

.profile-field {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-field .field-label {
    width: 140px;
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 2px;
}

.profile-field .field-value {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.profile-field .field-value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
}

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

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    min-width: 300px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.4s ease;
    font-size: 13px;
}

.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);
}

.toast .toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast .toast-message {
    flex: 1;
    color: var(--text-primary);
}

.toast .toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
}

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

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

/* ════════════════════════════════════════
   CONFIRM DIALOG
   ════════════════════════════════════════ */
.confirm-dialog {
    text-align: center;
    padding: 20px;
}

.confirm-dialog .confirm-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirm-dialog h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.confirm-dialog p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.confirm-dialog .confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ════════════════════════════════════════
   LOADING & EMPTY STATES
   ════════════════════════════════════════ */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 360px;
    margin: 0 auto;
}

/* ════════════════════════════════════════
   DETAIL VIEW
   ════════════════════════════════════════ */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.detail-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
}

.detail-item .detail-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-item .detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.detail-item .detail-value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .content-area {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        display: none;
    }
    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .content-body {
        padding: 20px 16px;
    }
    .content-header {
        padding: 16px 20px;
    }
    .content-header h1 {
        font-size: 18px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-card .stat-value {
        font-size: 22px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-info .profile-meta {
        justify-content: center;
    }
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .modal {
        max-width: 100%;
        border-radius: var(--radius-lg);
    }
    .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box input {
        width: 100%;
    }
    .table-footer {
        flex-direction: column;
        align-items: center;
    }
    .login-card {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Page Transition ── */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* ── Filter dropdown ── */
.filter-select {
    padding: 9px 30px 9px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all var(--transition-fast);
}

.filter-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ════════════════════════════════════════
   PRINT STYLES FOR LAPORAN
   ════════════════════════════════════════ */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: Arial, sans-serif !important;
        font-size: 11pt !important;
    }

    .bg-animation,
    .sidebar,
    .sidebar-overlay,
    .content-header,
    .toast-container,
    .modal-overlay,
    .no-print,
    .btn,
    .menu-toggle,
    .filter-panel {
        display: none !important;
    }

    .content-area {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .content-body {
        padding: 0 !important;
    }

    .print-only {
        display: block !important;
    }

    .report-paper {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 20px !important;
        border: none !important;
        box-shadow: none !important;
    }

    .report-table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-top: 15px !important;
    }

    .report-table th,
    .report-table td {
        border: 1px solid #000000 !important;
        padding: 6px 8px !important;
        font-size: 10pt !important;
        color: #000000 !important;
    }

    .report-table th {
        background-color: #f0f0f0 !important;
        font-weight: bold !important;
        text-align: center !important;
    }

    .kop-surat {
        text-align: center;
        border-bottom: 3px double #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .kop-surat h2 {
        font-size: 16pt;
        font-weight: bold;
        margin: 0;
        text-transform: uppercase;
    }

    .kop-surat h3 {
        font-size: 14pt;
        margin: 2px 0;
    }

    .kop-surat p {
        font-size: 10pt;
        margin: 0;
        color: #333;
    }
}

/* ════════════════════════════════════════
   PUBLIC LANDING PAGE STYLES
   ════════════════════════════════════════ */
.public-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 14px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.navbar-brand .brand-icon {
    font-size: 28px;
}
.navbar-brand .brand-text h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}
.navbar-brand .brand-text span {
    font-size: 12px;
    color: var(--text-muted);
}
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav-link:hover {
    color: var(--text-accent);
}
.public-hero {
    padding: 60px 24px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}
.hero-container {
    max-width: 860px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}
.hero-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.public-section {
    padding: 60px 24px;
}
.section-container {
    max-width: 1280px;
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.section-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}
.public-footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--border-glass);
    padding: 24px;
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
@media (max-width: 768px) {
    .navbar-menu { display: none; }
    .hero-title { font-size: 28px; }
}

/* ════════════════════════════════════════
   INFOGRAFIS ANIMATIONS & MICRO-INTERACTIONS
   ════════════════════════════════════════ */
@keyframes barGrow {
    from { width: 0%; }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.infografis-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.infografis-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.3) !important;
}

.animated-bar {
    animation: barGrow 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.pulse-badge {
    animation: pulseGlow 2s infinite;
}

.float-anim {
    animation: floatSoft 4s ease-in-out infinite;
}

@media (max-width: 900px) {
    .infografis-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ════════════════════════════════════════
   TOAST NOTIFICATIONS
   ════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 40px);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }

.toast-icon { font-size: 16px; }
.toast-message { flex: 1; word-break: break-word; }

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    margin-left: auto;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

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

/* ════════════════════════════════════════
   DESKTOP 75% SCALING (EXACT VIEWPORT FIT)
   ════════════════════════════════════════ */
@media (min-width: 1025px) {
    #app {
        zoom: 0.75;
        width: calc(100vw / 0.75);
        min-height: calc(100vh / 0.75);
    }

    .sidebar {
        width: 250px;
    }

    .content-area {
        margin-left: 250px;
    }
}

@media (max-width: 1024px) {
    .content-area {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    body {
        font-size: 13px;
    }

    .content-area {
        padding: 0 !important;
        margin-left: 0 !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .content-body {
        padding: 14px 12px !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* Content Header Mobile Stacking */
    .content-header {
        padding: 14px 16px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .content-header h1 {
        font-size: 18px !important;
    }

    .content-header .header-actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .content-header .header-actions .btn {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 110px !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Table & Card Responsiveness */
    .table-card {
        border-radius: var(--radius-md) !important;
        max-width: 100% !important;
        margin-bottom: 16px !important;
    }

    .table-header {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 14px 14px !important;
        gap: 12px !important;
    }

    .table-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .search-box {
        width: 100% !important;
    }

    .search-box input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .filter-select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .table-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 0 !important;
    }

    .data-table {
        width: 100% !important;
        min-width: 650px !important;
    }

    .data-table th, .data-table td {
        padding: 8px 10px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    .table-footer {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 12px 14px !important;
        text-align: center !important;
    }

    .pagination {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    .pagination button {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px !important;
    }

    /* Modal Mobile UX */
    .modal-overlay {
        padding: 8px !important;
        align-items: flex-end !important;
    }

    .modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 92vh !important;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
        margin: 0 !important;
    }

    .modal-header {
        padding: 14px 16px !important;
    }

    .modal-body {
        padding: 16px 14px !important;
    }

    .modal-footer {
        flex-direction: column-reverse !important;
        gap: 8px !important;
        padding: 12px 14px !important;
    }

    .modal-footer .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Report Tabs Scroll Container */
    div[style*="overflow-x:auto"] {
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    div[style*="overflow-x:auto"]::-webkit-scrollbar {
        display: none !important;
    }

    div[style*="overflow-x:auto"] .btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    /* Hero & Navbar */
    .hero-section {
        padding: 24px 14px !important;
    }

    .hero-title {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }

    .public-navbar {
        padding: 10px 14px !important;
    }

    .navbar-brand h2 {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .content-header .header-actions .btn {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .toast-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: calc(100vw - 20px) !important;
    }
.password-toggle-btn {
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    user-select: none;
}

.password-toggle-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
}



