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

:root {
    --goethe-green: #79b03a;
    --goethe-green-2: #a7cf53;
    --goethe-red: #cf2e2e;
    --goethe-charcoal: #2c3238;
    --goethe-graphite: #1f242b;
    --goethe-fog: #eef2ef;
    --goethe-white: #ffffff;
    --goethe-text: #222a31;
    --goethe-shadow: 0 14px 36px rgba(16, 26, 35, 0.18);
}

/* Global admin background */
body,
.content-wrapper,
.main-footer {
    background:
        radial-gradient(1000px 520px at 0% -20%, rgba(121, 176, 58, 0.18), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(207, 46, 46, 0.12), transparent 58%),
        linear-gradient(180deg, #f6f8f7 0%, #edf2ef 100%);
    color: var(--goethe-text);
    font-family: 'Exo 2', 'Segoe UI', Tahoma, sans-serif;
}

/* Top navbar */
.main-header.navbar {
    background: linear-gradient(120deg, #1f242b 0%, #303943 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 6px 20px rgba(14, 19, 25, 0.35) !important;
}
.main-header.navbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--goethe-green), var(--goethe-green-2), var(--goethe-red));
}
.main-header.navbar .nav-link,
.main-header.navbar .navbar-nav .nav-link,
.main-header.navbar .navbar-nav .nav-link i {
    color: #f2f5f8 !important;
}
.main-header.navbar .nav-link:hover,
.main-header.navbar .navbar-nav .nav-link:hover {
    color: var(--goethe-green-2) !important;
}

/* Sidebar */
.main-sidebar {
    background:
        radial-gradient(420px 300px at 20% 0%, rgba(121, 176, 58, 0.2), transparent 70%),
        linear-gradient(180deg, #212830 0%, #171c22 60%, #11161c 100%) !important;
}
.brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.brand-link .brand-text {
    color: #f5f8fb !important;
    font-family: 'Rajdhani', 'Exo 2', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.sidebar .nav-sidebar > .nav-item > .nav-link {
    border-radius: 12px;
    margin: 3px 8px;
    color: #dce4eb !important;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.sidebar .nav-sidebar > .nav-item > .nav-link:hover {
    background: rgba(121, 176, 58, 0.16) !important;
    color: #ffffff !important;
    transform: translateX(2px);
}
.sidebar .nav-sidebar > .nav-item > .nav-link.active {
    background: linear-gradient(90deg, rgba(121, 176, 58, 0.34), rgba(121, 176, 58, 0.2)) !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(167, 207, 83, 0.34);
}
.sidebar .nav-treeview > .nav-item > .nav-link.active {
    background: rgba(207, 46, 46, 0.2) !important;
    color: #fff !important;
}
.main-sidebar .nav-header,
.main-sidebar .nav-header:first-of-type {
    border-top: 0 !important;
    margin-top: .2rem !important;
    padding-top: .2rem !important;
    color: #a9b7c6 !important;
}
.main-sidebar .nav-header::before,
.main-sidebar .nav-header::after {
    content: none !important;
}

/* Content cards and controls */
.card {
    border: 1px solid rgba(44, 50, 56, 0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(24, 34, 44, 0.08);
}
.card-header {
    border-bottom: 1px solid rgba(44, 50, 56, 0.08) !important;
}
.btn-primary,
.btn-success {
    background: linear-gradient(90deg, var(--goethe-green), var(--goethe-green-2)) !important;
    border-color: #6ea335 !important;
    color: #16210f !important;
    font-weight: 700;
}
.btn-primary:hover,
.btn-success:hover {
    filter: brightness(0.96);
}
.btn-danger,
.badge-danger {
    background: linear-gradient(90deg, var(--goethe-red), #e24444) !important;
    border-color: #bd2727 !important;
}
.form-control:focus,
.custom-select:focus,
.select2-container--default .select2-selection--single:focus {
    border-color: var(--goethe-green) !important;
    box-shadow: 0 0 0 0.2rem rgba(121, 176, 58, 0.18) !important;
}

/* Login page: futuristic but institutional */
.login-page,
.register-page,
.forgot-password-page,
.reset-password-page {
    background:
        radial-gradient(1200px 720px at 0% -10%, rgba(121, 176, 58, 0.28), transparent 60%),
        radial-gradient(1100px 720px at 100% 0%, rgba(207, 46, 46, 0.18), transparent 62%),
        linear-gradient(135deg, #1a1f25 0%, #272f37 52%, #20272f 100%) !important;
    position: relative;
    overflow: hidden;
}
#tsparticles,
#tsparticles canvas {
    position: fixed !important;
    inset: 0;
}
.login-page::before,
.register-page::before,
.forgot-password-page::before,
.reset-password-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at 50% 35%, black 35%, transparent 78%);
    pointer-events: none;
    z-index: 1;
}
.login-logo a,
.register-logo a,
.forgot-password-logo a,
.reset-password-logo a {
    color: #f8fbff !important;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-weight: 700;
}
.login-box,
.register-box {
    width: 470px;
    max-width: calc(100vw - 2rem);
    animation: goetheFloat .85s ease-out both;
    position: relative;
    z-index: 2;
}
.goethe-auth-card,
.login-card-body,
.register-card-body {
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 18px !important;
    box-shadow: var(--goethe-shadow) !important;
    backdrop-filter: blur(8px);
}
.goethe-auth-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 250, 0.86)) !important;
}
.goethe-auth-headline {
    text-align: center;
}
.goethe-auth-kicker {
    color: #4b5560;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 0.68rem;
}
.goethe-auth-headline h1 {
    margin: 0.35rem 0 0.3rem;
    font-size: 1.45rem;
    color: #182029;
    font-weight: 800;
}
.goethe-auth-headline p {
    margin: 0;
    color: #5d6873;
    font-size: 0.9rem;
}
.login-card-body .form-control {
    border-radius: 10px;
    border: 1px solid rgba(44, 50, 56, 0.16);
    height: calc(2.3rem + 2px);
}
.login-card-body .input-group-text {
    border: 1px solid rgba(44, 50, 56, 0.16);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: rgba(121, 176, 58, 0.08);
    color: #4a5866;
}
.btn-goethe-login {
    background: linear-gradient(100deg, var(--goethe-green), var(--goethe-green-2) 65%, #b8db6d);
    border: 0;
    border-radius: 10px;
    color: #1d2716;
    font-weight: 800;
    letter-spacing: 0.01em;
    padding: 0.62rem 1rem;
}
.btn-goethe-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(121, 176, 58, 0.28);
}
.goethe-link {
    color: #37414d;
    font-weight: 600;
}
.goethe-link:hover {
    color: var(--goethe-red);
}
.goethe-resend-form label {
    color: #4b5560;
    font-size: 0.85rem;
}
.goethe-resend-form .btn-outline-secondary {
    border-color: #8e98a3;
    color: #3f4750;
}
.goethe-resend-form .btn-outline-secondary:hover {
    background: #3f4750;
    color: #fff;
}

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

/* DataTables overflow guard */
.table-responsive {
    overflow-x: auto;
}
.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
}
.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
}
.table-modern,
.table-modern.table {
    width: 100%;
}

@media (max-width: 576px) {
    .login-box,
    .register-box {
        width: calc(100vw - 1.25rem);
    }

    .goethe-auth-headline h1 {
        font-size: 1.25rem;
    }
}
