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

:root {
--charcoal: #393939;
--text: #252525;
--muted: #666666;
--light-muted: #999999;
--background: #F5F7F8;
--white: #FFFFFF;


--cyan: #01AED8;
--purple: #8B54AB;
--red: #E5484D;

--border: #E3E7EA;

--shadow:
    0 8px 24px rgba(0, 0, 0, 0.10);


}

html {
min-height: 100%;
}

body {
min-height: 100vh;
background: var(--background);
color: var(--text);


font-family:
    "Poppins",
    "Segoe UI",
    Arial,
    sans-serif;

-webkit-font-smoothing: antialiased;


}

button,
input {
font: inherit;
}

button {
cursor: pointer;
}

.hidden {
display: none !important;
}

/* ============================================================= */
/* GENERAL                                                       */
/* ============================================================= */

.view {
min-height: 100vh;
}

.eyebrow {
color: var(--cyan);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.14em;
}

/* ============================================================= */
/* LOGIN                                                         */
/* ============================================================= */

.login-view {
display: flex;
align-items: center;
justify-content: center;


padding: 32px 20px;


}

.login-container {
width: 100%;
max-width: 390px;
text-align: center;
}

.login-logo {
display: flex;
align-items: center;
justify-content: center;


width: 82px;
height: 82px;

margin: 0 auto 18px;

border-radius: 50%;

background: var(--cyan);
color: var(--white);

font-size: 34px;
font-weight: 700;

box-shadow:
    0 8px 22px rgba(1, 174, 216, 0.22);


}

.login-container h1 {
color: var(--cyan);
font-size: 32px;
line-height: 1.2;
font-weight: 800;
}

.login-subtitle {
margin-top: 5px;


color: var(--muted);

font-size: 18px;
font-weight: 600;
font-style: italic;


}

.login-error {
margin-top: 12px;
color: var(--red);
font-size: 14px;
font-weight: 700;
}

.login-form {
margin-top: 24px;
text-align: left;
}

.input-group + .input-group {
margin-top: 18px;
}

.input-group label {
display: block;


margin-bottom: 7px;

color: var(--text);

font-size: 13px;
font-weight: 700;


}

.input-wrapper {
position: relative;
}

.input-icon {
position: absolute;


left: 16px;
top: 50%;

transform: translateY(-50%);

color: var(--muted);

font-size: 18px;

pointer-events: none;


}

.input-wrapper input {
width: 100%;


height: 52px;

padding: 0 48px;

border: 1px solid var(--border);
border-radius: 9px;

outline: none;

background: var(--white);
color: var(--text);

font-size: 15px;
font-weight: 600;

box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.05);

transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;


}

.input-wrapper input:focus {
border-color: var(--cyan);


box-shadow:
    0 0 0 3px rgba(1, 174, 216, 0.12);


}

.password-toggle {
position: absolute;


right: 10px;
top: 50%;

width: 36px;
height: 36px;

transform: translateY(-50%);

border: none;
border-radius: 50%;

background: transparent;
color: var(--muted);

font-size: 14px;


}

.forgot-password {
display: block;


margin: 9px 0 0 auto;

border: none;
background: transparent;

color: var(--cyan);

font-size: 13px;
font-weight: 800;

text-transform: uppercase;


}

.primary-button {
border: none;
border-radius: 9px;


background: var(--cyan);
color: var(--white);

box-shadow:
    0 6px 16px rgba(1, 174, 216, 0.20);


}

.login-button {
width: 100%;


margin-top: 13px;

padding: 13px;

font-size: 15px;
font-weight: 800;


}

.register-link {
margin-top: 40px;


border: none;
background: transparent;

color: var(--text);

font-size: 15px;
font-weight: 600;


}

.register-link strong {
color: var(--cyan);
}

/* ============================================================= */
/* HOME HEADER                                                    */
/* ============================================================= */

.home-view {
background: var(--background);
}

.app-header {
display: flex;
align-items: center;
justify-content: space-between;


min-height: 84px;

padding: 14px 24px;

background: var(--charcoal);
color: var(--white);


}

.header-school {
min-width: 0;
}

.school-name {
overflow: hidden;


max-width: 500px;

white-space: nowrap;
text-overflow: ellipsis;

font-size: 20px;
font-weight: 700;


}

.school-role {
margin-top: 1px;


color: rgba(255, 255, 255, 0.78);

font-size: 11px;
font-weight: 600;


}

.profile-button {
display: flex;
align-items: center;
justify-content: center;


width: 55px;
height: 55px;

flex-shrink: 0;

border: 2px solid #EDF0F7;
border-radius: 50%;

background: transparent;
color: var(--white);

font-size: 23px;


}

/* ============================================================= */
/* APP LAYOUT                                                     */
/* ============================================================= */

.app-layout {
display: flex;
align-items: flex-start;
min-height: calc(100vh - 84px);
}

.sidebar {
display: flex;
flex-direction: column;

position: sticky;
top: 84px;
height: calc(100vh - 84px);
overflow-y: auto;

width: 230px;

flex-shrink: 0;

padding: 24px 14px;

background: var(--white);

border-right: 1px solid var(--border);


}

/* profile-button menu */
.profile-menu {
position: fixed;
z-index: 50;

display: flex;
flex-direction: column;

min-width: 180px;

padding: 6px;

background: var(--white);
border: 1px solid var(--border);
border-radius: 10px;
box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.profile-menu button {
padding: 10px 12px;

border: none;
border-radius: 6px;

background: transparent;
color: var(--text);

text-align: left;
font-size: 14px;
font-weight: 600;
}

.profile-menu button:hover {
background: #F1F4F5;
}

.profile-menu #profileMenuLogout {
color: #C0392B;
}

.sidebar-brand {
padding: 0 12px 22px;


color: var(--charcoal);

font-size: 18px;
font-weight: 800;


}

.sidebar nav {
display: flex;
flex-direction: column;


height: 100%;


}

.nav-item {
display: flex;
align-items: center;


gap: 12px;

width: 100%;

padding: 11px 12px;

border: none;
border-radius: 8px;

background: transparent;
color: var(--muted);

text-align: left;

font-size: 14px;
font-weight: 700;

transition:
    background 0.15s ease,
    color 0.15s ease;


}

.nav-item span {
width: 20px;
text-align: center;
}

.nav-item:hover {
background: #F1F4F5;
color: var(--text);
}

.nav-item.active {
background: rgba(1, 174, 216, 0.10);
color: var(--cyan);
}

.sidebar-divider {
height: 1px;


margin: 12px 8px;

background: var(--border);


}

.sidebar-spacer {
flex: 1;
}

/* ============================================================= */
/* DASHBOARD                                                      */
/* ============================================================= */

.dashboard-content {
width: 100%;
max-width: 1180px;


margin: 0 auto;

padding: 34px;


}

.dashboard-heading h1 {
margin-top: 5px;


font-size: 28px;
line-height: 1.3;


}

.dashboard-heading p:last-child {
margin-top: 6px;


color: var(--muted);

font-size: 14px;


}

.quick-actions {
margin-top: 34px;
}

.quick-actions h2 {
font-size: 18px;
}

.action-grid {
display: grid;


grid-template-columns:
    repeat(3, minmax(0, 1fr));

gap: 16px;

margin-top: 16px;


}

.action-card {
display: flex;
align-items: center;


gap: 16px;

min-height: 110px;

padding: 18px;

border: 1px solid var(--border);
border-radius: 12px;

background: var(--white);

color: var(--text);

text-align: left;

box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.06);

transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;


}

.action-card:hover {
transform: translateY(-2px);


box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.10);


}

.action-icon {
display: flex;
align-items: center;
justify-content: center;


width: 48px;
height: 48px;

flex-shrink: 0;

border-radius: 10px;

background: rgba(1, 174, 216, 0.10);
color: var(--cyan);

font-size: 22px;
font-weight: 700;


}

.action-card strong {
display: block;


font-size: 14px;


}

.action-card span {
display: block;


margin-top: 4px;

color: var(--muted);

font-size: 12px;


}

.dashboard-placeholder {
display: flex;
align-items: center;


min-height: 190px;

margin-top: 28px;

padding: 28px;

border: 1px dashed #CBD2D7;
border-radius: 14px;

background: rgba(255, 255, 255, 0.55);


}

.placeholder-icon {
font-size: 26px;
color: var(--cyan);
}

.dashboard-placeholder h2 {
margin-top: 8px;


font-size: 18px;


}

.dashboard-placeholder p {
max-width: 650px;


margin-top: 6px;

color: var(--muted);

font-size: 14px;
line-height: 1.6;


}

/* ============================================================= */
/* PLANS                                                         */
/* ============================================================= */

.plans-view {
width: 100%;


padding: 28px 32px 40px;


}

.plans-header {
display: flex;
align-items: center;


width: 100%;
max-width: 1180px;

margin: 0 auto;


}

.back-button {
display: flex;
align-items: center;
justify-content: center;


width: 42px;
height: 42px;

border: none;
border-radius: 50%;

background: transparent;
color: var(--charcoal);

font-size: 28px;


}

.back-button:hover {
background: rgba(0, 0, 0, 0.06);
}

.plans-brand {
margin-left: 12px;


color: var(--charcoal);

font-size: 18px;
font-weight: 800;


}

.plans-introduction {
max-width: 760px;


margin: 34px auto 0;

text-align: center;


}

.plans-introduction h1 {
margin-top: 8px;


font-size: 30px;
line-height: 1.3;


}

.plans-introduction p {
margin-top: 9px;


color: var(--muted);

font-size: 15px;
line-height: 1.6;


}

.plans-introduction small {
display: block;


margin-top: 9px;

color: var(--light-muted);

font-size: 12px;
line-height: 1.55;


}

.plans-grid {
display: grid;


grid-template-columns:
    repeat(2, minmax(0, 1fr));

gap: 18px;

width: 100%;
max-width: 1100px;

margin: 34px auto 0;


}

.plan-card {
padding: 26px;


border-radius: 16px;

color: var(--white);

box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.10);


}

.resultix-plan {
background: var(--cyan);
}

.attendix-plan {
background: var(--purple);
}

.bundle-plan {
background: #121212;
}

.bundle-plus-plan {
background: #1C1C1C;


border: 1.5px solid var(--cyan);


}

.plan-chip {
align-self: flex-start;
display: inline-block;


padding: 4px 10px;

border-radius: 5px;

background: rgba(255, 255, 255, 0.20);

font-size: 11px;
font-weight: 800;

letter-spacing: 0.12em;


}

.plan-card h2 {
margin-top: 12px;


font-size: 25px;


}

.plan-description {
margin-top: 7px;


color: rgba(255, 255, 255, 0.85);

font-size: 14px;
line-height: 1.6;
font-weight: 600;


}

.plan-card ul {
display: flex;
flex-direction: column;


gap: 8px;

margin-top: 20px;

list-style: none;

font-size: 14px;
line-height: 1.5;


}

.plan-button {
width: 100%;


margin-top: 22px;

padding: 13px 16px;

border: none;
border-radius: 8px;

background: var(--white);

font-size: 14px;
font-weight: 800;


}

.resultix-plan .plan-button {
color: var(--cyan);
}

.attendix-plan .plan-button {
color: var(--purple);
}

.bundle-plan .plan-button {
color: #121212;
}

.bundle-plus-plan .plan-button {
background: var(--cyan);
color: var(--white);
}

.plan-divider {
height: 1px;


margin-top: 18px;

background: rgba(255, 255, 255, 0.20);


}

.addon-row {
display: flex;
align-items: center;
justify-content: space-between;


gap: 16px;

margin-top: 16px;


}

.addon-row strong {
display: block;


font-size: 13px;


}

.addon-row small {
display: block;


margin-top: 2px;

color: rgba(255, 255, 255, 0.75);

font-size: 11px;


}

.switch {
position: relative;


width: 46px;
height: 26px;

flex-shrink: 0;


}

.switch input {
width: 0;
height: 0;


opacity: 0;


}

.switch span {
position: absolute;


inset: 0;

border-radius: 999px;

background: rgba(255, 255, 255, 0.25);

transition: 0.2s ease;


}

.switch span::before {
content: "";


position: absolute;

width: 20px;
height: 20px;

top: 3px;
left: 3px;

border-radius: 50%;

background: var(--white);

transition: 0.2s ease;


}

.switch input:checked + span {
background: var(--white);
}

.switch input:checked + span::before {
transform: translateX(20px);
background: var(--purple);
}

.bundle-heading {
grid-column: 1 / -1;


margin-top: 8px;

color: var(--charcoal);

text-align: center;

font-size: 16px;
font-weight: 800;


}

.bundle-plus-top {
display: flex;
align-items: center;
justify-content: space-between;


gap: 12px;


}

.bundle-plus-top > span {
color: var(--cyan);


font-size: 11px;
font-weight: 800;

letter-spacing: 0.08em;


}

.plans-view > .contact-button {
display: block;

width: 100%;
max-width: 500px;

margin: 26px auto 0;

padding: 12px;

border: none;

background: transparent;

color: var(--charcoal);

font-size: 14px;
font-weight: 700;

}

.plans-view footer {
margin-top: 5px;

text-align: center;

color: #777;

font-size: 13px;
font-weight: 600;

}

/* ============================================================= */
/* EXPIRED                                                       */
/* ============================================================= */

.expired-view {
display: flex;
justify-content: center;

padding: 40px 24px;

}

.expired-container {
width: 100%;
max-width: 560px;

text-align: center;

}

.expired-brand {
color: var(--charcoal);

font-size: 18px;
font-weight: 800;

}

.alert-icon {
display: flex;
align-items: center;
justify-content: center;

width: 88px;
height: 88px;

margin: 42px auto 0;

border-radius: 50%;

background: var(--red);
color: var(--white);

font-size: 48px;
font-weight: 800;

box-shadow:
    0 8px 20px rgba(229, 72, 77, 0.20);

}

.expired-container h1 {
margin-top: 24px;

font-size: 25px;
line-height: 1.4;

}

.expired-message {
margin-top: 11px;

color: var(--muted);

font-size: 15px;
line-height: 1.65;
font-weight: 600;

}

.expired-date {
margin-top: 9px;

color: var(--light-muted);

font-size: 13px;
font-weight: 600;

}

.retention-notice {
display: flex;
align-items: flex-start;

gap: 12px;

margin-top: 28px;

padding: 16px;

border: 1px solid #F6CFCE;
border-radius: 14px;

background: #FDEDEC;

text-align: left;

}

.retention-icon {
display: flex;
align-items: center;
justify-content: center;

width: 20px;
height: 20px;

flex-shrink: 0;

border-radius: 50%;

background: var(--red);
color: var(--white);

font-size: 13px;
font-weight: 800;

}

.retention-notice p {
color: #8A3B3B;

font-size: 13px;
line-height: 1.55;
font-weight: 600;

}

.expired-primary-button,
.expired-secondary-button {
width: 100%;

border: none;
border-radius: 8px;

padding: 13px 16px;

color: var(--white);

font-size: 15px;
font-weight: 800;

}

.expired-primary-button {
margin-top: 28px;

background: var(--red);


}

.expired-secondary-button {
margin-top: 13px;


background: var(--cyan);


}

.expired-contact-button {
margin-top: 8px;

padding: 12px;

border: none;

background: transparent;

color: var(--light-muted);

font-size: 13px;
font-weight: 600;


}

.expired-container footer {
margin-top: 4px;


color: #777;

font-size: 13px;
font-weight: 600;


}

/* ============================================================= */
/* TABLET                                                        */
/* ============================================================= */

@media (max-width: 999px) {

.sidebar {
    width: 200px;
}


.dashboard-content {
    padding: 28px 24px;
}


.action-grid {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}


.plans-grid {
    max-width: 760px;
}

}

/* ============================================================= */
/* PHONE                                                        */
/* ============================================================= */

@media (max-width: 700px) {

.app-header {
    min-height: 76px;
    padding: 12px 16px;
}


.school-name {
    max-width: calc(100vw - 100px);
    font-size: 18px;
}


.profile-button {
    width: 48px;
    height: 48px;
}


.app-layout {
    display: block;
}


.sidebar {
    display: none;
}


.dashboard-content {
    padding: 24px 16px 32px;
}


.dashboard-heading h1 {
    font-size: 24px;
}


.action-grid {
    grid-template-columns: 1fr;
}


.action-card {
    min-height: 88px;
}


.plans-view {
    padding: 20px 16px 32px;
}


.plans-introduction {
    margin-top: 24px;
}


.plans-introduction h1 {
    font-size: 24px;
}


.plans-grid {
    grid-template-columns: 1fr;

    max-width: 520px;

    margin-top: 26px;
}


.bundle-heading {
    margin-top: 5px;
}


.plan-card {
    padding: 21px;
}


.bundle-plus-top {
    align-items: flex-start;
    flex-direction: column;
}


.expired-view {
    padding: 32px 16px;
}


.expired-container {
    max-width: 520px;
}


.expired-container h1 {
    font-size: 22px;
}

}

/* ============================================================= */
/* SMALL PHONE                                                   */
/* ============================================================= */

@media (max-width: 420px) {

.login-view {
    padding: 24px 16px;
}


.login-logo {
    width: 72px;
    height: 72px;
}


.login-container h1 {
    font-size: 29px;
}


.login-subtitle {
    font-size: 17px;
}


.expired-container {
    max-width: 100%;
}

}

/* ============================================================= */
/* SHINY CHARCOAL THEME  (admin UI only — module colours untouched) */
/* --cyan / --purple stay reserved for Resultix / Attendix        */
/* ============================================================= */

:root {
--ink: #2A2C30;
--silver: #C9CDD3;
--sheen: linear-gradient(145deg, #5B5F66 0%, #383A3F 42%, #26282C 62%, #45484E 100%);
--sheen-edge: inset 0 1px 0 rgba(255,255,255,0.16), inset 0 -1px 0 rgba(0,0,0,0.35);
}

.eyebrow { color: #6A6E75; }
.login-logo { background: var(--sheen); box-shadow: var(--sheen-edge), 0 8px 22px rgba(0,0,0,0.25); }
.login-container h1 { color: var(--ink); }
.input-wrapper input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(42,44,48,0.14); }
.forgot-password, .register-link strong, .placeholder-icon { color: var(--ink); }
.primary-button, .expired-secondary-button { background: var(--sheen); box-shadow: var(--sheen-edge), 0 6px 16px rgba(0,0,0,0.22); }
.app-header { background: var(--sheen); box-shadow: var(--sheen-edge); }
.nav-item.active { background: rgba(42,44,48,0.08); color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.action-icon { background: var(--sheen); color: var(--white); box-shadow: var(--sheen-edge); }
.bundle-plus-plan { border-color: var(--silver); }
.bundle-plus-plan .plan-button { background: var(--silver); color: var(--ink); }
.bundle-plus-top > span { color: var(--silver); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.plan-card :focus-visible { outline-color: var(--white); }

/* ============================================================= */
/* PLANS — 5 cards, module colours unchanged                     */
/* ============================================================= */

.plans-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 1180px; }
.plan-card { display: flex; flex-direction: column; grid-column: span 3; transition: transform .18s ease, box-shadow .18s ease; }
.plan-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0,0,0,0.16); }
.plan-card.bundle-plan, .plan-card.bundle-admit-plan, .plan-card.bundle-plus-plan { grid-column: span 2; }
.plan-card ul { flex: 1; }
.bundle-admit-plan { background: #171717; border: 1.5px solid rgba(255,255,255,0.18); }
.bundle-admit-plan .plan-button { color: #171717; }
.bundle-plus-plan { box-shadow: 0 0 0 4px rgba(201,205,211,0.14), 0 8px 24px rgba(0,0,0,0.14); }
.resultix-plan, .attendix-plan { box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 24px rgba(0,0,0,0.10); }
.plans-view > .contact-button { max-width: 320px; margin-top: 30px; border: 1.5px solid var(--ink); border-radius: 9px; }
.plans-view > .contact-button:hover { background: var(--ink); color: var(--white); }

/* ============================================================= */
/* PANELS, FORMS, LISTS                                          */
/* ============================================================= */

.panel .dashboard-heading + .two-col { margin-top: 26px; }
.two-col { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 18px; align-items: start; }
.card { padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.card h2 { font-size: 18px; margin-bottom: 16px; }
.field { margin-top: 16px; }
.field:first-of-type { margin-top: 0; }
.field label, .check-row { font-size: 13px; font-weight: 700; }
.field label { display: block; margin-bottom: 7px; }
.hint { color: var(--light-muted); font-size: 12px; font-weight: 600; }
.field p.hint { margin: -3px 0 8px; }
.field input, .field select, .field textarea, .comp-add input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; outline: none; background: var(--white); color: var(--text); font-size: 14px; font-weight: 600; }
.field textarea { resize: vertical; }
.field input.invalid, .field select.invalid { border-color: var(--red); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-2 .field { margin-top: 16px; }
.btn { padding: 12px 22px; font-size: 14px; font-weight: 800; }
.btn.wide { width: 100%; margin-top: 22px; }
.btn:disabled { opacity: .55; cursor: progress; }
.ghost-button, .danger-button { padding: 11px 16px; border-radius: 9px; font-size: 14px; font-weight: 700; }
.ghost-button { border: 1px solid var(--border); background: var(--white); color: var(--text); }
.ghost-button:hover { border-color: var(--ink); }
.danger-button { border: none; background: var(--red); color: var(--white); }
.form-actions { display: flex; gap: 10px; margin-top: 22px; justify-content: flex-end; }
.check-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--ink); }
.check-row:has(input:disabled) { opacity: .5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label, .range-grid label { position: relative; margin: 0; cursor: pointer; }
.chips input, .range-grid input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: block; min-width: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.chips input:checked + span { background: var(--sheen); border-color: var(--ink); color: var(--white); box-shadow: var(--sheen-edge); }
.chips input:focus-visible + span, .range-grid input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.item strong { display: block; font-size: 14px; }
.item small { color: var(--muted); font-size: 12px; font-weight: 600; }
.item .acts { display: flex; gap: 6px; flex-shrink: 0; }
.item .acts button { padding: 6px 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--white); font-size: 12px; font-weight: 700; color: var(--text); }
.item .acts .del { color: var(--red); }
.empty { padding: 22px; border: 1px dashed #CBD2D7; border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.comp-add { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.comp-add button { grid-column: 1 / -1; }

/* dialog + toast */
dialog { margin: auto; width: min(380px, 92vw); padding: 24px; border: none; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(20,21,23,.55); }
dialog h3 { font-size: 18px; }
dialog p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 50; max-width: 90vw; padding: 12px 18px; border-radius: 10px; background: var(--sheen); color: var(--white); font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--red); }

/* ============================================================= */
/* CONTACT / REGISTRATION INFO                                   */
/* ============================================================= */

.contact-view { padding: 28px 32px 48px; }
.contact-wrap { max-width: 720px; margin: 30px auto 0; }
.contact-wrap h1 { margin-top: 6px; font-size: 30px; line-height: 1.3; }
.contact-lead { margin: 8px 0 24px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.range-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.range-grid span { display: block; padding: 14px 8px; border: 1.5px solid var(--border); border-radius: 10px; text-align: center; font-size: 14px; font-weight: 800; color: var(--text); background: var(--white); transition: border-color .15s, background .15s, color .15s; }
.range-grid label:hover span { border-color: #9A9EA5; }
.range-grid input:checked + span { background: var(--sheen); border-color: var(--ink); color: var(--white); box-shadow: var(--sheen-edge); }
.plan-pick { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.plan-pick span { font-size: 13px; }
.contact-card.done { text-align: center; padding: 40px 24px; }
.contact-card.done p { margin: 8px 0 22px; color: var(--muted); }
.ok-icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: var(--sheen); color: var(--white); font-size: 34px; font-weight: 800; box-shadow: var(--sheen-edge); }

@media (max-width: 999px) {
.plan-card.bundle-plan, .plan-card.bundle-admit-plan { grid-column: span 3; }
.plan-card.bundle-plus-plan { grid-column: 1 / -1; }
.plans-grid { max-width: 820px; }
.two-col { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
.plan-card, .plan-card.bundle-plan, .plan-card.bundle-admit-plan, .plan-card.bundle-plus-plan { grid-column: 1 / -1; }
.contact-view { padding: 20px 16px 32px; }
.contact-wrap h1 { font-size: 24px; }
.grid-2 { grid-template-columns: 1fr; gap: 0; }
.comp-add { grid-template-columns: 1fr 1fr; }
.comp-add input:first-child { grid-column: 1 / -1; }
.sidebar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
* { transition: none !important; scroll-behavior: auto !important; }
}

/* chip: sits at its natural width, no bullet */
.plan-chip::before { content: none; }
.bundle-plus-top .plan-chip { align-self: auto; }
.module-plans-note { margin-top: 6px; }

/* extra form bits */
.more-input { margin-top: 10px; width: 100%; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; outline: none; }
.field select, .field input[type=number] { min-height: 46px; }
.toolbar { margin-bottom: 18px; }
.toolbar .field { max-width: 360px; }
.wide-ghost { width: 100%; margin-top: 10px; padding: 13px; }
.verify-text { margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.verify-text strong { color: var(--text); overflow-wrap: anywhere; }
.verify-text + .login-button { margin-top: 22px; }
.module-card .empty { margin-top: 12px; }
.module-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 6px; }
.module-card .badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; color: var(--white); }
.module-card.resultix .badge { background: var(--cyan); }
.module-card.attendix .badge { background: var(--purple); }
.module-card .badge.off { background: #9A9EA5; }
.module-card .ghost-button { margin-top: 16px; }
.st-row { display: grid; grid-template-columns: 84px 1fr minmax(120px, 170px) 40px; gap: 8px; align-items: center; }
.st-row input, .st-row select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; background: var(--white); outline: none; }
.st-row .del-btn { height: 44px; border: 1px solid var(--border); border-radius: 9px; background: var(--white); color: var(--red); font-weight: 800; }
.st-row:not(:has(select)) { grid-template-columns: 84px 1fr 40px; }
.st-row input.invalid { border-color: var(--red); }
.item .roll { display: inline-block; min-width: 34px; margin-right: 10px; padding: 2px 8px; border-radius: 6px; background: #EEF0F2; font-size: 12px; font-weight: 800; }

/* phone: section strip replaces the hidden sidebar */
.mobile-nav { display: none; }
@media (max-width: 700px) {
.mobile-nav { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; scrollbar-width: none; }
.mobile-nav .nav-item { width: auto; flex-shrink: 0; padding: 8px 12px; white-space: nowrap; gap: 8px; }
.st-row, .st-row:not(:has(select)) { grid-template-columns: 1fr 44px; }
.st-row .r-roll { grid-column: 1 / -1; }
.st-row .r-opt { grid-column: 1 / -1; }
.item { flex-wrap: wrap; }
.form-actions { flex-wrap: wrap; }
}


/* ============================================================= */
/* SPLASH, PROGRESS, SKELETONS                                   */
/* ============================================================= */

.splash-view { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 100vh; }
.splash-view.hidden { display: none; }
.splash-name { color: var(--ink); font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.splash-bar, .topbar { position: relative; overflow: hidden; background: #DADDE1; }
.splash-bar { width: 160px; height: 4px; border-radius: 4px; }
.splash-bar::before, .topbar::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--sheen); animation: slide 1.1s ease-in-out infinite; }
.topbar { position: fixed; top: 0; left: 0; z-index: 100; width: 100%; height: 3px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.topbar.on { opacity: 1; }
@keyframes slide { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.is-loading .sk, .sk-row { color: transparent !important; border-radius: 6px; background: linear-gradient(90deg, #E4E6E9 25%, #F1F2F4 37%, #E4E6E9 63%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }
.sk-row { height: 18px; margin: 8px 0; }
.is-loading .stat-card small { display: inline-block; min-width: 90px; }
@media (prefers-reduced-motion: reduce) { .splash-bar::before, .topbar::before, .is-loading .sk, .sk-row { animation: none; } }

/* ============================================================= */
/* DASHBOARD SUMMARY                                             */
/* ============================================================= */

.summary { margin-top: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); text-align: left; box-shadow: 0 4px 14px rgba(0,0,0,.05); transition: transform .15s, box-shadow .15s, border-color .15s; }
.stat-card:hover { transform: translateY(-2px); border-color: #9A9EA5; box-shadow: 0 10px 22px rgba(0,0,0,.1); }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.stat-value { color: var(--ink); font-size: 34px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-card small { color: var(--muted); font-size: 12px; font-weight: 600; }
.summary-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.summary .card h2 { font-size: 16px; margin-bottom: 14px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: 10px; align-items: center; padding: 2px 0; border: none; background: none; text-align: left; font-size: 13px; font-weight: 700; color: var(--text); }
.bar-row:hover .bar-fill { filter: brightness(1.25); }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; border-radius: 6px; background: #ECEEF0; overflow: hidden; }
.bar-fill { display: block; height: 100%; min-width: 4px; border-radius: 6px; background: var(--sheen); transition: width .4s ease; }
.bar-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.sum-plan-name { font-size: 18px; font-weight: 800; color: var(--ink); }
.sum-plan-meta { margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.sum-plan-meta.warn { color: var(--red); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.mod-badge { padding: 4px 10px; border-radius: 6px; color: var(--white); font-size: 12px; font-weight: 800; }
.mod-badge.resultix { background: var(--cyan); }
.mod-badge.attendix { background: var(--purple); }
.checklist-card { margin-top: 14px; }
.check-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); text-align: left; font-size: 14px; font-weight: 700; color: var(--text); }
.check-item:hover { border-color: var(--ink); }
.check-dot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #B5B9BF; font-size: 13px; color: var(--white); flex-shrink: 0; }
.check-item.done { color: var(--muted); text-decoration: line-through; }
.check-item.done .check-dot { background: var(--sheen); border-color: var(--ink); }
.quick-actions { margin-top: 28px; }

/* toolbar / search */
.toolbar-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.toolbar-grid .field { margin-top: 0; }
.toolbar .field { max-width: none; }
.more-btn { width: 100%; margin-top: 12px; }
.empty.small { padding: 14px; }

/* plans: current plan */
.plans-current { max-width: 760px; margin: 18px auto 0; padding: 10px 16px; border-radius: 10px; background: #EEF0F2; color: var(--ink); text-align: center; font-size: 14px; font-weight: 700; }
.plans-current.warn { background: #FDECEC; color: var(--red); }
.plan-card.is-current { outline: 3px solid var(--ink); outline-offset: 3px; }
.current-badge { align-self: flex-start; margin-bottom: 10px; padding: 4px 10px; border-radius: 6px; background: var(--white); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.plan-button:disabled { opacity: .7; cursor: default; }

@media (max-width: 999px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .summary-row { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .toolbar-grid { grid-template-columns: 1fr; } .stat-value { font-size: 28px; } .bar-row { grid-template-columns: minmax(70px, 110px) 1fr 38px; } }

/* ============================================================= */
/* STICKY HEADER (fixes the gap above the sidebar) + renewal + jump */
/* ============================================================= */

.app-header { position: sticky; top: 0; z-index: 30; }
.sidebar { top: var(--header-h, 84px); height: calc(100vh - var(--header-h, 84px)); }
.mobile-nav { top: var(--header-h, 76px); z-index: 29; }

.renewal-mode [data-new-only] { display: none; }
.contact-card input[readonly] { background: #F1F3F5; color: var(--muted); cursor: not-allowed; }

.jump-btn { display: none; width: 100%; margin-top: 14px; border-color: var(--ink); font-weight: 800; }
@media (max-width: 999px) { .jump-btn { display: block; } }


/* ============================================================= */
/* CALENDAR                                                      */
/* ============================================================= */

:root { --ev-holiday: #C0392B; --ev-exam: #2A2C30; --ev-event: #5B7083; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-head h2 { flex: 1; margin: 0; text-align: center; font-size: 18px; }
.cal-nav { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 9px; background: var(--white); font-size: 20px; line-height: 1; color: var(--text); }
.cal-nav:hover { border-color: var(--ink); }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow span { padding: 6px 0; text-align: center; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.cal-cell { display: flex; flex-direction: column; gap: 3px; min-height: 84px; padding: 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--white); text-align: left; overflow: hidden; }
.cal-cell.blank { border: none; background: none; }
button.cal-cell:hover { border-color: var(--ink); }
.cal-cell.weekend { background: #F1F2F4; }
.cal-cell.closed { background: #FBEDEB; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-num { font-size: 13px; font-weight: 800; color: var(--text); }
.cal-cell.weekend .cal-num { color: var(--muted); }
.cal-chip { display: block; overflow: hidden; padding: 2px 5px; border-radius: 4px; color: var(--white); font-size: 10.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.ev-holiday.cal-chip, .tag.ev-holiday, .lg-holiday { background: var(--ev-holiday); }
.ev-exam.cal-chip, .tag.ev-exam, .lg-exam { background: var(--ev-exam); }
.ev-event.cal-chip, .tag.ev-event, .lg-event { background: var(--ev-event); }
.tag { display: inline-block; margin-right: 8px; padding: 2px 7px; border-radius: 5px; color: var(--white); font-size: 11px; font-weight: 800; vertical-align: 1px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lg-weekend { background: #E3E5E8; border: 1px solid #C9CDD3; }
@media (max-width: 700px) {
.cal-cell { min-height: 54px; padding: 4px; }
.cal-chip, .cal-more { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
.cal-more { display: none; }
}