* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

h1,
h2,
h3,
h4,
strong {
    color: var(--ink) !important;
}

h1,
h2,
h3,
h4 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -0.03em;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

.sekolo-body {
    background: var(--bg);
}

.template-site-shell,
.template-auth-shell {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "Inter", "Trebuchet MS", "Lucida Sans Unicode", sans-serif;
}

.template-site-shell h1,
.template-site-shell h2,
.template-site-shell h3,
.template-site-shell h4,
.template-auth-shell h1,
.template-auth-shell h2,
.template-auth-shell h3,
.template-auth-shell h4 {
    font-family: "Lexend", Georgia, "Times New Roman", serif;
    letter-spacing: -0.03em;
}

.template-site-shell p,
.template-auth-shell p {
    margin-bottom: 0;
}

.template-site-shell {
    display: flex;
    flex-direction: column;
}

.template-site-header-wrap {
    position: sticky;
    top: 0;
    z-index: 70;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(18px);
}

.template-site-footer {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
}

.template-site-header {
    display: grid;
    padding: 1rem 1.25rem;
    background: color-mix(in srgb, var(--paper-strong) 94%, transparent);
    box-shadow: var(--shadow);
}

.template-site-navbar .container-fluid {
    align-items: center;
    gap: 1rem;
}

.template-site-navbar-panel {
    flex-grow: 1;
}

.template-site-menu-row {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.template-site-nav-list {
    flex: 1 1 auto;
}

.template-site-brand,
.workspace-school-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.template-site-brand-mark,
.workspace-brand-icon,
.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: color-mix(in srgb, var(--theme-brand) 14%, var(--theme-panel-bg));
    color: var(--theme-brand);
}

.template-site-brand-mark {
    width: 3rem;
    height: 3rem;
    font-size: 1.15rem;
}

.icon-badge {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-brand) 12%, var(--theme-panel-bg));
}

.workspace-brand-icon {
    width: 3rem;
    height: 3rem;
    background: color-mix(in srgb, var(--theme-brand) 16%, var(--theme-panel-bg));
}

.template-site-brand-copy {
    display: grid;
    gap: 0.1rem;
}

.template-site-brand-copy strong {
    font-size: 1.05rem;
    line-height: 1.1;
}

.template-site-brand-copy span {
    color: var(--muted);
    font-size: 0.8rem;
}

.template-site-toggler {
    border-color: var(--line);
    border-radius: 14px;
}

.template-site-nav-link {
    color: var(--muted);
    font-weight: 600;
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
    border-radius: 999px;
}

.template-site-nav-link:hover,
.template-site-nav-link:focus-visible {
    color: var(--ink);
    background: var(--theme-surface-alt);
}

.template-site-nav-link.active {
    color: var(--theme-brand);
    background: color-mix(in srgb, var(--theme-brand) 12%, var(--theme-panel-bg));
}

.template-site-auth-cluster,
.workspace-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.template-theme-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.template-site-auth-cluster {
    justify-content: flex-end;
}

.template-site-auth-button {
    white-space: nowrap;
}

.template-site-icon-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.template-site-icon-btn.dropdown-toggle::after {
    display: none;
}

.template-site-option-menu {
    min-width: 220px;
    padding: 0.55rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--paper-strong);
    box-shadow: var(--shadow);
}

.template-site-option-menu-label {
    padding: 0.2rem 0.45rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.template-site-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    color: var(--ink);
}

.template-site-option-item.active,
.template-site-option-item.active:hover,
.template-site-option-item.active:focus-visible,
.template-site-option-item:active {
    background: color-mix(in srgb, var(--theme-brand) 12%, var(--theme-panel-bg));
    color: var(--theme-brand);
}

.template-site-main {
    flex: 1 0 auto;
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
    display: grid;
    gap: 1.5rem;
}

.template-site-footer-wrap {
    padding: 0 1rem 1rem;
    margin-top: auto;
}

.template-site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper-strong);
}

.template-site-footer-brand {
    display: grid;
    gap: 0.35rem;
}

.template-site-footer-brand p,
.template-site-footer-copy {
    color: var(--muted);
    font-size: 0.88rem;
}

.template-site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.95rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.template-site-footer-links a:hover {
    color: var(--theme-brand);
}

.template-auth-main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 2rem 0 3rem;
    display: grid;
    align-items: center;
}

.template-auth-main-fullbleed,
.template-auth-main.template-auth-main-fullbleed {
    width: 100%;
    max-width: none;
    padding: 0;
}

.template-surface {
    background: var(--paper-strong);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.template-surface-muted {
    background: var(--theme-surface-alt);
}

.template-page-hero {
    width: min(860px, 100%);
    display: grid;
    gap: 0.9rem;
    padding: 1rem 0 0.25rem;
}

.template-page-hero h1 {
    margin: 0;
    font-size: clamp(2.25rem, 6vw, 4rem);
    line-height: 1.05;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.small-text,
.workspace-topbar-label,
.workspace-page-copy {
    color: var(--muted);
    font-size: 0.95rem;
}

.theme-input {
    border-color: var(--theme-input-border);
    background: var(--theme-input-bg);
    color: var(--theme-input-text);
    border-radius: 18px;
    padding: 0.9rem 1rem;
}

.theme-input,
.form-control,
.form-select,
.input-group-text,
.btn-light,
.btn-outline-secondary,
.table,
.dropdown-menu,
.offcanvas,
.modal-content,
.list-group-item {
    background-color: var(--theme-input-bg);
    color: var(--theme-input-text);
    border-color: var(--theme-input-border);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--theme-input-text);
    --bs-table-border-color: var(--line);
    --bs-table-striped-bg: color-mix(in srgb, var(--theme-brand) 5%, var(--theme-panel-bg));
    --bs-table-striped-color: var(--theme-input-text);
    --bs-table-hover-bg: color-mix(in srgb, var(--theme-brand) 8%, var(--theme-panel-bg));
    --bs-table-hover-color: var(--theme-input-text);
}

.table> :not(caption)>*>* {
    color: inherit;
    background-color: transparent;
    box-shadow: none;
    border-color: var(--line);
}

option {
    background: var(--theme-input-bg);
    color: var(--theme-input-text);
}

::placeholder {
    color: color-mix(in srgb, var(--muted) 88%, transparent) !important;
    opacity: 1;
}

.text-body-secondary,
.small.text-body-secondary,
.card .text-body-secondary,
.dropdown-menu .text-body-secondary {
    color: var(--muted) !important;
}

.btn-light,
.btn-outline-secondary {
    color: var(--theme-button-secondary-text);
}

.btn-light:hover,
.btn-light:focus-visible,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
    background: var(--theme-button-secondary-hover-bg);
    border-color: var(--theme-button-secondary-hover-border);
    color: var(--theme-button-secondary-text);
}

.theme-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.25rem var(--theme-focus-ring);
}

.form-control:focus,
.form-select:focus,
.btn:focus-visible,
.list-group-item:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.25rem var(--theme-focus-ring);
}

.btn-close {
    filter: var(--theme-close-filter);
}

.inline-banner {
    border-radius: 20px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--theme-info-border);
    background: var(--theme-info-bg);
    color: var(--theme-info-text);
}

.inline-banner-success {
    border-color: var(--theme-success-border);
    background: var(--theme-success-bg);
    color: var(--theme-success-text);
}

.inline-banner-danger {
    border-color: color-mix(in srgb, var(--theme-danger) 28%, var(--theme-panel-bg));
    background: color-mix(in srgb, var(--theme-danger) 12%, var(--theme-panel-bg));
    color: color-mix(in srgb, var(--theme-danger) 82%, var(--theme-text));
}

.inline-banner-title {
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.inline-banner-copy {
    color: inherit;
}

.workspace-shell {
    min-height: 100vh;
    width: 100%;
}

.workspace-frame {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--theme-sidebar-width) minmax(0, 1fr);
    gap: 0;
    background: var(--bg);
}

.workspace-sidebar {
    min-height: 100vh;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 1rem;
    border-right: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    display: grid;
    gap: 18px;
    align-content: start;
}

.workspace-sidebar-mobile {
    min-height: 100%;
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    border-right: 0;
    background: transparent;
}

.workspace-sidebar .small-text,
.workspace-sidebar .sidebar-heading {
    color: var(--muted);
}

.sidebar-school {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper-strong);
}

.workspace-brand-panel {
    padding: 0.9rem 1rem;
    background: transparent;
}

.sidebar-brand-cluster {
    display: grid;
    gap: 0.7rem;
}

.sidebar-brand-title {
    display: block;
    font-size: 0.98rem;
    line-height: 1.2;
}

.sidebar-section,
.sidebar-group,
.sidebar-nav {
    display: grid;
}

.sidebar-section {
    gap: 12px;
}

.sidebar-group,
.sidebar-nav {
    gap: 10px;
}

.school-switch-button {
    min-height: 2.65rem;
    font-weight: 700;
    width: fit-content;
    max-width: 100%;
}

.sidebar-heading,
.my-shell-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.sidebar-link {
    padding: 14px 14px;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    border: 1px solid transparent;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    color: var(--ink);
    background: var(--theme-surface-alt);
}

.sidebar-link.active {
    background: color-mix(in srgb, var(--theme-brand) 10%, var(--theme-panel-bg));
    border-color: color-mix(in srgb, var(--theme-brand) 24%, var(--theme-panel-bg));
    color: var(--theme-brand);
}

.workspace-main {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 1rem;
    min-height: 100vh;
    padding: 0;
    overflow: visible;
}

.workspace-content {
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: 1rem;
}

.workspace-header-wrap {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg);
}

.workspace-dashboard-header {
    padding: 0.95rem 1rem;
}

.workspace-header-row {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.workspace-header-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-left: auto;
}

.workspace-header-leading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.workspace-current-school {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.workspace-school-brand,
.workspace-school-brand .template-site-brand-copy {
    min-width: 0;
}

.workspace-school-brand .template-site-brand-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-school-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    padding-left: 3.9rem;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.35;
}

.workspace-header-actions {
    justify-content: flex-end;
    gap: 12px;
}

.workspace-mobile-trigger,
.workspace-topbar-trigger {
    display: none;
}

.workspace-topbar-menu {
    border-left: 1px solid var(--line);
    background: var(--paper-strong);
}

.workspace-topbar-panel {
    display: grid;
    gap: 1rem;
}

.workspace-header-actions-mobile {
    width: 100%;
    justify-content: flex-start;
}

.workspace-page-heading {
    margin: 0;
}

.workspace-page-title {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.page-breadcrumb {
    margin-bottom: 0;
}

.breadcrumb a,
.breadcrumb-item.active {
    color: var(--muted);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--theme-info-border);
    background: var(--theme-info-bg);
    color: var(--theme-info-text);
    font-size: 0.85rem;
    font-weight: 700;
}

.status-chip.warn {
    background: var(--theme-warning-bg);
    color: var(--theme-warning-text);
    border-color: var(--theme-warning-border);
}

.status-chip.success {
    background: var(--theme-success-bg);
    color: var(--theme-success-text);
    border-color: var(--theme-success-border);
}

.notification-pill {
    position: absolute;
    top: 0.15rem;
    right: 0.1rem;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: var(--theme-danger);
    color: var(--theme-danger-text);
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

.account-menu {
    min-width: 220px;
}

.account-menu-summary {
    display: grid;
    gap: 0.15rem;
    padding: 0.35rem 0.45rem 0.65rem;
}

.account-menu-summary strong {
    font-size: 0.95rem;
}

.account-menu-summary span {
    color: var(--muted);
    font-size: 0.82rem;
}

.my-shell-header-card {
    display: grid;
    gap: 1rem;
}

.my-shell-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.25rem;
}

.my-shell-header-copy {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 460px;
}

.my-shell-page-title {
    margin: 0;
    font-size: clamp(1.6rem, 2.6vw, 2.15rem);
    line-height: 1.1;
}

.my-shell-page-copy {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.my-shell-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.my-shell-header-side,
.my-shell-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.my-shell-header-side {
    justify-content: flex-end;
    flex: 0 1 auto;
}

.my-shell-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.my-shell-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--theme-surface-alt);
    color: var(--theme-button-secondary-text);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.my-shell-tab:hover,
.my-shell-tab:focus-visible {
    background: var(--theme-button-secondary-hover-bg);
    border-color: var(--theme-button-secondary-hover-border);
    color: var(--ink);
    text-decoration: none;
}

.my-shell-tab:focus-visible {
    outline: 3px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.my-shell-tab.active {
    background: color-mix(in srgb, var(--theme-brand) 12%, var(--theme-panel-bg));
    border-color: color-mix(in srgb, var(--theme-brand) 24%, var(--line));
    color: var(--theme-brand);
}

@media (max-width: 991.98px) {

    .template-site-header,
    .template-site-footer {
        width: min(100%, calc(100% - 8px));
    }

    .template-site-navbar-panel {
        flex-basis: 100%;
    }

    .template-site-menu-row {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--line);
        align-items: stretch;
        flex-direction: column;
    }

    .template-site-nav-list {
        width: 100%;
        margin-left: 0 !important;
    }

    .template-site-auth-cluster {
        width: 100%;
        justify-content: flex-start;
    }

    .workspace-frame {
        grid-template-columns: 1fr;
    }

    .workspace-sidebar {
        display: none;
    }

    .workspace-sidebar-mobile {
        display: grid !important;
    }

    .workspace-mobile-trigger,
    .workspace-topbar-trigger {
        display: inline-flex;
    }

    .workspace-header-actions-desktop {
        display: none;
    }

    .workspace-header-controls {
        margin-left: 0;
    }

    .workspace-header-actions-mobile,
    .workspace-header-actions-mobile .template-theme-controls {
        justify-content: flex-start;
    }

    .workspace-school-meta {
        padding-left: 0;
    }
}

@media (max-width: 840px) {

    .template-site-main,
    .template-auth-main {
        width: min(100%, calc(100% - 20px));
    }

    .template-site-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .template-page-hero h1 {
        max-width: none;
    }
}

.template-hero-image img,
.template-story-image img,
.template-map-frame img,
.template-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.template-hero-image,
.template-story-image,
.template-map-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--paper-strong);
    box-shadow: var(--shadow);
}

.template-signup-title-block>h1 {
    margin: 18px 0 10px;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    letter-spacing: -0.04em;
}

.workspace-metric-label, .workspace-metric-value {
    display: block;
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
