:root {
    --primary: #312E81;
    --primary-light: #4338CA;
    --primary-dark: #1E1B4B;
    --primary-glow: rgba(49, 46, 129, 0.08);
    --accent: #06B6D4;
    --accent-light: #22D3EE;
    --accent-glow: rgba(6, 182, 212, 0.1);
    --bg: #F9FAFB;
    --bg-alt: #F3F4F6;
    --card: #FFFFFF;
    --text: #111827;
    --text-secondary: #6B7280;
    --muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --success: #059669;
    --success-light: #D1FAE5;
    --info: #2563EB;
    --info-light: #DBEAFE;
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-sm: 0 0 0 1px var(--border);
    --shadow-md: 0 0 0 1px var(--border), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 0 0 1px var(--border), 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 0 0 1px var(--border), 0 8px 32px rgba(0, 0, 0, 0.08)
}

body.dark-mode {
    --bg: #0F172A;
    --bg-alt: #1E293B;
    --card: #1F2937;
    --text: #F3F4F6;
    --text-secondary: #9CA3AF;
    --border: #374151;
    --border-light: #374151
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background .3s, color .3s
}

body.lang-bn {
    font-family: 'Noto Sans Bengali', sans-serif
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.2
}

body.lang-bn h1,
body.lang-bn h2,
body.lang-bn h3,
body.lang-bn h4,
body.lang-bn h5 {
    font-family: 'Noto Sans Bengali', sans-serif
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    padding: 10px 24px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-family: 'Inter';
    font-weight: 600;
    font-size: 13px;
    transition: all .2s
}

.btn-accent:hover {
    background: var(--accent-light);
    box-shadow: 0 0 0 3px var(--accent-glow)
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    padding: 10px 24px;
    border-radius: var(--radius);
    border: 1.5px solid var(--primary);
    cursor: pointer;
    font-family: 'Inter';
    font-weight: 600;
    font-size: 13px;
    transition: all .2s
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff
}

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

.btn-danger {
    background: var(--danger);
    color: #fff;
    padding: 6px 16px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-family: 'Inter';
    font-weight: 500;
    font-size: 12px;
    transition: all .2s
}

.btn-danger:hover {
    opacity: .9
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all .2s;
    overflow: hidden
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--muted)
}

input,
select,
textarea {
    font-family: 'Inter';
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    width: 100%;
    transition: all .2s;
    background: #fff;
    color: var(--text)
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: var(--bg-alt);
    border-color: var(--border);
    color: var(--text)
}

body.lang-bn input,
body.lang-bn select,
body.lang-bn textarea {
    font-family: 'Noto Sans Bengali', sans-serif
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
    letter-spacing: .01em
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    cursor: pointer;
    text-decoration: none;
    border-radius: var(--radius)
}

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

.dropdown {
    position: relative
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all .2s;
    z-index: 100;
    border: 1px solid var(--border)
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible
}

.dropdown-item {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    font-weight: 500
}

.dropdown-item:hover {
    background: var(--bg-alt);
    color: var(--primary)
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 12px;
    opacity: .5
}

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    height: 500px
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s
}

.slide.active {
    opacity: 1
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(49, 46, 129, 0.85) 0%, rgba(49, 46, 129, 0.4) 60%, transparent 100%);
    display: flex;
    align-items: center;
    padding: 0 80px
}

.notice-ticker {
    background: var(--primary-dark);
    color: #fff;
    padding: 8px 0;
    overflow: hidden
}

.ticker-wrap {
    display: flex;
    animation: ticker 35s linear infinite
}

.ticker-item {
    white-space: nowrap;
    padding: 0 40px;
    font-size: 13px
}

@keyframes ticker {
    0% {
        transform: translateX(0)
    }

    100% {
        transform: translateX(-50%)
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em
}

.badge-success {
    background: var(--success-light);
    color: var(--success)
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning)
}

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

.badge-danger {
    background: var(--danger-light);
    color: var(--danger)
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .2s
}

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

.modal-content {
    background: var(--card);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(.95);
    transition: all .2s;
    box-shadow: var(--shadow-xl)
}

.modal-overlay.show .modal-content {
    transform: scale(1)
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    padding: 12px 20px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform .3s;
    box-shadow: var(--shadow-lg)
}

.toast.show {
    transform: translateX(0)
}

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

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

.toast-info {
    background: var(--info)
}

.admin-sidebar {
    width: 240px;
    background: var(--card);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    transition: transform .2s;
    overflow-y: auto;
    border-right: 1px solid var(--border)
}

.admin-main {
    margin-left: 240px;
    min-height: 100vh;
    background: var(--bg)
}

.admin-nav-item {
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
    margin: 1px 8px;
    border-radius: 0 6px 6px 0
}

.admin-nav-item:hover {
    background: var(--bg-alt)
}

.admin-nav-item.active {
    background: var(--primary-glow);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600
}

.admin-nav-item i {
    width: 18px;
    text-align: center;
    font-size: 14px
}

.admin-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border)
}

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

.admin-table th {
    background: var(--bg-alt);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--border)
}

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

.admin-table tbody tr:hover td {
    background: var(--bg)
}

.admin-table tr:last-child td {
    border-bottom: none
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all .2s
}

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

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: 'Inter';
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    transition: all .15s
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600
}

.program-card {
    display: flex
}

.program-card .card {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column
}

.program-card .p-4 {
    flex: 1;
    display: flex;
    flex-direction: column
}

.program-card .flex.gap-2 {
    margin-top: auto
}

.program-card .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity .2s
}

.program-card:hover .card::before {
    opacity: 1
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-family: 'Inter';
    font-weight: 600;
    font-size: 13px;
    transition: all .2s
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .2s
}

.lightbox.show {
    opacity: 1;
    visibility: visible
}

.fade-in {
    animation: fadeIn .4s ease
}

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

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

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all .2s;
    border: none
}

.slider-dot.active {
    background: var(--accent);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.3)
}

#loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity .3s
}

.loader {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite
}

@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 12px
}

.calendar-day {
    padding: 8px 4px;
    border-radius: 4px;
    background: var(--bg);
    min-height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s
}

.calendar-day:hover:not([style*="transparent"]) {
    background: var(--bg-alt)
}

.calendar-day.has-event {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(49, 46, 129, 0.2)
}

.calendar-day.today.has-event {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(49, 46, 129, 0.2), inset 0 0 0 2px var(--accent)
}

.calendar-day-name {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
    padding: 4px
}

.form-group {
    margin-bottom: 16px
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary)
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.lang-switch-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--card);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: var(--text);
    transition: all 0.2s;
    white-space: nowrap
}

.lang-switch-btn:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
    color: var(--primary)
}

.lang-switch-btn i {
    font-size: 14px
}

@media(max-width:500px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0
    }
}

@media(max-width:768px) {
    .slider-container {
        height: 300px
    }

    .slide-overlay {
        padding: 0 24px
    }

    .admin-sidebar {
        transform: translateX(-100%)
    }

    .admin-sidebar.open {
        transform: translateX(0)
    }

    .admin-main {
        margin-left: 0
    }
}

::-webkit-scrollbar {
    width: 6px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted)
}

::selection {
    background: var(--primary);
    color: #fff
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px
}