/* ==================================================================
   Preschool Suite — Design System
   Warm premium preschool + modern SaaS. Single shared stylesheet.
   ================================================================== */

/* ---------- Tokens ---------- */
:root {
    --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

    --ink-900: #1f2437;
    --ink-700: #3c4257;
    --ink-500: #6b7183;
    --ink-400: #8a90a3;
    --ink-300: #b4b9c9;

    --cream: #faf6f0;
    --paper: #f6f4fb;
    --white: #ffffff;
    --line: #e9e6f2;
    --line-soft: #f0eef8;

    --primary: #f0704a;
    --primary-600: #e05a34;
    --primary-soft: #fdeee7;

    --teal: #16a394;
    --teal-soft: #e0f5f2;

    --violet: #7c5cff;
    --violet-soft: #efebff;

    --blue: #3b82f6;
    --blue-soft: #e8f0fe;

    --green: #21a06b;
    --green-soft: #e2f6ec;

    --amber: #f59e0b;
    --amber-soft: #fef3d8;

    --rose: #e5484d;
    --rose-soft: #fdeaea;

    --radius: 16px;
    --radius-lg: 22px;
    --radius-sm: 10px;

    --shadow-sm: 0 1px 3px rgba(31, 36, 55, .06);
    --shadow-md: 0 6px 20px -6px rgba(31, 36, 55, .12);
    --shadow-lg: 0 18px 44px -14px rgba(31, 36, 55, .2);

    --green-600: #1c9a63;
    --rose-600: #d93840;
    --amber-600: #d97706;
    --sidebar-w: 264px;
}

/* ---------- Inline stroke icons ---------- */
.i { display: inline-grid; place-items: center; vertical-align: middle; line-height: 1; }
.i svg {
    width: 1.15em; height: 1.15em; display: block;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ico .i svg { width: 19px; height: 19px; }
.i.i-lg svg { width: 1.6em; height: 1.6em; }
.i.i-sm svg { width: 1em; height: 1em; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--primary-600); text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3, h4 { color: var(--ink-900); font-weight: 800; line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { line-height: 1.7; }

::selection { background: var(--primary-soft); color: var(--primary-600); }

.container { width: min(1180px, 92%); margin-inline: auto; }
.section { padding: 84px 0; }
.section.tint { background: var(--cream); }
.section.paper { background: var(--paper); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--primary-600); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--primary); }
.lead { font-size: 1.06rem; color: var(--ink-500); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 999px; border: 0; cursor: pointer;
    font: 600 .95rem var(--font); transition: all .18s ease; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -8px rgba(240, 112, 74, .65); }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(240, 112, 74, .7); }
.btn-outline { background: transparent; color: var(--ink-900); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-600); }
.btn-light { background: #fff; color: var(--ink-900); }
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-whatsapp { background: #22c15e; color: #fff; }
.btn-whatsapp:hover { background: #1ba750; color: #fff; }
.btn-ghost { background: var(--line-soft); color: var(--ink-700); }
.btn-ghost:hover { background: var(--line); }
.btn-danger { background: var(--rose-soft); color: var(--rose); }
.btn-danger:hover { background: #fbdcdc; }
.btn-sm { padding: 7px 14px; font-size: .83rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
    font-size: .74rem; font-weight: 700; border-radius: 999px; letter-spacing: .01em; white-space: nowrap;
}
.b-gray  { background: var(--line-soft); color: var(--ink-500); }
.b-primary { background: var(--primary-soft); color: var(--primary-600); }
.b-teal  { background: var(--teal-soft); color: #0d7c71; }
.b-violet{ background: var(--violet-soft); color: #6039f5; }
.b-blue  { background: var(--blue-soft); color: #2563eb; }
.b-green { background: var(--green-soft); color: #178357; }
.b-amber { background: var(--amber-soft); color: #b8730a; }
.b-rose  { background: var(--rose-soft); color: #c53035; }

/* Filter chip tabs (status tabs on list pages) */
.filter-btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px;
    background: var(--white); border: 1px solid var(--line); color: var(--ink-500);
    font: 600 .84rem var(--font); transition: all .14s; white-space: nowrap;
}
.filter-btn b {
    background: var(--line-soft); color: var(--ink-500); border-radius: 999px;
    font-size: .7rem; padding: 1px 8px; font-weight: 800;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary-600); }
.filter-btn.active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; box-shadow: 0 6px 16px -8px rgba(31,36,55,.5); }
.filter-btn.active b { background: rgba(255,255,255,.18); color: #fff; }

.status-new .badge, .badge.new { background: var(--blue-soft); color: #2563eb; }
.status-contacted .badge, .badge.contacted { background: var(--amber-soft); color: #b8730a; }
.status-counselling .badge, .badge.counselling { background: var(--violet-soft); color: #6039f5; }
.status-visit .badge, .badge.visit { background: var(--teal-soft); color: #0d7c71; }
.status-application .badge, .badge.application { background: var(--blue-soft); color: #2563eb; }
.status-assessment .badge, .badge.assessment { background: var(--violet-soft); color: #6039f5; }
.status-offered .badge, .badge.offered { background: var(--amber-soft); color: #b8730a; }
.status-confirmed .badge, .badge.confirmed { background: var(--green-soft); color: #178357; }
.status-enrolled .badge, .badge.enrolled { background: var(--green); color: #fff; }
.status-lost .badge, .badge.lost { background: var(--rose-soft); color: #c53035; }

.badge.active { background: var(--green-soft); color: #178357; }
.badge.admitted { background: var(--teal-soft); color: #0d7c71; }
.badge.applied { background: var(--blue-soft); color: #2563eb; }
.badge.enquiry { background: var(--line-soft); color: var(--ink-500); }
.badge.paid { background: var(--green-soft); color: #178357; }
.badge.partial { background: var(--amber-soft); color: #b8730a; }
.badge.due { background: var(--blue-soft); color: #2563eb; }
.badge.overdue { background: var(--rose-soft); color: #c53035; }
.badge.present { background: var(--green-soft); color: #178357; }
.badge.absent { background: var(--rose-soft); color: #c53035; }
.badge.leave { background: var(--amber-soft); color: #b8730a; }
.badge.late { background: var(--blue-soft); color: #2563eb; }
.badge.pending { background: var(--amber-soft); color: #b8730a; }
.badge.completed { background: var(--green-soft); color: #178357; }
.badge.cancelled, .badge.no_show { background: var(--rose-soft); color: #c53035; }
.badge.scheduled { background: var(--blue-soft); color: #2563eb; }
.badge.confirmed { background: var(--teal-soft); color: #0d7c71; }
.badge.under_review { background: var(--violet-soft); color: #6039f5; }
.badge.approved { background: var(--green-soft); color: #178357; }
.badge.rejected { background: var(--rose-soft); color: #c53035; }
.badge.converted { background: var(--green); color: #fff; }
.badge.submitted { background: var(--blue-soft); color: #2563eb; }
.badge.draft { background: var(--line-soft); color: var(--ink-500); }
.badge.high { background: var(--rose-soft); color: #c53035; }
.badge.medium { background: var(--amber-soft); color: #b8730a; }
.badge.low { background: var(--line-soft); color: var(--ink-500); }
.badge.rescheduled { background: var(--violet-soft); color: #6039f5; }
.badge.upcoming { background: var(--blue-soft); color: #2563eb; }
.badge.male { background: var(--blue-soft); color: #2563eb; }
.badge.female { background: var(--rose-soft); color: #c53035; }

/* ---------- Cards ---------- */
.card {
    background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 22px;
}
.card-hover { transition: transform .18s ease, box-shadow .18s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.kpi {
    background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
    padding: 20px 22px; box-shadow: var(--shadow-sm); display: flex; gap: 16px; align-items: center;
    transition: transform .15s ease, box-shadow .15s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
    font-size: 1.5rem; flex: none;
}
.kpi-label { font-size: .82rem; color: var(--ink-500); font-weight: 600; }
.kpi-value { font-size: 1.65rem; font-weight: 800; color: var(--ink-900); line-height: 1.1; }
.kpi-sub { font-size: .76rem; color: var(--ink-400); margin-top: 3px; }

/* Soft-tinted KPI variant: no icon, ink value first */
.kpi.tint { background: var(--tint, var(--line-soft)); border-color: transparent; box-shadow: none; }
.kpi.tint:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.kpi.tint .kpi-value { color: var(--tint-ink, var(--ink-900)); }
.kpi.tint .kpi-label { color: var(--tint-ink, var(--ink-700)); opacity: .78; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-700); margin-bottom: 7px; }
.field .hint { font-size: .75rem; color: var(--ink-400); margin-top: 5px; }
.input, select.input, textarea.input {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px;
    font: 500 .93rem var(--font); color: var(--ink-900); background: var(--white);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.input::placeholder { color: var(--ink-300); }
textarea.input { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span2 { grid-column: 1 / -1; }
.checkbox-row { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.err-text { color: var(--rose); font-size: .8rem; margin-top: 5px; font-weight: 600; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: 14px; font-size: .92rem; margin-bottom: 18px; font-weight: 500; }
.alert-success { background: var(--green-soft); color: #136b46; border: 1px solid #bfe8d4; }
.alert-error { background: var(--rose-soft); color: #a8282c; border: 1px solid #f5c9c9; }
.alert-info { background: var(--blue-soft); color: #1d4fd7; border: 1px solid #c9dcfd; }

/* ---------- Avatars ---------- */
.avatar {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
    font-weight: 800; font-size: .95rem; color: #fff; background: var(--violet); flex: none;
}
.avatar.sm { width: 34px; height: 34px; font-size: .78rem; border-radius: 11px; }
.avatar.lg { width: 74px; height: 74px; font-size: 1.5rem; border-radius: 22px; }
.av-a { background: linear-gradient(135deg, #f0704a, #e05a34); }
.av-b { background: linear-gradient(135deg, #7c5cff, #6039f5); }
.av-c { background: linear-gradient(135deg, #16a394, #0d7c71); }
.av-d { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.av-e { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* ==================================================================
   PUBLIC WEBSITE
   ================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--ink-900); font-size: 1.12rem; }
.brand-badge {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), #f0a04a); color: #fff; font-size: 1.3rem;
    box-shadow: 0 6px 14px -6px rgba(240, 112, 74, .6);
}
.brand small { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .14em; color: var(--primary-600); text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
    padding: 9px 14px; border-radius: 999px; color: var(--ink-700); font-weight: 600; font-size: .92rem;
    transition: all .15s;
}
.nav-links a:hover, .nav-links a.active { background: var(--primary-soft); color: var(--primary-600); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink-900); }

/* Hero */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(760px 420px at 88% -10%, rgba(124, 92, 255, .14), transparent 60%),
        radial-gradient(700px 420px at -8% 110%, rgba(22, 163, 148, .13), transparent 60%),
        linear-gradient(180deg, #fffdf9 0%, var(--cream) 100%);
    padding: 96px 0 110px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
    padding: 8px 16px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--ink-700);
    box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.hero p.lead { font-size: 1.13rem; }
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 34px; margin-top: 46px; flex-wrap: wrap; }
.hero-trust b { display: block; font-size: 1.5rem; color: var(--ink-900); }
.hero-trust span { font-size: .84rem; color: var(--ink-500); }
.hero-visual { position: relative; }
.hero-visual img {
    border-radius: 34px; box-shadow: var(--shadow-lg); aspect-ratio: 5/5.4; object-fit: cover; width: 100%;
}
.float-card {
    position: absolute; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
    padding: 13px 18px; display: flex; gap: 12px; align-items: center; font-size: .86rem; font-weight: 600; color: var(--ink-900);
}
.float-card .fc-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; }
.float-card small { display: block; color: var(--ink-500); font-weight: 500; font-size: .76rem; }
.fc-1 { top: 26px; left: -26px; }
.fc-2 { bottom: 40px; right: -18px; }
.fc-3 { bottom: -20px; left: 34px; }

/* Program / feature cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

.program-card {
    background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line-soft);
    padding: 30px 28px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column;
}
.program-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.program-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
    background: linear-gradient(90deg, var(--pc, var(--primary)), var(--pc2, #f0a04a));
}
.program-card .age-chip {
    align-self: flex-start; background: var(--line-soft); border-radius: 999px; padding: 6px 14px;
    font-size: .78rem; font-weight: 700; color: var(--ink-700); margin-bottom: 16px;
}
.program-card h3 { font-size: 1.35rem; }
.program-card p { font-size: .92rem; color: var(--ink-500); flex: 1; }
.program-meta { display: flex; gap: 18px; margin: 14px 0 18px; font-size: .82rem; color: var(--ink-500); flex-wrap: wrap; }
.program-meta b { color: var(--ink-700); display: block; font-size: .84rem; }
.seats { font-size: .8rem; font-weight: 700; color: var(--teal); margin-bottom: 14px; }

.feature-icon {
    width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
    font-size: 1.6rem; margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.06rem; margin-bottom: 8px; }
.feature-card p { font-size: .89rem; color: var(--ink-500); margin: 0; }

/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img { border-radius: 28px; box-shadow: var(--shadow-lg); aspect-ratio: 6/5; object-fit: cover; width: 100%; }
.check-list { list-style: none; padding: 0; margin: 22px 0 30px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; color: var(--ink-700); }
.check-list .tick {
    width: 24px; height: 24px; border-radius: 8px; background: var(--green-soft); color: var(--green);
    display: grid; place-items: center; font-size: .8rem; font-weight: 800; flex: none; margin-top: 1px;
}

/* Steps */
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 26px; position: relative; box-shadow: var(--shadow-sm); }
.step-card::before {
    counter-increment: step; content: "0" counter(step);
    font-size: 2.6rem; font-weight: 800; color: var(--primary-soft);
    -webkit-text-stroke: 1.5px var(--primary); position: absolute; top: 18px; right: 22px; opacity: .9;
}
.step-card h3 { font-size: 1.02rem; margin-top: 12px; }
.step-card p { font-size: .86rem; color: var(--ink-500); margin: 0; }

/* Teachers */
.teacher-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.teacher-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.teacher-card .tphoto { aspect-ratio: 1; background: linear-gradient(135deg, var(--violet-soft), var(--teal-soft)); display: grid; place-items: center; font-size: 3rem; }
.teacher-card .tinfo { padding: 20px 22px; }
.teacher-card h3 { margin-bottom: 3px; font-size: 1.05rem; }
.teacher-card .desig { color: var(--primary-600); font-size: .8rem; font-weight: 700; margin-bottom: 8px; }
.teacher-card p { font-size: .84rem; color: var(--ink-500); margin: 0; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid a { border-radius: var(--radius); overflow: hidden; display: block; position: relative; }
.gallery-grid img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .35s ease; display: block; }
.gallery-grid a:hover img { transform: scale(1.05); }
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 34px; }
.gallery-filters button {
    border: 1.5px solid var(--line); background: #fff; padding: 8px 20px; border-radius: 999px;
    font: 600 .85rem var(--font); color: var(--ink-500); cursor: pointer; transition: all .15s;
}
.gallery-filters button.active, .gallery-filters button:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Testimonials */
.testi-card { background: #fff; border-radius: var(--radius-lg); padding: 30px; border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); }
.testi-card .stars { color: var(--amber); letter-spacing: 2px; margin-bottom: 12px; }
.testi-card p { font-size: .95rem; color: var(--ink-700); font-style: italic; }
.testi-card .who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testi-card .who b { display: block; font-size: .92rem; color: var(--ink-900); }
.testi-card .who span { font-size: .78rem; color: var(--ink-500); }

/* CTA band */
.cta-band {
    background: linear-gradient(120deg, var(--primary) 0%, #f0a04a 100%);
    border-radius: 30px; padding: 64px 56px; color: #fff; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .92); max-width: 560px; }
.cta-band .btn-light { color: var(--primary-600); }

/* Footer */
.site-footer { background: #221d38; color: #b7b1cf; margin-top: 90px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px; padding: 68px 0 44px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.site-footer a { color: #b7b1cf; font-size: .9rem; display: inline-block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .09); padding: 20px 0; font-size: .82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a {
    width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .08);
    display: grid; place-items: center; font-size: 1rem; color: #fff;
}
.social-row a:hover { background: var(--primary); }

/* Floating quick contact (mobile) */
.quick-contact {
    position: fixed; bottom: 18px; right: 18px; z-index: 70; display: flex; flex-direction: column; gap: 10px;
}
.quick-contact a {
    width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem;
    box-shadow: var(--shadow-lg); color: #fff;
}
.qc-call { background: var(--primary); }
.qc-wa { background: #22c15e; }
.qc-form { background: var(--violet); }

/* ==================================================================
   APP LAYOUT (CRM / Teacher / Parent portal)
   ================================================================== */
.app-shell { display: flex; min-height: 100vh; background: var(--paper); }
.sidebar {
    width: var(--sidebar-w); background: var(--white); border-right: 1px solid var(--line-soft);
    position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column;
    transition: transform .22s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 22px 16px; font-weight: 800; color: var(--ink-900); font-size: 1.02rem; }
.sidebar-brand small { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .13em; color: var(--primary-600); text-transform: uppercase; }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 14px 20px; }
.side-nav .group { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-300); padding: 18px 12px 8px; }
.side-nav a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    color: var(--ink-700); font-weight: 600; font-size: .9rem; margin-bottom: 2px; transition: all .13s;
}
.side-nav a:hover { background: var(--line-soft); color: var(--ink-900); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary-600); }
.side-nav a .ico { width: 22px; text-align: center; font-size: 1.05rem; }
.side-nav a .count {
    margin-left: auto; background: var(--rose); color: #fff; font-size: .68rem; font-weight: 800;
    border-radius: 999px; padding: 2px 8px;
}
.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--line-soft); font-size: .78rem; color: var(--ink-400); }

.app-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
    position: sticky; top: 0; z-index: 40; background: rgba(246, 244, 251, .88); backdrop-filter: blur(8px);
    display: flex; align-items: center; gap: 14px; padding: 14px 28px; border-bottom: 1px solid var(--line-soft);
}
.topbar h1 { font-size: 1.22rem; margin: 0; }
.topbar .spacer { flex: 1; }
.topbar .search-wrap { position: relative; width: min(380px, 34vw); }
.topbar .search-wrap .input { padding: 10px 14px 10px 40px; border-radius: 999px; background: #fff; }
.topbar .search-ico {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-300); pointer-events: none; display: inline-grid;
}
.topbar .search-ico svg { width: 16px; height: 16px; }
.icon-btn {
    width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line-soft); background: #fff;
    display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; position: relative; transition: all .15s;
}
.icon-btn:hover { border-color: var(--line); box-shadow: var(--shadow-sm); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); border: 2px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line-soft); padding: 6px 12px 6px 6px; border-radius: 999px; font-size: .86rem; font-weight: 700; color: var(--ink-900); }
.user-chip small { display: block; font-size: .68rem; color: var(--ink-400); font-weight: 600; }

.content { padding: 28px; max-width: 1360px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h2 { font-size: 1.5rem; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--ink-500); font-size: .92rem; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.panel-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }

/* Dashboard snapshot strip: divided band instead of separate cards */
.snapshot {
    display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white);
    border-radius: var(--radius-lg); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
    overflow: hidden; margin-bottom: 26px;
}
.snap-cell {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 14px;
    padding: 20px 22px; position: relative;
}
.snap-cell + .snap-cell { border-left: 1px solid var(--line-soft); }
.snap-cell::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--snap, transparent); }
.snap-ico {
    grid-row: 1 / span 3; align-self: center; width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.25rem;
}
.snap-val { font-size: 1.7rem; font-weight: 800; color: var(--ink-900); line-height: 1.05; }
.snap-lbl { font-size: .8rem; font-weight: 700; color: var(--ink-500); margin-top: 3px; }
.snap-sub { font-size: .72rem; color: var(--ink-400); margin-top: 1px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.panel-head h3 { margin: 0; font-size: 1.02rem; }
.panel-head a { font-size: .82rem; font-weight: 700; }
.panel { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel .panel-body { padding: 20px 22px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th {
    text-align: left; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink-400); font-weight: 800; padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
    white-space: nowrap; background: #fcfbfe;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #faf9fe; }
.table-person { display: flex; align-items: center; gap: 12px; }
.table-person b { display: block; color: var(--ink-900); font-size: .9rem; }
.table-person small { color: var(--ink-400); font-size: .76rem; }

/* Filters bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters .input { width: auto; min-width: 150px; padding: 9px 12px; font-size: .86rem; }
.filters label { font-size: .8rem; font-weight: 700; color: var(--ink-500); }

/* Pipeline */
.pipeline { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.pipe-col { min-width: 232px; flex: 1; background: var(--paper); border-radius: var(--radius-lg); padding: 12px; }
.pipe-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.pipe-head b { font-size: .82rem; color: var(--ink-700); }
.pipe-head .n { background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 1px 9px; color: var(--ink-500); }
.pipe-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow-sm); transition: box-shadow .15s; }
.pipe-card:hover { box-shadow: var(--shadow-md); }
.pipe-card b { display: block; font-size: .87rem; color: var(--ink-900); }
.pipe-card small { color: var(--ink-400); font-size: .74rem; display: block; margin-top: 3px; }
.pipe-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before {
    content: ""; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 3px solid var(--primary);
}
.tl-item.alt::before { border-color: var(--violet); }
.tl-item.dim::before { border-color: var(--ink-300); }
.tl-date { font-size: .72rem; font-weight: 800; color: var(--ink-400); text-transform: uppercase; letter-spacing: .06em; }
.tl-item p { margin: 3px 0 0; font-size: .89rem; color: var(--ink-700); }

/* Profile header */
.profile-hero {
    background: linear-gradient(120deg, #fff 0%, var(--cream) 100%);
    border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 26px 28px;
    display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.profile-hero .avatar.xl { width: 92px; height: 92px; font-size: 1.9rem; border-radius: 26px; }
.profile-hero img.photo { width: 92px; height: 92px; border-radius: 26px; object-fit: cover; box-shadow: var(--shadow-md); }
.profile-hero h2 { margin: 0 0 4px; font-size: 1.45rem; }
.profile-hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* Stat chips inside profiles */
.chip-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.chip-stat { background: var(--white); border: 1px solid var(--line-soft); border-radius: 16px; padding: 14px 18px; min-width: 130px; box-shadow: var(--shadow-sm); }
.chip-stat b { display: block; font-size: 1.25rem; color: var(--ink-900); }
.chip-stat span { font-size: .74rem; color: var(--ink-500); font-weight: 600; }

/* Attendance grid */
.attend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.attend-card { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; background: #fff; cursor: pointer; transition: all .13s; user-select: none; }
.attend-card:hover { border-color: var(--ink-300); }
.attend-card .nm { flex: 1; min-width: 0; }
.attend-card .nm b { display: block; font-size: .87rem; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attend-card .opts { display: flex; gap: 5px; }
.opt { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: .95rem; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: all .12s; }
.opt:hover { border-color: var(--ink-300); }
.opt.present.sel { background: var(--green); border-color: var(--green); }
.opt.absent.sel { background: var(--rose); border-color: var(--rose); }
.opt.leave.sel { background: var(--amber); border-color: var(--amber); }
.opt.late.sel { background: var(--blue); border-color: var(--blue); }
.opt.sel { color: #fff; }

/* Progress bars */
.meter { height: 8px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), #4ecdc4); }

/* WhatsApp modal & utilities */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(31, 24, 55, .45); backdrop-filter: blur(3px);
    z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 22px; max-width: 520px; width: 100%; padding: 26px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-bottom: 4px; }
.modal .muted { color: var(--ink-500); font-size: .86rem; }
.muted { color: var(--ink-500); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 10px; } .gap-3 { gap: 16px; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }
.text-sm { font-size: .84rem; }
.text-xs { font-size: .74rem; }
.bold { font-weight: 700; }
.ink { color: var(--ink-900); }
.danger { color: var(--rose); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* Search dropdown */
.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border-radius: 16px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--line-soft); overflow: hidden; display: none; z-index: 80; max-height: 420px; overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink-700); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--line-soft); }
.search-results .sr-type { margin-left: auto; }

/* Login / auth pages */
.auth-wrap {
    min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-foot {
    position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 12px;
    padding: 14px 28px; font-size: .76rem; color: var(--ink-400); pointer-events: none; flex-wrap: wrap;
}
.auth-hero {
    position: relative; overflow: hidden; display: flex; align-items: stretch;
    background:
        radial-gradient(700px 460px at 110% -10%, rgba(255, 255, 255, .18), transparent 55%),
        radial-gradient(560px 420px at -12% 112%, rgba(58, 28, 91, .3), transparent 60%),
        linear-gradient(150deg, var(--primary) 0%, #e8582f 55%, #f0a04a 130%);
    color: #fff;
}
.ah-inner {
    display: flex; flex-direction: column; justify-content: space-between;
    width: min(480px, 100%); margin-inline: auto; padding: 56px 48px;
}
.auth-hero h2 { color: #fff; font-size: 1.7rem; margin: 22px 0 10px; }
.auth-hero p { color: rgba(255, 255, 255, .92); max-width: 420px; margin: 0; }
.ah-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.ah-points li { display: flex; align-items: center; gap: 11px; font-size: .93rem; font-weight: 600; color: rgba(255,255,255,.95); }
.ah-tick {
    width: 26px; height: 26px; border-radius: 9px; background: rgba(255,255,255,.16);
    display: inline-grid; place-items: center; flex: none;
}
.ah-tick svg { stroke: #fff; }
.ah-bottom { display: grid; gap: 18px; margin-top: 40px; }
.auth-quote {
    background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 16px; padding: 16px 20px; font-size: .92rem; font-style: italic;
    backdrop-filter: blur(2px); color: rgba(255,255,255,.96);
}
.ah-back {
    display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.88);
    font-size: .84rem; font-weight: 700; width: fit-content;
}
.ah-back:hover { color: #fff; }
.ah-back svg { stroke-width: 2.4; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 48px 24px 72px; background: var(--paper); }
.auth-card { width: min(420px, 100%); }
.auth-brand-sm {
    font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--primary-600); margin-bottom: 14px;
}
.demo-creds {
    background: var(--line-soft); border-radius: 14px; font-size: .8rem;
    margin-top: 22px; line-height: 1.9;
}
.demo-creds summary {
    cursor: pointer; font-weight: 700; color: var(--ink-500); padding: 12px 16px;
    list-style-position: inside; user-select: none;
}
.demo-creds summary:hover { color: var(--ink-700); }
.demo-creds[open] summary { color: var(--ink-700); border-bottom: 1px dashed var(--line); }
.demo-creds .demo-rows { padding: 10px 16px 12px; }
.demo-creds code { background: #fff; padding: 2px 8px; border-radius: 7px; font-size: .78rem; border: 1px solid var(--line); }

/* Empty / error states */
.empty-state { padding: 48px 24px; text-align: center; color: var(--ink-500); }
.empty-state .err-emoji { margin-bottom: 6px; }
.empty-state p { margin: 0; font-size: .92rem; }
.err-emoji {
    width: 76px; height: 76px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary-600);
}
.err-emoji .i svg { width: 34px; height: 34px; }

/* Parent portal accents */
.parent-shell .sidebar { border-top: 6px solid var(--teal); }
.teacher-shell .sidebar { border-top: 6px solid var(--violet); }

/* Mobile bottom tabs (app layout on phones) */
.mobile-tabs { display: none; }

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 1080px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .panel-grid { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .snapshot { grid-template-columns: repeat(2, 1fr); }
    .snap-cell:nth-child(odd) { border-left: 0; }
    .snap-cell:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 900px) {
    .nav-links {
        display: none; position: absolute; top: 74px; left: 0; right: 0; background: #fff;
        flex-direction: column; align-items: stretch; padding: 14px; gap: 4px; border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .nav-cta .btn-outline { display: none; }
    .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding: 64px 0 80px; }
    .hero-visual img { aspect-ratio: 4/3; }
    .fc-1 { left: 8px; } .fc-2 { right: 8px; }
    .grid-3 { grid-template-columns: 1fr; }
    .steps-row { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-foot { position: static; justify-content: center; padding: 6px 16px 10px; }

    /* App shell -> mobile */
    .sidebar { transform: translateX(-105%); box-shadow: none; }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .app-main { margin-left: 0; padding-bottom: 76px; }
    .topbar { padding: 12px 16px; }
    .topbar .search-wrap { width: auto; flex: 1; }
    .content { padding: 18px 16px; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .kpi { padding: 14px 16px; }
    .kpi-value { font-size: 1.3rem; }
    .page-head h2 { font-size: 1.28rem; }

    .mobile-tabs {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 55; background: #fff;
        border-top: 1px solid var(--line-soft); box-shadow: 0 -6px 24px -12px rgba(31,36,55,.25);
    }
    .mobile-tabs a {
        flex: 1; text-align: center; padding: 10px 4px 12px; font-size: .64rem; font-weight: 700; color: var(--ink-400);
        display: flex; flex-direction: column; gap: 3px; align-items: center;
    }
    .mobile-tabs a .ico { font-size: 1.25rem; }
    .mobile-tabs a.active { color: var(--primary-600); }
    .mobile-tabs .ico svg { width: 22px; height: 22px; }
    .mobile-tabs a .tab-badge {
        position: absolute; margin-top: -8px; background: var(--rose); color: #fff; border-radius: 999px;
        font-size: .58rem; padding: 1px 5px; font-weight: 800;
    }
}
@media (max-width: 560px) {
    .section { padding: 60px 0; }
    .form-grid { grid-template-columns: 1fr; }
    .grid-4, .steps-row { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .cta-band { padding: 44px 28px; }
    .hero-ctas .btn { width: 100%; }
    .profile-actions { margin-left: 0; width: 100%; }
    .profile-actions .btn { flex: 1; }
    .quick-contact { bottom: 84px; }
}
