/* ============================================================================
   DemoAppCore — site.css  (v3, "Glass" design)
   Deep indigo→cyan glass surroundings; white readable cards for data areas.
   The single first-party stylesheet (dropzone.css is third-party).
   All sizes in rem. Root: 12px (html { font-size: 75% }).
   ========================================================================== */

@font-face {
    font-family: 'VarelaRound';
    src: url('VarelaRound-Regular.ttf') format('truetype');
    font-display: swap;
}

:root {
    --ink: #0f172a;            /* dark slate text on light surfaces */
    --ink-soft: #475569;
    --paper: #ffffff;
    --paper-soft: #f1f5f9;
    --line: #e2e8f0;
    --bg-1: #0b1533;           /* page gradient stops */
    --bg-2: #14276b;
    --bg-3: #0e3a5f;
    --glass: rgba(255, 255, 255, 0.07);
    --glass-line: rgba(255, 255, 255, 0.16);
    --glass-ink: #e6edf7;      /* light text on glass */
    --glass-ink-soft: #9fb3d1;
    --accent: #38bdf8;         /* cyan */
    --accent-2: #2563eb;       /* blue */
    --accent-grad: linear-gradient(135deg, #38bdf8, #6366f1);
    --danger: #f43f5e;
    --ok: #34d399;
    --radius: 1.16rem;
    --radius-s: 0.66rem;
    --shadow: 0 0.8rem 2.5rem rgba(2, 8, 30, 0.45);
    --shadow-s: 0 0.25rem 1rem rgba(2, 8, 30, 0.25);
}

html { font-size: 75%; }

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'VarelaRound', 'Segoe UI', Arial, sans-serif;
    font-size: 1.16rem;
    color: var(--glass-ink);
    direction: rtl;
    background: var(--bg-1);
    background-image:
        radial-gradient(60rem 40rem at 85% -10%, rgba(56, 189, 248, 0.28), transparent 60%),
        radial-gradient(50rem 36rem at 0% 110%, rgba(99, 102, 241, 0.30), transparent 60%),
        linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
    background-attachment: fixed;
}

/* ---------------------------------------------------------------- header -- */

#upperPanel {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.8rem;
    background: rgba(11, 21, 51, 0.55);
    backdrop-filter: blur(1.2rem);
    -webkit-backdrop-filter: blur(1.2rem);
    border-bottom: 0.08rem solid var(--glass-line);
}

#rightPart {
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    background: linear-gradient(90deg, #e6edf7, #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#leftPart {
    margin-right: auto;   /* pushes to the far (left) side in RTL */
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--glass-ink-soft);
    font-size: 1rem;
}

#leftPart img { height: 2.6rem; filter: drop-shadow(0 0 0.5rem rgba(56, 189, 248, 0.5)); }

#menuToggle { display: none; font-size: 1.9rem; cursor: pointer; color: var(--glass-ink); }

#content { min-height: calc(100vh - 4.5rem); }

/* -------------------------------------------------------------- buttons -- */

.btnPrimary, .btnGhost {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: inherit;
    font-size: 1.25rem;
    padding: 0.9rem 1.9rem;
    border-radius: 3rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btnPrimary {
    color: #06121f;
    background: var(--accent-grad);
    border: none;
    box-shadow: 0 0.5rem 1.6rem rgba(56, 189, 248, 0.45);
}

.btnPrimary:hover { transform: translateY(-0.17rem); box-shadow: 0 0.8rem 2rem rgba(56, 189, 248, 0.6); }

.btnGhost {
    color: var(--glass-ink);
    background: var(--glass);
    border: 0.08rem solid var(--glass-line);
}

.btnGhost:hover { background: rgba(255, 255, 255, 0.13); }

.btnGhost.small { font-size: 1.05rem; padding: 0.55rem 1.2rem; }

/* -------------------------------------------------------------- landing -- */

#landing { max-width: 86rem; margin: 0 auto; padding: 3rem 2rem 2rem; }

.hero { text-align: center; padding: 3.5rem 1rem 3rem; }

.heroBadge {
    display: inline-block;
    padding: 0.4rem 1.3rem;
    border-radius: 3rem;
    border: 0.08rem solid var(--glass-line);
    background: var(--glass);
    color: #7dd3fc;
    font-size: 1rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.8rem;
}

.hero h1 {
    margin: 0 0 1.4rem;
    font-size: 4.4rem;
    line-height: 1.15;
    font-weight: 400;
}

.grad {
    background: linear-gradient(90deg, #38bdf8, #a5b4fc, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.heroSub {
    max-width: 52rem;
    margin: 0 auto 2.6rem;
    color: var(--glass-ink-soft);
    font-size: 1.5rem;
    line-height: 1.75;
}

.heroSub b { color: var(--glass-ink); font-weight: 400; }

.heroButtons { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
    margin-top: 2.5rem;
}

.featureCard {
    background: var(--glass);
    border: 0.08rem solid var(--glass-line);
    border-radius: var(--radius);
    padding: 2rem 1.8rem;
    backdrop-filter: blur(0.85rem);
    -webkit-backdrop-filter: blur(0.85rem);
    box-shadow: var(--shadow-s);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.featureCard:hover { transform: translateY(-0.33rem); border-color: rgba(125, 211, 252, 0.45); }

.featureIcon {
    width: 4.6rem;
    height: 4.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    margin-bottom: 1.4rem;
}

.featureCard h3 { margin: 0 0 0.8rem; font-size: 1.6rem; font-weight: 400; color: var(--glass-ink); }

.featureCard p { margin: 0; color: var(--glass-ink-soft); line-height: 1.7; }

.featureCard code, .heroSub code {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    padding: 0.1rem 0.45rem;
    border-radius: 0.4rem;
    direction: ltr;
    unicode-bidi: embed;
    font-size: 0.95em;
}

.presentSection { text-align: center; margin-top: 4.5rem; }

.presentSection h2 { font-size: 2.6rem; font-weight: 400; margin: 0 0 0.6rem; }

.sectionSub { color: var(--glass-ink-soft); margin: 0 0 2rem; font-size: 1.3rem; }

.presentCards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }

.presentCard {
    font-family: inherit;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.8rem;
    background: var(--glass);
    border: 0.08rem solid var(--glass-line);
    border-radius: var(--radius);
    color: var(--glass-ink);
    cursor: pointer;
    backdrop-filter: blur(0.85rem);
    -webkit-backdrop-filter: blur(0.85rem);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.presentCard:hover {
    transform: translateY(-0.33rem);
    border-color: rgba(125, 211, 252, 0.5);
    background: rgba(56, 189, 248, 0.1);
}

.presentNum {
    font-size: 2.4rem;
    color: transparent;
    -webkit-text-stroke: 0.08rem rgba(125, 211, 252, 0.75);
}

.presentName { font-size: 1.6rem; }

.presentDesc { color: var(--glass-ink-soft); font-size: 1.1rem; line-height: 1.6; }

.landingFooter {
    margin-top: 5rem;
    padding: 1.8rem 0 1rem;
    text-align: center;
    color: var(--glass-ink-soft);
    font-size: 1rem;
    border-top: 0.08rem solid var(--glass-line);
}

/* --------------------------------------------------------- admin layout -- */

#layout { display: flex; min-height: calc(100vh - 4.5rem); }

#menu {
    width: 15rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.6rem 1rem;
    background: rgba(8, 15, 38, 0.45);
    border-left: 0.08rem solid var(--glass-line);
    backdrop-filter: blur(0.85rem);
    -webkit-backdrop-filter: blur(0.85rem);
}

#menu .buttons, #menu .menuBottom { display: flex; flex-direction: column; gap: 0.5rem; }

#menu input[type=button] {
    font-family: inherit;
    font-size: 1.25rem;
    text-align: right;
    color: var(--glass-ink);
    background-color: transparent;
    border: 0.08rem solid transparent;
    border-radius: var(--radius-s);
    padding: 0.9rem 3.4rem 0.9rem 1rem;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.5rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

#menu input[type=button]:hover { background-color: rgba(255, 255, 255, 0.08); }

#menu input.active {
    background-color: rgba(56, 189, 248, 0.16);
    border-color: rgba(125, 211, 252, 0.45);
}

#menu input#Cars {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237dd3fc'%3E%3Cpath d='M18.9 6c-.2-.6-.8-1-1.4-1H6.5c-.6 0-1.2.4-1.4 1L3 12v8c0 .6.4 1 1 1h1c.6 0 1-.4 1-1v-1h12v1c0 .6.4 1 1 1h1c.6 0 1-.4 1-1v-8l-2.1-6zM6.9 7h10.2l1.4 4H5.5l1.4-4zM6.5 16c-.8 0-1.5-.7-1.5-1.5S5.7 13 6.5 13s1.5.7 1.5 1.5S7.3 16 6.5 16zm11 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5z'/%3E%3C/svg%3E");
}

#menu input#Students {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237dd3fc'%3E%3Cpath d='M12 3 1 9l11 6 9-4.91V17h2V9L12 3zm-7 9.68V17c0 2 3.13 4 7 4s7-2 7-4v-4.32l-7 3.82-7-3.82z'/%3E%3C/svg%3E");
}

#menu input#Hello {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239fb3d1'%3E%3Cpath d='M12 3 2 12h3v8h6v-6h2v6h6v-8h3L12 3z'/%3E%3C/svg%3E");
    color: var(--glass-ink-soft);
}

#menu input#Contact {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239fb3d1'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
    color: var(--glass-ink-soft);
}

#inner { flex: 1; padding: 2rem; min-width: 0; }

/* on wide screens, mirror the menu's width on the far side so the content
   pane — and everything centered inside it — is centered in the VIEWPORT
   with equal margins on both sides (RTL: the menu column is on the right) */
@media (min-width: 90rem) {
    #inner { margin-left: 15rem; }
}

.adminWelcome { text-align: center; padding: 6rem 2rem; color: var(--glass-ink-soft); }
.adminWelcome h1 { color: var(--glass-ink); font-weight: 400; font-size: 2.6rem; margin-bottom: 0.8rem; }

#inner h1 { font-weight: 400; font-size: 2.2rem; margin: 0.4rem 0 1.4rem; }

/* ----------------------------------------------------------- table card -- */

div.table {
    position: relative;
    width: 90%;
    margin: 2rem auto;
    background: var(--paper);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem;
    overflow-x: auto;
}

div.table svg { vertical-align: middle; }

div.table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.16rem;
}

div.table thead th {
    text-align: right;
    color: var(--ink-soft);
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.02em;
    padding: 0.8rem 1rem;
    border-bottom: 0.17rem solid var(--line);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

div.table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 0.08rem solid var(--paper-soft);
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

div.table tbody tr { cursor: pointer; transition: background 0.1s ease; }

div.table tbody tr:hover { background: #eef7fe; }

/* the body scrolls under a header row that stays put — desktop screens only,
   so mobile/print/other contexts don't have to undo it */
@media screen and (min-width: 56.26rem) {
    div.table thead { width: calc(100% - 1em); }
    div.table tbody { display: block; max-height: 48vh; overflow: auto; }
    div.table tr { display: table; table-layout: fixed; width: 100%; }
}

/* sort indicators (pure CSS, replaces the old png images) */
th.sort_both::after, th.sort_asc::after, th.sort_desc::after {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.85em;
    color: #94a3b8;
}
th.sort_both::after { content: '⇅'; }
th.sort_asc::after  { content: '↑'; color: var(--accent-2); }
th.sort_desc::after { content: '↓'; color: var(--accent-2); }

.addButton {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    width: 3rem;
    height: 3rem;
    font-size: 1.8rem;
    line-height: 1;
    color: #06121f;
    background: var(--accent-grad);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0.3rem 1rem rgba(56, 189, 248, 0.5);
    transition: transform 0.15s ease;
}

.addButton:hover { transform: scale(1.08); }

#menuIcon { cursor: pointer; fill: #94a3b8; }
#menuIcon:hover { fill: var(--accent-2); }

#toolbar {
    display: none;
    position: absolute;
    top: 3rem;
    right: 0;
    min-width: 12rem;
    background: var(--paper);
    border: 0.08rem solid var(--line);
    border-radius: var(--radius-s);
    box-shadow: var(--shadow);
    overflow: hidden;
    color: var(--ink);
    font-size: 1.1rem;
}

#toolbar > div { padding: 0.8rem 1.2rem; cursor: pointer; }
#toolbar > div:hover { background: var(--paper-soft); }

/* ------------------------------------------------------------ filter bar -- */

.filterBar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin: 0 3.6rem 1.2rem 3.6rem; /* clears the burger (right) and + button (left) */
    padding: 0.9rem 1.1rem;
    background: var(--paper-soft);
    border: 0.08rem solid var(--line);
    border-radius: var(--radius-s);
}

.filterBar label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.filterBar input[type=text], .filterBar select {
    font-family: inherit;
    font-size: 1.1rem;
    color: var(--ink);
    background: var(--paper);
    border: 0.08rem solid var(--line);
    border-radius: 0.5rem;
    padding: 0.5rem 0.8rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filterBar input[type=text]:focus, .filterBar select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.2);
}

.filterBar #search {
    min-width: 16rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M15.5 14h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.7rem center;
    background-size: 1.3rem;
    padding-left: 2.6rem;
}

/* ----------------------------------------------------------------- pager -- */

.pager { display: flex; justify-content: center; gap: 0.4rem; padding-top: 1.2rem; color: var(--ink-soft); }

.pager span {
    min-width: 2.4rem;
    text-align: center;
    padding: 0.4rem 0.7rem;
    border: 0.08rem solid var(--line);
    border-radius: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.pager span:hover { background: var(--paper-soft); }

.pager input { width: 2.6rem; text-align: center; border: none; font-family: inherit; font-size: inherit; }

/* the middle "page n/N" box is an indicator, not a button */
.pager span:nth-child(3) { border: none; cursor: default; direction: ltr; }
.pager span:nth-child(3):hover { background: none; }

/* ------------------------------------------------------ page form card -- */

.pageForm {
    max-width: 44rem;
    margin: 3rem auto;
    padding: 2.4rem 2.6rem;
    background: var(--paper);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.pageForm h1 { font-weight: 400; font-size: 2.2rem; margin: 0 0 0.4rem; }

.pageFormSub { color: var(--ink-soft); margin: 0 0 1rem; }

/* field/focus/button styling is shared with #formDiv below — one source for both form systems */

/* ------------------------------------------------------- form (popup) -- */

/* stacking is by DOM order — popups append last (overlay, then its panel), so no z-index is needed */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 28, 0.6);
    backdrop-filter: blur(0.25rem);
    -webkit-backdrop-filter: blur(0.25rem);
}

#formDiv, .popupPanel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(44rem, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    background: var(--paper);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.2rem;
}

#formDiv label, .pageForm label {
    display: block;
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin: 1rem 0 0.3rem;
}

#formDiv input[type=text], #formDiv input[type=date], #formDiv input[type=color],
#formDiv input[type=number], #formDiv select, #formDiv textarea,
.pageForm input[type=text], .pageForm input[type=date], .pageForm input[type=color],
.pageForm input[type=number], .pageForm select, .pageForm textarea {
    width: 100%;
    font-family: inherit;
    font-size: 1.2rem;
    color: var(--ink);
    background: var(--paper);
    border: 0.08rem solid var(--line);
    border-radius: 0.5rem;
    padding: 0.7rem 0.9rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#formDiv input:focus, #formDiv select:focus, #formDiv textarea:focus,
.pageForm input:focus, .pageForm select:focus, .pageForm textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.2);
}

/* inline-control row (checkbox/radio + its label on one line) — emitted by UIField,
   works in any form container. Placed after the label rule so display:inline wins. */
.checkRow { margin-top: 1.2rem; }
.checkRow input { width: 1.3rem; height: 1.3rem; accent-color: var(--accent-2); vertical-align: middle; }
#formDiv .checkRow label, .pageForm .checkRow label, .checkRow label {
    display: inline;
    margin: 0 0.5rem 0 0;
    vertical-align: middle;
}

#formDiv input[type=button], .pageForm input[type=button] {
    font-family: inherit;
    font-size: 1.2rem;
    margin: 1.6rem 0.5rem 0 0;
    padding: 0.7rem 1.8rem;
    border-radius: 3rem;
    border: none;
    cursor: pointer;
    background: var(--accent-grad);
    color: #06121f;
}

#formDiv input[type=button][value='ביטול'] { background: var(--paper-soft); color: var(--ink-soft); }
#formDiv input[type=button][value='מחיקה'] { background: #fee2e8; color: var(--danger); }

.textError, .error { color: var(--danger); font-size: 1rem; }

/* validation failure (toggled by setControlError) — specific enough to beat the form input rules */
#formDiv input.invalid, #formDiv select.invalid, #formDiv textarea.invalid,
.pageForm input.invalid, .pageForm select.invalid, .pageForm textarea.invalid,
.invalid { border-color: var(--danger); }

.popupPanel { text-align: center; }
.popupPanel .popUpTitle { display: block; font-size: 1.5rem; margin-bottom: 0.6rem; }
.popupPanel .popUpText { display: block; line-height: 1.7; }
#popUpQuestion span { display: block; font-size: 1.3rem; margin-bottom: 0.4rem; }

.popupPanel input[type=button] {
    font-family: inherit;
    font-size: 1.15rem;
    margin: 1.6rem 0.4rem 0 0;
    padding: 0.6rem 1.9rem;
    border-radius: 3rem;
    border: none;
    cursor: pointer;
    background: var(--accent-grad);
    color: #06121f;
}

/* multi-select checkbox dropdown (emitted by Controls.CheckBoxListWithLabel) */
.checkBoxDropDownWithLabel {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: var(--accent-2);
}

.checkBoxDropDownPopup {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--paper);
    border: 0.08rem solid var(--line);
    border-radius: var(--radius-s);
    box-shadow: var(--shadow);
    padding: 0.8rem 1rem;
    max-height: 20rem;
    overflow-y: auto;
    white-space: nowrap;
    color: var(--ink);
}

/* the בחר הכל / נקה הכל buttons stay compact even inside #formDiv (which styles its buttons as CTAs) */
#formDiv .checkBoxDropDownPopup input[type=button], .pageForm .checkBoxDropDownPopup input[type=button],
.checkBoxDropDownPopup input[type=button] {
    font-size: 1rem;
    margin: 0 0 0.6rem 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: 0.4rem;
    border: 0.08rem solid var(--line);
    background: var(--paper-soft);
    color: var(--ink);
    cursor: pointer;
}

/* import-dialog caption (emitted by tablemaker.js importTable) */
.captionBar { text-align: right; font-size: 1.4rem; margin-bottom: 1rem; }

.captionBar span {
    float: left;
    cursor: pointer;
    color: var(--ink-soft);
    padding: 0 0.5rem;
    border-radius: 0.4rem;
}

.captionBar span:hover { background: var(--danger); color: #fff; }

/* dropzone / image field */
.ImageField { display: inline-block; vertical-align: middle; width: 10rem; margin-bottom: 0.3rem; }
.ImageField img { max-width: 100%; border-radius: var(--radius-s); cursor: pointer; }
.dropzone {
    border: 0.17rem dashed var(--line);
    border-radius: var(--radius-s);
    background: var(--paper-soft);
    color: var(--ink-soft);
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
}

/* dropzone.css positions the message absolutely around a sprite we don't ship —
   flow it normally so the dialog sizes to its content */
.dropzone .dz-default.dz-message {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    background-image: none;
}

/* --------------------------------------------------------------- spinner -- */

.spinner {
    width: 2.6rem;
    height: 2.6rem;
    margin: 1.5rem auto;
    border: 0.25rem solid rgba(56, 189, 248, 0.25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- slides -- */

.slides { position: relative; max-width: 74rem; margin: 0 auto; padding: 2rem 2rem 6.5rem; }

.slide { display: none; }

.slide.active {
    display: block;
    background: var(--glass);
    border: 0.08rem solid var(--glass-line);
    border-radius: var(--radius);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    box-shadow: var(--shadow);
    min-height: 58vh;
    padding: 3rem 3.4rem;
    animation: slideIn 0.25s ease;
}

@keyframes slideIn { from { opacity: 0; transform: translateY(0.8rem); } to { opacity: 1; transform: none; } }

.slide h1 { font-size: 3.6rem; font-weight: 400; line-height: 1.2; margin: 0.6rem 0 1.2rem; }
.slide h2 { font-size: 2.4rem; font-weight: 400; margin: 0 0 1.6rem; color: #bae6fd; }
.slide p { line-height: 1.8; color: var(--glass-ink-soft); font-size: 1.3rem; }
.slide ul, .slide ol { line-height: 2; font-size: 1.3rem; padding-right: 1.6rem; margin: 0; }
.slide li { margin-bottom: 0.5rem; }
.slide ul.big, .slide ol.big { font-size: 1.45rem; }
.slide b { color: var(--glass-ink); font-weight: 400; }

.titleSlide { text-align: center; }
.titleSlide p { font-size: 1.6rem; }

.slideKicker {
    display: inline-block;
    margin-top: 3rem;
    padding: 0.35rem 1.2rem;
    border-radius: 3rem;
    border: 0.08rem solid var(--glass-line);
    color: #7dd3fc;
    font-size: 1rem;
    letter-spacing: 0.12em;
}

.slide code {
    background: rgba(56, 189, 248, 0.13);
    color: #7dd3fc;
    padding: 0.1rem 0.45rem;
    border-radius: 0.4rem;
    direction: ltr;
    unicode-bidi: embed;
    font-size: 0.95em;
}

.slide .note {
    margin-top: 1.6rem;
    padding: 0.9rem 1.3rem;
    border-radius: var(--radius-s);
    border-right: 0.25rem solid var(--accent);
    background: rgba(56, 189, 248, 0.09);
    color: var(--glass-ink);
}

pre.code {
    direction: ltr;
    text-align: left;
    background: #081226;
    border: 0.08rem solid rgba(125, 211, 252, 0.2);
    border-radius: var(--radius-s);
    padding: 1.4rem 1.6rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}

pre.code code {
    background: none;
    padding: 0;
    color: #c9e4ff;
    font-family: 'Cascadia Code', Consolas, monospace;
    font-size: 1.05rem;
    line-height: 1.65;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }

.diagram { width: 100%; max-width: 62rem; margin: 1.6rem auto 0; display: block; }
.dgBox { fill: rgba(255, 255, 255, 0.07); stroke: rgba(159, 179, 209, 0.5); }
.dgBox.dgMain { fill: rgba(56, 189, 248, 0.2); stroke: #38bdf8; }
.dgBox.dgAlt { fill: rgba(99, 102, 241, 0.16); stroke: rgba(165, 180, 252, 0.6); }
.diagram text { fill: var(--glass-ink); font-size: 1.08rem; font-family: inherit; }
.diagram text.dgSmall { font-size: 0.83rem; fill: var(--glass-ink-soft); }
.dgLine { stroke: #7dd3fc; stroke-width: 1.5; fill: none; }

.slideNav {
    position: fixed;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    border-radius: 3rem;
    background: rgba(11, 21, 51, 0.75);
    border: 0.08rem solid var(--glass-line);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
}

.slideNav button, .slideNav .slideHome {
    font-family: inherit;
    font-size: 1.15rem;
    color: var(--glass-ink);
    background: var(--glass);
    border: 0.08rem solid var(--glass-line);
    border-radius: 3rem;
    padding: 0.5rem 1.4rem;
    cursor: pointer;
}

.slideNav button:hover:not(:disabled), .slideNav .slideHome:hover { background: rgba(56, 189, 248, 0.18); }
.slideNav button:disabled { opacity: 0.35; cursor: default; }
.slideCounter { color: var(--glass-ink-soft); min-width: 4rem; text-align: center; }

.slideProgress {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    height: 0.3rem;
    background: rgba(255, 255, 255, 0.08);
}

.slideProgress > div { height: 100%; width: 0; background: var(--accent-grad); transition: width 0.25s ease; }

/* ----------------------------------------------------------------- guide -- */

#guide { max-width: 86rem; margin: 0 auto; padding: 2.5rem 2rem; }

.guideHeader { text-align: center; margin-bottom: 2.4rem; }
.guideHeader h1 { font-size: 2.9rem; font-weight: 400; margin: 0 0 0.8rem; }
.guideHeader p { color: var(--glass-ink-soft); max-width: 56rem; margin: 0 auto 1.4rem; line-height: 1.8; font-size: 1.3rem; }

.guideGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }

.guideCard {
    background: var(--glass);
    border: 0.08rem solid var(--glass-line);
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
    backdrop-filter: blur(0.85rem);
    -webkit-backdrop-filter: blur(0.85rem);
}

.guideCard h2 { font-size: 1.7rem; font-weight: 400; color: #bae6fd; margin: 0 0 1rem; }
.guideCard ul { margin: 0; padding-right: 1.4rem; line-height: 1.95; color: var(--glass-ink-soft); }
.guideCard li b { color: var(--glass-ink); font-weight: 400; }
.guideCard code {
    background: rgba(56, 189, 248, 0.13);
    color: #7dd3fc;
    padding: 0.05rem 0.4rem;
    border-radius: 0.4rem;
    direction: ltr;
    unicode-bidi: embed;
    font-size: 0.95em;
}
.guideCard pre.code { margin: 0.6rem 0; }
.guideCard .note { color: var(--glass-ink); margin: 0.8rem 0 0; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 56.25rem) {
    #menuToggle { display: inline; }
    #leftPart { font-size: 0; }        /* keep the logo, hide the text */

    .hero h1 { font-size: 3rem; }
    .features, .presentCards, .guideGrid, .split { grid-template-columns: 1fr; }

    #layout { display: block; }
    #menu {
        position: fixed;
        top: 0;
        bottom: 0;
        right: -70vw;
        width: 66vw;
        z-index: 80;
        border-left: none;
        border-right: 0.08rem solid var(--glass-line);
        background: rgba(8, 15, 38, 0.96);
        transition: right 0.25s ease;
        justify-content: flex-start;
        gap: 2rem;
    }
    body.menu-open #menu { right: 0; }

    #inner { padding: 1.2rem; }
    .filterBar { margin: 0 0 1rem 0; margin-top: 3rem; }
    .slide.active { padding: 1.8rem 1.4rem; }
    .slides { padding: 1rem 0.8rem 6.5rem; }
    .slide h1 { font-size: 2.4rem; }

    /* tables become stacked cards; each cell is labeled from its column header
       (data-label is stamped by tablemaker.js getTable) */
    div.table { width: 100%; }
    div.table thead { display: none; }
    div.table table, div.table tbody, div.table tr, div.table td { display: block; width: 100%; }
    div.table tr { padding: 0.7rem 0; border-bottom: 0.08rem solid var(--line); }
    div.table td, div.table tbody td {
        max-width: none;
        white-space: normal;
        overflow: visible;
        padding: 0.15rem 0;
        border: none;
    }
    div.table tbody td:empty { display: none; }
    div.table td::before { content: attr(data-label) ": "; color: var(--ink-soft); font-size: 1rem; }
    div.table td:first-child { display: inline-block; width: auto; font-weight: 700; }
    div.table td:first-child::before { content: none; }
}

/* ----------------------------------------------------------------- print -- */

@media print {
    #upperPanel, #menu, .filterBar, .pager, .addButton, #toolbar, svg { display: none; }
    body { background: #fff; }
    div.table { width: 100%; margin: 0; box-shadow: none; }
}
