:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.25rem;
}

.brand-icon {
    font-size: 1.5rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
}

.nav-username {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--secondary);
}

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

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-info { background: var(--info); color: white; }

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: radial-gradient(circle at top right, #eef2ff, transparent),
                radial-gradient(circle at bottom left, #f0f9ff, transparent);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 0.95rem;
    transition: all 0.2s;
}

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

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

/* Badges */
.badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-role { text-transform: uppercase; letter-spacing: 0.025em; }

/* Table */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #f1f5f9;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 700;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

/* Auth Page */
.auth-page {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    justify-content: center;
}

.auth-container {
    max-width: 450px;
    width: 100%;
    margin: 4rem auto;
}

.auth-card {
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Utility */
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
}

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

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── PAGE LAYOUT ─────────────────────────────────────────── */
.page-content { padding: 2rem 0; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

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

/* ─── GRIDS ──────────────────────────────────────────────── */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-detail { grid-template-columns: 1.6fr 1fr; }
.grid-chart-table { grid-template-columns: 1.5fr 1fr; }

/* ─── STATS ──────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon-primary { background: #eef2ff; }
.stat-icon-success { background: #dcfce7; }
.stat-icon-warning { background: #fef3c7; }
.stat-icon-danger  { background: #fee2e2; }
.stat-icon-info    { background: #e0f2fe; }

.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 800; }

/* ─── ALERTS ─────────────────────────────────────────────── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.alert-close { background: none; border: none; cursor: pointer; font-size: 1.25rem; opacity: 0.6; }
.alert-close:hover { opacity: 1; }

.flash-container {
    position: fixed;
    top: 80px;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    width: 100%;
}

/* ─── SECTION (Landing) ──────────────────────────────────── */
.section { padding: 5rem 0; }
.section-alt { background: #f8fafc; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.section-desc  { color: var(--text-muted); font-size: 1.05rem; }

.card-feature {
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.card-feature h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.card-link {
    display: inline-block;
    margin-top: auto;
    padding-top: 1rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.card-link:hover { color: var(--primary-hover); text-decoration: underline; }

/* Hero visual floats */
.hero-badge {
    display: inline-block;
    background: #eef2ff;
    color: var(--primary);
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-visual { position: relative; }

.hero-card-float {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.float-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: floatUp 3s ease-in-out infinite alternate;
}

.float-card.card-2 { animation-delay: 0.5s; margin-left: 2rem; }
.float-card.card-3 { animation-delay: 1s; }

@keyframes floatUp {
    from { transform: translateY(0); }
    to   { transform: translateY(-8px); }
}

.float-icon { font-size: 1.75rem; }
.float-label { font-size: 0.75rem; color: var(--text-muted); }
.float-value { font-weight: 700; font-size: 0.95rem; }

/* Steps */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    max-width: 180px;
}

.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.step h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.step p  { font-size: 0.8rem; color: var(--text-muted); }

.step-arrow { font-size: 1.5rem; color: var(--border); }

/* Contact */
.contact-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.contact-icon { font-size: 2rem; display: block; margin-bottom: 1rem; }

/* ─── FORMS ──────────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.required  { color: var(--danger); }
.section-divider {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.input-password-wrapper { position: relative; }

.input-password-wrapper .form-input { padding-right: 3rem; }

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.form-group-action {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.filter-form .form-row {
    align-items: flex-end;
    flex-wrap: wrap;
}

/* ─── AUTH ───────────────────────────────────────────────── */
.auth-container-wide { max-width: 700px; }
.auth-title   { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.25rem; }
.auth-subtitle{ color: var(--text-muted); font-size: 0.9rem; }
.auth-form    { margin: 1.5rem 0; }
.auth-footer  { text-align: center; font-size: 0.875rem; color: var(--text-muted); }
.link         { color: var(--primary); font-weight: 600; text-decoration: none; }
.link:hover   { text-decoration: underline; }

/* ─── TABLE DETAIL ───────────────────────────────────────── */
.table-detail th { width: 160px; color: var(--text-muted); font-weight: 600; background: none; }
.table-detail td { word-break: break-word; }

/* ─── BADGE ROLE ─────────────────────────────────────────── */
.badge-mahasiswa { background: #e0f2fe; color: #075985; }
.badge-staff     { background: #f3e8ff; color: #6b21a8; }
.badge-admin     { background: #fce7f3; color: #9d174d; }
.badge-lg        { font-size: 0.875rem; padding: 0.4rem 0.875rem; }

/* ─── STATUS TIMELINE ────────────────────────────────────── */
.status-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.status-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.status-step.active .status-step-dot {
    background: var(--primary);
    color: white;
}

.status-step.done .status-step-dot { background: var(--success); }
.status-step.rejected .status-step-dot { background: var(--danger); }

.status-step-line {
    flex: 1;
    height: 3px;
    background: var(--border);
    min-width: 60px;
}

.status-step-line.active { background: var(--primary); }

.status-step p { font-size: 0.75rem; font-weight: 600; }

.status-current { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ─── CARD VARIANTS ──────────────────────────────────────── */
.card-status  { border-left: 4px solid var(--primary); }
.card-success { border-left: 4px solid var(--success); background: #f0fdf4; }

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.empty-state p   { color: var(--text-muted); }

/* ─── PAGINATION ─────────────────────────────────────────── */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pagination-info { font-size: 0.85rem; color: var(--text-muted); }

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.modal-box-wide { max-width: 700px; }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1.5rem; }

/* ─── FILE ACTIONS ───────────────────────────────────────── */
.file-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.tolak-form { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }

.actions-cell { display: flex; gap: 0.5rem; }

/* ─── ERROR PAGE ─────────────────────────────────────────── */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* ─── MISC ───────────────────────────────────────────────── */
.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.small   { font-size: 0.8rem; }
.ml-2    { margin-left: 0.5rem; }
.mt-3    { margin-top: 0.75rem; }
.mt-4    { margin-top: 1rem; }
.flex-grow { flex: 1; }
.text-danger { color: var(--danger); }
.info-list { padding-left: 1.5rem; }
.info-list li { margin-bottom: 0.5rem; }

.donut-wrapper { max-width: 220px; margin: 0 auto; }
.donut-legend  { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; font-size: 0.85rem; }
.legend-dot    { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 0.5rem; }

/* ─── NAVBAR TOGGLE (mobile) ─────────────────────────────── */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar-toggle { display: flex; }

    .navbar-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        gap: 1rem;
    }

    .navbar-menu.active { display: flex; }

    .hero-inner     { grid-template-columns: 1fr; gap: 2rem; }
    .hero-title     { font-size: 2.5rem; }
    .hero-visual    { display: none; }
    .grid-3         { grid-template-columns: 1fr; }
    .grid-2         { grid-template-columns: 1fr; }
    .grid-detail    { grid-template-columns: 1fr; }
    .grid-chart-table { grid-template-columns: 1fr; }
    .stats-grid     { grid-template-columns: repeat(2, 1fr); }
    .form-row       { grid-template-columns: 1fr; }
    .steps          { flex-direction: column; }
    .step-arrow     { transform: rotate(90deg); }
}
