:root {
    --primary: #1e3a8a; /* blue-900 */
    --heading-primary: #1e3a8a;
    --btn-primary-bg: #1e3a8a;
    --accent: #facc15; /* yellow-400 */
    --accent-hover: #eab308; /* yellow-500 */
    --bg-light: #f8fafc; /* slate-50 */
    --bg-white: #ffffff;
    --text-dark: #0f172a; /* slate-900 */
    --text-gray: #475569; /* slate-600 */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --icon-bg: #eff6ff;
    --border-color: #e2e8f0;
    --font-sans: 'Inter', sans-serif;
    
    /* Layout */
    --container-max: 1280px;
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
}

html.dark {
    --heading-primary: #93c5fd; 
    --btn-primary-bg: #3b82f6;
    --bg-light: #0f172a;
    --bg-white: #1e293b;
    --text-dark: #f8fafc;
    --text-gray: #cbd5e1;
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --icon-bg: rgba(96, 165, 250, 0.15);
    --border-color: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Typography / Utilities */
.text-primary { color: var(--heading-primary); }
.text-accent { color: var(--accent); }
.text-white { color: #fff; }
.text-gray { color: var(--text-gray); }
.text-blue-100 { color: #dbeafe; }

.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--bg-white); }
.bg-primary { background-color: var(--primary); }
.bg-blue-50 { background-color: var(--icon-bg); }
.bg-gradient-primary { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }

/* Container & Layout */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}
@media(min-width: 640px) {
    .container { padding: 0 var(--spacing-8); }
}

.max-w-2xl { max-width: 42rem; margin: 0 auto; }
.grid { display: grid; grid-template-columns: 1fr; gap: var(--spacing-8); }
@media(min-width: 768px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(min-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-loose { gap: var(--spacing-8); }
.gap-wrap { gap: var(--spacing-4); flex-wrap: wrap; }
.mb-tight { margin-bottom: var(--spacing-2); }
.mb-loose { margin-bottom: var(--spacing-8); }
.mt-loose { margin-top: var(--spacing-8); }
.pt-tight { padding-top: var(--spacing-4); }
.mx-auto { margin-left: auto; margin-right: auto; }
.leading-relaxed { line-height: 1.625; }
.rel { position: relative; }
.z-10 { position: relative; z-index: 10; }

/* Components */
/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--glass-border);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.glass-dark {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem; /* 72px */
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: var(--spacing-8);
}

.nav-link {
    font-weight: 500;
    color: var(--text-gray);
    transition: color 0.2s;
}
.nav-link:hover {
    color: var(--text-dark);
}

.nav-cta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.mobile-only { display: none; }
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex; align-items: center; gap: 0.5rem; }
}

.icon-btn {
    padding: var(--spacing-2);
    color: var(--text-dark);
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: calc(100vh - 4.5rem);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-6);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.mobile-link {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    padding: var(--spacing-4) 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-primary {
    background-color: var(--btn-primary-bg);
    color: white;
}
.btn-primary:hover {
    background-color: #1e40af; /* blue-800 */
}
.btn-accent {
    background-color: var(--accent);
    color: #422006; /* dark brown/yellow */
}
.btn-accent:hover {
    background-color: var(--accent-hover);
}
.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}
.btn-huge {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
}
.btn-outline {
    border: 1px solid var(--text-gray);
    color: var(--text-dark);
}
.btn-outline:hover {
    background-color: var(--bg-light);
}

/* Sections */
.section {
    padding: var(--spacing-12) 0;
}
@media (min-width: 768px) {
    .section { padding: var(--spacing-16) 0; }
}

.hero {
    position: relative;
    padding: 5rem 0 4rem;
    overflow: hidden;
}
@media (min-width: 768px) {
    .hero { padding: 8rem 0; }
}

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

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-6);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: var(--spacing-6);
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
@media (min-width: 768px) {
    .hero-title { font-size: 4.5rem; }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--bg-light);
    max-width: 42rem;
    margin: 0 auto var(--spacing-12);
    opacity: 0.9;
}
@media (min-width: 768px) {
    .hero-subtitle { font-size: 1.25rem; }
}

.hero-bg-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    z-index: 1;
}
.blur-1 {
    width: 300px; height: 300px;
    background: #3b82f6;
    top: -50px; left: -50px;
}
.blur-2 {
    width: 400px; height: 400px;
    background: #facc15;
    bottom: -100px; right: 0px;
    opacity: 0.3;
}

/* Feature Cards */
.card {
    background: var(--bg-white);
    padding: var(--spacing-8);
    border-radius: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-icon-wrapper {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-6);
}
.icon-large { width: 2rem; height: 2rem; }

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-3);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-4);
}
@media (min-width: 768px) { .section-title { font-size: 2.5rem; } }

.divider {
    width: 4rem;
    height: 0.3rem;
    background-color: var(--accent);
    border-radius: 9999px;
    margin-bottom: var(--spacing-12);
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: 0.5rem 1rem;
    background: var(--bg-white);
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Footer Items */
.footer-title {
    font-weight: 700;
    margin-bottom: var(--spacing-4);
}
.footer-list li {
    margin-bottom: var(--spacing-3);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-3);
}
.icon-sm { width: 1.25rem; height: 1.25rem; flex-shrink: 0; margin-top: 0.1rem;}

.hover-text-primary:hover { color: var(--primary) !important; text-decoration: underline;}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }

/* Forms & Tables (Used in Admin Dashboard) */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: var(--bg-white);
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    background-color: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-gray);
    border-bottom: 1px solid #e2e8f0;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-dark);
}

tr:hover td {
    background-color: #f8fafc;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-success { background: #dcfce7; color: #166534; }
.status-warning { background: #fef9c3; color: #854d0e; }
.status-danger { background: #fee2e2; color: #991b1b; }

/* Admin Grid Layouts */
.admin-layout {
    display: flex;
    min-height: 100vh;
}
@media (max-width: 1024px) {
    .admin-layout { flex-direction: column; }
}

.sidebar {
    width: 250px;
    background: #0f172a;
    color: white;
    padding: var(--spacing-6);
    display: flex;
    flex-direction: column;
}
@media (max-width: 1024px) {
    .sidebar { width: 100%; flex-direction: column; align-items: stretch; padding: var(--spacing-4); }
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
    margin-top: var(--spacing-8);
}
@media (max-width: 1024px) {
    .sidebar-nav { 
        flex-direction: row; 
        margin-top: var(--spacing-4);
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .sidebar-link { white-space: nowrap; flex-shrink: 0; font-size: 0.875rem; padding: 0.5rem 0.75rem; }
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #94a3b8;
    transition: all 0.2s;
    font-weight: 500;
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.main-content {
    flex: 1;
    padding: var(--spacing-8);
    background: var(--bg-light);
    width: 100%;
}
@media (max-width: 1024px) {
    .main-content { padding: var(--spacing-4); overflow-x: hidden; }
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.hidden { display: none !important; }

/* Utility */
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
