:root {
    --bg: #f4f7f9;
    --surface: #ffffff;
    --ink: #172033;
    --muted: #687789;
    --line: #dde6ed;
    --brand: #1f6f8b;
    --brand-dark: #164d63;
    --accent: #c1743b;
    --ok: #1f7a4d;
    --shadow: 0 18px 45px rgba(23, 32, 51, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    padding: 22px 16px;
    overflow-y: auto;
    color: #eaf4f7;
    background: #17394a;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 20px;
}

.brand-mark,
.profile-chip span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    font-weight: 800;
    background: var(--accent);
    border-radius: 8px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: #afc6d1;
    font-size: 12px;
}

.nav {
    display: grid;
    gap: 4px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px;
    color: #d6e7ee;
    border-radius: 7px;
}

.nav a span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #17394a;
    font-size: 11px;
    font-weight: 800;
    background: #d7e8ef;
    border-radius: 6px;
}

.module-svg {
    width: 18px;
    height: 18px;
}

.nav a:hover,
.nav a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-group {
    border-radius: 7px;
}

.nav-group summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px;
    color: #d6e7ee;
    cursor: pointer;
    border-radius: 7px;
    list-style: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary::after {
    content: "v";
    margin-left: auto;
    color: #afc6d1;
    font-size: 11px;
    font-weight: 800;
}

.nav-group[open] summary::after {
    transform: rotate(180deg);
}

.nav-group summary span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #17394a;
    font-size: 11px;
    font-weight: 800;
    background: #d7e8ef;
    border-radius: 6px;
}

.nav-group summary:hover,
.nav-group summary.is-active,
.nav-group[open] summary {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-group div {
    display: grid;
    gap: 2px;
    padding: 4px 0 6px 38px;
}

.nav-group div a {
    min-height: 34px;
    padding: 7px 10px;
    color: #c7dde6;
    font-size: 13px;
}

.app-shell {
    min-height: 100vh;
    margin-left: 264px;
    padding: 26px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.topbar h1,
.module-hero h2,
.hero-band h2 {
    margin: 0;
    letter-spacing: 0;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.icon-button .module-svg {
    width: 19px;
    height: 19px;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 5px 12px 5px 5px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.profile-chip {
    flex-wrap: wrap;
}

.profile-menu {
    position: relative;
    margin-left: 4px;
}

.profile-menu summary {
    padding-right: 10px;
    cursor: pointer;
    list-style: none;
}

.profile-menu summary::after {
    content: "v";
    margin-left: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-menu > div {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    min-width: 190px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.profile-menu > div a {
    padding: 12px 14px;
    color: var(--ink);
    font-weight: 800;
    border-bottom: 1px solid var(--line);
}

.profile-menu > div a:last-child {
    border-bottom: 0;
}

.profile-menu > div a:hover {
    background: #f4f8fa;
}

.profile-chip span {
    width: 34px;
    height: 34px;
    font-size: 12px;
}

.profile-chip img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 7px;
}

.profile-chip small {
    width: 100%;
    margin-left: 43px;
    margin-top: -8px;
    color: var(--muted);
    font-size: 11px;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    color: var(--brand-dark);
    font-weight: 800;
    background: #e9f3f6;
    border-radius: 7px;
}

.hero-band,
.module-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    margin-bottom: 18px;
    color: #fff;
    background: linear-gradient(135deg, #1f6f8b, #19485d);
    border-radius: 8px;
}

.hero-band h2 {
    max-width: 760px;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.08;
}

.module-hero {
    align-items: flex-start;
}

.module-hero p {
    max-width: 720px;
    margin-bottom: 0;
    color: #d7e8ef;
}

.hero-band .eyebrow,
.module-hero .eyebrow {
    color: #b9d8e2;
}

.primary-action,
.secondary-action,
.inline-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
    background: var(--accent);
    border: 0;
    border-radius: 7px;
}

.hero-actions,
.preview-links,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.action-dropdown {
    position: relative;
    min-width: 190px;
}

.action-dropdown > button {
    width: 100%;
    min-height: 42px;
    color: #fff;
    font-weight: 800;
    background: var(--accent);
    border: 0;
    border-radius: 7px;
}

.action-dropdown > div {
    position: absolute;
    z-index: 5;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    min-width: 210px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.action-dropdown:hover > div,
.action-dropdown:focus-within > div {
    display: grid;
}

.action-dropdown a {
    padding: 12px 14px;
    color: var(--ink);
    font-weight: 800;
    border-bottom: 1px solid var(--line);
}

.action-dropdown a:last-child {
    border-bottom: 0;
}

.action-dropdown a:hover {
    background: #f4f8fa;
}

.secondary-action {
    color: var(--brand-dark);
    background: #e9f3f6;
}

.stat-grid,
.mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card,
.mini-stat-grid article,
.panel,
.module-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 18px;
}

.stat-card span,
.mini-stat-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.stat-card strong,
.mini-stat-grid strong {
    display: block;
    margin: 8px 0 2px;
    font-size: 30px;
}

.stat-card p {
    margin: 0;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr;
    gap: 16px;
    margin-bottom: 18px;
}

.panel {
    padding: 18px;
}

.panel-wide {
    grid-row: span 2;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.panel-header h3 {
    margin: 0;
}

.panel-header a {
    color: var(--brand);
    font-weight: 800;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    color: var(--ok);
    font-size: 12px;
    font-weight: 800;
    background: #e7f6ee;
    border-radius: 99px;
}

.progress {
    height: 10px;
    overflow: hidden;
    background: #e5edf2;
    border-radius: 99px;
}

.progress span {
    display: block;
    height: 100%;
    background: var(--brand);
}

.split-list,
.money-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.split-list span,
.money-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
}

.split-list strong,
.money-list strong {
    color: var(--ink);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.module-card {
    display: grid;
    gap: 10px;
    min-height: 172px;
    padding: 18px;
}

.module-card > span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: var(--brand);
    border-radius: 8px;
}

.module-card > span .module-svg {
    width: 22px;
    height: 22px;
}

.module-eyebrow {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.module-eyebrow .module-svg {
    width: 14px;
    height: 14px;
}

.module-card strong {
    font-size: 18px;
}

.module-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

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

.mini-stat-grid article {
    padding: 16px;
}

.inline-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.inline-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.inline-form input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.empty-state {
    display: grid;
    gap: 10px;
    place-items: start;
}

.empty-state p {
    max-width: 560px;
    color: var(--muted);
}

.login-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 520px);
    gap: 42px;
    align-items: center;
    min-height: 100vh;
    margin: -26px;
    padding: clamp(28px, 5vw, 72px);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(13, 57, 74, 0.92), rgba(31, 111, 139, 0.68)),
        radial-gradient(circle at 18% 18%, rgba(193, 116, 59, 0.32), transparent 34%),
        linear-gradient(135deg, #17394a, #2f7b6d 58%, #c1743b);
}

.login-shell.has-login-background {
    background:
        linear-gradient(135deg, rgba(13, 57, 74, 0.9), rgba(31, 111, 139, 0.58)),
        linear-gradient(rgba(23, 57, 74, 0.34), rgba(23, 57, 74, 0.74)),
        var(--login-bg) center / cover no-repeat;
}

.login-shell.has-login-background .login-panel {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.login-showcase {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 28px;
    max-width: 720px;
    color: #fff;
}

.login-brand-lockup {
    display: flex;
    gap: 14px;
    align-items: center;
}

.login-brand-lockup img,
.login-brand-lockup > span {
    display: inline-grid;
    place-items: center;
    width: 66px;
    height: 66px;
    object-fit: contain;
    color: #17394a;
    font-size: 22px;
    font-weight: 900;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.login-brand-lockup h2,
.login-showcase h1 {
    margin: 0;
}

.login-brand-lockup .eyebrow {
    color: #f6d8bd;
}

.login-showcase h1 {
    max-width: 680px;
    font-size: clamp(38px, 5.6vw, 68px);
    line-height: 1.02;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.login-feature-grid article {
    display: grid;
    gap: 6px;
    min-height: 118px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.login-feature-grid strong {
    color: #fff;
    font-size: 16px;
}

.login-feature-grid span {
    color: #e6f1f4;
    line-height: 1.45;
}

.login-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: clamp(26px, 4vw, 38px);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}

.login-panel h2 {
    margin: 0;
    font-size: 34px;
}

.login-panel p {
    color: var(--muted);
}

.login-panel-header {
    margin-bottom: 20px;
}

.login-form,
.settings-form {
    display: grid;
    gap: 14px;
}

.admission-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.form-grid label,
.filter-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.form-grid input,
.form-grid select,
.filter-form select {
    min-height: 44px;
    padding: 0 12px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.form-wide {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-actions button,
.filter-form button {
    min-height: 42px;
    padding: 0 16px;
    color: #fff;
    font-weight: 800;
    background: var(--brand);
    border: 0;
    border-radius: 7px;
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto;
    gap: 12px;
    align-items: end;
}

.student-search-form {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
}

.student-search-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.student-search-form input,
.student-search-form select {
    min-height: 44px;
    padding: 0 12px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.student-search-form button {
    min-height: 42px;
    padding: 0 16px;
    color: #fff;
    font-weight: 800;
    background: var(--brand);
    border: 0;
    border-radius: 7px;
}

.student-photo {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    object-fit: cover;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: var(--brand);
    border-radius: 8px;
}

.student-table td strong,
.student-table td small {
    display: block;
}

.student-table td small {
    margin-top: 3px;
    color: var(--muted);
}

.portal-account-table th,
.portal-account-table td {
    vertical-align: top;
}

.portal-account-form {
    display: grid;
    gap: 10px;
    min-width: 220px;
    margin-bottom: 10px;
}

.portal-account-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-account-form input {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.portal-account-form button {
    min-height: 36px;
    padding: 0 12px;
    color: #fff;
    font-weight: 800;
    background: var(--brand);
    border: 0;
    border-radius: 7px;
}

.preview-links {
    min-width: 180px;
}

.preview-links .secondary-action {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
}

.role-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.role-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    color: var(--brand-dark);
    font-weight: 800;
    background: #e9f3f6;
    border: 1px solid #d6e7ee;
    border-radius: 7px;
}

.role-tabs a.is-active,
.role-tabs a:hover {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.accounting-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 18px;
}

.exam-distribution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.hr-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.hr-role-chart,
.hr-payroll-chart {
    display: grid;
    gap: 14px;
}

.hr-role-chart div,
.hr-payroll-chart div {
    display: grid;
    grid-template-columns: minmax(130px, 190px) minmax(110px, 150px) 1fr;
    gap: 12px;
    align-items: center;
}

.hr-role-chart span,
.hr-payroll-chart span,
.hr-payroll-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hr-role-chart strong,
.hr-payroll-chart strong {
    color: var(--ink);
}

.hr-role-chart i,
.hr-payroll-chart i {
    display: block;
    height: 18px;
    min-width: 24px;
    background: linear-gradient(90deg, var(--brand), #4f8f7c);
    border-radius: 999px;
}

.hr-payroll-chart .allowance-bar i {
    background: linear-gradient(90deg, #3d8f67, #92c47c);
}

.hr-payroll-chart .deduction-bar i {
    background: linear-gradient(90deg, #b44d42, #e0a24a);
}

.hr-payroll-chart .gross-bar i {
    background: linear-gradient(90deg, #426b8f, #8fb8d8);
}

.hr-payroll-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.hr-payroll-summary div {
    padding: 12px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.hr-payroll-summary strong {
    display: block;
    margin-top: 6px;
}

.student-portal-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.student-portal-hero > div {
    display: flex;
    align-items: center;
    gap: 16px;
}

.portal-avatar {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.portal-avatar.placeholder {
    display: grid;
    place-items: center;
    color: var(--brand-dark);
    font-size: 26px;
    font-weight: 900;
    background: #e9f3f6;
}

.student-portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.portal-module-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.portal-module-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    color: var(--brand-dark);
    font-weight: 800;
    background: #e9f3f6;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.portal-module-nav a.is-active,
.portal-module-nav a:hover {
    color: #fff;
    background: var(--brand);
}

.area-chart svg {
    width: 100%;
    height: 180px;
    color: var(--brand);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.area-chart polygon {
    fill: rgba(31, 111, 139, 0.18);
}

.area-chart polyline {
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
}

.portal-bar-chart {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    min-height: 190px;
    padding-top: 16px;
}

.portal-bar-chart div {
    display: grid;
    gap: 8px;
    align-items: end;
    text-align: center;
}

.portal-bar-chart b {
    display: block;
    width: 100%;
    min-height: 8px;
    background: linear-gradient(180deg, var(--brand), #72a98f);
    border-radius: 7px 7px 2px 2px;
}

.portal-bar-chart span,
.portal-bar-chart strong {
    color: var(--muted);
    font-size: 12px;
}

.attendance-bars b {
    background: linear-gradient(180deg, var(--accent), #dba66b);
}

.profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-detail-grid span {
    display: grid;
    gap: 5px;
    padding: 12px;
    color: var(--muted);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.profile-detail-grid strong {
    color: var(--ink);
}

.mailbox-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
}

.mailbox-folders {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.mailbox-folders a {
    padding: 10px 12px;
    color: var(--muted);
    font-weight: 800;
    border-radius: 7px;
}

.mailbox-folders a.is-active,
.mailbox-folders a:hover {
    color: #fff;
    background: var(--brand);
}

.assignment-card,
.message-list article {
    display: grid;
    gap: 8px;
    padding: 14px;
    margin-bottom: 12px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.assignment-card span,
.assignment-card small,
.message-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.conversation-layout {
    align-items: start;
}

.conversation-panel-stack {
    display: grid;
    gap: 16px;
    align-content: start;
}

.conversation-thread {
    display: grid;
    gap: 12px;
}

.conversation-thread article {
    display: grid;
    gap: 10px;
    max-width: min(100%, 760px);
    padding: 16px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.conversation-thread article.is-mine {
    justify-self: end;
    background: #eef6ff;
    border-color: #cfe1fb;
}

.conversation-thread article p {
    margin: 0;
    color: var(--ink);
    line-height: 1.6;
}

.conversation-thread-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 12px;
    align-items: center;
}

.conversation-thread-meta span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.conversation-attachment {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.conversation-empty {
    padding: 18px;
    color: var(--muted);
    background: #f8fafb;
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.conversation-detail-list span {
    align-items: center;
}

.conversation-detail-list b {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.assignment-card textarea,
.assignment-card input[type="file"] {
    width: 100%;
}

.assignment-card button {
    justify-self: start;
    min-height: 38px;
    padding: 0 14px;
    color: #fff;
    font-weight: 800;
    background: var(--accent);
    border: 0;
    border-radius: 7px;
}

.finance-chart {
    display: grid;
    gap: 18px;
}

.finance-chart div {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(120px, 160px) 1fr;
    gap: 12px;
    align-items: center;
}

.finance-chart span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.finance-chart strong {
    color: var(--ink);
}

.finance-chart i {
    display: block;
    height: 18px;
    min-width: 24px;
    background: linear-gradient(90deg, var(--brand), #4f8f7c);
    border-radius: 999px;
}

.finance-chart .expense-bar i {
    background: linear-gradient(90deg, #b44d42, #e0a24a);
}

.fee-breakdown {
    display: grid;
    gap: 10px;
}

.fee-breakdown div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.fee-breakdown span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.reminder-table {
    margin-top: 18px;
}

.print-report {
    max-width: 1120px;
    margin: 0 auto;
}

.print-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.print-meta span {
    padding: 8px 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.accounting-form {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
}

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

.exam-grade-form button {
    grid-column: 1 / -1;
}

.exam-overview-form {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
}

.marksheet-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.marksheet-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.marksheet-form input,
.marksheet-form select,
.marksheet-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.upload-field small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: none;
}

.upload-field a {
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
}

.tag-bank,
.marksheet-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-bank button,
.marksheet-options label {
    padding: 8px 10px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    background: #e9f3f6;
    border: 1px solid #d6e7ee;
    border-radius: 6px;
}

.tag-bank button {
    cursor: pointer;
}

.muted {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.attendance-options {
    min-width: 300px;
}

.attendance-options label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 3px 10px 3px 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.attendance-remark {
    min-width: 220px;
}

.attendance-status-select {
    min-width: 140px;
}

.rich-editor {
    display: grid;
    gap: 8px;
}

.mailbox-editor {
    padding: 12px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.mailbox-editor .editor-surface {
    min-height: 210px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(23, 57, 74, 0.04);
}

.editor-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.editor-title button,
.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input[type="color"] {
    min-height: 36px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.editor-title button,
.editor-toolbar button {
    padding: 0 10px;
    cursor: pointer;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.editor-toolbar select {
    width: auto;
    min-width: 120px;
    padding: 0 8px;
}

.editor-toolbar input[type="color"] {
    width: 42px;
    padding: 4px;
}

.editor-surface {
    min-height: 150px;
    padding: 14px;
    color: var(--ink);
    line-height: 1.55;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    outline: 0;
}

.editor-surface:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(31, 111, 139, 0.12);
}

.rich-editor textarea[data-editor-source] {
    display: none;
    min-height: 150px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    text-transform: none;
}

.rich-editor.is-source .editor-surface {
    display: none;
}

.rich-editor.is-source textarea[data-editor-source] {
    display: block;
}

.marksheet-preview {
    position: relative;
    max-width: 980px;
    aspect-ratio: 210 / 297;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.marksheet-preview.landscape {
    max-width: 1160px;
    aspect-ratio: 297 / 210;
}

.marksheet-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
}

.marksheet-paper {
    position: relative;
    z-index: 1;
}

.marksheet-paper header,
.marksheet-paper footer {
    text-align: center;
}

.marksheet-paper img {
    max-height: 72px;
    max-width: 160px;
}

.preview-photo {
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    background: #edf3f6;
    border: 1px solid var(--line);
}

.preview-photo.is-round {
    border-radius: 999px;
}

.signature-line {
    display: inline-block;
    width: 140px;
    border-bottom: 1px solid var(--ink);
}

.marksheet-paper table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
}

.marksheet-paper th,
.marksheet-paper td {
    padding: 8px;
    border: 1px solid #222;
}

.marksheet-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.danger-action {
    min-height: 32px;
    padding: 0 10px;
    color: #9f241e;
    font-weight: 800;
    background: #fff1f0;
    border: 1px solid #f0b8b2;
    border-radius: 6px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}

.row-actions a,
.row-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    color: var(--brand-dark);
    font-weight: 800;
    background: #e9f3f6;
    border: 0;
    border-radius: 6px;
}

.row-actions button {
    color: #9f241e;
    background: #fff1f0;
}

.row-actions form {
    margin: 0;
}

.table-input {
    width: 100%;
    min-height: 36px;
    margin-bottom: 6px;
    padding: 0 10px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.payroll-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.payroll-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.payroll-form input,
.payroll-form select,
.payroll-form textarea {
    min-height: 42px;
    padding: 0 12px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.payroll-form textarea {
    min-height: 120px;
    padding: 10px 12px;
    resize: vertical;
}

.payroll-form button {
    min-height: 42px;
    padding: 0 16px;
    color: #fff;
    font-weight: 800;
    background: var(--brand);
    border: 0;
    border-radius: 7px;
}

.payslip {
    max-width: 920px;
    margin: 0 auto;
}

.payslip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.payslip-grid div {
    padding: 14px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.payslip-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.payslip-grid strong {
    display: block;
    margin-top: 6px;
}

@media print {
    .sidebar,
    .topbar,
    .role-tabs,
    .secondary-action,
    .no-print {
        display: none !important;
    }

    .app-shell {
        margin: 0;
        padding: 0;
    }

    .panel {
        box-shadow: none;
    }

    .marksheet-preview {
        width: 210mm;
        max-width: none;
        min-height: 297mm;
        border: 0;
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .marksheet-preview.landscape {
        width: 297mm;
        min-height: 210mm;
    }
}

.login-form label,
.settings-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.login-form input,
.settings-form input {
    min-height: 44px;
    padding: 0 12px;
    color: var(--ink);
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.login-form button,
.settings-form button {
    min-height: 44px;
    color: #fff;
    font-weight: 800;
    background: var(--brand);
    border: 0;
    border-radius: 7px;
}

.alert-error {
    padding: 12px;
    margin: 18px 0;
    color: #9f241e;
    background: #fff1f0;
    border: 1px solid #f0b8b2;
    border-radius: 7px;
}

.demo-users {
    margin-top: 22px;
    padding: 16px;
    background: #f4f8fa;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.demo-users ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    margin: 10px 0 0;
    padding: 0;
    color: var(--muted);
    list-style: none;
}

.demo-users li {
    overflow-wrap: anywhere;
    font-size: 12px;
    font-weight: 700;
}

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

.settings-wide {
    grid-column: 1 / -1;
}

.settings-upload-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.settings-upload-card > div {
    display: grid;
    gap: 8px;
}

.settings-upload-card > div > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.settings-upload-card img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.settings-upload-card .settings-bg-preview {
    width: min(100%, 420px);
    height: 150px;
    object-fit: cover;
}

.settings-check {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 9px !important;
    align-items: center;
    color: var(--ink) !important;
    text-transform: none !important;
}

.settings-check input {
    width: 16px;
    min-height: 16px;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.permission-grid article {
    padding: 16px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.permission-grid ul {
    display: grid;
    gap: 7px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
}

.permission-grid li span {
    color: var(--ink);
    font-weight: 800;
}

.homework-grid,
.homework-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.homework-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(22, 34, 51, .06);
}

.homework-card h3 {
    margin: 8px 0 4px;
    font-size: 20px;
}

.homework-card p {
    margin: 0;
    color: var(--muted);
}

.homework-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.homework-card dl div {
    padding: 10px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.homework-card dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.homework-card dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.homework-card textarea,
.homework-card input,
.marking-form textarea,
.marking-form input,
.marking-form select {
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.student-homework-card {
    align-content: start;
}

.feedback-box {
    padding: 12px;
    background: #f4fbf7;
    border: 1px solid #b9e4c8;
    border-radius: 8px;
}

.rich-content {
    color: var(--ink);
    line-height: 1.65;
}

.rich-content p,
.rich-content ul,
.rich-content ol {
    margin: 0 0 10px;
}

.rich-content a {
    color: var(--brand);
    font-weight: 800;
}

.person-cell {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 180px;
}

.person-cell img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 50%;
}

.marking-form {
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.marking-form button,
.homework-card button,
.homework-form button {
    min-height: 40px;
    color: #fff;
    font-weight: 800;
    background: var(--brand);
    border: 0;
    border-radius: 7px;
}

.check-row {
    display: flex !important;
    gap: 10px;
    align-items: center;
    color: var(--ink) !important;
}

.website-public {
    margin: 0;
    color: #173044;
    background: #f6fbff;
}

.website-public-header {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(18px, 5vw, 72px);
    background: #fff;
    border-bottom: 1px solid rgba(20, 59, 91, .12);
}

.website-public-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: inherit;
    font-weight: 900;
    text-decoration: none;
    min-height: 35px;
}

.website-public-brand img {
    width: 85px;
    height: 35px;
    object-fit: contain;
    flex: 0 0 auto;
    display: block;
}

.website-public-header nav,
.website-public-footer div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.website-public-header a,
.website-public-footer a {
    color: inherit;
    font-weight: 800;
    text-decoration: none;
}

.website-public-login,
.website-public-hero a,
.website-public-contact button,
.website-manager-template-card button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    color: #fff !important;
    background: #1466b8;
    border: 0;
    border-radius: 7px;
    font-weight: 900;
    text-decoration: none;
}

.website-public-hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 34px;
    align-items: center;
    min-height: 560px;
    padding: clamp(34px, 6vw, 82px);
}

.website-public-hero h1,
.website-public-page h1,
.website-public-section h1 {
    margin: 0 0 16px;
    font-size: 54px;
    line-height: 1.04;
}

.website-public-hero p,
.website-public-page p,
.website-public-section p,
.website-public-contact p {
    color: #526878;
    font-size: 17px;
    line-height: 1.7;
}

.website-public-hero img,
.website-public-page img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 8px;
}

.website-public-section,
.website-public-page,
.website-public-contact {
    padding: clamp(34px, 6vw, 76px);
}

.website-public-page,
.website-public-contact {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 34px;
    align-items: start;
}

.website-public-card-grid,
.website-public-gallery,
.website-public-teachers,
.website-manager-grid,
.website-manager-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.website-public-card-grid article,
.website-public-gallery article,
.website-public-teachers article,
.website-manager-link,
.website-manager-template-card,
.website-manager-media-grid article {
    padding: 18px;
    background: #fff;
    border: 1px solid rgba(20, 59, 91, .12);
    border-radius: 8px;
}

.website-public-gallery img,
.website-manager-media-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 7px;
}

.website-gallery-groups {
    display: grid;
    gap: 32px;
}

.website-gallery-group {
    display: grid;
    gap: 16px;
}

.website-gallery-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(20, 59, 91, .1);
}

.website-gallery-group-header h2,
.website-gallery-group-header h4 {
    margin: 4px 0 0;
    font-size: 26px;
    line-height: 1.1;
}

.website-gallery-group-header small {
    color: #526878;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.website-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.website-gallery-grid article,
.website-manager-media-grid article {
    display: grid;
    gap: 10px;
}

.website-gallery-grid strong,
.website-manager-media-grid strong {
    color: #173044;
    font-size: 15px;
}

.website-gallery-grid p,
.website-manager-media-grid p {
    margin: 0;
    color: #526878;
    font-size: 14px;
    line-height: 1.6;
}

.website-manager-media-grid span {
    color: #6c7d8a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.website-public-teachers img {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 50%;
}

.website-public-contact form {
    display: grid;
    gap: 12px;
    padding: 22px;
    background: #fff;
    border-radius: 8px;
}

.website-public-contact input,
.website-public-contact textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(20, 59, 91, .18);
    border-radius: 7px;
}

.website-public-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px clamp(18px, 5vw, 72px);
    color: #fff;
    background: #123b63;
}

.website-modern {
    color: #f8ecd0;
    background: #081a2c;
}

.website-modern .website-public-header,
.website-modern .website-public-card-grid article,
.website-modern .website-public-gallery article,
.website-modern .website-public-teachers article,
.website-modern .website-public-contact form {
    color: #f8ecd0;
    background: #0f2943;
    border-color: rgba(222, 178, 86, .24);
}

.website-modern .website-public-hero,
.website-modern .website-public-footer {
    background: #071525;
}

.website-modern .website-public-login,
.website-modern .website-public-hero a,
.website-modern .website-public-contact button,
.website-manager-template-card.is-modern button {
    color: #06111f !important;
    background: #d9ad52;
}

.website-modern .website-public-hero p,
.website-modern .website-public-page p,
.website-modern .website-public-section p,
.website-modern .website-public-contact p {
    color: #d9c7a7;
}

.website-manager-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.website-manager-link {
    display: grid;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.website-manager-form textarea {
    min-height: 96px;
}

.alert-success {
    padding: 12px;
    margin: 18px 0;
    color: #116138;
    background: #effaf3;
    border: 1px solid #b9e4c8;
    border-radius: 7px;
}

.notification-bell {
    position: relative;
}

.notification-bell summary {
    list-style: none;
    position: relative;
}

.notification-bell summary::-webkit-details-marker {
    display: none;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    color: #fff;
    background: #d92d20;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 20;
    width: min(360px, calc(100vw - 32px));
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(22, 34, 51, .16);
}

.notification-dropdown-head,
.notification-card-head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.notification-item {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    padding: 10px;
    color: var(--ink);
    text-decoration: none;
    border-radius: 7px;
}

.notification-item:hover,
.notification-unread {
    background: #f1f7ff;
}

.notification-item-icon,
.notification-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #1466b8;
    background: #e8f4ff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}

.notification-item strong,
.notification-item small,
.notification-item em {
    display: block;
}

.notification-item small,
.notification-item em,
.notification-empty {
    color: var(--muted);
    font-size: 12px;
}

.notification-dropdown form button,
.notification-card button,
.notification-manager button {
    min-height: 36px;
    padding: 0 12px;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 7px;
    font-weight: 800;
}

.notification-list {
    display: grid;
    gap: 14px;
}

.notification-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.notification-card h3 {
    margin: 0;
}

.notification-message {
    margin: 10px 0;
}

.notification-card p {
    color: var(--muted);
}

.notification-priority-low,
.notification-priority-normal,
.notification-priority-high,
.notification-priority-urgent {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.notification-priority-low {
    color: #4b5563;
    background: #f3f4f6;
}

.notification-priority-normal {
    color: #155eef;
    background: #e8f0ff;
}

.notification-priority-high {
    color: #b54708;
    background: #fff4e5;
}

.notification-priority-urgent {
    color: #b42318;
    background: #fff1f0;
}

/* Website Public Shared */
.website-public-logo-fallback,
.website-public-image-fallback,
.website-review-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.website-public-logo-fallback {
    width: 85px;
    height: 35px;
    color: #fff;
    background: #1466b8;
    border-radius: 8px;
    flex: 0 0 auto;
    font-size: 12px;
    letter-spacing: .08em;
}

.website-public-image-fallback {
    width: 100%;
    min-height: 260px;
    color: #1466b8;
    background: linear-gradient(135deg, #e8f4ff, #f7fbff);
    border: 1px dashed rgba(20, 102, 184, .28);
    border-radius: 8px;
}

.website-review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.website-review-grid article {
    display: grid;
    gap: 10px;
    padding: 20px;
    border-radius: 8px;
}

.website-review-grid img,
.website-review-avatar {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 50%;
}

.website-review-avatar {
    color: #fff;
    background: #1466b8;
}

.website-review-stars {
    color: #e6ad2e;
    letter-spacing: 2px;
}

/* Website Classic Template */
.website-classic-topbar {
    display: flex;
    justify-content: center;
    gap: 22px;
    padding: 9px 18px;
    color: #fff;
    background: #1466b8;
    font-size: 13px;
    font-weight: 800;
}

.website-classic-header {
    box-shadow: 0 10px 26px rgba(20, 102, 184, .08);
}

.website-classic-hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 212, 102, .34), transparent 24%),
        linear-gradient(135deg, #f7fbff 0%, #e8f4ff 100%);
}

.website-classic-hero img {
    box-shadow: 0 24px 60px rgba(20, 102, 184, .18);
}

.website-classic-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0 clamp(34px, 6vw, 82px) 34px;
}

.website-classic-stats span {
    padding: 18px;
    color: #315165;
    background: #fff;
    border: 1px solid rgba(20, 102, 184, .12);
    border-radius: 8px;
}

.website-classic-stats strong {
    display: block;
    color: #1466b8;
    font-size: 30px;
}

.website-classic-card-grid article {
    border-top: 4px solid #64b5f6;
}

.website-classic-programs {
    background: #eef8f3;
}

.website-classic-gallery {
    grid-template-columns: 1.2fr .8fr .8fr;
}

.website-review-classic {
    background: #eaf6ff;
}

.website-review-classic .website-review-grid article {
    background: #fff;
    border: 1px solid rgba(20, 102, 184, .12);
    box-shadow: 0 16px 34px rgba(20, 102, 184, .08);
}

.website-classic-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 clamp(34px, 6vw, 76px) 60px;
    padding: 30px;
    color: #fff;
    background: #1466b8;
    border-radius: 8px;
}

.website-classic-cta a {
    color: #173044;
    background: #ffd766;
}

/* Website Modern Template */
.website-modern-header {
    position: absolute;
    z-index: 3;
    width: 100%;
    color: #f8ecd0;
    background: rgba(7, 21, 37, .78) !important;
    border-bottom-color: rgba(217, 173, 82, .24) !important;
    backdrop-filter: blur(14px);
}

.website-modern-cinema {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: end;
    min-height: 720px;
    padding: 140px clamp(28px, 6vw, 92px) 78px;
    background:
        linear-gradient(90deg, rgba(5,16,30,.94), rgba(5,16,30,.58)),
        radial-gradient(circle at 82% 20%, rgba(217,173,82,.25), transparent 30%),
        #071525;
    background-position: center;
    background-size: cover;
}

.website-modern-cinema h1 {
    max-width: 840px;
    margin: 10px 0 18px;
    color: #fff;
    font-size: 68px;
    line-height: 1;
}

.website-modern-cinema p {
    max-width: 680px;
    color: #d9c7a7;
    font-size: 19px;
    line-height: 1.7;
}

.website-modern-cinema span {
    color: #d9ad52;
    font-weight: 900;
    text-transform: uppercase;
}

.website-modern-cinema aside {
    padding: 24px;
    color: #f8ecd0;
    background: rgba(15, 41, 67, .9);
    border: 1px solid rgba(217,173,82,.32);
    border-radius: 8px;
}

.website-modern-cinema a,
.website-classic-cta a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 7px;
    font-weight: 900;
    text-decoration: none;
}

.website-modern-overlap {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 0;
    align-items: center;
    padding: 0 clamp(28px, 6vw, 92px) 76px;
    margin-top: -42px;
}

.website-modern-overlap article {
    z-index: 1;
    padding: 36px;
    color: #173044;
    background: #f8f4ea;
    border-left: 5px solid #d9ad52;
    border-radius: 8px;
}

.website-modern-overlap img,
.website-modern-overlap .website-public-image-fallback {
    min-height: 420px;
    border-radius: 0 8px 8px 0;
}

.website-modern-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #0f2943;
}

.website-modern-split article {
    padding: clamp(34px, 6vw, 76px);
    border-right: 1px solid rgba(217,173,82,.22);
}

.website-modern-split h2,
.website-modern-features h2,
.website-modern-gallery h2,
.website-review-modern h2 {
    color: #f8ecd0;
}

.website-modern-features {
    display: grid;
    gap: 14px;
    padding: clamp(34px, 6vw, 76px);
}

.website-modern-features article {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    padding: 18px;
    color: #f8ecd0;
    background: #0f2943;
    border: 1px solid rgba(217,173,82,.22);
    border-radius: 8px;
}

.website-modern-features span {
    color: #d9ad52;
    font-size: 28px;
    font-weight: 900;
}

.website-modern-gallery {
    padding: clamp(34px, 6vw, 76px);
    background: #f8f4ea;
}

.website-modern-gallery h2 {
    color: #081a2c;
}

.website-modern-gallery div {
    display: grid;
    grid-template-columns: 1.4fr .8fr .8fr;
    gap: 14px;
}

.website-modern-gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

.website-modern-gallery img.featured {
    grid-row: span 2;
    height: 454px;
}

.website-review-modern {
    padding: clamp(34px, 6vw, 76px);
    background: linear-gradient(135deg, #071525, #102b47);
}

.website-review-modern .website-review-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
}

.website-review-modern .website-review-grid article {
    color: #f8ecd0;
    background: rgba(15, 41, 67, .82);
    border: 1px solid rgba(217,173,82,.26);
}

.website-review-modern .website-review-grid article:first-child {
    grid-row: span 2;
    padding: 30px;
}

/* Website Manager Admin */
.website-manager-template-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: #fff;
    background: linear-gradient(135deg, #1466b8, #64b5f6);
    border-radius: 8px;
    font-size: 52px;
    font-weight: 900;
}

.website-manager-template-preview.modern {
    color: #071525;
    background: linear-gradient(135deg, #071525, #d9ad52);
}

.website-review-admin-grid img {
    border-radius: 50%;
}

@media (max-width: 1100px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .login-showcase {
        max-width: 760px;
    }

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

    .accounting-grid,
    .hr-overview-grid,
    .student-portal-grid,
    .mailbox-layout,
    .exam-distribution-grid,
    .homework-grid,
    .homework-report-grid {
        grid-template-columns: 1fr;
    }

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

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

    .website-gallery-grid,
    .website-manager-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .login-shell {
        margin: -16px;
        padding: 20px;
    }

    .login-showcase h1 {
        font-size: 36px;
    }

    .login-feature-grid,
    .demo-users ul {
        grid-template-columns: 1fr;
    }

    .login-panel {
        width: 100%;
    }

    .sidebar {
        position: static;
        width: auto;
        max-height: 320px;
    }

    .app-shell {
        margin-left: 0;
        padding: 16px;
    }

    .topbar,
    .hero-band,
    .module-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .stat-grid,
    .mini-stat-grid,
    .module-grid,
    .accounting-grid,
    .exam-distribution-grid,
    .inline-form,
    .settings-form,
    .permission-grid,
    .form-grid,
    .filter-form,
    .student-search-form,
    .payroll-form,
    .hr-overview-grid,
    .hr-payroll-summary,
    .student-portal-grid,
    .profile-detail-grid,
    .mailbox-layout,
    .payslip-grid {
        grid-template-columns: 1fr;
    }

        .finance-chart div,
        .hr-role-chart div,
    .hr-payroll-chart div,
    .website-public-hero,
    .website-public-page,
    .website-public-contact,
    .website-public-card-grid,
    .website-public-gallery,
    .website-public-teachers,
    .website-manager-grid,
    .website-manager-media-grid {
        grid-template-columns: 1fr;
    }

    .website-public-header,
    .website-public-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .website-gallery-group-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .website-public-brand img,
    .website-public-logo-fallback {
        width: 72px;
        height: 30px;
    }

    .website-gallery-grid,
    .website-manager-media-grid {
        grid-template-columns: 1fr;
    }

    .website-public-hero h1,
    .website-public-page h1,
    .website-public-section h1 {
        font-size: 38px;
    }

    .homework-card dl {
        grid-template-columns: 1fr;
    }
}

/* Global UI Theme Color Settings */
body:not(.website-public) {
    background: var(--smapis-app-bg, #FFFFFF);
}

.sidebar {
    color: var(--smapis-inactive-sidebar-text, #444746);
    background: var(--smapis-sidebar-bg, #F2F6FC);
    border-radius: 0 24px 24px 0;
    box-shadow: 10px 0 32px rgba(15, 23, 42, 0.06);
}

.brand,
.brand small {
    color: var(--smapis-inactive-sidebar-text, #444746);
}

.nav a,
.nav-group summary,
.nav-group div a {
    color: var(--smapis-inactive-sidebar-text, #444746);
    border-radius: 999px;
}

.nav a span,
.nav-group summary span {
    color: var(--smapis-active-sidebar-text, #0B57D0);
    background: color-mix(in srgb, var(--smapis-active-sidebar-bg, #C2E7FF) 68%, #ffffff);
    border-radius: 999px;
}

.nav a:hover,
.nav a.is-active,
.nav-group summary:hover,
.nav-group summary.is-active,
.nav-group[open] summary {
    color: var(--smapis-active-sidebar-text, #0B57D0);
    background: var(--smapis-active-sidebar-bg, #C2E7FF);
    font-weight: 700;
}

.nav-group summary::after {
    color: var(--smapis-inactive-sidebar-text, #444746);
}

.topbar {
    padding: 16px 18px;
    background: var(--smapis-topbar-bg, #FFFFFF);
    border: 1px solid color-mix(in srgb, var(--smapis-inactive-sidebar-text, #444746) 12%, transparent);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.primary-action,
.settings-form > button,
.settings-actions button:first-child,
.inline-form button,
.form-grid button,
.student-search-form button,
.filter-form button,
.notification-dropdown form button,
.notification-card button,
.notification-manager button {
    color: var(--smapis-primary-btn-text, #001D35);
    background: var(--smapis-primary-btn-bg, #C2E7FF);
    border-color: transparent;
    border-radius: 18px;
    font-weight: 800;
}

.secondary-action {
    color: var(--smapis-active-sidebar-text, #0B57D0);
    background: var(--smapis-active-sidebar-bg, #C2E7FF);
}

.module-hero,
.hero-band,
.dashboard-banner,
.page-banner {
    color: var(--ink);
    background: var(--smapis-banner-bg, #EAF1FB);
    border: 1px solid color-mix(in srgb, var(--smapis-inactive-sidebar-text, #444746) 10%, transparent);
    border-radius: 24px;
}

.module-hero p,
.module-hero .eyebrow,
.hero-band .eyebrow {
    color: var(--smapis-inactive-sidebar-text, #444746);
}

.stat-card,
.mini-stat-grid article,
.panel,
.module-card,
.dashboard-card {
    background: var(--smapis-card-bg, #FFFFFF);
    border-radius: 16px;
}

.settings-theme-form {
    align-items: start;
}

.settings-theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.theme-color-row {
    display: grid;
    grid-template-columns: 1fr 54px 120px;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: color-mix(in srgb, var(--smapis-banner-bg, #EAF1FB) 60%, #ffffff);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.theme-color-row input[type="color"] {
    width: 52px;
    height: 42px;
    padding: 3px;
    cursor: pointer;
}

.theme-color-row input[type="text"] {
    min-width: 0;
    font-family: Consolas, Monaco, monospace;
    text-transform: uppercase;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 760px) {
    .settings-theme-grid {
        grid-template-columns: 1fr;
    }

    .theme-color-row {
        grid-template-columns: 1fr;
    }
}

body.guest-shell {
    background: #f7f3ea;
}

body.guest-shell .guest-shell-main {
    min-height: 100vh;
}

body.guest-shell .panel.empty-state {
    max-width: 680px;
    margin: 72px auto;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    min-height: 100vh;
    overflow: hidden;
    background: #f7f3ea;
}

.login-stage {
    position: relative;
    display: grid;
    align-items: center;
    padding: 56px 48px;
    color: #f7f3ea;
    background: linear-gradient(145deg, #184d3b 0%, #1f684f 56%, #287a6a 100%);
}

.login-shell.has-login-background .login-stage {
    background:
        linear-gradient(145deg, rgba(24, 77, 59, 0.94), rgba(40, 122, 106, 0.9)),
        var(--login-hero-image) center / cover no-repeat;
}

.login-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.18;
    pointer-events: none;
}

.login-stage-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 24px;
    max-width: 760px;
}

.login-brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-brand-lockup img,
.login-brand-lockup > span {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    object-fit: contain;
    color: #184d3b;
    font-size: 22px;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(14, 43, 34, 0.18);
}

.login-brand-lockup .eyebrow {
    color: #dce8df;
}

.login-brand-copy {
    display: grid;
    gap: 4px;
}

.login-brand-subtitle {
    margin: 0;
    color: #dce8df;
    font-size: 14px;
    line-height: 1.45;
}

.login-brand-lockup h1,
.login-hero-copy h2,
.login-panel h2,
.login-artboard h3 {
    margin: 0;
}

.login-brand-lockup h1 {
    color: #ffffff;
    font-size: 30px;
    line-height: 1.08;
}

.login-hero-copy {
    display: grid;
    gap: 12px;
}

.login-kicker {
    margin: 0;
    color: #dce8df;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.login-hero-copy h2 {
    max-width: 22ch;
    color: #ffffff;
    font-size: 48px;
    line-height: 1.06;
}

.login-hero-copy p {
    max-width: 62ch;
    margin: 0;
    color: #eef6f0;
    font-size: 16px;
    line-height: 1.65;
}

.login-trust-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.login-trust-list article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    min-height: 108px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    backdrop-filter: blur(6px);
}

.login-trust-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
}

.login-trust-icon .module-svg {
    width: 18px;
    height: 18px;
}

.login-trust-list strong {
    display: block;
    margin-bottom: 4px;
    color: #ffffff;
    font-size: 15px;
}

.login-trust-list span {
    color: #e7f1eb;
    font-size: 13px;
    line-height: 1.55;
}

.login-artboard {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
    gap: 14px;
    align-items: stretch;
    min-height: 252px;
}

.login-artboard-grid {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 24px);
    opacity: 0.55;
}

.login-artboard-card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    padding: 18px;
    color: #26322e;
    background: rgba(247, 243, 234, 0.97);
    border: 1px solid rgba(220, 232, 223, 0.9);
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(9, 26, 21, 0.14);
}

.login-artboard-main {
    align-self: stretch;
}

.login-artboard-side {
    align-self: end;
}

.login-artboard-eyebrow {
    margin: 0;
    color: #6f7b76;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-artboard-card h3 {
    font-size: 24px;
    line-height: 1.12;
}

.login-artboard-main h3 {
    max-width: 24ch;
}

.login-artboard p {
    margin: 0;
}

.login-artboard-main p {
    max-width: 52ch;
    color: #53615c;
    line-height: 1.65;
}

.login-artboard-side strong {
    display: block;
    color: #184d3b;
    font-size: 16px;
    line-height: 1.45;
}

.login-artboard-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-artboard-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    color: #26322e;
    font-size: 13px;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #dce8df;
    border-radius: 999px;
}

.login-artboard-metrics i {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #287a6a;
    border-radius: 999px;
}

.login-artboard-side ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.login-artboard-side li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #53615c;
    font-size: 13px;
    line-height: 1.5;
}

.login-artboard-side .module-svg {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex: 0 0 auto;
    color: #287a6a;
}

.login-auth {
    display: grid;
    place-items: center;
    padding: 56px 48px;
    background: #f7f3ea;
}

.login-panel {
    width: min(100%, 470px);
    padding: 34px 32px 30px;
    color: #26322e;
    background: #ffffff;
    border: 1px solid #dce8df;
    border-radius: 14px;
    box-shadow: 0 22px 48px rgba(24, 77, 59, 0.12);
}

.login-panel-header {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.login-panel-header p {
    margin: 0;
    color: #6f7b76;
    line-height: 1.55;
}

.login-panel h2 {
    color: #184d3b;
    font-size: 28px;
    line-height: 1.14;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 15px;
    margin-bottom: 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.login-success {
    color: #184d3b;
    background: #edf7f1;
    border-color: #bfd7c6;
}

.login-error {
    color: #8f2c2c;
    background: #fcecec;
    border-color: #e6b5b5;
}

.login-alert-icon {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.login-alert-icon .module-svg {
    width: 18px;
    height: 18px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-field {
    display: grid;
    gap: 8px;
}

.login-field-head {
    display: grid;
    gap: 4px;
}

.login-field-label {
    color: #6f7b76;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.login-field-help {
    color: #6f7b76;
    font-size: 12px;
    line-height: 1.45;
}

.login-field-control {
    display: flex;
    align-items: stretch;
    min-height: 54px;
    overflow: hidden;
    background: #f7f3ea;
    border: 1px solid #dce8df;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-field-control:focus-within {
    background: #ffffff;
    border-color: #287a6a;
    box-shadow: 0 0 0 4px rgba(40, 122, 106, 0.14);
}

.login-field-icon,
.login-password-toggle {
    display: inline-grid;
    place-items: center;
    width: 52px;
    flex: 0 0 auto;
    color: #287a6a;
}

.login-field-icon {
    border-right: 1px solid #dce8df;
}

.login-field-icon .module-svg,
.login-password-toggle .module-svg,
.login-submit-icon .module-svg,
.login-security-icon .module-svg,
.login-back-link .module-svg,
.login-alert-icon .module-svg {
    width: 18px;
    height: 18px;
}

.login-field input {
    width: 100%;
    min-width: 0;
    padding: 0 14px;
    color: #26322e;
    background: transparent;
    border: 0;
}

.login-field input:focus {
    outline: none;
}

.login-password-toggle {
    margin-left: auto;
    color: #287a6a;
    background: transparent;
    border: 0;
    border-left: 1px solid #dce8df;
}

.login-password-toggle:focus-visible,
.login-submit:focus-visible,
.login-back-link:focus-visible {
    outline: 3px solid rgba(40, 122, 106, 0.34);
    outline-offset: 2px;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px;
    color: #ffffff;
    font-weight: 800;
    background: #184d3b;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 16px 30px rgba(24, 77, 59, 0.18);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.login-submit:hover {
    background: #143f30;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(24, 77, 59, 0.22);
}

.login-submit:disabled,
.login-submit.is-loading {
    cursor: progress;
    opacity: 0.96;
}

.login-submit-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
}

.login-submit.is-loading .login-submit-spinner {
    display: inline-block;
}

.login-submit.is-loading .login-submit-icon {
    display: none;
}

.login-security-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 0;
    color: #6f7b76;
    font-size: 13px;
    line-height: 1.55;
}

.login-security-icon {
    display: inline-grid;
    place-items: center;
    color: #287a6a;
}

.login-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    color: #6f7b76;
    font-size: 13px;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #184d3b;
    font-weight: 700;
}

.login-samples {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 14px 16px;
    color: #4f5d58;
    background: #f7f3ea;
    border: 1px dashed #dce8df;
    border-radius: 12px;
    font-size: 13px;
}

.login-samples strong {
    color: #26322e;
}

.login-samples p {
    margin: 0;
}

.login-samples ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
}

.login-samples code {
    padding: 2px 6px;
    color: #184d3b;
    background: #ffffff;
    border-radius: 6px;
}

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

@media (max-width: 1040px) {
    .login-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-stage,
    .login-auth {
        padding: 36px 24px;
    }
}

@media (max-width: 780px) {
    body.guest-shell .panel.empty-state {
        margin: 48px auto;
    }

    .login-trust-list {
        grid-template-columns: 1fr;
    }

    .login-artboard {
        grid-template-columns: 1fr;
    }

    .login-artboard-side {
        align-self: stretch;
    }
}

@media (max-width: 640px) {
    .login-stage,
    .login-auth {
        padding: 24px 18px;
    }

    .login-brand-lockup img,
    .login-brand-lockup > span {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }

    .login-brand-lockup h1 {
        font-size: 24px;
    }

    .login-hero-copy h2 {
        font-size: 32px;
    }

    .login-artboard {
        display: none;
    }

    .login-panel {
        padding: 26px 20px 22px;
    }

    .login-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Login redesign used on the public auth page */
.login-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    background: #0d1f2d;
    --brand: #1f6f8b;
    --brand-dark: #164d63;
}

.login-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: clamp(40px, 6vw, 80px);
    color: #fff;
    background:
        linear-gradient(160deg, rgba(13, 57, 74, 0.94) 0%, rgba(15, 40, 58, 0.88) 100%);
    overflow: hidden;
}

.login-shell.has-login-background .login-showcase {
    background:
        linear-gradient(160deg, rgba(13, 57, 74, 0.9), rgba(15, 40, 58, 0.82)),
        var(--login-bg) center / cover no-repeat;
}

.login-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.login-brand-mark img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.login-brand-mark-text {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.login-brand-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.login-brand-sub {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    margin-top: 1px;
}

.login-hero {
    position: relative;
    z-index: 1;
}

.login-hero-label {
    display: inline-block;
    margin-bottom: 20px;
    padding: 5px 12px;
    color: #f0c99a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(193, 116, 59, 0.18);
    border: 1px solid rgba(193, 116, 59, 0.28);
    border-radius: 20px;
}

.login-hero h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(32px, 4.2vw, 56px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.login-hero h1 em {
    font-style: normal;
    color: #f0c99a;
}

.login-hero-desc {
    max-width: 460px;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    line-height: 1.65;
}

.login-pills {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.login-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(6px);
}

.login-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1f9e6e;
    flex-shrink: 0;
}

.login-pill strong {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
}

.login-pill span {
    color: rgba(255, 255, 255, 0.38);
    font-size: 13px;
}

.login-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 5vw, 56px);
    background: #fff;
}

.login-shell.has-login-background .login-panel {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
}

.login-panel-inner {
    width: 100%;
    max-width: 380px;
    margin: auto;
}

.login-panel-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-panel-eyebrow::before {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.login-panel-title {
    margin: 0 0 6px;
    color: #0d1f2d;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.login-panel-subtitle {
    margin: 0 0 28px;
    color: #687789;
    font-size: 14px;
    line-height: 1.6;
}

.alert-error,
.alert-success {
    margin-bottom: 18px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.5;
    border-radius: 8px;
}

.alert-error {
    color: #7a1f1f;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.alert-success {
    color: #1f4d3a;
    background: #f0fdf6;
    border: 1px solid #bbf7d0;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 6px;
}

.login-form label > span {
    color: #3d4f5d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-form input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: #0d1f2d;
    font-size: 14.5px;
    background: #f7fafb;
    border: 1.5px solid #dde6ed;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.login-form input:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31, 111, 139, 0.12);
}

.login-form input::placeholder {
    color: #a8b7c4;
}

.login-password-field {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: #f7fafb;
    border: 1.5px solid #dde6ed;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-password-field:focus-within {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31, 111, 139, 0.12);
}

.login-password-field input {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.login-password-toggle {
    display: inline-grid;
    place-items: center;
    width: 46px;
    flex: 0 0 auto;
    color: var(--brand);
    background: transparent;
    border: 0;
    border-left: 1px solid #dde6ed;
}

.login-password-toggle:focus-visible,
.login-submit:focus-visible,
.login-back-link:focus-visible {
    outline: 3px solid rgba(31, 111, 139, 0.22);
    outline-offset: 2px;
}

.login-password-toggle .module-svg,
.login-submit-icon .module-svg,
.login-security-icon .module-svg,
.login-back-link .module-svg {
    width: 18px;
    height: 18px;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    margin-top: 4px;
    padding: 0 20px;
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: var(--brand);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(31, 111, 139, 0.3);
}

.login-submit:hover {
    background: var(--brand-dark);
    box-shadow: 0 6px 18px rgba(31, 111, 139, 0.38);
}

.login-submit:active {
    transform: translateY(1px);
}

.login-submit:disabled,
.login-submit.is-loading {
    cursor: progress;
    opacity: 0.96;
}

.login-submit-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
}

.login-submit.is-loading .login-submit-spinner {
    display: inline-block;
}

.login-submit.is-loading .login-submit-icon {
    display: none;
}

.login-security-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 0;
    color: #687789;
    font-size: 13px;
    line-height: 1.55;
}

.login-security-icon {
    display: inline-grid;
    place-items: center;
    color: var(--brand);
}

.login-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    color: #687789;
    font-size: 13px;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0d1f2d;
    font-weight: 700;
}

.demo-users {
    display: grid;
    gap: 8px;
    margin-top: 24px;
    padding: 14px 16px;
    background: #f7fafb;
    border: 1px solid #e8eff4;
    border-radius: 8px;
    font-size: 13px;
}

.demo-users strong {
    display: block;
    margin-bottom: 6px;
    color: #3d4f5d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-users p {
    margin: 0;
    color: #687789;
}

.demo-users code {
    padding: 1px 5px;
    color: var(--brand);
    background: rgba(31, 111, 139, 0.08);
    border-radius: 4px;
    font-size: 12px;
}

.demo-users ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.demo-users li {
    color: #4a5f6e;
    font-size: 12.5px;
    padding: 2px 0;
}

.demo-users li::before {
    content: "-> ";
    color: var(--brand);
    font-weight: 700;
}

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

@media (max-width: 820px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-showcase {
        gap: 32px;
        min-height: auto;
    }

    .login-pills {
        display: none;
    }
}

@media (max-width: 640px) {
    .login-showcase,
    .login-panel {
        padding: 28px 20px;
    }

    .login-brand-mark {
        width: 48px;
        height: 48px;
        border-radius: 11px;
    }

    .login-brand-mark img {
        width: 32px;
        height: 32px;
    }

    .login-brand-name {
        font-size: 14px;
    }

    .login-hero h1 {
        font-size: 30px;
    }

    .login-panel-title {
        font-size: 24px;
    }

    .login-panel-subtitle {
        margin-bottom: 22px;
    }

    .login-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
