/* =====================================================
   Data Mahasiswa - Main Stylesheet
   Modern CSS with Bootstrap 5 customizations
   ===================================================== */

/* ----- CSS Variables (Design System) ----- */
:root {
    /* Primary Colors - Professional Blue */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Accent Colors - Vibrant Teal */
    --accent-50: #f0fdfa;
    --accent-100: #ccfbf1;
    --accent-200: #99f6e4;
    --accent-300: #5eead4;
    --accent-400: #2dd4bf;
    --accent-500: #14b8a6;
    --accent-600: #0d9488;
    --accent-700: #0f766e;
    --accent-800: #115e59;
    --accent-900: #134e4a;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Shadows - Very subtle */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
    --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.02);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.04), 0 4px 6px rgba(0,0,0,0.02);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.05), 0 10px 10px rgba(0,0,0,0.02);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Border Radius - Sharper, more professional */
    --radius-sm: 0.125rem;
    --radius: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-full: 9999px;

    /* Font Family */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ----- Base Styles ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ----- Typography ----- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--gray-900);
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

/* ----- Layout ----- */
.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ----- Modern Navbar ----- */
.navbar-modern {
    background: linear-gradient(135deg,
            rgba(30, 64, 175, 0.95) 0%,
            rgba(37, 99, 235, 0.9) 50%,
            rgba(14, 165, 233, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 0.875rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

.navbar-modern.scrolled {
    padding: 0.5rem 0;
    background: linear-gradient(135deg,
            rgba(30, 64, 175, 0.98) 0%,
            rgba(37, 99, 235, 0.95) 100%);
}

/* Brand Styles */
.navbar-modern .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.navbar-modern .navbar-brand:hover {
    opacity: 0.9;
}

.navbar-modern .brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
}

.navbar-modern .navbar-brand:hover .brand-icon {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    transform: rotate(-5deg);
}

.navbar-modern .brand-icon i {
    font-size: 1.4rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-modern .brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Navigation Links */
.navbar-modern .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.625rem 1.25rem !important;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.125rem;
    overflow: hidden;
}

.navbar-modern .navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-radius: var(--radius-full);
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-normal);
}

.navbar-modern .navbar-nav .nav-link:hover::before,
.navbar-modern .navbar-nav .nav-link.active::before {
    opacity: 1;
    transform: scale(1);
}

.navbar-modern .navbar-nav .nav-link:hover,
.navbar-modern .navbar-nav .nav-link.active {
    color: white !important;
    transform: translateY(-1px);
}

.navbar-modern .navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-modern .navbar-nav .nav-link i {
    font-size: 1.1rem;
    transition: transform var(--transition-fast);
}

.navbar-modern .navbar-nav .nav-link:hover i {
    transform: scale(1.15);
}

.navbar-modern .navbar-nav .nav-link span {
    position: relative;
    z-index: 1;
}

/* Dropdown Styles */
.navbar-modern .dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    margin-top: 0.5rem;
    animation: dropdownFade 0.25s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-modern .dropdown-item {
    color: var(--gray-700);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.navbar-modern .dropdown-item:hover {
    background: var(--primary-50);
    color: var(--primary-700);
    transform: translateX(4px);
}

.navbar-modern .dropdown-item i {
    font-size: 1.1rem;
    color: var(--gray-500);
    transition: color var(--transition-fast);
}

.navbar-modern .dropdown-item:hover i {
    color: var(--primary-600);
}

.navbar-modern .dropdown-divider {
    border-color: var(--gray-200);
    margin: 0.5rem 0;
}

/* Custom Toggler - Modern Hamburger */
.navbar-modern .navbar-toggler {
    border: none;
    padding: 0.625rem;
    background: #1e3a5f;
    border-radius: 10px;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 42px;
    height: 42px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-modern .navbar-toggler:hover {
    background: #2d4a6f;
    transform: scale(1.05);
}

.navbar-modern .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.5);
    outline: none;
}

.navbar-modern .toggler-bar {
    display: block;
    width: 20px;
    height: 2.5px;
    min-height: 2.5px;
    background: #d9a441;
    background-color: #d9a441;
    border-radius: 2px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.navbar-modern .navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-modern .navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.navbar-modern .navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .navbar-modern .navbar-collapse {
        background: rgba(30, 64, 175, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: var(--radius-lg);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-modern .navbar-nav .nav-link {
        padding: 0.875rem 1rem !important;
        border-radius: var(--radius);
    }

    .navbar-modern .dropdown-menu {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        box-shadow: none;
        padding: 0.5rem;
    }

    .navbar-modern .dropdown-item {
        color: rgba(255, 255, 255, 0.9);
    }

    .navbar-modern .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .navbar-modern .dropdown-item i {
        color: rgba(255, 255, 255, 0.7);
    }

    .navbar-modern .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.15);
    }
}

/* ----- Hero Section ----- */
.hero {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 50%, var(--gray-900) 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: white;
    opacity: 0.9;
    max-width: 600px;
}

.hero .btn-primary {
    background: var(--primary-700);
    border-color: var(--primary-700);
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.hero .btn-primary:hover {
    background: var(--primary-800);
    border-color: var(--primary-800);
}

/* ----- Cards ----- */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
    background: white;
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    background: white;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ----- Feature Cards ----- */
.feature-card {
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast);
}

.feature-card:hover {
    border-color: var(--primary-300);
}

.feature-card .icon {
    width: 48px;
    height: 48px;
    background: var(--primary-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--primary-700);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* ----- Buttons ----- */
.btn {
    font-weight: 500;
    border-radius: var(--radius);
    padding: 0.5rem 1.25rem;
    transition: all var(--transition-fast);
}

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

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

.btn-accent {
    background: var(--accent-500);
    border-color: var(--accent-500);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-600);
    border-color: var(--accent-600);
    color: white;
}

.btn-outline-primary {
    border-color: var(--primary-600);
    color: var(--primary-600);
}

.btn-outline-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

/* ----- Forms ----- */
.form-control {
    border-radius: var(--radius);
    border-color: var(--gray-300);
    padding: 0.625rem 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-select {
    border-radius: var(--radius);
}

/* ----- Page Loading Animation ----- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Loading bar at top */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    z-index: 10000;
    width: 0;
    transition: width 0.2s ease;
}

.loading-bar.active {
    transition: width 0.5s ease;
}

/* ----- Content Area ----- */
#app {
    min-height: 400px;
    transition: opacity var(--transition-normal);
}

#app.loading {
    opacity: 0.5;
}

.content-section {
    padding: 3rem 0;
}

.content-section h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-600);
    border-radius: var(--radius-full);
}

/* ----- Footer ----- */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: var(--accent-400);
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* ----- Alerts / Toast ----- */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

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

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

/* ----- Stats Section ----- */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: var(--primary-100);
    color: var(--primary-600);
}

.stat-icon.accent {
    background: var(--accent-100);
    color: var(--accent-600);
}

.stat-icon.success {
    background: #d1fae5;
    color: #059669;
}

.stat-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ----- Tables ----- */
.table {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background: var(--gray-100);
}

.table th {
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: var(--gray-50);
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .content-section {
        padding: 2rem 0;
    }
}

/* ----- Animations ----- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

/* Stagger animations */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}