:root {
    /* Brand Theme Colors matched from Taman Kreatif Tirtayasa Logo */
    --brand-primary: #059669;          /* Emerald Green (Logo Foundation & Emblem) */
    --brand-primary-hover: #047857;    /* Deep Forest Green */
    --brand-primary-light: #ecfdf5;    /* Soft Mint Green */
    --brand-secondary: #0284c7;        /* Sky Blue */
    --brand-secondary-hover: #0369a1;  /* Ocean Blue */
    --brand-accent: #f59e0b;           /* Sunshine Gold */
    --brand-accent-hover: #d97706;     /* Warm Amber */
    --brand-pink: #ec4899;             /* Joyful Magenta Pink */
    --brand-purple: #8b5cf6;           /* Playful Violet */
    --brand-dark: #064e3b;             /* Dark Pine Green */
    --dark-slate: #0f172a;             /* Deep Charcoal Slate */
    --sidebar-width: 260px;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334155;
    background-color: #f8fafc;
}

/* =========================================
   LOGO STYLING & CONTAINERS
   ========================================= */
.school-navbar-logo {
    height: 52px;
    max-height: 52px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.school-navbar-logo:hover {
    transform: scale(1.04);
}

.school-footer-logo {
    height: 58px;
    max-height: 58px;
    width: auto;
    object-fit: contain;
}

.school-admin-logo {
    height: 42px;
    max-height: 42px;
    width: auto;
    object-fit: contain;
}

.school-login-logo {
    height: 84px;
    max-height: 84px;
    width: auto;
    object-fit: contain;
}

.logo-badge-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 4px 6px;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   PUBLIC FRONTEND STYLES
   ========================================= */

/* Top Info Bar */
.top-bar {
    background: linear-gradient(90deg, #064e3b 0%, #065f46 60%, #0284c7 100%);
    color: #e6fffa;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.top-bar a:hover {
    color: var(--brand-accent);
}

/* Main Navbar */
.main-navbar {
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.08);
    border-bottom: 2px solid #ecfdf5;
}

.main-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand-primary);
}

.main-navbar .nav-link {
    color: #334155;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.6rem 0.9rem !important;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.main-navbar .nav-link:hover {
    color: var(--brand-primary) !important;
    background-color: var(--brand-primary-light);
}

.main-navbar .nav-link.active {
    color: var(--brand-primary) !important;
    background-color: var(--brand-primary-light);
    font-weight: 700;
}

/* Hero Carousel */
.hero-slider-item {
    min-height: 540px;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.94) 0%, rgba(5, 150, 105, 0.88) 50%, rgba(2, 132, 199, 0.85) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 60px 0;
    position: relative;
}

.hero-slider-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.25;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #ecfdf5;
    line-height: 1.6;
}

/* Counter Stat Cards */
.stat-counter-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.75rem 1.25rem;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.06);
    border-bottom: 4px solid var(--brand-primary);
    border-top: 1px solid #f1f5f9;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-counter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(5, 150, 105, 0.12);
}

/* Section Headings */
.section-tag {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-primary);
    background-color: var(--brand-primary-light);
    border: 1px solid rgba(5, 150, 105, 0.2);
    padding: 0.35rem 0.85rem;
    border-radius: 50rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-weight: 800;
    color: #064e3b;
    font-size: 2rem;
}

/* Cards & Badges */
.feature-card {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}

.feature-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.1);
}

.program-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    background-color: var(--brand-primary-light);
    color: var(--brand-primary);
}

/* Tagline pill */
.tagline-pill {
    background: linear-gradient(90deg, #fef3c7 0%, #ecfdf5 50%, #e0f2fe 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400e;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.65rem;
    border-radius: 50rem;
    display: inline-block;
}

/* Teacher Avatar */
.teacher-avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--brand-primary-light);
}

/* Testimonial Quote Box */
.testimonial-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Button Overrides */
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
}

.btn-outline-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

.text-primary {
    color: var(--brand-primary) !important;
}

.bg-primary {
    background-color: var(--brand-primary) !important;
}

/* Footer */
.main-footer {
    background: linear-gradient(180deg, #064e3b 0%, #032b21 100%);
    color: #a7f3d0;
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 4px solid var(--brand-accent);
}

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

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

/* =========================================
   ADMIN CMS BACKOFFICE STYLES
   ========================================= */
#admin-wrapper {
    min-height: 100vh;
    display: flex;
    width: 100%;
}

#admin-sidebar {
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
    flex: 0 0 var(--sidebar-width) !important;
    flex-shrink: 0 !important;
    min-height: 100vh;
    height: 100vh;
    background-color: #064e3b !important;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

#admin-page-content {
    flex: 1 1 auto;
    min-width: 0 !important;
    width: calc(100% - var(--sidebar-width));
}

#admin-sidebar .nav-link {
    color: #a7f3d0;
    font-size: 0.88rem;
    padding: 0.65rem 1rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 0.5rem;
}

#admin-sidebar .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

#admin-sidebar .nav-link.active {
    background-color: #047857 !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 991.98px) {
    #admin-sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        z-index: 1050;
        top: 0;
        bottom: 0;
    }

    #admin-wrapper.toggled #admin-sidebar {
        margin-left: 0;
    }
}

/* =========================================
   FLATPICKR DATETIMEPICKER CUSTOM STYLES
   ========================================= */
.flatpickr-calendar {
    background: #ffffff !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
    font-family: inherit !important;
    padding: 0.25rem;
}

.flatpickr-months {
    background: var(--brand-primary) !important;
    border-top-left-radius: 0.85rem !important;
    border-top-right-radius: 0.85rem !important;
    color: #ffffff !important;
    padding: 0.5rem 0 !important;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month,
.flatpickr-current-month .cur-month,
.flatpickr-current-month input.cur-year {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #fef08a !important;
}

span.flatpickr-weekday {
    background: #f8fafc !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

.flatpickr-day {
    border-radius: 0.5rem !important;
    font-weight: 500;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.selected:hover, 
.flatpickr-day.selected.prevMonthDay, 
.flatpickr-day.selected.nextMonthDay {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.flatpickr-day:hover {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: var(--brand-primary) !important;
}

.flatpickr-day.today {
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary) !important;
}

.datepicker-input[readonly] {
    background-color: #ffffff !important;
    cursor: pointer;
}
