/* ========================================================
   Sistem Pendataan Sekolah Inklusi & Siswa Berkebutuhan Khusus
   Style: Modern, Clean, Accessible, & Vibrant
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #e0e7ff;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --card-shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* -------------------------------------------------
   Navbar Styles
   ------------------------------------------------- */
.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.navbar-brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    font-weight: 500;
    color: #475569;
    transition: color 0.2s ease;
}

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

/* -------------------------------------------------
   Hero Section
   ------------------------------------------------- */
.hero-gradient {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    position: relative;
    overflow: hidden;
    color: #ffffff;
    padding: 70px 0 90px 0;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(79, 70, 229, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, rgba(79, 70, 229, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #a5f3fc;
    margin-bottom: 1.25rem;
}

/* -------------------------------------------------
   Stat Metric Cards
   ------------------------------------------------- */
.stat-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

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

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.card-indigo::after { background-color: #4f46e5; }
.stat-card.card-cyan::after   { background-color: #06b6d4; }
.stat-card.card-emerald::after{ background-color: #10b981; }
.stat-card.card-amber::after  { background-color: #f59e0b; }

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.icon-indigo  { background: #e0e7ff; color: #4338ca; }
.icon-cyan    { background: #cffafe; color: #0891b2; }
.icon-emerald { background: #d1fae5; color: #059669; }
.icon-amber   { background: #fef3c7; color: #d97706; }
.icon-rose    { background: #ffe4e6; color: #e11d48; }

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #0f172a;
    line-height: 1.1;
    margin: 6px 0;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* -------------------------------------------------
   Cards & Containers
   ------------------------------------------------- */
.custom-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.custom-card-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-card-body {
    padding: 24px;
}

/* -------------------------------------------------
   Buttons
   ------------------------------------------------- */
.btn-primary-custom {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.btn-light-custom {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    transition: all 0.2s ease;
}

.btn-light-custom:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* -------------------------------------------------
   Badges Kategori & Status
   ------------------------------------------------- */
.badge-autism {
    background-color: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

.badge-tunanetra {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-tunarungu {
    background-color: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.badge-tunadaksa {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-tunagrahita {
    background-color: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.badge-adhd {
    background-color: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.badge-learning {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-kategori {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge {
    padding: 6px 12px;
    font-size: 0.775rem;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

/* -------------------------------------------------
   Tables
   ------------------------------------------------- */
.table-custom {
    margin-bottom: 0;
}

.table-custom thead th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
    padding: 14px 16px;
}

.table-custom tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

/* -------------------------------------------------
   School Portal Layout (Sidebar & Topbar)
   ------------------------------------------------- */
.portal-wrapper {
    display: flex;
    min-height: calc(100vh - 70px);
}

.portal-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 24px 16px;
    flex-shrink: 0;
}

.portal-content {
    flex-grow: 1;
    background-color: #f8fafc;
    padding: 30px;
    overflow-x: hidden;
}

.sidebar-menu-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.08em;
    padding: 12px 16px 6px 16px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.sidebar-link i {
    width: 22px;
    font-size: 1.1rem;
    margin-right: 10px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.sidebar-link:hover i {
    color: var(--primary);
}

.sidebar-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.sidebar-link.active i {
    color: var(--primary);
}

.school-badge-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #cbd5e1;
}

/* -------------------------------------------------
   Form Styles
   ------------------------------------------------- */
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* -------------------------------------------------
   Footer
   ------------------------------------------------- */
.footer-custom {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 40px 0 24px 0;
    margin-top: auto;
    font-size: 0.875rem;
}

.footer-custom a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-custom a:hover {
    color: #38bdf8;
}

/* Mobile responsive fixes */
@media (max-width: 991px) {
    .portal-wrapper {
        flex-direction: column;
    }
    .portal-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .portal-content {
        padding: 20px 15px;
    }
}
