/**
 * ==========================================================
 * KLASENTA 
 * GLOBAL APPLICATION STYLES — VERSION 2.0
 *
 * PURPOSE:
 * Consolidated production stylesheet for the Golden Standard
 * invoicing and school finance application.
 *
 * CLEANUP NOTES:
 * - Exact duplicate rule blocks removed.
 * - Existing cascade-preserving overrides retained.
 * - Global modal state standardized with compatibility aliases.
 * - Disabled button behaviour standardized.
 * - All existing safety-search sections retained.
 *
 * SAFETY SEARCH:
 * APP-STYLES
 * ==========================================================
 */

:root {
    --color-primary: #c89b2c;
    --color-primary-dark: #9b741c;
    --color-dark: #182234;
    --color-dark-soft: #253248;
    --color-text: #1e293b;
    --color-muted: #687386;
    --color-background: #f5f7fa;
    --color-surface: #ffffff;
    --color-border: #e3e8ef;
    --color-success: #168447;
    --color-success-soft: #eaf8f0;
    --color-danger: #c83b3b;
    --color-danger-soft: #fff0f0;
    --shadow-card: 0 24px 70px rgba(18, 31, 50, 0.11);
    --radius-large: 24px;
    --radius-medium: 14px;
    --radius-small: 10px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: "Inter", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================
   AUTHENTICATION
   SAFETY SEARCH: APP-AUTH
========================================================== */

.auth-body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--color-background);
}

.auth-layout {
    display: grid;
    grid-template-columns:
        minmax(360px, 0.95fr)
        minmax(480px, 1.05fr);
    min-height: 100vh;
}

/* ==========================================================
   AUTHENTICATION LEFT PANEL
========================================================== */

.auth-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px clamp(34px, 5vw, 80px);
    overflow: hidden;
    background:
        radial-gradient(
            circle at 10% 5%,
            rgba(200, 155, 44, 0.26),
            transparent 28%
        ),
        linear-gradient(
            145deg,
            #111a2a 0%,
            #1b293e 52%,
            #111b2d 100%
        );
    color: #ffffff;
}

.auth-panel::after {
    position: absolute;
    right: -140px;
    bottom: -160px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
}

/* ==========================================================
   AUTHENTICATION BRANDING
========================================================== */

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

.auth-brand > img.login-brand-logo {
    display: block;
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
    flex: 0 0 120px;
    object-fit: contain;
}

.login-brand-copy {
    min-width: 0;
}

.login-brand-copy strong,
.login-brand-copy span {
    display: block;
}

.login-brand-copy strong {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.025em;
}

.login-brand-copy span {
    max-width: 290px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ==========================================================
   AUTHENTICATION COPY
========================================================== */

.auth-copy {
    position: relative;
    z-index: 1;
    max-width: 600px;
    padding: 70px 0;
}

.auth-eyebrow,
.auth-kicker {
    display: block;
    margin-bottom: 16px;
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-copy h1 {
    max-width: 580px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 5.2vw, 74px);
    line-height: 0.99;
    letter-spacing: -0.055em;
}

.auth-copy > p {
    max-width: 560px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.75;
}

/* ==========================================================
   AUTHENTICATION FEATURES
========================================================== */

.auth-feature-list {
    display: grid;
    gap: 14px;
    margin-top: 40px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.83);
    font-size: 14px;
    font-weight: 600;
}

.auth-feature span {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    color: var(--color-primary);
    font-size: 11px;
}

.auth-panel-footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
}

/* ==========================================================
   AUTHENTICATION FORM PANEL
========================================================== */

.auth-form-panel {
    display: grid;
    min-height: 100vh;
    padding: 40px;
    place-items: center;
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.78),
            rgba(255, 255, 255, 0.78)
        ),
        var(--color-background);
}

.auth-card {
    width: min(100%, 490px);
    padding: clamp(30px, 5vw, 54px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.auth-card-heading {
    margin-bottom: 34px;
}

.auth-card-heading h2 {
    margin: 0;
    color: var(--color-dark);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.auth-card-heading p {
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.65;
}

/* ==========================================================
   AUTHENTICATION RESPONSIVE
========================================================== */

@media (max-width: 980px) {

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        min-height: auto;
        padding: 32px 26px 42px;
    }

    .auth-copy {
        padding: 50px 0;
    }

    .auth-form-panel {
        min-height: auto;
        padding: 38px 22px;
    }
}

@media (max-width: 640px) {

    .auth-brand {
        gap: 14px;
    }

    .auth-brand > img.login-brand-logo {
        width: 70px;
        height: 70px;
        max-width: 70px;
        max-height: 70px;
        flex-basis: 70px;
    }

    .login-brand-copy strong {
        font-size: 22px;
    }

    .login-brand-copy span {
        max-width: 210px;
        font-size: 9px;
        letter-spacing: 0.08em;
    }

    .auth-copy h1 {
        font-size: clamp(38px, 12vw, 54px);
    }

    .auth-copy > p {
        font-size: 14px;
    }

    .auth-card {
        padding: 28px 22px;
    }
}

/* ==========================================================
   FORMS
   SAFETY SEARCH: APP-FORMS
========================================================== */

.form-group {
    margin-bottom: 21px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-group input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid #d9e0e8;
    border-radius: var(--radius-small);
    outline: none;
    background: #ffffff;
    color: var(--color-text);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.form-group input::placeholder {
    color: #9aa4b2;
}

.form-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(200, 155, 44, 0.13);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    padding: 7px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--color-primary-dark);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    transform: translateY(-50%);
}

/* ==========================================================
   BUTTONS
   SAFETY SEARCH: APP-BUTTONS
========================================================== */

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 0;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--color-primary);
    color: #172033;
    box-shadow: 0 12px 28px rgba(200, 155, 44, 0.25);
}

.button-primary:hover {
    background: #d5aa3e;
}

.button-full {
    width: 100%;
}

.auth-help {
    margin: 20px 0 0;
    color: #8b95a5;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

/* ==========================================================
   ALERTS
   SAFETY SEARCH: APP-ALERTS
========================================================== */

.alert {
    margin-bottom: 22px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.alert-error {
    border: 1px solid #ffd0d0;
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.alert-success {
    border: 1px solid #ccebd9;
    background: var(--color-success-soft);
    color: var(--color-success);
}

/* ==========================================================
   EXISTING APPLICATION SHELL
========================================================== */

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    padding: 30px;
    background: var(--color-dark);
    color: #ffffff;
}

.logo {
    margin-bottom: 40px;
}

.logo h2 {
    margin: 0;
    font-size: 24px;
}

.logo p {
    margin-top: 5px;
    opacity: 0.7;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar a {
    padding: 12px 15px;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    transition: background 160ms ease;
}

.sidebar a:hover {
    background: var(--color-dark-soft);
}

.content {
    flex: 1;
    padding: 50px;
}

/* ==========================================================
   RESPONSIVE
   SAFETY SEARCH: APP-RESPONSIVE
========================================================== */

@media (max-width: 900px) {

    .auth-panel {
        min-height: auto;
        padding: 30px 24px 42px;
    }

    .auth-copy {
        padding: 70px 0 10px;
    }

    .auth-copy h1 {
        max-width: 670px;
        font-size: clamp(38px, 9vw, 66px);
    }

    .auth-feature-list,
    .auth-panel-footer {
        display: none;
    }

    .auth-form-panel {
        min-height: auto;
        padding: 34px 20px 50px;
    }

    .auth-card {
        margin-top: -1px;
        box-shadow: 0 18px 50px rgba(18, 31, 50, 0.08);
    }

    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .content {
        padding: 25px;
    }
}

@media (max-width: 560px) {

    .auth-panel {
        padding: 24px 19px 35px;
    }

    .auth-copy {
        padding-top: 54px;
    }

    .auth-copy h1 {
        font-size: 39px;
        line-height: 1.03;
    }

    .auth-copy > p {
        margin-top: 20px;
        font-size: 14px;
    }

    .auth-form-panel {
        padding: 25px 14px 36px;
    }

    .auth-card {
        padding: 29px 21px;
        border-radius: 18px;
    }
}


/* ==========================================================
   SIDEBAR FOOTER
   SAFETY SEARCH: APP-SIDEBAR-FOOTER
========================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar nav {
    flex: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-user {
    margin-bottom: 14px;
}

.sidebar-user strong,
.sidebar-user span {
    display: block;
}

.sidebar-user strong {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
}

.sidebar-user span {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.sidebar .logout-link {
    display: block;
    padding: 11px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.sidebar .logout-link:hover {
    background: rgba(255, 255, 255, 0.15);
}


/* ==========================================================
   DASHBOARD
   SAFETY SEARCH: APP-DASHBOARD
========================================================== */

.dashboard {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.dashboard-eyebrow,
.card-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--color-primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dashboard-header h1 {
    margin: 0;
    color: var(--color-dark);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.dashboard-header p {
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.6;
}

.dashboard-date {
    min-width: 220px;
    padding: 15px 18px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    text-align: right;
}

.dashboard-date span,
.dashboard-date strong {
    display: block;
}

.dashboard-date span {
    margin-bottom: 5px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-date strong {
    color: var(--color-dark);
    font-size: 13px;
}

.demo-notice {
    margin-bottom: 22px;
    padding: 13px 16px;
    border: 1px solid #f1dda5;
    border-radius: 10px;
    background: #fffaf0;
    color: #775912;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
}

/* ==========================================================
   DASHBOARD STAT CARDS
========================================================== */

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

.stat-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: 0 10px 30px rgba(18, 31, 50, 0.045);
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 22px;
}

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

.stat-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    background: rgba(200, 155, 44, 0.13);
    color: var(--color-primary-dark);
    font-size: 10px;
    font-weight: 900;
}

.stat-value {
    display: block;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(25px, 2.8vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.stat-meta {
    display: block;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.5;
}

.stat-positive {
    color: var(--color-success);
}

/* ==========================================================
   DASHBOARD CONTENT CARDS
========================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.7fr);
    gap: 20px;
    align-items: start;
}

.dashboard-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: 0 10px 30px rgba(18, 31, 50, 0.04);
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
}

.card-heading h2 {
    margin: 0;
    color: var(--color-dark);
    font-size: 19px;
    letter-spacing: -0.025em;
}

.text-link {
    color: var(--color-primary-dark);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

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

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

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

.data-table th,
.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    background: #fafbfc;
    color: #788395;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table td {
    color: #4d596b;
    font-size: 12px;
}

.data-table td:first-child strong,
.data-table td:first-child span {
    display: block;
}

.data-table td:first-child strong {
    color: var(--color-dark);
    font-size: 12px;
}

.data-table td:first-child span {
    margin-top: 4px;
    color: #9099a8;
    font-size: 10px;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.status-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.status-success {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.status-pending {
    background: #fff6de;
    color: #936b00;
}

/* ==========================================================
   COLLECTION SUMMARY
========================================================== */

.collection-list {
    padding: 8px 24px 14px;
}

.collection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 0;
    border-bottom: 1px solid #edf0f4;
}

.collection-item:last-child {
    border-bottom: 0;
}

.collection-item div strong,
.collection-item div span {
    display: block;
}

.collection-item div strong {
    color: var(--color-dark);
    font-size: 12px;
}

.collection-item div span {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 10px;
}

.collection-item > strong {
    color: var(--color-dark);
    font-size: 13px;
    white-space: nowrap;
}

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

@media (max-width: 1180px) {

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

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

@media (max-width: 760px) {

    .dashboard-header {
        display: block;
    }

    .dashboard-date {
        width: 100%;
        margin-top: 20px;
        text-align: left;
    }

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

    .stat-card {
        padding: 19px;
    }

    .card-heading {
        padding: 18px;
    }

    .data-table th,
    .data-table td {
        padding: 14px 18px;
    }

    .collection-list {
        padding-right: 18px;
        padding-left: 18px;
    }
}


/* ==========================================================
   STUDENT DIRECTORY
   SAFETY SEARCH: APP-STUDENTS
========================================================== */

.students-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-header h1 {
    margin: 0;
    color: var(--color-dark);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.page-header p {
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.6;
}

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

.empty-state {
    max-width: 520px;
    margin: 0 auto;
    padding: 70px 24px;
    text-align: center;
}

.empty-state-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 20px;
    place-items: center;
    border-radius: 16px;
    background: rgba(200, 155, 44, 0.14);
    color: var(--color-primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.empty-state h3 {
    margin: 0;
    color: var(--color-dark);
    font-size: 21px;
}

.empty-state p {
    margin: 12px auto 24px;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.7;
}

.student-table td:first-child strong,
.student-table td:first-child span {
    display: block;
}

@media (max-width: 760px) {

    .page-header {
        display: block;
    }

    .page-header .button {
        width: 100%;
        margin-top: 20px;
    }
}


/* ==========================================================
   ACTIVE SIDEBAR LINK
   SAFETY SEARCH: APP-SIDEBAR-ACTIVE
========================================================== */

.sidebar a.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 700;
}


/* ==========================================================
   PAGE ACTIONS
   SAFETY SEARCH: APP-PAGE-ACTIONS
========================================================== */

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.button-secondary {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-dark);
    box-shadow: none;
}

.button-secondary:hover {
    border-color: var(--color-primary);
    background: #fffaf0;
}

@media (max-width: 760px) {

    .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        margin-top: 20px;
    }

    .page-actions .button {
        width: 100%;
        margin-top: 0;
    }
}


/* ==========================================================
   STUDENT BULK IMPORT
   SAFETY SEARCH: APP-STUDENT-IMPORT
========================================================== */

.student-import-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.import-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 20px;
    align-items: start;
}

.import-form {
    padding: 24px;
}

.file-upload-area {
    display: flex;
    min-height: 260px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 35px;
    border: 2px dashed #d7dde6;
    border-radius: 14px;
    background: #fafbfc;
    cursor: pointer;
    text-align: center;
    transition:
        border-color 160ms ease,
        background 160ms ease;
}

.file-upload-area:hover {
    border-color: var(--color-primary);
    background: #fffaf0;
}

.file-upload-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 16px;
    background: rgba(200, 155, 44, 0.14);
    color: var(--color-primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.file-upload-area strong {
    color: var(--color-dark);
    font-size: 16px;
}

.file-upload-area > span:last-of-type {
    max-width: 370px;
    margin-top: 9px;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.6;
}

.file-upload-area input {
    margin-top: 22px;
    max-width: 100%;
    color: var(--color-muted);
    font-size: 12px;
}

.import-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
}

.import-help-content {
    padding: 11px 24px 20px;
}

.import-help-item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px 0;
    border-bottom: 1px solid #edf0f4;
}

.import-help-item:last-child {
    border-bottom: 0;
}

.import-help-item > span {
    display: grid;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    place-items: center;
    border-radius: 9px;
    background: rgba(200, 155, 44, 0.13);
    color: var(--color-primary-dark);
    font-size: 10px;
    font-weight: 900;
}

.import-help-item p {
    margin: 3px 0 0;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.6;
}

.import-preview-card {
    margin-top: 20px;
}

.import-summary {
    text-align: right;
}

.import-summary strong,
.import-summary span {
    display: block;
}

.import-summary strong {
    color: var(--color-dark);
    font-size: 20px;
}

.import-summary span {
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 10px;
}

.preview-file-info {
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.preview-file-info span,
.preview-file-info strong {
    display: block;
}

.preview-file-info span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.preview-file-info strong {
    margin-top: 6px;
    color: var(--color-dark);
    font-size: 13px;
}

.preview-file-info p {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 11px;
}

.import-preview-table td:first-child {
    color: var(--color-muted);
}

.preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
}

.preview-footer p {
    margin: 0;
    color: var(--color-muted);
    font-size: 11px;
}

.preview-footer .button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

@media (max-width: 1050px) {

    .import-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {

    .import-form {
        padding: 18px;
    }

    .file-upload-area {
        min-height: 230px;
        padding: 26px 18px;
    }

    .import-form-actions,
    .preview-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .import-form-actions .button,
    .preview-footer .button {
        width: 100%;
    }

    .preview-footer {
        padding: 18px;
    }
}


/* ==========================================================
   STUDENT IMPORT VALIDATION
   SAFETY SEARCH: APP-IMPORT-VALIDATION
========================================================== */

.validation-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.validation-summary-card {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
}

.validation-summary-card span,
.validation-summary-card strong {
    display: block;
}

.validation-summary-card span {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
}

.validation-summary-card strong {
    margin-top: 9px;
    color: var(--color-dark);
    font-size: 28px;
}

.validation-summary-card.is-valid {
    border-color: #ccebd9;
    background: var(--color-success-soft);
}

.validation-summary-card.is-valid strong {
    color: var(--color-success);
}

.validation-summary-card.is-error {
    border-color: #ffd0d0;
    background: var(--color-danger-soft);
}

.validation-summary-card.is-error strong {
    color: var(--color-danger);
}

.status-error {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.import-row-error {
    background: #fffafa;
}

.import-error-cell {
    min-width: 260px;
    white-space: normal !important;
}

.import-error-list {
    margin: 0;
    padding-left: 17px;
    color: var(--color-danger);
    font-size: 10px;
    line-height: 1.6;
}

.validation-ok {
    color: var(--color-success);
    font-size: 10px;
    font-weight: 700;
}

.table-subtext {
    display: block;
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 10px;
}

@media (max-width: 760px) {

    .validation-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   CONTENT WIDTH FIX
   SAFETY SEARCH: APP-CONTENT-PADDING
========================================================== */

.content {
    min-width: 0;
    padding-right: 32px;
    padding-left: 32px;
    overflow-x: hidden;
}

.student-import-page,
.students-page,
.dashboard {
    width: 100%;
    max-width: 100%;
}

.import-layout {
    width: 100%;
    min-width: 0;
}

.import-layout > * {
    min-width: 0;
}



/* ==========================================================
   ADD STUDENT MODAL
   SAFETY SEARCH: APP-STUDENT-MODAL
========================================================== */

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(11, 19, 32, 0.64);
    opacity: 0;
    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

.modal-backdrop.is-visible {
    visibility: visible;
    opacity: 1;
}

.modal-dialog {
    width: min(100%, 820px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    background: var(--color-surface);
    box-shadow: 0 30px 90px rgba(8, 19, 35, 0.28);
    transform: translateY(20px) scale(0.985);
    transition: transform 180ms ease;
}

.modal-backdrop.is-visible .modal-dialog {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    margin: 0;
    color: var(--color-dark);
    font-size: 26px;
    letter-spacing: -0.035em;
}

.modal-header p {
    margin: 8px 0 0;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.6;
}

.modal-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface);
    color: var(--color-dark);
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
}

.modal-close:hover {
    background: #f5f7fa;
}

.modal-alert {
    margin: 22px 28px 0;
}

.modal-alert strong {
    display: block;
    margin-bottom: 7px;
}

.modal-alert ul {
    margin: 0;
    padding-left: 18px;
}

.student-form {
    padding: 0 28px;
}

.form-section {
    padding: 27px 0;
    border-bottom: 1px solid var(--color-border);
}

.form-section:last-of-type {
    border-bottom: 0;
}

.form-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 21px;
}

.form-section-heading > span {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    border-radius: 9px;
    background: rgba(200, 155, 44, 0.14);
    color: var(--color-primary-dark);
    font-size: 10px;
    font-weight: 900;
}

.form-section-heading strong,
.form-section-heading p {
    display: block;
}

.form-section-heading strong {
    color: var(--color-dark);
    font-size: 14px;
}

.form-section-heading p {
    margin: 4px 0 0;
    color: var(--color-muted);
    font-size: 11px;
}

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

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

.form-group select {
    width: 100%;
    min-height: 52px;
    padding: 0 42px 0 15px;
    border: 1px solid #d9e0e8;
    border-radius: var(--radius-small);
    outline: none;
    background: #ffffff;
    color: var(--color-text);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.form-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(200, 155, 44, 0.13);
}

.modal-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    margin: 0 -28px;
    padding: 20px 28px;
    border-top: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

@media (max-width: 760px) {

    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal-dialog {
        width: 100%;
        max-height: 94vh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 20px 20px 0 0;
    }

    .modal-header {
        padding: 22px 19px;
    }

    .modal-alert {
        margin-right: 19px;
        margin-left: 19px;
    }

    .student-form {
        padding-right: 19px;
        padding-left: 19px;
    }

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

    .form-group-wide {
        grid-column: auto;
    }

    .modal-footer {
        margin-right: -19px;
        margin-left: -19px;
        padding: 17px 19px;
    }

    .modal-footer .button {
        flex: 1;
    }
}


/* ==========================================================
   ADMISSION NUMBER SUGGESTION
   SAFETY SEARCH: APP-ADMISSION-SUGGESTION
========================================================== */

.admission-number-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.admission-number-field .button {
    min-height: 52px;
    white-space: nowrap;
}

.form-help {
    display: block;
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 11px;
}

.form-help strong {
    color: var(--color-dark);
}

@media (max-width: 560px) {

    .admission-number-field {
        grid-template-columns: 1fr;
    }

    .admission-number-field .button {
        width: 100%;
    }
}


/* ==========================================================
   FILE UPLOAD
   SAFETY SEARCH: APP-FILE-UPLOAD
========================================================== */

.file-upload input[type="file"]{
    display:none;
}

.file-upload-label{

    display:flex;
    align-items:center;
    gap:16px;

    width:100%;

    min-height:60px;

    padding:16px 18px;

    border:2px dashed #D7DCE7;

    border-radius:14px;

    background:#FAFBFD;

    cursor:pointer;

    transition:.25s;
}

.file-upload-label:hover{

    border-color:#C79B28;

    background:#FFFDF7;
}

.file-upload-button{

    background:#1E293B;

    color:#fff;

    padding:10px 18px;

    border-radius:10px;

    font-size:14px;

    font-weight:600;

    white-space:nowrap;
}

.file-upload-name{

    color:#667085;

    font-size:14px;

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;
}


/* ==========================================================
   STUDENT DIRECTORY AVATAR
   SAFETY SEARCH: APP-STUDENT-AVATAR
========================================================== */

.student-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.student-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    object-fit: cover;
    background: #f3f5f8;
}

.student-avatar-placeholder {
    display: grid;
    place-items: center;
    background: rgba(200, 155, 44, 0.14);
    color: var(--color-primary-dark);
    font-size: 11px;
    font-weight: 900;
}

.student-identity-copy strong,
.student-identity-copy span {
    display: block;
}

.student-identity-copy strong {
    color: var(--color-dark);
    font-size: 12px;
}

.student-identity-copy span {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 10px;
}


/* ==========================================================
   STUDENT PROFILE
   SAFETY SEARCH: APP-STUDENT-PROFILE
========================================================== */

.student-profile-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.student-profile-link {
    color: var(--color-dark);
    text-decoration: none;
}

.student-profile-link:hover {
    color: var(--color-primary-dark);
}

.student-profile-grid {
    display: grid;
    grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.student-profile-card {
    padding: 28px;
    text-align: center;
}

.student-profile-photo-wrap {
    display: flex;
    justify-content: center;
}

.student-profile-photo {
    width: 132px;
    height: 132px;
    border: 5px solid #ffffff;
    border-radius: 28px;
    object-fit: cover;
    background: #f3f5f8;
    box-shadow: 0 14px 38px rgba(18, 31, 50, 0.14);
}

.student-profile-photo-placeholder {
    display: grid;
    place-items: center;
    background: rgba(200, 155, 44, 0.15);
    color: var(--color-primary-dark);
    font-size: 28px;
    font-weight: 900;
}

.student-profile-name {
    margin-top: 23px;
}

.student-profile-name h2 {
    margin: 0;
    color: var(--color-dark);
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.student-profile-name p {
    margin: 8px 0 0;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
}

.student-profile-status {
    margin-top: 16px;
}

.profile-summary-list {
    margin-top: 27px;
    border-top: 1px solid var(--color-border);
}

.profile-summary-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.profile-summary-item span {
    color: var(--color-muted);
    font-size: 11px;
}

.profile-summary-item strong {
    color: var(--color-dark);
    font-size: 12px;
    text-align: right;
}

.student-profile-main {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--color-border);
}

.profile-detail-item {
    min-width: 0;
    padding: 23px 24px;
    background: var(--color-surface);
}

.profile-detail-item span,
.profile-detail-item strong {
    display: block;
}

.profile-detail-item span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.profile-detail-item strong {
    margin-top: 9px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 13px;
}

.profile-finance-placeholder {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-finance-stat {
    padding: 25px 24px;
    border-right: 1px solid var(--color-border);
}

.profile-finance-stat:last-child {
    border-right: 0;
}

.profile-finance-stat span,
.profile-finance-stat strong {
    display: block;
}

.profile-finance-stat span {
    color: var(--color-muted);
    font-size: 11px;
}

.profile-finance-stat strong {
    margin-top: 10px;
    color: var(--color-dark);
    font-size: 24px;
    letter-spacing: -0.035em;
}

.profile-module-notice {
    padding: 14px 24px;
    border-top: 1px solid var(--color-border);
    background: #fffaf0;
    color: #775912;
    font-size: 11px;
    line-height: 1.6;
}

.profile-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 24px;
}

.status-info {
    background: #edf3ff;
    color: #315da8;
}

@media (max-width: 1050px) {

    .student-profile-grid {
        grid-template-columns: 1fr;
    }

    .student-profile-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 22px;
        align-items: center;
        text-align: left;
    }

    .student-profile-name {
        margin-top: 0;
    }

    .student-profile-status,
    .profile-summary-list {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {

    .student-profile-card {
        display: block;
        text-align: center;
    }

    .student-profile-name {
        margin-top: 21px;
    }

    .profile-detail-grid,
    .profile-finance-placeholder,
    .profile-action-grid {
        grid-template-columns: 1fr;
    }

    .profile-detail-item,
    .profile-finance-stat {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .profile-detail-item:last-child,
    .profile-finance-stat:last-child {
        border-bottom: 0;
    }

    .profile-action-grid .button {
        width: 100%;
    }
}


/* ==========================================================
   EDIT STUDENT
   SAFETY SEARCH: APP-STUDENT-EDIT
========================================================== */

.student-edit-card {
    overflow: hidden;
}

.current-student-photo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
}

.current-student-photo img {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 12px;
    object-fit: cover;
}

.current-student-photo strong,
.current-student-photo span {
    display: block;
}

.current-student-photo strong {
    color: var(--color-dark);
    font-size: 12px;
}

.current-student-photo span {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 11px;
}


/* ==========================================================
   STUDENT STATISTICS
   SAFETY SEARCH: APP-STUDENT-STATISTICS
========================================================== */

.student-statistics{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:20px;
    margin:0 0 28px;
}

.stat-card {
    min-width: 0;
    padding: 22px 18px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


/* ==========================================================
   FINANCE KPI CARDS
   SAFETY SEARCH: APP-FINANCE-KPI-CARDS
========================================================== */

.finance-statistics .stat-card {
    min-width: 0;
    padding: 22px 18px;
}

.finance-statistics .stat-value {
    display: block;
    width: 100%;
    margin-top: 14px;
    font-size: clamp(22px, 1.9vw, 30px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.finance-statistics .finance-stat-note {
    display: block;
    margin-top: 12px;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.4;
}

.finance-statistics .finance-stat-note {
    display: block;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.4;
}

.stat-card:hover{
    transform:translateY(-2px);
    box-shadow:0 16px 36px rgba(15,23,42,.08);
}

.stat-label{
    display:block;
    color:var(--color-muted);
    font-size:12px;
    font-weight:700;
    letter-spacing:.05em;
    text-transform:uppercase;
}

.stat-value{
    display:block;
    margin-top:12px;
    color:var(--color-dark);
    font-size:36px;
    font-weight:800;
    line-height:1;
}

.stat-success{
    color:#16a34a;
}

.stat-info{
    color:#2563eb;
}

.stat-danger{
    color:#dc2626;
}

@media (max-width:1024px){

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

}

@media (max-width:640px){

    .student-statistics{
        grid-template-columns:1fr;
    }

}


/* ==========================================================
   LEGACY STUDENT TOOLBAR REMOVED
   Shared directory controls are defined later under:
   APP-SHARED-DIRECTORY-TOOLBAR
========================================================== */


/* ==========================================================
   SIDEBAR BRANDING
   SAFETY SEARCH: APP-SIDEBAR-BRANDING
========================================================== */

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-school-logo {
    display: block;
    width: 74px;
    height: 74px;
    max-width: 74px;
    max-height: 74px;
    flex: 0 0 74px;
    object-fit: contain;
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-brand-copy h2,
.sidebar-brand-copy p {
    display: block;
    margin: 0;
}

.sidebar-brand-copy h2 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.sidebar-brand-copy p {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}


/* ==========================================================
   FEES & BILLING OVERVIEW
   SAFETY SEARCH: APP-FEES-OVERVIEW
========================================================== */

.fees-page {
    display: grid;
    gap: 28px;
}

.finance-period-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
}

.finance-period-banner > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.finance-period-banner span {
    color: var(--color-muted);
    font-size: 14px;
}

.finance-period-banner strong {
    color: var(--color-dark);
    font-size: 16px;
}

.finance-statistics .stat-card {
    min-width: 0;
}



.finance-statistics .stat-card {
    min-width: 0;
    overflow: hidden;
}

.finance-stat-note {
    display: block;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.45;
}

.finance-account-card {
    overflow: hidden;
}

.finance-account-table td:nth-child(4),
.finance-account-table td:nth-child(5),
.finance-account-table td:nth-child(6) {
    white-space: nowrap;
}

.finance-account-table td:nth-child(6) strong {
    color: var(--color-dark);
}

@media (max-width: 1180px) {

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

@media (max-width: 640px) {

    .finance-statistics {
        grid-template-columns: 1fr;
    }

    .finance-period-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .finance-statistics .stat-value {
        font-size: 34px;
    }
}


/* ==========================================================
   STUDENT FINANCE ACCOUNT
   SAFETY SEARCH: APP-STUDENT-FINANCE-ACCOUNT
========================================================== */

.student-account-page {
    display: grid;
    gap: 28px;
}

.student-account-header {
    align-items: flex-start;
}

.student-account-header .page-actions {
    flex-wrap: wrap;
}

/* ----------------------------------------------------------
   STUDENT SUMMARY
---------------------------------------------------------- */

.student-finance-summary {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 32px;
    padding: 28px;
}

.student-finance-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.student-finance-avatar {
    display: grid;
    width: 88px;
    height: 88px;
    max-width: 88px;
    max-height: 88px;
    flex: 0 0 88px;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    object-fit: cover;
    background: #f7f1df;
    color: #9a6b00;
    font-size: 22px;
    font-weight: 800;
}

.student-finance-profile h2 {
    margin: 5px 0 0;
    color: var(--color-dark);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.student-finance-profile p {
    margin: 9px 0 0;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   ACCOUNT DETAILS
---------------------------------------------------------- */

.student-finance-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fbfcfe;
}

.student-finance-details > div {
    min-width: 0;
    padding: 17px 18px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.student-finance-details > div:nth-child(3n) {
    border-right: 0;
}

.student-finance-details > div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.student-finance-details dt {
    margin: 0 0 7px;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.student-finance-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

/* ----------------------------------------------------------
   ACCOUNT SECTIONS
---------------------------------------------------------- */

.student-account-section {
    overflow: hidden;
}

.student-account-section .card-heading {
    min-height: 96px;
}

.student-account-section .table-wrap {
    border-top: 1px solid var(--color-border);
}

.student-charge-table {
    min-width: 980px;
}

.student-charge-table td:not(:first-child),
.student-charge-table th:not(:first-child) {
    white-space: nowrap;
}

.student-charge-table td:first-child {
    min-width: 250px;
}

.table-cell-note {
    display: block;
    max-width: 330px;
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
    white-space: normal;
}

/* ----------------------------------------------------------
   OPTIONAL SERVICES
---------------------------------------------------------- */

.optional-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
    border-top: 1px solid var(--color-border);
}

.optional-service-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fbfcfe;
}

.optional-service-card > div {
    min-width: 0;
}

.optional-service-card strong,
.optional-service-card span {
    display: block;
}

.optional-service-card strong {
    color: var(--color-dark);
    font-size: 14px;
    line-height: 1.4;
}

.optional-service-card > div > span {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 12px;
}

/* ----------------------------------------------------------
   EMPTY STATES
---------------------------------------------------------- */

.student-account-section .empty-state {
    min-height: 220px;
    padding: 42px 24px;
    border-top: 1px solid var(--color-border);
}

/* ----------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------- */

@media (max-width: 1120px) {

    .student-finance-summary {
        grid-template-columns: 1fr;
    }

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

    .student-finance-details > div:nth-child(3n) {
        border-right: 1px solid var(--color-border);
    }

    .student-finance-details > div:nth-child(2n) {
        border-right: 0;
    }

    .student-finance-details > div:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--color-border);
    }

    .student-finance-details > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

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

@media (max-width: 700px) {

    .student-account-page {
        gap: 20px;
    }

    .student-finance-summary {
        gap: 24px;
        padding: 20px;
    }

    .student-finance-profile {
        align-items: flex-start;
    }

    .student-finance-avatar {
        width: 70px;
        height: 70px;
        max-width: 70px;
        max-height: 70px;
        flex-basis: 70px;
        border-radius: 18px;
    }

    .student-finance-details {
        grid-template-columns: 1fr;
    }

    .student-finance-details > div,
    .student-finance-details > div:nth-child(2n),
    .student-finance-details > div:nth-child(3n) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .student-finance-details > div:last-child {
        border-bottom: 0;
    }

    .optional-service-grid {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .optional-service-card {
        align-items: flex-start;
    }
}


/* ==========================================================
   RECORD PAYMENT MODAL
   SAFETY SEARCH: APP-RECORD-PAYMENT
========================================================== */

.payment-modal {
    width: min(100%, 760px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.payment-modal .modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 24px 28px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.payment-modal .modal-header h2 {
    margin: 4px 0 0;
    color: var(--color-dark);
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.payment-modal .modal-header p {
    max-width: 560px;
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.payment-form {
    padding: 26px 28px 28px;
}

/* ----------------------------------------------------------
   ACCOUNT SUMMARY
---------------------------------------------------------- */

.payment-account-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 26px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fbfcfe;
}

.payment-account-summary > div {
    min-width: 0;
    padding: 18px 20px;
}

.payment-account-summary > div + div {
    border-left: 1px solid var(--color-border);
}

.payment-account-summary span,
.payment-account-summary strong {
    display: block;
}

.payment-account-summary span {
    margin-bottom: 7px;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.payment-account-summary strong {
    color: var(--color-dark);
    font-size: 17px;
    line-height: 1.35;
}

/* ----------------------------------------------------------
   FORM GRID
---------------------------------------------------------- */

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

.payment-form .form-field {
    min-width: 0;
}

.payment-form .form-field-full {
    grid-column: 1 / -1;
}

.payment-form .form-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-dark);
    font-size: 12px;
    font-weight: 800;
}

.payment-form .form-field input,
.payment-form .form-field select,
.payment-form .form-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: var(--color-dark);
    font: inherit;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.payment-form .form-field textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.55;
}

.payment-form .form-field input:focus,
.payment-form .form-field select:focus,
.payment-form .form-field textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 155, 40, 0.12);
    background: #fffdf7;
}

.payment-form .form-field input::placeholder,
.payment-form .form-field textarea::placeholder {
    color: #9aa4b2;
}

.payment-form .form-field small {
    display: block;
    margin-top: 7px;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.45;
}

/* ----------------------------------------------------------
   ALLOCATION NOTE
---------------------------------------------------------- */

.payment-allocation-note {
    margin-top: 24px;
    padding: 17px 18px;
    border: 1px solid #ead7a0;
    border-radius: 14px;
    background: #fffaf0;
}

.payment-allocation-note strong {
    display: block;
    color: #8a6200;
    font-size: 13px;
}

.payment-allocation-note p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.55;
}

/* ----------------------------------------------------------
   MODAL ACTIONS
---------------------------------------------------------- */

.payment-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border);
}

.payment-modal .modal-actions .button {
    min-width: 138px;
}

/* ----------------------------------------------------------
   MOBILE
---------------------------------------------------------- */

@media (max-width: 680px) {

    .payment-modal {
        width: min(100%, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
    }

    .payment-modal .modal-header {
        padding: 20px;
    }

    .payment-form {
        padding: 20px;
    }

    .payment-account-summary,
    .payment-form .form-grid {
        grid-template-columns: 1fr;
    }

    .payment-account-summary > div + div {
        border-top: 1px solid var(--color-border);
        border-left: 0;
    }

    .payment-modal .modal-actions {
        flex-direction: column-reverse;
    }

    .payment-modal .modal-actions .button {
        width: 100%;
    }
}


/* ==========================================================
   PAYMENT RECEIPT
   SAFETY SEARCH: APP-PAYMENT-RECEIPT
========================================================== */

.receipt-page {
    display: grid;
    gap: 22px;
}

.receipt-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.receipt-document {
    position: relative;
    width: min(100%, 900px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.receipt-watermark {
    position: absolute;
    top: 47%;
    left: 50%;
    z-index: 0;
    transform: translate(-50%, -50%) rotate(-18deg);
    color: rgba(22, 35, 58, 0.035);
    font-size: clamp(100px, 18vw, 190px);
    font-weight: 900;
    letter-spacing: 0.08em;
    pointer-events: none;
    user-select: none;
}

.receipt-document > *:not(.receipt-watermark) {
    position: relative;
    z-index: 1;
}

.receipt-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding: 34px;
    border-bottom: 1px solid var(--color-border);
}

.receipt-school-brand {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
}

.receipt-school-brand img {
    display: block;
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    object-fit: contain;
}

.receipt-school-copy {
    min-width: 0;
}

.receipt-document-type,
.receipt-number-block > span,
.receipt-information-grid span,
.receipt-payment-summary span,
.receipt-allocation-metrics span,
.receipt-balance-summary span,
.receipt-signature-block > span {
    display: block;
    margin-bottom: 6px;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.receipt-school-brand h1 {
    max-width: 490px;
    margin: 0;
    color: var(--color-dark);
    font-size: clamp(23px, 3vw, 32px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.receipt-school-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin-top: 9px;
}

.receipt-school-contact span {
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.45;
}

.receipt-number-block {
    min-width: 235px;
    text-align: right;
}

.receipt-number-block strong {
    display: block;
    color: var(--color-dark);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.receipt-number-block small {
    display: block;
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 11px;
}

.receipt-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 34px;
    border-bottom: 1px solid var(--color-border);
    background: #fbfcfe;
    color: var(--color-muted);
    font-size: 12px;
}

.receipt-status-row > span:last-child strong {
    color: var(--color-dark);
}

.receipt-information-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 28px 34px 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
}

.receipt-information-grid > div {
    min-width: 0;
    padding: 17px 18px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.receipt-information-grid > div:nth-child(3n) {
    border-right: 0;
}

.receipt-information-grid > div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.receipt-information-grid strong,
.receipt-payment-summary strong,
.receipt-balance-summary strong {
    color: var(--color-dark);
    font-size: 14px;
    line-height: 1.45;
}

.receipt-payment-summary {
    display: grid;
    grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 28px 34px;
}

.receipt-payment-summary > div {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fbfcfe;
}

.receipt-payment-summary .receipt-amount-card {
    border-color: #ead7a0;
    background: #fffaf0;
}

.receipt-payment-summary .receipt-amount-card strong {
    color: #9a6b00;
    font-size: 23px;
}

.receipt-section {
    margin: 0 34px 28px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
}

.receipt-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 19px 20px;
    border-bottom: 1px solid var(--color-border);
    background: #fbfcfe;
}

.receipt-section-heading span,
.receipt-account-position-heading span {
    color: #a56f00;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.receipt-section-heading h2,
.receipt-account-position-heading h2 {
    margin: 5px 0 0;
    color: var(--color-dark);
    font-size: 19px;
}

.receipt-section-heading > strong {
    color: var(--color-dark);
    font-size: 18px;
}

.receipt-allocation-card {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.receipt-allocation-card:last-child {
    border-bottom: 0;
}

.receipt-allocation-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.receipt-allocation-title > div {
    min-width: 0;
}

.receipt-allocation-title span {
    display: block;
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 11px;
}

.receipt-allocation-title > strong {
    color: #169b45;
    font-size: 18px;
    white-space: nowrap;
}

.receipt-allocation-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 17px;
}

.receipt-allocation-metrics > div {
    padding: 13px 14px;
    border-radius: 11px;
    background: #f6f8fc;
}

.receipt-allocation-metrics strong {
    color: var(--color-dark);
    font-size: 13px;
}

.receipt-account-position {
    padding: 0 34px 28px;
}

.receipt-account-position-heading {
    margin-bottom: 15px;
}

.receipt-balance-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
}

.receipt-balance-summary > div {
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #f6f8fc;
}

.receipt-balance-summary .receipt-paid-value {
    color: #16a34a;
    font-size: 20px;
}

.receipt-balance-summary .receipt-balance-value {
    color: #dc2626;
    font-size: 20px;
}

.receipt-note-copy {
    padding: 20px;
    color: var(--color-dark);
    font-size: 13px;
    line-height: 1.65;
}

.receipt-authorization {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin: 4px 34px 28px;
    padding: 26px;
    border-radius: 16px;
    background: #fbfcfe;
}

.receipt-signature-block {
    width: min(100%, 280px);
}

.receipt-signature-line {
    height: 35px;
    margin-bottom: 8px;
    border-bottom: 1px solid #9aa4b2;
}

.receipt-signature-block strong,
.receipt-signature-block small {
    display: block;
}

.receipt-signature-block strong {
    color: var(--color-dark);
    font-size: 14px;
}

.receipt-signature-block small {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 10px;
}

.receipt-thank-you {
    text-align: right;
}

.receipt-thank-you strong {
    color: var(--color-dark);
    font-size: 16px;
}

.receipt-thank-you p {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 11px;
}

.receipt-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 19px 34px;
    border-top: 1px solid var(--color-border);
    background: #fbfcfe;
}

.receipt-footer p {
    max-width: 600px;
    margin: 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.receipt-footer > span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}


/* ==========================================================
   RECEIPT EMAIL DELIVERY AUDIT
   SAFETY SEARCH: APP-RECEIPT-EMAIL-AUDIT
========================================================== */

.receipt-email-audit {
    margin: 26px 34px 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #ffffff;
}

.receipt-email-audit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.receipt-email-audit-heading > div > span {
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.receipt-email-audit-heading h2 {
    margin: 5px 0 0;
    font-size: 18px;
}

.receipt-email-audit-heading .status-badge {
    flex: 0 0 auto;
}

.receipt-email-audit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.receipt-email-audit-grid > div {
    min-width: 0;
    padding: 21px 22px;
    border-right: 1px solid var(--color-border);
}

.receipt-email-audit-grid > div:last-child {
    border-right: 0;
}

.receipt-email-audit-grid span,
.receipt-email-audit-grid strong {
    display: block;
}

.receipt-email-audit-grid span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.receipt-email-audit-grid strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.receipt-email-error {
    padding: 17px 22px;
    border-top: 1px solid #f2caca;
    background: #fff5f5;
    color: #a72b2b;
}

.receipt-email-error strong {
    display: block;
    font-size: 11px;
}

.receipt-email-error p {
    margin: 5px 0 0;
    font-size: 11px;
    line-height: 1.55;
}

@media (max-width: 760px) {

    .receipt-email-audit {
        margin-right: 20px;
        margin-left: 20px;
    }

    .receipt-email-audit-grid {
        grid-template-columns: 1fr;
    }

    .receipt-email-audit-grid > div {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .receipt-email-audit-grid > div:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 760px) {
}


/* ==========================================================
   GLOBAL MODAL STATE COMPATIBILITY
   SAFETY SEARCH: APP-MODAL-STATE-COMPATIBILITY
========================================================== */

body.modal-open,
body.has-open-modal {
    overflow: hidden;
}

.modal-backdrop.is-visible,
.modal-backdrop.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop.is-visible .modal-dialog,
.modal-backdrop.is-open .modal-dialog {
    transform: translateY(0) scale(1);
}

/* Prevent hidden modal backdrops from intercepting clicks. */
.modal-backdrop:not(.is-visible):not(.is-open) {
    pointer-events: none;
}

/* Standard disabled-button behaviour across all modules. */
.button:disabled,
.button[disabled],
.button.is-disabled {
    cursor: not-allowed;
    opacity: 0.48;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}


/* ----------------------------------------------------------
   PRINT
---------------------------------------------------------- */

@media print {

    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: #ffffff !important;
    }

    .sidebar,
    .no-print,
    .page-header,
    .app-footer {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .receipt-page {
        display: block;
    }

    .receipt-document {
        width: 100%;
        max-width: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .receipt-watermark {
        color: rgba(22, 35, 58, 0.03);
    }
}

/* ----------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------- */

@media (max-width: 760px) {

    .receipt-header,
    .receipt-authorization {
        align-items: flex-start;
        flex-direction: column;
    }

    .receipt-number-block,
    .receipt-thank-you {
        min-width: 0;
        text-align: left;
    }

    .receipt-information-grid,
    .receipt-balance-summary {
        grid-template-columns: 1fr;
    }

    .receipt-information-grid > div,
    .receipt-information-grid > div:nth-child(3n) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .receipt-information-grid > div:last-child {
        border-bottom: 0;
    }

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

    .receipt-allocation-metrics {
        grid-template-columns: 1fr;
    }

    .receipt-signature-block {
        width: 100%;
    }
}

@media (max-width: 520px) {

    .receipt-header,
    .receipt-status-row,
    .receipt-payment-summary,
    .receipt-account-position,
    .receipt-footer {
        padding-right: 20px;
        padding-left: 20px;
    }

    .receipt-information-grid,
    .receipt-section,
    .receipt-authorization {
        margin-right: 20px;
        margin-left: 20px;
    }

    .receipt-school-brand {
        align-items: flex-start;
    }

    .receipt-school-brand img {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .receipt-payment-summary {
        grid-template-columns: 1fr;
    }

    .receipt-status-row,
    .receipt-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* ==========================================================
   PAYMENTS DIRECTORY
   SAFETY SEARCH: APP-PAYMENTS-DIRECTORY
========================================================== */

.payments-page {
    display: grid;
    gap: 28px;
}

.payments-directory-card {
    overflow: hidden;
}

.payments-table {
    min-width: 1180px;
}

.payments-table th,
.payments-table td {
    vertical-align: middle;
}

.payments-table td:nth-child(1),
.payments-table td:nth-child(4),
.payments-table td:nth-child(5),
.payments-table td:nth-child(6),
.payments-table td:nth-child(7),
.payments-table td:nth-child(8),
.payments-table td:nth-child(9) {
    white-space: nowrap;
}

.payments-table td:nth-child(2) {
    min-width: 240px;
}

.payments-table td:nth-child(7) strong {
    color: var(--color-dark);
}

.receipt-link {
    color: #9a6b00;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.receipt-link:hover {
    color: #6f4d00;
    text-decoration: underline;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.button-small {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 11px;
}

@media (max-width: 760px) {

    .payments-page {
        gap: 20px;
    }

    .payments-page-header {
        align-items: flex-start;
    }

    .payments-page-header .page-actions {
        width: 100%;
    }

    .payments-page-header .page-actions .button {
        flex: 1 1 auto;
    }
}


/* ==========================================================
   PAYMENT ACCOUNT LOOKUP
   SAFETY SEARCH: APP-PAYMENT-ACCOUNT-LOOKUP
========================================================== */

/* ==========================================================
   PAYMENT ACCOUNT LOOKUP — HEIGHT AND SCROLL FIX
   SAFETY SEARCH: APP-PAYMENT-ACCOUNT-LOOKUP-SCROLL
========================================================== */

.payment-lookup-modal {
    display: flex;
    width: min(100%, 720px);
    max-height: calc(100vh - 48px);
    flex-direction: column;
    overflow: hidden;
}

.payment-lookup-modal .modal-header {
    flex: 0 0 auto;
}

.payment-lookup-body {
    display: flex;
    min-height: 0;
    padding: 24px 28px 28px;
    flex: 1 1 auto;
    flex-direction: column;
}

.payment-lookup-search {
    flex: 0 0 auto;
    margin-bottom: 20px;
}

.payment-account-list {
    display: grid;
    min-height: 0;
    overflow-y: auto;
    flex: 1 1 auto;
    gap: 12px;
    padding: 0 10px 24px 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd2dc transparent;
}

.payment-account-list::after {
    display: none;
}

.payment-account-list::-webkit-scrollbar {
    width: 8px;
}

.payment-account-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: transparent;
}

.payment-account-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd2dc;
}

.payment-account-list::-webkit-scrollbar-thumb:hover {
    background: #a56f00;
}

.payment-account-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* Hide filtered payment lookup results */
.payment-account-option[hidden] {
    display: none !important;
}

.payment-lookup-empty[hidden] {
    display: none !important;
}

.payment-account-option:hover {
    border-color: #d6b457;
    background: #fffdf7;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.payment-account-option-meta {
    flex: 0 0 auto;
    text-align: right;
}

.payment-account-option-meta span,
.payment-account-option-meta strong,
.payment-account-option-meta small {
    display: block;
}

.payment-account-option-meta span {
    margin-bottom: 5px;
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.payment-account-option-meta strong {
    color: #dc2626;
    font-size: 15px;
}

.payment-account-option-meta small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 10px;
}

.payment-lookup-empty {
    padding: 26px;
    border: 1px dashed var(--color-border);
    border-radius: 14px;
    color: var(--color-muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 620px) {

    .payment-lookup-modal {
        width: min(100%, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
    }

    .payment-lookup-body {
        padding: 20px;
    }

    .payment-account-option {
        align-items: flex-start;
        flex-direction: column;
    }

    .payment-account-option-meta {
        width: 100%;
        padding-top: 13px;
        border-top: 1px solid var(--color-border);
        text-align: left;
    }
}

/* ==========================================================
   SHARED DIRECTORY TOOLBAR
   Used by Students, Fees, Payments and Receipts
   SAFETY SEARCH: APP-SHARED-DIRECTORY-TOOLBAR
========================================================== */

.student-toolbar {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.student-toolbar-control {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.student-toolbar-control:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(199, 155, 40, 0.10);
}

.student-toolbar-control:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 155, 40, 0.12);
}

/* ==========================================================
   SHARED DIRECTORY SEARCH
========================================================== */

.student-search {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 76px;
    gap: 14px;
    padding: 0 20px;
    background: #ffffff;
}

.student-search .search-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--color-muted);
}

.student-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
}

.student-search input::placeholder {
    color: #98a2b3;
}

/* ==========================================================
   SHARED DIRECTORY FILTERS
========================================================== */

.student-filters {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(145px, 1fr);
    align-items: stretch;
    border-left: 1px solid var(--color-border);
}

.student-filter {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 12px 14px;
    border-right: 1px solid var(--color-border);
    background: #ffffff;
    transition: background-color 0.18s ease;
}

.student-filter:last-child {
    border-right: 0;
}

.student-filter:hover {
    background: #fbfcfe;
}

.student-filter:focus-within {
    background: #fffaf0;
}

.student-filter label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
}

.student-filter select {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 0 24px 0 0;
    border: 0;
    outline: 0;
    appearance: none;
    background-color: transparent;
    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            #667085 50%
        ),
        linear-gradient(
            135deg,
            #667085 50%,
            transparent 50%
        );
    background-position:
        calc(100% - 8px) 13px,
        calc(100% - 3px) 13px;
    background-repeat: no-repeat;
    background-size: 5px 5px;
    color: var(--color-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}

.student-filter select:focus {
    outline: 0;
}

.search-helper {
    display: block;
    margin-top: 9px;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

/* ==========================================================
   SHARED DIRECTORY TOOLBAR RESPONSIVE
========================================================== */

@media (max-width: 1180px) {

    .student-toolbar-control {
        grid-template-columns: 1fr;
    }

    .student-search {
        min-height: 60px;
        border-bottom: 1px solid var(--color-border);
    }

    .student-filters {
        grid-auto-flow: row;
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
        border-left: 0;
    }

    .student-filter:nth-child(2n) {
        border-right: 0;
    }

    .student-filter:nth-child(n + 3) {
        border-top: 1px solid var(--color-border);
    }
}

@media (max-width: 560px) {

    .student-toolbar {
        padding: 16px;
    }

    .student-filters {
        grid-template-columns: 1fr;
    }

    .student-filter,
    .student-filter:nth-child(2n) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .student-filter:nth-child(n + 3) {
        border-top: 0;
    }

    .student-filter:last-child {
        border-bottom: 0;
    }
}


/* ==========================================================
   RECEIPTS DIRECTORY
   SAFETY SEARCH: APP-RECEIPTS-DIRECTORY
========================================================== */

.receipts-page {
    display: grid;
    gap: 28px;
}

.receipts-directory-card {
    overflow: hidden;
}

.receipts-directory-card .table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.receipts-table {
    width: 100%;
    min-width: 1380px;
    table-layout: auto;
}

.receipts-table th,
.receipts-table td {
    padding: 16px 14px;
    vertical-align: middle;
}

.receipts-table tbody tr[hidden] {
    display: none !important;
}

.receipts-table td:nth-child(1) {
    min-width: 220px;
    white-space: nowrap;
}

.receipts-table td:nth-child(2) {
    min-width: 235px;
}

.receipts-table td:nth-child(3) {
    min-width: 110px;
    white-space: nowrap;
}

.receipts-table td:nth-child(4) {
    min-width: 130px;
    white-space: nowrap;
}

.receipts-table td:nth-child(5) {
    min-width: 120px;
    white-space: nowrap;
}

.receipts-table td:nth-child(6) {
    min-width: 175px;
}

.receipts-table td:nth-child(7) {
    min-width: 145px;
    white-space: nowrap;
}

.receipts-table td:nth-child(8) {
    min-width: 125px;
    white-space: nowrap;
}

.receipts-table td:nth-child(9) {
    min-width: 100px;
    white-space: nowrap;
}

.receipts-table td:nth-child(10) {
    min-width: 220px;
    white-space: nowrap;
}

.receipts-table .table-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
}

.receipt-link {
    color: #a56f00;
    font-weight: 800;
    text-decoration: none;
}

.receipt-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.directory-filter-empty {
    padding: 34px 24px;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 13px;
    text-align: center;
}

.directory-filter-empty[hidden] {
    display: none !important;
}


/* ==========================================================
   REPORTS MODULE
   SAFETY SEARCH: APP-REPORTS-MODULE
========================================================== */

.reports-page {
    display: grid;
    min-width: 0;
    gap: 28px;
}

.reports-page-header {
    align-items: flex-start;
}

.reports-page-header .page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================
   REPORT KPI CARDS
========================================================== */

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

.reports-statistics .stat-card {
    display: flex;
    min-width: 0;
    min-height: 154px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding: 22px 20px;
}

.reports-statistics .stat-label {
    display: block;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reports-statistics .stat-value {
    display: block;
    width: 100%;
    margin-top: 10px;
    overflow: hidden;
    color: var(--color-text);
    font-size: clamp(22px, 2vw, 34px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reports-statistics .stat-success { color: #16a34a; }
.reports-statistics .stat-danger { color: #dc2626; }
.reports-statistics .stat-info { color: #2563eb; }

.reports-statistics .finance-stat-note {
    display: block;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.45;
}

/* ==========================================================
   REPORT FILTER CARD
========================================================== */

.reports-filter-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
}

.reports-filter-card .card-heading {
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
}

.reports-filter-form { padding: 24px; }

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

.reports-filter-form .form-field {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.reports-filter-form .form-field label {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.reports-filter-form .form-field select,
.reports-filter-form .form-field input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: none;
    background-color: #ffffff;
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.reports-filter-form .form-field select {
    appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, #667085 50%),
        linear-gradient(135deg, #667085 50%, transparent 50%);
    background-position:
        calc(100% - 19px) 21px,
        calc(100% - 14px) 21px;
    background-repeat: no-repeat;
    background-size: 5px 5px;
}

.reports-filter-form .form-field select:hover,
.reports-filter-form .form-field input:hover {
    border-color: var(--color-primary);
}

.reports-filter-form .form-field select:focus,
.reports-filter-form .form-field input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 155, 40, 0.12);
}

.reports-filter-form input[type="date"] { color-scheme: light; }

.reports-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.reports-filter-actions .button { min-width: 116px; }

/* ==========================================================
   REPORT SELECTOR
========================================================== */

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

.report-selector-card {
    display: flex;
    min-width: 0;
    min-height: 132px;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    outline: none;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.report-selector-card:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #d6b354;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.report-selector-card:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 155, 40, 0.14);
}

.report-selector-card.is-active {
    border-color: var(--color-primary);
    background: #fffaf0;
    box-shadow:
        0 0 0 1px rgba(199, 155, 40, 0.12),
        0 12px 28px rgba(199, 155, 40, 0.08);
}

.report-selector-card:disabled {
    cursor: default;
    opacity: 1;
}

.report-selector-card span {
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-selector-card strong {
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.35;
}

.report-selector-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.55;
}

/* ==========================================================
   REPORT WORKSPACE
========================================================== */

.reports-workspace {
    position: relative;
    overflow: visible;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
}

.reports-workspace .card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 18px 18px 0 0;
    background: #ffffff;
}

.reports-workspace .card-heading h2 { margin: 5px 0 0; }

.reports-workspace .status-badge,
.reports-workspace .student-count { flex: 0 0 auto; }

/* ==========================================================
   COLLECTIONS SUMMARY
========================================================== */

.reports-page .collections-summary-grid {
    position: sticky;
    top: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.reports-page .collections-summary-grid > div {
    min-width: 0;
    padding: 20px 22px;
    border-right: 1px solid var(--color-border);
}

.reports-page .collections-summary-grid > div:last-child { border-right: 0; }

.reports-page .collections-summary-grid span,
.reports-page .collections-summary-grid strong { display: block; }

.reports-page .collections-summary-grid span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.reports-page .collections-summary-grid strong {
    margin-top: 8px;
    overflow: hidden;
    color: var(--color-text);
    font-size: clamp(20px, 1.7vw, 27px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================
   COLLECTIONS SEARCH
========================================================== */

.reports-page .collections-toolbar {
    display: block;
    width: 100%;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.reports-page .collections-search-box {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    gap: 13px;
    padding: 0 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #ffffff;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.reports-page .collections-search-box:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 22px rgba(199, 155, 40, 0.10);
}

.reports-page .collections-search-box:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 155, 40, 0.12);
}

.reports-page .collections-search-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--color-muted);
}

.reports-page .collections-search-box input {
    width: 100%;
    min-width: 0;
    height: 54px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
}

.reports-page .collections-search-box input::placeholder { color: #98a2b3; }

.reports-page .collections-search-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 10px;
}

.reports-page .collections-search-footer small {
    min-width: 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

.reports-page .collections-search-footer strong {
    flex: 0 0 auto;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

/* ==========================================================
   COLLECTIONS TABLE
========================================================== */

.reports-page .reports-workspace .table-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 0 0 18px 18px;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #aeb7c4 transparent;
}

.reports-page .reports-workspace .table-wrap::-webkit-scrollbar { height: 10px; }
.reports-page .reports-workspace .table-wrap::-webkit-scrollbar-track { background: transparent; }

.reports-page .reports-workspace .table-wrap::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #aeb7c4;
    background-clip: padding-box;
}

.reports-page .collections-report-table {
    width: 100%;
    min-width: 1640px;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.reports-page .collections-report-table th,
.reports-page .collections-report-table td {
    padding: 16px 14px;
    vertical-align: middle;
    background: #ffffff;
}

.reports-page .collections-report-table thead th { background: #f8fafc; }
.reports-page .collections-report-table tbody tr[hidden] { display: none !important; }

.reports-page .collections-report-table td:nth-child(1) { min-width: 125px; white-space: nowrap; }
.reports-page .collections-report-table td:nth-child(2) { min-width: 220px; white-space: nowrap; }
.reports-page .collections-report-table td:nth-child(3) { min-width: 210px; }
.reports-page .collections-report-table td:nth-child(4) { min-width: 110px; white-space: nowrap; }
.reports-page .collections-report-table td:nth-child(5) { min-width: 200px; }
.reports-page .collections-report-table td:nth-child(6) { min-width: 130px; white-space: nowrap; }
.reports-page .collections-report-table td:nth-child(7) { min-width: 170px; }
.reports-page .collections-report-table td:nth-child(8) { min-width: 145px; white-space: nowrap; }
.reports-page .collections-report-table td:nth-child(9) { min-width: 135px; white-space: nowrap; }
.reports-page .collections-report-table td:nth-child(10) { min-width: 140px; white-space: nowrap; }
.reports-page .collections-report-table td:nth-child(11) { min-width: 190px; white-space: nowrap; }

.reports-page .collections-report-table .table-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
}

.reports-page .collections-report-table .collection-amount {
    display: inline-block;
    color: #168447;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.015em;
    white-space: nowrap;
}

/* ==========================================================
   FROZEN DATE AND RECEIPT COLUMNS
========================================================== */

.reports-page .collections-report-table th:nth-child(1),
.reports-page .collections-report-table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 8;
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    background: #ffffff;
}

.reports-page .collections-report-table th:nth-child(2),
.reports-page .collections-report-table td:nth-child(2) {
    position: sticky;
    left: 125px;
    z-index: 7;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    border-right: 1px solid var(--color-border);
    background: #ffffff;
    box-shadow: 8px 0 14px rgba(15, 23, 42, 0.05);
}

.reports-page .collections-report-table thead th:nth-child(1),
.reports-page .collections-report-table thead th:nth-child(2) {
    z-index: 12;
    background: #f8fafc;
}

.reports-page .collections-report-table tbody tr:hover td,
.reports-page .collections-report-table tbody tr:hover td:nth-child(1),
.reports-page .collections-report-table tbody tr:hover td:nth-child(2) {
    background: #fafbfc;
}

/* ==========================================================
   REPORT PLACEHOLDER / EMPTY STATE
========================================================== */

.reports-workspace-placeholder {
    display: flex;
    min-height: 280px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 46px 24px;
    text-align: center;
}

.reports-workspace-placeholder .empty-state-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 16px;
    background: #fff7e3;
    color: #a56f00;
    font-size: 12px;
    font-weight: 800;
}

.reports-workspace-placeholder h3 {
    margin: 18px 0 0;
    color: var(--color-text);
    font-size: 19px;
}

.reports-workspace-placeholder p {
    max-width: 540px;
    margin: 9px auto 0;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.65;
}

/* ==========================================================
   REPORTS RESPONSIVE — DESKTOP
========================================================== */

@media (max-width: 1180px) {
    .reports-statistics,
    .reports-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .reports-statistics .stat-value {
        font-size: clamp(26px, 4vw, 36px);
    }
}

/* ==========================================================
   REPORTS RESPONSIVE — TABLET
========================================================== */

@media (max-width: 900px) {
    .reports-page .collections-summary-grid {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        box-shadow: none;
    }

    .reports-page .collections-summary-grid > div:nth-child(2) {
        border-right: 0;
    }

    .reports-page .collections-summary-grid > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--color-border);
    }
}

@media (max-width: 760px) {
    .reports-page { gap: 20px; }

    .reports-page-header {
        display: grid;
        gap: 16px;
    }

    .reports-page-header .page-actions { width: 100%; }
    .reports-page-header .page-actions .button { width: 100%; }
    .reports-filter-form { padding: 18px; }
    .reports-workspace .card-heading { align-items: flex-start; }
}

/* ==========================================================
   REPORTS RESPONSIVE — MOBILE
========================================================== */

@media (max-width: 620px) {
    .reports-statistics,
    .reports-selector,
    .reports-filter-grid,
    .reports-page .collections-summary-grid {
        grid-template-columns: 1fr;
    }

    .reports-statistics .stat-card { min-height: 132px; }

    .reports-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .reports-filter-actions .button {
        width: 100%;
        min-width: 0;
    }

    .report-selector-card { min-height: auto; }

    .reports-page .collections-summary-grid > div,
    .reports-page .collections-summary-grid > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .reports-page .collections-summary-grid > div:last-child {
        border-bottom: 0;
    }

    .reports-page .collections-toolbar { padding: 16px; }

    .reports-page .collections-search-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .reports-page .collections-report-table th:nth-child(1),
    .reports-page .collections-report-table td:nth-child(1),
    .reports-page .collections-report-table th:nth-child(2),
    .reports-page .collections-report-table td:nth-child(2) {
        position: static;
        box-shadow: none;
    }
}



/* ==========================================================
   OUTSTANDING BALANCES REPORT
   SAFETY SEARCH: APP-OUTSTANDING-BALANCES-REPORT
========================================================== */

.report-selector-card {
    text-decoration: none;
}

.outstanding-report-table {
    width: 100%;
    min-width: 1520px;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.outstanding-report-table th,
.outstanding-report-table td {
    padding: 16px 14px;
    vertical-align: middle;
    background: #ffffff;
}

.outstanding-report-table thead th {
    background: #f8fafc;
}

.outstanding-report-table tbody tr[hidden] {
    display: none !important;
}

.outstanding-report-table td:nth-child(1) {
    min-width: 220px;
}

.outstanding-report-table td:nth-child(2) {
    min-width: 120px;
    white-space: nowrap;
}

.outstanding-report-table td:nth-child(3) {
    min-width: 170px;
}

.outstanding-report-table td:nth-child(4) {
    min-width: 180px;
    white-space: nowrap;
}

.outstanding-report-table td:nth-child(5),
.outstanding-report-table td:nth-child(6),
.outstanding-report-table td:nth-child(7) {
    min-width: 145px;
    white-space: nowrap;
}

.outstanding-report-table td:nth-child(8) {
    min-width: 190px;
}

.outstanding-report-table td:nth-child(9) {
    min-width: 145px;
    white-space: nowrap;
}

.outstanding-report-table td:nth-child(10) {
    min-width: 110px;
    white-space: nowrap;
}

.outstanding-report-table .outstanding-amount {
    display: inline-block;
    color: #dc2626;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.015em;
    white-space: nowrap;
}

.outstanding-report-table tbody tr:hover td {
    background: #fafbfc;
}


/* ==========================================================
   STUDENT STATEMENT REPORT
   SAFETY SEARCH: APP-STUDENT-STATEMENT-REPORT
========================================================== */

.statement-report-workspace {
    overflow: visible;
}

/* ==========================================================
   STATEMENT ACCOUNT SELECTOR
========================================================== */

.statement-selector-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.statement-selector-field {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.statement-selector-field label {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.statement-selector-field select {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 42px 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: 0;
    appearance: none;
    background-color: #ffffff;
    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            #667085 50%
        ),
        linear-gradient(
            135deg,
            #667085 50%,
            transparent 50%
        );
    background-position:
        calc(100% - 19px) 21px,
        calc(100% - 14px) 21px;
    background-repeat: no-repeat;
    background-size: 5px 5px;
    color: var(--color-text);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.statement-selector-field select:hover {
    border-color: var(--color-primary);
}

.statement-selector-field select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 155, 40, 0.12);
}

/* ==========================================================
   STATEMENT STUDENT PROFILE
========================================================== */

.statement-profile {
    display: grid;
    grid-template-columns:
        minmax(240px, 1.4fr)
        repeat(3, minmax(150px, 1fr));
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.statement-profile > div {
    min-width: 0;
    padding: 20px 22px;
    border-right: 1px solid var(--color-border);
}

.statement-profile > div:last-child {
    border-right: 0;
}

.statement-profile span,
.statement-profile strong,
.statement-profile small {
    display: block;
}

.statement-profile span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.statement-profile h3 {
    margin: 7px 0 0;
    color: var(--color-text);
    font-size: 20px;
    line-height: 1.3;
}

.statement-profile p {
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: 12px;
}

.statement-profile strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.statement-profile small {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 11px;
}

/* ==========================================================
   STATEMENT TABLE
========================================================== */

.statement-report-workspace .table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #aeb7c4 transparent;
}

.student-statement-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: separate;
    border-spacing: 0;
}

.student-statement-table th,
.student-statement-table td {
    padding: 16px 14px;
    vertical-align: middle;
}

.student-statement-table th:nth-child(1),
.student-statement-table td:nth-child(1) {
    min-width: 130px;
    white-space: nowrap;
}

.student-statement-table th:nth-child(2),
.student-statement-table td:nth-child(2) {
    min-width: 260px;
}

.student-statement-table th:nth-child(3),
.student-statement-table td:nth-child(3) {
    min-width: 180px;
    white-space: nowrap;
}

.student-statement-table th:nth-child(4),
.student-statement-table td:nth-child(4),
.student-statement-table th:nth-child(5),
.student-statement-table td:nth-child(5),
.student-statement-table th:nth-child(6),
.student-statement-table td:nth-child(6) {
    min-width: 135px;
    white-space: nowrap;
}

.student-statement-table th:nth-child(7),
.student-statement-table td:nth-child(7) {
    min-width: 110px;
    white-space: nowrap;
}

.statement-credit {
    color: #168447;
    font-weight: 800;
}

.statement-balance-due {
    color: #c62828 !important;
}

.statement-balance-clear {
    color: #168447 !important;
}

/* ==========================================================
   STATEMENT ACTIONS
========================================================== */

.statement-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
    background: #fafbfc;
}

/* ==========================================================
   STATEMENT PRINT
========================================================== */

@media print {

    .sidebar,
    .topbar,
    .reports-page-header,
    .reports-statistics,
    .reports-filter-card,
    .reports-selector,
    .statement-selector-form,
    .statement-actions {
        display: none !important;
    }

    .reports-page,
    .reports-workspace {
        display: block;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .statement-report-workspace .card-heading {
        border: 0;
        padding: 0 0 18px;
    }

    .statement-profile {
        break-inside: avoid;
    }

    .student-statement-table {
        min-width: 0;
        font-size: 10px;
    }

    .statement-report-workspace .table-wrap {
        overflow: visible;
    }

    .student-statement-table th,
    .student-statement-table td {
        padding: 8px 7px;
    }
}

/* ==========================================================
   STATEMENT RESPONSIVE
========================================================== */

@media (max-width: 980px) {

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

    .statement-profile > div:nth-child(2) {
        border-right: 0;
    }

    .statement-profile > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--color-border);
    }
}

@media (max-width: 680px) {

    .statement-selector-form {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .statement-selector-form .button {
        width: 100%;
    }

    .statement-profile {
        grid-template-columns: 1fr;
    }

    .statement-profile > div,
    .statement-profile > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

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

    .statement-actions {
        display: grid;
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .statement-actions .button {
        width: 100%;
    }
}



/* ==========================================================
   FEE PERFORMANCE REPORT
   SAFETY SEARCH: APP-FEE-PERFORMANCE-REPORT
========================================================== */

.fee-performance-workspace {
    overflow: visible;
}

.fee-performance-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
}

.fee-performance-table th,
.fee-performance-table td {
    padding: 16px 14px;
    vertical-align: middle;
}

.fee-performance-table th:nth-child(1),
.fee-performance-table td:nth-child(1) {
    min-width: 220px;
}

.fee-performance-table th:nth-child(2),
.fee-performance-table td:nth-child(2) {
    min-width: 95px;
    white-space: nowrap;
}

.fee-performance-table th:nth-child(3),
.fee-performance-table td:nth-child(3),
.fee-performance-table th:nth-child(4),
.fee-performance-table td:nth-child(4),
.fee-performance-table th:nth-child(5),
.fee-performance-table td:nth-child(5) {
    min-width: 145px;
    white-space: nowrap;
}

.fee-performance-table th:nth-child(6),
.fee-performance-table td:nth-child(6) {
    min-width: 180px;
}

.fee-performance-table th:nth-child(7),
.fee-performance-table td:nth-child(7) {
    min-width: 145px;
    white-space: nowrap;
}

.performance-collected {
    color: #168447 !important;
    font-weight: 800;
}

.performance-outstanding {
    color: #c62828 !important;
    font-weight: 800;
}

.performance-rate-cell {
    display: grid;
    gap: 8px;
}

.performance-rate-cell > strong {
    font-size: 13px;
}

.performance-rate-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf1f5;
}

.performance-rate-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
}

@media (max-width: 680px) {

    .fee-performance-table {
        min-width: 980px;
    }
}



/* ==========================================================
   SETTINGS MODULE
   SAFETY SEARCH: APP-SETTINGS-MODULE
========================================================== */

.settings-page {
    display: grid;
    min-width: 0;
    gap: 28px;
}

.settings-page-header {
    align-items: flex-start;
}

/* ==========================================================
   SETTINGS NAVIGATION
========================================================== */

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

.settings-navigation-item {
    display: flex;
    min-width: 0;
    min-height: 116px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--color-text);
    text-decoration: none;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.settings-navigation-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.settings-navigation-item.is-active {
    border-color: var(--color-primary);
    background: #fffaf0;
    box-shadow: 0 0 0 3px rgba(199, 155, 40, 0.10);
}

.settings-navigation-item span {
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-navigation-item strong {
    font-size: 15px;
    line-height: 1.35;
}

.settings-navigation-item small {
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.5;
}

/* ==========================================================
   SETTINGS WORKSPACE
========================================================== */

.settings-workspace {
    overflow: hidden;
}

.settings-workspace .card-heading {
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
}

.settings-placeholder {
    display: flex;
    min-height: 300px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.settings-placeholder h3 {
    margin: 18px 0 0;
    font-size: 19px;
}

.settings-placeholder p {
    max-width: 560px;
    margin: 8px auto 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.65;
}

/* ==========================================================
   SYSTEM INFORMATION
========================================================== */

.settings-system-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-system-grid > div {
    min-width: 0;
    padding: 24px;
    border-right: 1px solid var(--color-border);
}

.settings-system-grid > div:last-child {
    border-right: 0;
}

.settings-system-grid span,
.settings-system-grid strong {
    display: block;
}

.settings-system-grid span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-system-grid strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    font-size: 15px;
}

/* ==========================================================
   SETTINGS RESPONSIVE
========================================================== */

@media (max-width: 1000px) {

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

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

    .settings-system-grid > div:nth-child(2) {
        border-right: 0;
    }

    .settings-system-grid > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--color-border);
    }
}

@media (max-width: 620px) {

    .settings-page {
        gap: 20px;
    }

    .settings-navigation,
    .settings-system-grid {
        grid-template-columns: 1fr;
    }

    .settings-system-grid > div,
    .settings-system-grid > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .settings-system-grid > div:last-child {
        border-bottom: 0;
    }
}



/* ==========================================================
   APPLICATION FOOTER
   SAFETY SEARCH: APP-FOOTER
========================================================== */

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 36px;
    padding: 20px 4px 4px;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
}

.app-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-footer-brand strong {
    color: var(--color-text);
    font-size: 12px;
}

.app-footer-brand span,
.app-footer p {
    margin: 0;
    font-size: 10px;
}

@media (max-width: 620px) {

    .app-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}



/* ==========================================================
   SETTINGS USERS
   SAFETY SEARCH: APP-SETTINGS-USERS
========================================================== */

.settings-users-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.settings-alert {
    margin: 20px 24px 0;
}

.settings-user-statistics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--color-border);
}

.settings-user-statistics article {
    min-width: 0;
    padding: 22px 24px;
    border-right: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-user-statistics article:last-child {
    border-right: 0;
}

.settings-user-statistics span,
.settings-user-statistics strong,
.settings-user-statistics small {
    display: block;
}

.settings-user-statistics span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-user-statistics strong {
    margin-top: 9px;
    overflow: hidden;
    color: var(--color-text);
    font-size: clamp(25px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-user-statistics small {
    margin-top: 9px;
    color: var(--color-muted);
    font-size: 11px;
}

.settings-user-statistics .settings-last-login {
    font-size: clamp(18px, 1.6vw, 24px);
}

.settings-stat-success {
    color: #168447 !important;
}

.settings-stat-info {
    color: #2563eb !important;
}

.settings-users-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px 180px;
    gap: 12px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-user-search {
    display: flex;
    min-width: 0;
    height: 50px;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #ffffff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-user-search:hover {
    border-color: var(--color-primary);
}

.settings-user-search:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 155, 40, 0.12);
}

.settings-user-search > span {
    color: var(--color-muted);
    font-size: 20px;
    line-height: 1;
}

.settings-user-search input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
}

.settings-users-toolbar select {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 40px 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: 0;
    appearance: none;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #667085 50%),
        linear-gradient(135deg, #667085 50%, transparent 50%);
    background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px;
    background-repeat: no-repeat;
    background-size: 5px 5px;
    color: var(--color-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
}

.settings-directory-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.settings-directory-heading h3 {
    margin: 5px 0 0;
    font-size: 17px;
}

.settings-directory-heading > strong {
    color: var(--color-muted);
    font-size: 10px;
    white-space: nowrap;
}

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

.settings-users-table {
    width: 100%;
    min-width: 1080px;
}

.settings-users-table th,
.settings-users-table td {
    vertical-align: middle;
}

.settings-users-table td:nth-child(1) { min-width: 290px; }
.settings-users-table td:nth-child(2) { min-width: 175px; }
.settings-users-table td:nth-child(3),
.settings-users-table td:nth-child(4),
.settings-users-table td:nth-child(5),
.settings-users-table td:nth-child(6) { white-space: nowrap; }

.settings-user-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-user-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: #fff5d6;
    color: #9a6800;
    font-size: 15px;
    font-weight: 800;
}

.settings-user-identity strong,
.settings-user-identity span,
.settings-user-identity small {
    display: block;
}

.settings-user-identity span {
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 11px;
}

.settings-user-identity small {
    margin-top: 4px;
    color: var(--color-primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.settings-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2f8;
    color: #344054;
    font-size: 10px;
    font-weight: 800;
}

.settings-never-login,
.settings-protected-account {
    color: var(--color-muted);
    font-size: 11px;
}

.settings-users-table tr[hidden] {
    display: none !important;
}

body.has-settings-modal {
    overflow: hidden;
}

.settings-user-modal[hidden] {
    display: none !important;
}

.settings-user-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.settings-user-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 35, 0.54);
    backdrop-filter: blur(3px);
}

.settings-user-modal-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(560px, 100%);
    height: 100%;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: -24px 0 60px rgba(10, 20, 35, 0.18);
}

.settings-user-modal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px;
    border-bottom: 1px solid var(--color-border);
}

.settings-user-modal-heading h2 {
    margin: 6px 0 0;
}

.settings-user-modal-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: #ffffff;
    color: var(--color-text);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.settings-user-form {
    display: grid;
    gap: 18px;
    padding: 28px;
}

.settings-user-form .form-field {
    display: grid;
    gap: 8px;
}

.settings-user-form .form-field label {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-user-form .form-field input,
.settings-user-form .form-field select {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: 0;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
}

.settings-user-form .form-field input:focus,
.settings-user-form .form-field select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(199, 155, 40, 0.12);
}

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

.settings-user-status-control {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    cursor: pointer;
    font-size: 12px;
}

.settings-user-status-control input {
    width: 17px;
    height: 17px;
    accent-color: var(--color-primary);
}

.settings-user-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 1050px) {
    .settings-user-statistics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settings-user-statistics article:nth-child(2) { border-right: 0; }
    .settings-user-statistics article:nth-child(-n + 2) { border-bottom: 1px solid var(--color-border); }
    .settings-users-toolbar { grid-template-columns: 1fr 1fr; }
    .settings-user-search { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .settings-users-heading { align-items: flex-start; flex-direction: column; }
    .settings-users-heading .button { width: 100%; }
    .settings-user-statistics { grid-template-columns: 1fr; }
    .settings-user-statistics article,
    .settings-user-statistics article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--color-border); }
    .settings-user-statistics article:last-child { border-bottom: 0; }
    .settings-users-toolbar { grid-template-columns: 1fr; padding: 18px; }
    .settings-user-search { grid-column: auto; }
    .settings-directory-heading { align-items: flex-start; flex-direction: column; gap: 8px; padding: 18px; }
    .settings-alert { margin: 18px 18px 0; }
    .settings-user-modal-heading,
    .settings-user-form { padding: 22px 18px; }
    .settings-user-password-grid { grid-template-columns: 1fr; }
    .settings-user-form-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .settings-user-form-actions .button { width: 100%; }
}



/* ==========================================================
   ACCESS DENIED
   SAFETY SEARCH: APP-ACCESS-DENIED
========================================================== */

.access-denied-page {
    display: grid;
    min-height: calc(100vh - 100px);
    place-items: center;
    padding: 40px 0;
}

.access-denied-card {
    width: min(680px, 100%);
    padding: 52px 38px;
    text-align: center;
}

.access-denied-icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    place-items: center;
    border-radius: 20px;
    background: #fff4dd;
    color: #9a6800;
    font-size: 20px;
    font-weight: 800;
}

.access-denied-card h1 {
    max-width: 540px;
    margin: 12px auto 0;
    font-size: clamp(25px, 4vw, 38px);
    line-height: 1.15;
}

.access-denied-card p {
    max-width: 560px;
    margin: 16px auto 26px;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.7;
}


/* ==========================================================
   SETTINGS — ROLES & PERMISSIONS
   SAFETY SEARCH: APP-SETTINGS-ROLES
========================================================== */

.settings-roles-workspace {
    overflow: hidden;
}

.settings-roles-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ==========================================================
   ROLE STATISTICS
========================================================== */

.settings-role-statistics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--color-border);
}

.settings-role-statistics article {
    min-width: 0;
    padding: 22px 24px;
    border-right: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-role-statistics article:last-child {
    border-right: 0;
}

.settings-role-statistics span,
.settings-role-statistics strong,
.settings-role-statistics small {
    display: block;
}

.settings-role-statistics span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-role-statistics strong {
    margin-top: 9px;
    overflow: hidden;
    color: var(--color-text);
    font-size: clamp(25px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-role-statistics small {
    margin-top: 9px;
    color: var(--color-muted);
    font-size: 11px;
}

.settings-role-statistics .settings-policy-source {
    font-size: clamp(17px, 1.5vw, 22px);
}

/* ==========================================================
   ROLE NOTICE
========================================================== */

.settings-role-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fffaf0;
}

.settings-role-notice strong,
.settings-role-notice p {
    display: block;
}

.settings-role-notice strong {
    color: var(--color-text);
    font-size: 13px;
}

.settings-role-notice p {
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.55;
}

.settings-role-notice > span {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(199, 155, 40, 0.24);
    border-radius: 999px;
    background: #ffffff;
    color: #8a6200;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ==========================================================
   PERMISSION MATRIX
========================================================== */

.settings-role-matrix-wrap {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #aeb7c4 transparent;
}

.settings-role-matrix {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
}

.settings-role-matrix th,
.settings-role-matrix td {
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.settings-role-matrix tr > *:last-child {
    border-right: 0;
}

.settings-role-matrix thead th {
    padding: 18px 16px;
    background: #f8fafc;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    vertical-align: bottom;
}

.settings-role-matrix thead .settings-role-permission-column {
    width: 40%;
    min-width: 390px;
    text-align: left;
}

.settings-role-column-title {
    display: block;
    color: var(--color-text);
    font-size: 11px;
    line-height: 1.35;
}

.settings-role-matrix thead small {
    display: block;
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.settings-role-group-row th {
    padding: 11px 16px;
    background: #eef2f7;
    color: #344054;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
}

.settings-role-permission-cell {
    padding: 17px 18px;
    background: #ffffff;
}

.settings-role-permission-cell strong,
.settings-role-permission-cell span,
.settings-role-permission-cell code {
    display: block;
}

.settings-role-permission-cell strong {
    color: var(--color-text);
    font-size: 13px;
}

.settings-role-permission-cell span {
    max-width: 560px;
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.5;
}

.settings-role-permission-cell code {
    width: fit-content;
    margin-top: 8px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #f4f6f8;
    color: #475467;
    font-size: 9px;
}

.settings-role-access-cell {
    min-width: 155px;
    padding: 16px;
    background: #ffffff;
    text-align: center;
    vertical-align: middle;
}

.settings-permission-indicator {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
}

.settings-permission-indicator.is-allowed {
    background: #e8f7ee;
    color: #168447;
}

.settings-permission-indicator.is-denied {
    background: #f2f4f7;
    color: #98a2b3;
}

.settings-role-matrix tbody tr:not(.settings-role-group-row):hover td {
    background: #fafbfc;
}

/* ==========================================================
   MATRIX FOOTER
========================================================== */

.settings-role-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    background: #fafbfc;
}

.settings-role-footer p,
.settings-role-footer span {
    margin: 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.settings-role-footer span {
    text-align: right;
}

.settings-role-footer code {
    color: var(--color-text);
    font-size: 9px;
}

/* ==========================================================
   ROLES RESPONSIVE
========================================================== */

@media (max-width: 1050px) {

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

    .settings-role-statistics article:nth-child(2) {
        border-right: 0;
    }

    .settings-role-statistics article:nth-child(-n + 2) {
        border-bottom: 1px solid var(--color-border);
    }
}

@media (max-width: 680px) {

    .settings-role-statistics {
        grid-template-columns: 1fr;
    }

    .settings-role-statistics article,
    .settings-role-statistics article:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .settings-role-statistics article:last-child {
        border-bottom: 0;
    }

    .settings-role-notice,
    .settings-role-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 18px;
    }

    .settings-role-footer span {
        text-align: left;
    }
}


/* ==========================================================
   PERMISSIONS MATRIX — FROZEN PERMISSION COLUMN
   SAFETY SEARCH: APP-ROLES-FROZEN-PERMISSION-COLUMN
========================================================== */

.settings-role-matrix-wrap {
    position: relative;
    overflow-x: auto;
}

/* Freeze the Permission heading */

.settings-role-matrix thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 30;
    background: #f8fafc;
    box-shadow: 8px 0 14px rgba(15, 23, 42, 0.06);
}

/* Freeze each permission description cell */

.settings-role-matrix tbody
tr:not(.settings-role-group-row)
td:first-child {
    position: sticky;
    left: 0;
    z-index: 20;
    background: #ffffff;
    box-shadow: 8px 0 14px rgba(15, 23, 42, 0.06);
}

/* Preserve the hover state on the frozen column */

.settings-role-matrix tbody
tr:not(.settings-role-group-row):hover
td:first-child {
    background: #fafbfc;
}

/* Keep module group headings above the table content */

.settings-role-group-row th {
    position: sticky;
    left: 0;
    z-index: 25;
}


/* ==========================================================
   SETTINGS — SCHOOL INFORMATION
   SAFETY SEARCH: APP-SETTINGS-SCHOOL
========================================================== */

.settings-school-workspace {
    overflow: hidden;
}

.settings-school-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ==========================================================
   SCHOOL IDENTITY
========================================================== */

.settings-school-identity {
    display: grid;
    grid-template-columns:
        150px
        minmax(0, 1fr)
        minmax(220px, 0.8fr);
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-school-identity > div {
    min-width: 0;
    padding: 24px;
    border-right: 1px solid var(--color-border);
}

.settings-school-identity > div:last-child {
    border-right: 0;
}

.settings-school-logo-frame {
    display: grid;
    width: 96px;
    height: 96px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #f8fafc;
}

.settings-school-logo-frame img {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.settings-school-logo-frame span {
    color: var(--color-text);
    font-size: 16px;
    font-weight: 800;
}

.settings-school-title span,
.settings-school-source span,
.settings-school-source strong,
.settings-school-source small {
    display: block;
}

.settings-school-title > span,
.settings-school-source > span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-school-title h3 {
    margin: 8px 0 0;
    color: var(--color-text);
    font-size: clamp(21px, 2.2vw, 30px);
    line-height: 1.2;
}

.settings-school-title p {
    margin: 7px 0 0;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 800;
}

.settings-school-source strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.settings-school-source small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 10px;
}

/* ==========================================================
   SCHOOL SECTIONS
========================================================== */

.settings-school-section {
    border-bottom: 1px solid var(--color-border);
}

.settings-school-section-heading {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.settings-school-section-heading h3 {
    margin: 5px 0 0;
    font-size: 17px;
}

.settings-school-details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-school-details-grid article,
.settings-brand-assets-grid article {
    min-width: 0;
    padding: 20px 22px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-school-details-grid article:nth-child(3n),
.settings-brand-assets-grid article:last-child {
    border-right: 0;
}

.settings-school-details-grid article:nth-last-child(-n + 3),
.settings-brand-assets-grid article {
    border-bottom: 0;
}

.settings-school-details-grid span,
.settings-school-details-grid strong,
.settings-brand-assets-grid span,
.settings-brand-assets-grid strong {
    display: block;
}

.settings-school-details-grid span,
.settings-brand-assets-grid span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-school-details-grid strong,
.settings-brand-assets-grid strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.5;
}

.settings-brand-assets-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ==========================================================
   BRAND COLOURS
========================================================== */

.settings-brand-colours-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-brand-colours-grid article {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    border-right: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-brand-colours-grid article:last-child {
    border-right: 0;
}

.settings-colour-swatch {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 13px;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.settings-brand-colours-grid small,
.settings-brand-colours-grid strong {
    display: block;
}

.settings-brand-colours-grid small {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-brand-colours-grid strong {
    margin-top: 5px;
    font-size: 13px;
}

/* ==========================================================
   SCHOOL FOOTER
========================================================== */

.settings-school-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    background: #fafbfc;
}

.settings-school-footer p,
.settings-school-footer span {
    margin: 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.settings-school-footer span {
    text-align: right;
}

.settings-school-footer code {
    color: var(--color-text);
    font-size: 9px;
}

/* ==========================================================
   SCHOOL RESPONSIVE
========================================================== */

@media (max-width: 980px) {

    .settings-school-identity {
        grid-template-columns: 130px 1fr;
    }

    .settings-school-source {
        grid-column: 1 / -1;
        border-top: 1px solid var(--color-border);
        border-right: 0 !important;
    }

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

    .settings-school-details-grid article:nth-child(3n) {
        border-right: 1px solid var(--color-border);
    }

    .settings-school-details-grid article:nth-child(2n) {
        border-right: 0;
    }

    .settings-school-details-grid article:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--color-border);
    }

    .settings-school-details-grid article:nth-last-child(-n + 2) {
        border-bottom: 0;
    }
}

@media (max-width: 680px) {

    .settings-school-identity,
    .settings-school-details-grid,
    .settings-brand-assets-grid,
    .settings-brand-colours-grid {
        grid-template-columns: 1fr;
    }

    .settings-school-identity > div,
    .settings-school-details-grid article,
    .settings-brand-assets-grid article,
    .settings-brand-colours-grid article {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .settings-school-identity > div:last-child,
    .settings-school-details-grid article:last-child,
    .settings-brand-assets-grid article:last-child,
    .settings-brand-colours-grid article:last-child {
        border-bottom: 0;
    }

    .settings-school-logo-panel {
        display: flex;
        justify-content: center;
    }

    .settings-school-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 18px;
    }

    .settings-school-footer span {
        text-align: left;
    }
}



/* ==========================================================
   SETTINGS — SYSTEM INFORMATION
   SAFETY SEARCH: APP-SETTINGS-SYSTEM
========================================================== */

.settings-system-workspace {
    overflow: hidden;
}

.settings-system-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ==========================================================
   SYSTEM HERO
========================================================== */

.settings-system-hero {
    display: grid;
    grid-template-columns:
        120px
        minmax(0, 1fr)
        minmax(240px, 0.8fr);
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-system-hero > div {
    min-width: 0;
    padding: 24px;
    border-right: 1px solid var(--color-border);
}

.settings-system-hero > div:last-child {
    border-right: 0;
}

.settings-system-mark {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 20px;
    background: #fff5d6;
    color: #9a6800;
    font-size: 21px;
    font-weight: 900;
}

.settings-system-title span,
.settings-system-school span,
.settings-system-school strong,
.settings-system-school small {
    display: block;
}

.settings-system-title > span,
.settings-system-school > span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-system-title h3 {
    margin: 7px 0 0;
    color: var(--color-text);
    font-size: clamp(23px, 2.4vw, 32px);
}

.settings-system-title p {
    margin: 6px 0 0;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 800;
}

.settings-system-school strong {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.settings-system-school small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 10px;
}

/* ==========================================================
   SYSTEM SECTIONS
========================================================== */

.settings-system-section {
    border-bottom: 1px solid var(--color-border);
}

.settings-system-section-heading {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.settings-system-section-heading h3 {
    margin: 5px 0 0;
    font-size: 17px;
}

.settings-system-details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-system-details-grid article,
.settings-session-grid article {
    min-width: 0;
    padding: 21px 22px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-system-details-grid article:nth-child(3n),
.settings-session-grid article:last-child {
    border-right: 0;
}

.settings-system-details-grid article:nth-last-child(-n + 3),
.settings-session-grid article {
    border-bottom: 0;
}

.settings-system-details-grid span,
.settings-system-details-grid strong,
.settings-system-details-grid small,
.settings-session-grid span,
.settings-session-grid strong {
    display: block;
}

.settings-system-details-grid span,
.settings-session-grid span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-system-details-grid strong,
.settings-session-grid strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.45;
}

.settings-system-details-grid small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.45;
}

.settings-system-success {
    color: #168447 !important;
}

.settings-system-warning {
    color: #b54708 !important;
}

/* ==========================================================
   SESSION GRID
========================================================== */

.settings-session-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ==========================================================
   SYSTEM FOOTER
========================================================== */

.settings-system-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    background: #fafbfc;
}

.settings-system-footer p,
.settings-system-footer span {
    margin: 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.settings-system-footer span {
    text-align: right;
}

/* ==========================================================
   SYSTEM RESPONSIVE
========================================================== */

@media (max-width: 980px) {

    .settings-system-hero {
        grid-template-columns: 110px 1fr;
    }

    .settings-system-school {
        grid-column: 1 / -1;
        border-top: 1px solid var(--color-border);
        border-right: 0 !important;
    }

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

    .settings-system-details-grid article:nth-child(3n) {
        border-right: 1px solid var(--color-border);
    }

    .settings-system-details-grid article:nth-child(2n) {
        border-right: 0;
    }

    .settings-system-details-grid article:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--color-border);
    }

    .settings-system-details-grid article:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

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

    .settings-session-grid article:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .settings-session-grid article:first-child {
        border-bottom: 1px solid var(--color-border);
    }
}

@media (max-width: 680px) {

    .settings-system-hero,
    .settings-system-details-grid,
    .settings-session-grid {
        grid-template-columns: 1fr;
    }

    .settings-system-hero > div,
    .settings-system-details-grid article,
    .settings-session-grid article {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .settings-system-hero > div:last-child,
    .settings-system-details-grid article:last-child,
    .settings-session-grid article:last-child {
        border-bottom: 0;
    }

    .settings-system-mark {
        margin: 0 auto;
    }

    .settings-system-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 18px;
    }

    .settings-system-footer span {
        text-align: left;
    }
}


/* ==========================================================
   SETTINGS — RECEIPTS
   SAFETY SEARCH: APP-SETTINGS-RECEIPTS
========================================================== */

.settings-receipts-workspace {
    overflow: hidden;
}

.settings-receipts-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ==========================================================
   RECEIPT SUMMARY
========================================================== */

.settings-receipt-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--color-border);
}

.settings-receipt-summary article {
    min-width: 0;
    padding: 22px 24px;
    border-right: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-receipt-summary article:last-child {
    border-right: 0;
}

.settings-receipt-summary span,
.settings-receipt-summary strong,
.settings-receipt-summary small {
    display: block;
}

.settings-receipt-summary span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-receipt-summary strong {
    margin-top: 9px;
    overflow: hidden;
    color: var(--color-text);
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-receipt-summary small {
    margin-top: 9px;
    color: var(--color-muted);
    font-size: 11px;
}

.settings-receipt-summary .settings-receipt-config-value {
    font-size: clamp(18px, 1.6vw, 23px);
}

/* ==========================================================
   RECEIPT SECTIONS
========================================================== */

.settings-receipt-section {
    border-bottom: 1px solid var(--color-border);
}

.settings-receipt-section-heading {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.settings-receipt-section-heading h3 {
    margin: 5px 0 0;
    font-size: 17px;
}

.settings-receipt-number-grid,
.settings-receipt-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-receipt-number-grid article,
.settings-receipt-content-grid article {
    min-width: 0;
    padding: 20px 22px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-receipt-number-grid article:nth-child(2n),
.settings-receipt-content-grid article:nth-child(2n) {
    border-right: 0;
}

.settings-receipt-number-grid article:nth-last-child(-n + 2),
.settings-receipt-content-grid article:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.settings-receipt-number-grid span,
.settings-receipt-number-grid strong,
.settings-receipt-number-grid small,
.settings-receipt-content-grid span,
.settings-receipt-content-grid strong {
    display: block;
}

.settings-receipt-number-grid span,
.settings-receipt-content-grid span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-receipt-number-grid strong,
.settings-receipt-content-grid strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.5;
}

.settings-receipt-number-grid small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 10px;
}

.settings-receipt-content-grid .settings-receipt-content-wide {
    grid-column: 1 / -1;
    border-right: 0;
}

/* ==========================================================
   RECEIPT PREVIEW
========================================================== */

.settings-receipt-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px 24px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fffaf0 100%
        );
}

.settings-receipt-preview-kicker {
    display: block;
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-receipt-preview h4 {
    margin: 7px 0 0;
    color: var(--color-text);
    font-size: 22px;
}

.settings-receipt-preview p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 12px;
}

.settings-receipt-preview > strong {
    flex: 0 0 auto;
    padding: 12px 15px;
    border: 1px solid rgba(199, 155, 40, 0.22);
    border-radius: 12px;
    background: #ffffff;
    color: #8a6200;
    font-size: 12px;
    letter-spacing: 0.03em;
}

/* ==========================================================
   RECEIPT FOOTER
========================================================== */

.settings-receipt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    background: #fafbfc;
}

.settings-receipt-footer p,
.settings-receipt-footer span {
    margin: 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.settings-receipt-footer span {
    text-align: right;
}

.settings-receipt-footer code {
    color: var(--color-text);
    font-size: 9px;
}

/* ==========================================================
   RECEIPT SETTINGS RESPONSIVE
========================================================== */

@media (max-width: 980px) {

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

    .settings-receipt-summary article:nth-child(2) {
        border-right: 0;
    }

    .settings-receipt-summary article:nth-child(-n + 2) {
        border-bottom: 1px solid var(--color-border);
    }
}

@media (max-width: 680px) {

    .settings-receipt-summary,
    .settings-receipt-number-grid,
    .settings-receipt-content-grid {
        grid-template-columns: 1fr;
    }

    .settings-receipt-summary article,
    .settings-receipt-number-grid article,
    .settings-receipt-content-grid article,
    .settings-receipt-content-grid .settings-receipt-content-wide {
        grid-column: auto;
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .settings-receipt-summary article:last-child,
    .settings-receipt-number-grid article:last-child,
    .settings-receipt-content-grid article:last-child {
        border-bottom: 0;
    }

    .settings-receipt-preview,
    .settings-receipt-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 18px;
    }

    .settings-receipt-preview > strong {
        width: 100%;
        text-align: center;
    }

    .settings-receipt-footer span {
        text-align: left;
    }
}



/* ==========================================================
   SETTINGS — EMAIL
   SAFETY SEARCH: APP-SETTINGS-EMAIL
========================================================== */

.settings-email-workspace {
    overflow: hidden;
}

.settings-email-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ==========================================================
   EMAIL SUMMARY
========================================================== */

.settings-email-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--color-border);
}

.settings-email-summary article {
    min-width: 0;
    padding: 22px 24px;
    border-right: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-email-summary article:last-child {
    border-right: 0;
}

.settings-email-summary span,
.settings-email-summary strong,
.settings-email-summary small {
    display: block;
}

.settings-email-summary span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-email-summary strong {
    margin-top: 9px;
    overflow: hidden;
    color: var(--color-text);
    font-size: clamp(20px, 1.8vw, 28px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-email-summary small {
    margin-top: 9px;
    color: var(--color-muted);
    font-size: 11px;
}

.settings-email-success {
    color: #168447 !important;
}

.settings-email-warning {
    color: #b54708 !important;
}

/* ==========================================================
   EMAIL SECTIONS
========================================================== */

.settings-email-section {
    border-bottom: 1px solid var(--color-border);
}

.settings-email-section-heading {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.settings-email-section-heading h3 {
    margin: 5px 0 0;
    font-size: 17px;
}

.settings-email-details-grid,
.settings-email-identity-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-email-details-grid article,
.settings-email-identity-grid article {
    min-width: 0;
    padding: 20px 22px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.settings-email-details-grid article:nth-child(4n),
.settings-email-identity-grid article:last-child {
    border-right: 0;
}

.settings-email-details-grid article:nth-last-child(-n + 4),
.settings-email-identity-grid article {
    border-bottom: 0;
}

.settings-email-details-grid span,
.settings-email-details-grid strong,
.settings-email-identity-grid span,
.settings-email-identity-grid strong {
    display: block;
}

.settings-email-details-grid span,
.settings-email-identity-grid span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-email-details-grid strong,
.settings-email-identity-grid strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.5;
}

/* ==========================================================
   EMAIL TEMPLATE
========================================================== */

.settings-email-template {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    background: #ffffff;
}

.settings-email-template span,
.settings-email-template strong,
.settings-email-template small {
    display: block;
}

.settings-email-template > div > span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-email-template strong {
    margin-top: 8px;
    color: var(--color-text);
    font-size: 14px;
}

.settings-email-template small {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 10px;
}

.settings-email-template code {
    color: var(--color-text);
    font-size: 9px;
}

.settings-email-template-badge {
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px solid rgba(199, 155, 40, 0.22);
    border-radius: 11px;
    background: #fffaf0;
    color: #8a6200;
    font-size: 10px;
    font-weight: 800;
}

/* ==========================================================
   EMAIL NOTICE
========================================================== */

.settings-email-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fffaf0;
}

.settings-email-notice strong,
.settings-email-notice p {
    display: block;
}

.settings-email-notice strong {
    color: var(--color-text);
    font-size: 13px;
}

.settings-email-notice p {
    margin: 5px 0 0;
    max-width: 760px;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.55;
}

.settings-email-notice > span {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(199, 155, 40, 0.24);
    border-radius: 999px;
    background: #ffffff;
    color: #8a6200;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ==========================================================
   EMAIL FOOTER
========================================================== */

.settings-email-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    background: #fafbfc;
}

.settings-email-footer p,
.settings-email-footer span {
    margin: 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.settings-email-footer span {
    text-align: right;
}

.settings-email-footer code {
    color: var(--color-text);
    font-size: 9px;
}

/* ==========================================================
   EMAIL RESPONSIVE
========================================================== */

@media (max-width: 1100px) {

    .settings-email-summary,
    .settings-email-details-grid,
    .settings-email-identity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-email-summary article:nth-child(2),
    .settings-email-details-grid article:nth-child(2n),
    .settings-email-identity-grid article:nth-child(2) {
        border-right: 0;
    }

    .settings-email-summary article:nth-child(-n + 2),
    .settings-email-details-grid article:nth-last-child(n + 3),
    .settings-email-identity-grid article:nth-child(-n + 2) {
        border-bottom: 1px solid var(--color-border);
    }
}

@media (max-width: 680px) {

    .settings-email-summary,
    .settings-email-details-grid,
    .settings-email-identity-grid {
        grid-template-columns: 1fr;
    }

    .settings-email-summary article,
    .settings-email-details-grid article,
    .settings-email-identity-grid article {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .settings-email-summary article:last-child,
    .settings-email-details-grid article:last-child,
    .settings-email-identity-grid article:last-child {
        border-bottom: 0;
    }

    .settings-email-template,
    .settings-email-notice,
    .settings-email-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 18px;
    }

    .settings-email-footer span {
        text-align: left;
    }
}


/* ==========================================================
   FEE STRUCTURES
   SAFETY SEARCH: APP-FEE-STRUCTURES
========================================================== */

.fee-structures-page{display:grid;gap:24px}
.fee-structures-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.fee-structure-statistics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.fee-structure-directory{overflow:hidden}
.fee-structure-table{min-width:900px}
.fee-structure-table td:first-child{min-width:250px}
.fee-structure-modal-panel{width:min(760px,100%)}
.fee-structure-form{padding:26px 28px 32px}
.fee-structure-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.fee-structure-form .form-field{display:grid;gap:8px}
.fee-structure-form .form-field-full{grid-column:1/-1}
.fee-structure-form label{color:var(--color-muted);font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.fee-structure-form input,.fee-structure-form select,.fee-structure-form textarea{width:100%;min-width:0;padding:0 14px;border:1px solid var(--color-border);border-radius:12px;outline:0;background:#fff;color:var(--color-text);font:inherit;font-size:13px}
.fee-structure-form input,.fee-structure-form select{height:48px}
.fee-structure-form textarea{min-height:92px;padding-top:12px;resize:vertical}
.fee-structure-items-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-top:26px;padding-bottom:14px;border-bottom:1px solid var(--color-border)}
.fee-structure-items-heading h3{margin:5px 0 0;font-size:17px}
.fee-structure-items-heading small{color:var(--color-muted);font-size:10px}
.fee-structure-item-list{display:grid}
.fee-structure-item-row{display:grid;grid-template-columns:20px minmax(180px,1fr) 150px 180px;align-items:center;gap:14px;padding:15px 0;border-bottom:1px solid var(--color-border);text-transform:none!important}
.fee-structure-item-row>input[type=checkbox]{width:17px;height:17px;padding:0;accent-color:var(--color-primary)}
.fee-structure-item-copy strong,.fee-structure-item-copy small{display:block}
.fee-structure-item-copy strong{color:var(--color-text);font-size:12px}
.fee-structure-item-copy small{margin-top:4px;color:var(--color-muted);font-size:9px}
.fee-structure-item-row input:disabled,.fee-structure-item-row select:disabled{background:#f5f6f8;opacity:.7}
@media(max-width:1000px){.fee-structure-statistics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){
.fee-structures-header{flex-direction:column}
.fee-structures-header .page-actions{width:100%}
.fee-structure-statistics,.fee-structure-form-grid{grid-template-columns:1fr}
.fee-structure-form .form-field-full{grid-column:auto}
.fee-structure-item-row{grid-template-columns:20px 1fr}
.fee-structure-item-row .fee-structure-amount-input,.fee-structure-item-row select{grid-column:2}
}


/* ==========================================================
   PUBLISH BILLING
   SAFETY SEARCH: APP-PUBLISH-BILLING
========================================================== */

.publish-billing-page { display:grid; gap:24px; }

.publish-billing-header {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:24px;
}

.publish-billing-filter-card,
.publish-billing-preview,
.publish-billing-students { overflow:hidden; }

.publish-billing-filter {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr)) auto;
    align-items:end;
    gap:16px;
    padding:24px;
}

.publish-billing-filter .form-field { display:grid; gap:8px; }

.publish-billing-filter label {
    color:var(--color-muted);
    font-size:10px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.publish-billing-filter select {
    width:100%;
    min-width:0;
    height:48px;
    padding:0 14px;
    border:1px solid var(--color-border);
    border-radius:12px;
    outline:0;
    background:#fff;
    color:var(--color-text);
    font:inherit;
    font-size:13px;
}

.publish-billing-filter .button { min-height:48px; }

.publish-billing-statistics {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:20px;
}

.publish-billing-form { display:grid; gap:24px; }

.publish-billing-item-list { display:grid; }

.publish-billing-item {
    display:grid;
    grid-template-columns:24px minmax(180px,1fr) 140px 100px;
    align-items:center;
    gap:16px;
    padding:17px 22px;
    border-bottom:1px solid var(--color-border);
    background:#fff;
}

.publish-billing-item:last-child { border-bottom:0; }
.publish-billing-item.is-fixed { background:#fbfcfd; }

.publish-billing-item input {
    width:17px;
    height:17px;
    accent-color:var(--color-primary);
}

.publish-billing-item span,
.publish-billing-item span strong,
.publish-billing-item span small { display:block; min-width:0; }

.publish-billing-item span > strong {
    color:var(--color-text);
    font-size:13px;
}

.publish-billing-item span > small {
    margin-top:4px;
    color:var(--color-muted);
    font-size:10px;
}

.publish-billing-item > strong {
    color:var(--color-text);
    font-size:13px;
    text-align:right;
}

.publish-billing-item em {
    padding:7px 9px;
    border-radius:999px;
    background:#f1f4f8;
    color:var(--color-muted);
    font-size:9px;
    font-style:normal;
    font-weight:800;
    text-align:center;
    text-transform:uppercase;
}

.publish-billing-item.is-selectable em {
    background:#fff5d6;
    color:#8a6200;
}

.publish-select-all {
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--color-muted);
    font-size:11px;
    font-weight:700;
}

.publish-select-all input,
.publish-student-card input {
    width:17px;
    height:17px;
    accent-color:var(--color-primary);
}

.publish-student-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.publish-student-card {
    display:flex;
    min-width:0;
    align-items:center;
    gap:12px;
    padding:17px 20px;
    border-right:1px solid var(--color-border);
    border-bottom:1px solid var(--color-border);
    background:#fff;
}

.publish-student-card:nth-child(3n) { border-right:0; }

.publish-student-card span,
.publish-student-card strong,
.publish-student-card small { display:block; min-width:0; }

.publish-student-card strong {
    overflow:hidden;
    color:var(--color-text);
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.publish-student-card small {
    margin-top:4px;
    color:var(--color-muted);
    font-size:9px;
}

.publish-billing-actions {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    padding:22px 24px;
    background:#fafbfc;
}

.publish-billing-actions strong,
.publish-billing-actions p { display:block; }

.publish-billing-actions strong {
    color:var(--color-text);
    font-size:12px;
}

.publish-billing-actions p {
    max-width:700px;
    margin:5px 0 0;
    color:var(--color-muted);
    font-size:10px;
    line-height:1.55;
}

@media (max-width:1100px) {
    .publish-billing-filter {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

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

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

    .publish-student-card:nth-child(3n) {
        border-right:1px solid var(--color-border);
    }

    .publish-student-card:nth-child(2n) { border-right:0; }
}

@media (max-width:680px) {
    .publish-billing-header,
    .publish-billing-actions {
        align-items:flex-start;
        flex-direction:column;
    }

    .publish-billing-filter,
    .publish-billing-statistics,
    .publish-student-grid {
        grid-template-columns:1fr;
    }

    .publish-billing-filter .button,
    .publish-billing-actions .button { width:100%; }

    .publish-billing-item {
        grid-template-columns:24px minmax(0,1fr);
    }

    .publish-billing-item > strong,
    .publish-billing-item em {
        grid-column:2;
        text-align:left;
    }

    .publish-student-card,
    .publish-student-card:nth-child(2n),
    .publish-student-card:nth-child(3n) {
        border-right:0;
    }
}



/* ==========================================================
   RECORD PAYMENT
   SAFETY SEARCH: APP-RECORD-PAYMENT
========================================================== */

.record-payment-page {
    display: grid;
    gap: 24px;
}

.record-payment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.record-payment-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.record-payment-mode {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.record-payment-mode:hover {
    transform: translateY(-2px);
    border-color: rgba(199, 155, 40, 0.5);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.record-payment-mode.is-active {
    border-color: #c79b28;
    background: #fffaf0;
    box-shadow: 0 12px 28px rgba(199, 155, 40, 0.12);
}

.record-payment-mode span,
.record-payment-mode strong,
.record-payment-mode small {
    display: block;
}

.record-payment-mode > span {
    color: #9a6800;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.record-payment-mode strong {
    margin-top: 8px;
    color: var(--color-text);
    font-size: 18px;
}

.record-payment-mode small {
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.55;
}

.record-payment-panel {
    overflow: hidden;
}

.record-payment-search {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.record-payment-search input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    outline: 0;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
}

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

.record-account-card {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 20px 22px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.record-account-card:nth-child(2n) {
    border-right: 0;
}

.record-account-card:hover {
    background: #fffaf0;
}

.record-account-card > div {
    min-width: 0;
}

.record-account-card span,
.record-account-card strong,
.record-account-card small {
    display: block;
}

.record-account-card > div:first-child strong {
    overflow: hidden;
    color: var(--color-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-account-card > div:first-child span,
.record-account-card > div:first-child small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 10px;
}

.record-account-card > div:last-child {
    flex: 0 0 auto;
    text-align: right;
}

.record-account-card > div:last-child span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.record-account-card > div:last-child strong {
    margin-top: 6px;
    color: #dc2626;
    font-size: 15px;
}

.daily-service-payment-form {
    padding: 26px 28px 30px;
}

.daily-service-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.daily-service-form-grid .form-field {
    display: grid;
    gap: 8px;
}

.daily-service-form-grid .form-field-full {
    grid-column: 1 / -1;
}

.daily-service-form-grid label {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.daily-service-form-grid input,
.daily-service-form-grid select,
.daily-service-form-grid textarea {
    width: 100%;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: 0;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
}

.daily-service-form-grid input,
.daily-service-form-grid select {
    height: 48px;
}

.daily-service-form-grid textarea {
    min-height: 90px;
    padding-top: 12px;
    resize: vertical;
}

.daily-service-form-grid input[readonly] {
    background: #f7f8fa;
    font-weight: 800;
}

.daily-service-payment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 26px -28px -30px;
    padding: 21px 28px;
    background: #fafbfc;
}

.daily-service-payment-actions strong,
.daily-service-payment-actions p {
    display: block;
}

.daily-service-payment-actions strong {
    color: var(--color-text);
    font-size: 12px;
}

.daily-service-payment-actions p {
    max-width: 660px;
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

[data-payment-panel][hidden],
.record-account-card[hidden] {
    display: none !important;
}

@media (max-width: 820px) {
    .record-payment-modes,
    .record-account-grid,
    .daily-service-form-grid {
        grid-template-columns: 1fr;
    }

    .daily-service-form-grid .form-field-full {
        grid-column: auto;
    }

    .record-account-card,
    .record-account-card:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 680px) {
    .record-payment-header,
    .daily-service-payment-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .daily-service-payment-actions .button {
        width: 100%;
    }
}


/* ==========================================================
   STUDENT PROFILE — FINANCE ACTIONS
   SAFETY SEARCH: APP-STUDENT-PROFILE-FINANCE
========================================================== */

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

.profile-module-notice strong,
.profile-module-notice span {
    display: block;
}

.profile-module-notice strong {
    color: var(--color-text);
    font-size: 11px;
}

.profile-module-notice span {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 10px;
}

.student-finance-modal {
    width: min(660px, 100%);
}

.student-finance-form {
    padding: 26px 28px 30px;
}

.student-finance-form .form-field {
    display: grid;
    gap: 8px;
    margin-bottom: 17px;
}

.student-finance-form label {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.student-finance-form input,
.student-finance-form select,
.student-finance-form textarea {
    width: 100%;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: 0;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
    font-size: 13px;
}

.student-finance-form input,
.student-finance-form select {
    height: 48px;
}

.student-finance-form textarea {
    min-height: 92px;
    padding-top: 12px;
    resize: vertical;
}

.student-service-list {
    display: grid;
    margin-bottom: 22px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
}

.student-service-option {
    display: grid !important;
    grid-template-columns:
        22px
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 14px;
    margin: 0 !important;
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    text-transform: none !important;
}

.student-service-option:last-child {
    border-bottom: 0;
}

.student-service-option input {
    width: 17px;
    height: 17px;
    padding: 0;
    accent-color: var(--color-primary);
}

.student-service-option span,
.student-service-option span strong,
.student-service-option span small {
    display: block;
    min-width: 0;
}

.student-service-option span > strong {
    color: var(--color-text);
    font-size: 12px;
}

.student-service-option span > small {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
}

.student-service-option > strong {
    color: var(--color-text);
    font-size: 12px;
}

@media (max-width: 900px) {
    .profile-action-grid-expanded {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }
}

@media (max-width: 620px) {
    .profile-action-grid-expanded {
        grid-template-columns: 1fr;
    }
}

@media print {
    .sidebar,
    .page-header .page-actions,
    .profile-action-grid-expanded,
    .settings-user-modal {
        display: none !important;
    }

    .content {
        padding: 0 !important;
    }
}


/* ==========================================================
   FEE STRUCTURES — BILLING BASIS FIELDS
   SAFETY SEARCH: APP-FEE-STRUCTURES-BILLING-BASIS
========================================================== */

.fee-structure-modal-panel {
    width: min(980px, calc(100vw - 40px));
}

.fee-structure-item-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.fee-structure-item-row {
    display: grid;
    grid-template-columns:
        minmax(210px, 1.4fr)
        minmax(110px, .7fr)
        minmax(130px, .8fr)
        minmax(130px, .8fr)
        minmax(160px, 1fr);
    align-items: end;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.fee-structure-item-toggle {
    display: flex !important;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin: 0 !important;
    text-transform: none !important;
}

.fee-structure-item-toggle > input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    padding: 0;
    accent-color: var(--color-primary);
}

.fee-structure-item-copy,
.fee-structure-item-copy strong,
.fee-structure-item-copy small {
    display: block;
    min-width: 0;
}

.fee-structure-item-copy strong {
    color: var(--color-text);
    font-size: 12px;
}

.fee-structure-item-copy small {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.4;
}

.fee-structure-item-field {
    display: grid;
    gap: 7px;
}

.fee-structure-item-field label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fee-structure-item-field input,
.fee-structure-item-field select {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 11px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    font: inherit;
    font-size: 11px;
}

.fee-structure-item-field input:disabled,
.fee-structure-item-field select:disabled {
    background: #f5f6f8;
    color: var(--color-muted);
    opacity: .72;
}

@media (max-width: 980px) {
    .fee-structure-item-row {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .fee-structure-item-toggle {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .fee-structure-modal-panel {
        width: calc(100vw - 20px);
    }

    .fee-structure-item-row {
        grid-template-columns: 1fr;
    }

    .fee-structure-item-toggle {
        grid-column: auto;
    }
}


/* ==========================================================
   FEE STRUCTURES V2
   SAFETY SEARCH: APP-FEE-STRUCTURES-V2
========================================================== */

.fee-structures-page {
    display: grid;
    gap: 24px;
}

.fee-structures-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.fee-structure-statistics {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.fee-structure-directory {
    overflow: hidden;
}

.fee-structure-card-list {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.fee-structure-card {
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.fee-structure-card-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 16px;
}

.fee-structure-card-main h3 {
    margin: 6px 0 0;
    color: var(--color-text);
    font-size: 17px;
}

.fee-structure-card-main p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 10px;
}

.fee-structure-card-metrics {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.fee-structure-card-metrics > div {
    padding: 14px 18px;
    border-right: 1px solid var(--color-border);
}

.fee-structure-card-metrics > div:last-child {
    border-right: 0;
}

.fee-structure-card-metrics span,
.fee-structure-card-metrics strong {
    display: block;
}

.fee-structure-card-metrics span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fee-structure-card-metrics strong {
    margin-top: 5px;
    color: var(--color-text);
    font-size: 13px;
}

.fee-structure-description {
    margin: 0;
    padding: 16px 22px;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.fee-structure-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--color-border);
}

.fee-structure-card-actions form {
    margin: 0;
}

.button-small {
    min-height: 36px;
    padding: 0 13px;
    font-size: 10px;
}

.fee-structure-v2-modal {
    width: min(1180px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.fee-structure-v2-form {
    padding: 26px 28px 30px;
}

.fee-structure-v2-meta {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.fee-structure-v2-meta .form-field {
    display: grid;
    gap: 8px;
}

.fee-structure-v2-meta .form-field-full {
    grid-column: 1 / -1;
}

.fee-structure-v2-meta label,
.fee-plan-field label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fee-structure-v2-meta input,
.fee-structure-v2-meta select,
.fee-structure-v2-meta textarea,
.fee-plan-field input,
.fee-plan-field select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    font: inherit;
    font-size: 11px;
}

.fee-structure-v2-meta input,
.fee-structure-v2-meta select,
.fee-plan-field input,
.fee-plan-field select {
    height: 44px;
    padding: 0 11px;
}

.fee-structure-v2-meta textarea {
    min-height: 86px;
    padding: 12px;
    resize: vertical;
}

.fee-plan-builder-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding: 20px 0 14px;
    border-bottom: 1px solid var(--color-border);
}

.fee-plan-builder-heading h3 {
    margin: 5px 0 0;
    font-size: 18px;
}

.fee-plan-builder-heading p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 10px;
}

.fee-plan-builder {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.fee-plan-row {
    display: grid;
    grid-template-columns:
        28px
        minmax(190px, 1.3fr)
        minmax(120px, .8fr)
        minmax(110px, .7fr)
        minmax(120px, .8fr)
        minmax(120px, .8fr)
        minmax(145px, .9fr)
        minmax(150px, 1fr)
        36px;
    align-items: end;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.fee-plan-drag {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    color: var(--color-muted);
    cursor: grab;
}

.fee-plan-field {
    display: grid;
    gap: 7px;
}

.fee-plan-remove {
    width: 36px;
    height: 44px;
    border: 1px solid #f2c5c5;
    border-radius: 10px;
    background: #fff5f5;
    color: #b42318;
    font-size: 19px;
    cursor: pointer;
}

@media (max-width: 1150px) {

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

    .fee-structure-v2-meta {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .fee-plan-row {
        grid-template-columns:
            28px
            repeat(2, minmax(0, 1fr))
            36px;
    }

    .fee-plan-item,
    .fee-plan-notes {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {

    .fee-structures-header,
    .fee-plan-builder-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .fee-structure-statistics,
    .fee-structure-card-metrics,
    .fee-structure-v2-meta {
        grid-template-columns: 1fr;
    }

    .fee-structure-v2-meta .form-field-full {
        grid-column: auto;
    }

    .fee-structure-card-metrics > div {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .fee-structure-card-metrics > div:last-child {
        border-bottom: 0;
    }

    .fee-structure-v2-modal {
        width: calc(100vw - 20px);
    }

    .fee-structure-v2-form {
        padding: 20px;
    }

    .fee-plan-row {
        grid-template-columns:
            24px
            minmax(0, 1fr)
            36px;
    }

    .fee-plan-field,
    .fee-plan-item,
    .fee-plan-notes {
        grid-column: 2;
    }

    .fee-plan-remove {
        grid-column: 3;
        grid-row: 1;
    }
}



* ==========================================================
   FEE STRUCTURES V2 — GROUPED EDITOR
   SAFETY SEARCH: APP-FEE-STRUCTURES-GROUPED-EDITOR
========================================================== */

.fee-plan-groups {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.fee-plan-group {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #ffffff;
}

.fee-plan-group-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--color-border);
    background: #fafbfc;
}

.fee-plan-group-heading h4 {
    margin: 5px 0 0;
    color: var(--color-text);
    font-size: 15px;
}

.fee-plan-group-heading p {
    max-width: 580px;
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

.fee-plan-group-kicker {
    color: #9a6800;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.fee-plan-group-heading-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.fee-plan-group-count {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fee-plan-group .fee-plan-builder {
    margin: 0;
    padding: 14px;
}

.fee-plan-group .fee-plan-row {
    border-radius: 12px;
    box-shadow: none;
}

.fee-plan-group-empty {
    padding: 24px 20px;
    color: var(--color-muted);
    font-size: 10px;
    text-align: center;
}

.fee-plan-group[data-plan-group="academic"] {
    border-top: 3px solid #16233a;
}

.fee-plan-group[data-plan-group="lunch"] {
    border-top: 3px solid #c79b28;
}

.fee-plan-group[data-plan-group="transport"] {
    border-top: 3px solid #2563eb;
}

.fee-plan-group[data-plan-group="other"] {
    border-top: 3px solid #64748b;
}

@media (max-width: 760px) {
    .fee-plan-group-heading {
        flex-direction: column;
    }

    .fee-plan-group-heading-actions {
        width: 100%;
        justify-content: space-between;
    }
}


/* ==========================================================
   FEE STRUCTURES V2
   GROUP SCROLLING + SPACING REFINEMENT

   SAFETY SEARCH:
   APP-FEE-STRUCTURES-GROUP-SCROLL
========================================================== */

/* ----------------------------------------------------------
   MODAL BREATHING ROOM
---------------------------------------------------------- */

.fee-structure-v2-modal {
    width: min(1240px, calc(100vw - 48px));
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 28px;
}

.fee-structure-v2-form {
    padding: 32px 34px 38px;
}

/* ----------------------------------------------------------
   GROUP CONTAINER
---------------------------------------------------------- */

.fee-plan-groups {
    display: grid;
    gap: 28px;
    margin-top: 24px;
    padding-bottom: 12px;
}

.fee-plan-group {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow:
        0 8px 24px
        rgba(15, 23, 42, 0.04);
}

/* ----------------------------------------------------------
   STICKY GROUP HEADING
---------------------------------------------------------- */

.fee-plan-group-heading {
    position: sticky;
    top: 0;
    z-index: 5;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;

    padding: 22px 24px;

    border-bottom: 1px solid var(--color-border);

    background:
        rgba(250, 251, 252, 0.98);

    backdrop-filter: blur(8px);
}

.fee-plan-group-heading h4 {
    margin: 6px 0 0;
    font-size: 17px;
    line-height: 1.25;
}

.fee-plan-group-heading p {
    max-width: 640px;
    margin: 7px 0 0;
    font-size: 10px;
    line-height: 1.6;
}

.fee-plan-group-heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ----------------------------------------------------------
   INDIVIDUAL GROUP SCROLL AREA
---------------------------------------------------------- */

.fee-plan-group .fee-plan-builder {
    display: grid;
    gap: 14px;

    max-height: 430px;
    overflow-y: auto;
    overflow-x: hidden;

    margin: 0;
    padding: 20px 20px 24px;

    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

/* Academic can hold slightly more rows */
.fee-plan-group[data-plan-group="academic"]
.fee-plan-builder {
    max-height: 470px;
}

/* Transport has more combinations */
.fee-plan-group[data-plan-group="transport"]
.fee-plan-builder {
    max-height: 470px;
}

/* ----------------------------------------------------------
   CUSTOM GROUP SCROLLBARS
---------------------------------------------------------- */

.fee-plan-group .fee-plan-builder::-webkit-scrollbar {
    width: 10px;
}

.fee-plan-group .fee-plan-builder::-webkit-scrollbar-track {
    background: #f3f5f8;
    border-radius: 999px;
}

.fee-plan-group .fee-plan-builder::-webkit-scrollbar-thumb {
    background: #c9d0dc;
    border: 2px solid #f3f5f8;
    border-radius: 999px;
}

.fee-plan-group .fee-plan-builder::-webkit-scrollbar-thumb:hover {
    background: #aeb8c7;
}

/* Firefox */
.fee-plan-group .fee-plan-builder {
    scrollbar-width: thin;
    scrollbar-color:
        #c9d0dc
        #f3f5f8;
}

/* ----------------------------------------------------------
   FEE PLAN ROW SPACING
---------------------------------------------------------- */

.fee-plan-row {
    min-width: 0;
    padding: 18px 16px;

    border: 1px solid var(--color-border);
    border-radius: 14px;

    background: #ffffff;

    box-shadow:
        0 4px 14px
        rgba(15, 23, 42, 0.035);
}

.fee-plan-row:hover {
    border-color:
        rgba(199, 155, 40, 0.42);

    box-shadow:
        0 8px 20px
        rgba(15, 23, 42, 0.055);
}

.fee-plan-field {
    gap: 8px;
}

.fee-plan-field label {
    line-height: 1.2;
}

/* ----------------------------------------------------------
   EMPTY GROUP STATE
---------------------------------------------------------- */

.fee-plan-group-empty {
    padding: 34px 24px;
    border-top: 0;
    background: #ffffff;
    color: var(--color-muted);
    font-size: 11px;
    text-align: center;
}

/* ----------------------------------------------------------
   GROUP COLOUR REFINEMENT
---------------------------------------------------------- */

.fee-plan-group[data-plan-group="academic"] {
    border-top: 4px solid #16233a;
}

.fee-plan-group[data-plan-group="lunch"] {
    border-top: 4px solid #c79b28;
}

.fee-plan-group[data-plan-group="transport"] {
    border-top: 4px solid #2563eb;
}

.fee-plan-group[data-plan-group="other"] {
    border-top: 4px solid #64748b;
}

/* ----------------------------------------------------------
   MODAL ACTIONS
---------------------------------------------------------- */

.fee-structure-v2-form > .modal-actions {
    position: sticky;
    bottom: -1px;
    z-index: 8;

    margin:
        30px
        -34px
        -38px;

    padding: 20px 34px;

    border-top: 1px solid var(--color-border);

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

    backdrop-filter: blur(10px);
}

/* ----------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------- */

@media (max-width: 1150px) {

    .fee-structure-v2-modal {
        width: calc(100vw - 28px);
    }

    .fee-plan-group .fee-plan-builder,
    .fee-plan-group[data-plan-group="academic"]
    .fee-plan-builder,
    .fee-plan-group[data-plan-group="transport"]
    .fee-plan-builder {
        max-height: 520px;
    }

}

@media (max-width: 760px) {

    .fee-structure-v2-form {
        padding: 22px 18px 28px;
    }

    .fee-plan-groups {
        gap: 22px;
    }

    .fee-plan-group-heading {
        position: relative;
        flex-direction: column;
        padding: 18px;
    }

    .fee-plan-group .fee-plan-builder {
        max-height: 560px;
        padding: 14px;
    }

    .fee-structure-v2-form > .modal-actions {
        margin:
            24px
            -18px
            -28px;

        padding: 18px;
    }

}


* ==========================================================
   FAMILIES MODULE
   SAFETY SEARCH: APP-FAMILIES-CSS
========================================================== */

.families-page,
.family-profile-page {
    display: grid;
    gap: 24px;
}

.family-directory-card {
    overflow: hidden;
}

.family-search-form {
    display: flex;
    gap: 10px;
}

.family-search-form input {
    width: min(320px, 40vw);
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font: inherit;
}

.family-card-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 20px;
}

.family-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.family-card:hover {
    transform: translateY(-2px);
    border-color: rgba(199, 155, 40, .45);
    box-shadow:
        0 12px 30px
        rgba(15, 23, 42, .07);
}

.family-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
}

.family-card-heading h3 {
    margin: 5px 0 0;
    font-size: 16px;
}

.family-card-details {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.family-card-details > div {
    padding: 15px 18px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.family-card-details > div:nth-child(2n) {
    border-right: 0;
}

.family-card-details > div:nth-last-child(-n+2) {
    border-bottom: 0;
}

.family-card-details span,
.family-card-details strong {
    display: block;
}

.family-card-details span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.family-card-details strong {
    margin-top: 5px;
    font-size: 11px;
}

.family-modal-panel {
    width: min(640px, calc(100vw - 30px));
}

.family-form {
    display: grid;
    gap: 17px;
    padding: 26px 28px 30px;
}

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

.family-form .form-field,
.family-add-student-form .form-field {
    display: grid;
    gap: 8px;
}

.family-form label,
.family-add-student-form label,
.family-member-order label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.family-form input,
.family-form select,
.family-form textarea,
.family-add-student-form input,
.family-add-student-form select,
.family-member-order input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    font: inherit;
    font-size: 11px;
}

.family-form input,
.family-form select,
.family-add-student-form input,
.family-add-student-form select,
.family-member-order input {
    height: 44px;
    padding: 0 11px;
}

.family-form textarea {
    min-height: 88px;
    padding: 12px;
    resize: vertical;
}

.family-status-field label {
    display: flex;
    align-items: center;
    gap: 9px;
    text-transform: none;
}

.family-status-field input {
    width: 16px;
    height: 16px;
    padding: 0;
}

.family-profile-grid {
    display: grid;
    grid-template-columns:
        minmax(250px, .72fr)
        minmax(0, 2fr);
    gap: 22px;
    align-items: start;
}

.family-summary-card {
    position: sticky;
    top: 24px;
    overflow: hidden;
}

.family-summary-list {
    display: grid;
    border-top: 1px solid var(--color-border);
    margin-bottom: 18px;
}

.family-summary-list > div {
    padding: 15px 18px;
    border-bottom: 1px solid var(--color-border);
}

.family-summary-list span,
.family-summary-list strong {
    display: block;
}

.family-summary-list span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.family-summary-list strong {
    margin-top: 5px;
    font-size: 11px;
}

.family-profile-main {
    display: grid;
    gap: 22px;
}

.family-members-card,
.family-add-card {
    overflow: hidden;
}

.family-member-list {
    display: grid;
    padding: 16px;
    gap: 12px;
}

.family-member-row {
    display: grid;
    grid-template-columns:
        42px
        minmax(180px, 1.5fr)
        minmax(120px, .7fr)
        90px
        auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: #fff;
}

.family-member-position {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f6edd6;
    color: #8f6500;
    font-size: 12px;
    font-weight: 800;
}

.family-member-copy strong,
.family-member-copy span,
.family-member-discount span,
.family-member-discount strong {
    display: block;
}

.family-member-copy strong {
    font-size: 12px;
}

.family-member-copy span,
.family-member-discount span {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
}

.family-member-discount strong {
    margin-top: 4px;
    font-size: 15px;
}

.family-member-order {
    display: grid;
    gap: 6px;
}

.family-member-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 18px;
}

.family-add-student-form {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.5fr)
        minmax(120px, .6fr)
        auto;
    align-items: end;
    gap: 14px;
    padding: 20px;
}

@media (max-width: 980px) {
    .family-card-grid {
        grid-template-columns: 1fr;
    }

    .family-profile-grid {
        grid-template-columns: 1fr;
    }

    .family-summary-card {
        position: static;
    }

    .family-member-row {
        grid-template-columns:
            42px
            minmax(0, 1fr)
            90px;
    }

    .family-member-discount {
        grid-column: 2;
    }
}

@media (max-width: 680px) {
    .family-search-form,
    .family-form-grid,
    .family-add-student-form {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .family-search-form input {
        width: 100%;
    }

    .family-card-details {
        grid-template-columns: 1fr;
    }

    .family-card-details > div {
        border-right: 0;
    }

    .family-card-details > div:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--color-border);
    }

    .family-card-details > div:last-child {
        border-bottom: 0;
    }

    .family-member-row {
        grid-template-columns:
            38px
            minmax(0, 1fr);
    }

    .family-member-discount,
    .family-member-order,
    .family-member-row .button {
        grid-column: 2;
    }
}


/* ==========================================================
   STUDENT LEDGER — MANUAL CHARGE MODAL
   SAFETY SEARCH: APP-MANUAL-CHARGE-CSS
========================================================== */

.student-charge-modal {
    width: min(760px, calc(100vw - 30px));
}

.student-charge-form {
    padding: 24px 26px 28px;
}

.manual-charge-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #f8fafc;
}

.manual-charge-total span {
    color: var(--color-muted);
    font-size: 11px;
}

.manual-charge-total strong {
    color: var(--color-text);
    font-size: 20px;
}

@media (max-width: 680px) {
    .student-charge-form {
        padding: 20px 18px 24px;
    }

    .manual-charge-total {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* ==========================================================
   RECEIPT V2 — DISCOUNT + ALLOCATION DETAIL
   SAFETY SEARCH: APP-RECEIPT-V2-CSS
========================================================== */

.receipt-allocation-title small {
    display: block;
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.receipt-allocation-metrics-v2 {
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
}

.receipt-discount-value {
    color: #b42318;
}

.receipt-balance-summary {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .receipt-allocation-metrics-v2,
    .receipt-balance-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media print {
}


/* ==========================================================
   STUDENT STATEMENT OF ACCOUNT
   SAFETY SEARCH: APP-STUDENT-STATEMENT-CSS
========================================================== */

.student-statement-page {
    display: grid;
    gap: 20px;
}

.statement-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.statement-document {
    position: relative;
    overflow: hidden;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 34px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fff;
    box-shadow:
        0 18px 50px
        rgba(15, 23, 42, .07);
}

.statement-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 24px;
    border-bottom: 2px solid #16233a;
}

.statement-school-brand {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.statement-school-brand img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.statement-document-type {
    color: #9a6800;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.statement-school-brand h1 {
    margin: 6px 0 0;
    font-size: 24px;
}

.statement-school-brand p {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.statement-meta {
    display: grid;
    gap: 5px;
    text-align: right;
}

.statement-meta span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.statement-meta strong {
    font-size: 15px;
}

.statement-meta small {
    color: var(--color-muted);
    font-size: 9px;
}

.statement-student-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 24px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
}

.statement-student-grid > div {
    padding: 15px 18px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.statement-student-grid > div:nth-child(3n) {
    border-right: 0;
}

.statement-student-grid > div:nth-last-child(-n+3) {
    border-bottom: 0;
}

.statement-student-grid span,
.statement-student-grid strong {
    display: block;
}

.statement-student-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.statement-student-grid strong {
    margin-top: 5px;
    font-size: 11px;
}

.statement-summary {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.statement-summary > div {
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
}

.statement-summary span,
.statement-summary strong {
    display: block;
}

.statement-summary span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.statement-summary strong {
    margin-top: 7px;
    font-size: 16px;
}

.statement-credit {
    color: #027a48;
}

.statement-discount,
.statement-balance {
    color: #b42318;
}

.statement-ledger-section {
    margin-top: 26px;
}

.statement-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.statement-section-heading span {
    color: #9a6800;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.statement-section-heading h2 {
    margin: 5px 0 0;
    font-size: 18px;
}

.statement-section-heading > strong {
    color: var(--color-muted);
    font-size: 10px;
}

.statement-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.statement-table th,
.statement-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.statement-table th {
    background: #f7f8fa;
    color: var(--color-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.statement-table td:nth-child(4),
.statement-table td:nth-child(5),
.statement-table td:nth-child(6),
.statement-table th:nth-child(4),
.statement-table th:nth-child(5),
.statement-table th:nth-child(6) {
    text-align: right;
}

.statement-table td strong {
    font-size: 10px;
}

.statement-table td small {
    display: block;
    margin-top: 4px;
    color: #b42318;
    font-size: 8px;
}

.statement-row-payment {
    background: #f6fffa;
}

.statement-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.55;
}

.statement-footer p {
    max-width: 720px;
    margin: 0;
}

@media (max-width: 800px) {
    .statement-document {
        padding: 22px;
    }

    .statement-header,
    .statement-footer {
        flex-direction: column;
    }

    .statement-meta {
        text-align: left;
    }

    .statement-student-grid,
    .statement-summary {
        grid-template-columns: 1fr;
    }

    .statement-student-grid > div {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .statement-student-grid > div:last-child {
        border-bottom: 0;
    }
}

@media print {
    .no-print,
    .sidebar,
    .app-header {
        display: none !important;
    }

    .student-statement-page {
        display: block;
    }

    .statement-document {
        max-width: none;
        padding: 18mm 14mm;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .statement-table {
        font-size: 9px;
    }

    @page {
        size: A4 portrait;
        margin: 0;
    }
}




/* ==========================================================
   STUDENT LEDGER — NEW CHARGE MODAL V2
   SAFETY SEARCH: APP-STUDENT-CHARGE-MODAL-V2
========================================================== */

.student-charge-modal {
    display: flex;
    width: min(780px, calc(100vw - 40px));
    max-height: calc(100vh - 48px);
    flex-direction: column;
    overflow: hidden;
}

/* ----------------------------------------------------------
   MODAL HEADER
---------------------------------------------------------- */

.student-charge-modal .modal-header {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    padding: 26px 28px 24px;
    background: #ffffff;
}

.student-charge-modal .modal-header h2 {
    margin: 5px 0 0;
    color: var(--color-dark);
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.student-charge-modal .modal-header p {
    max-width: 590px;
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ----------------------------------------------------------
   FORM BODY
---------------------------------------------------------- */

.student-charge-form {
    min-height: 0;
    padding: 24px 28px 28px;
    overflow-y: auto;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #c8d0da transparent;
}

.student-charge-form::-webkit-scrollbar {
    width: 8px;
}

.student-charge-form::-webkit-scrollbar-track {
    background: transparent;
}

.student-charge-form::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c8d0da;
}

/* ----------------------------------------------------------
   ACCOUNT SUMMARY
---------------------------------------------------------- */

.student-charge-form .payment-account-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 26px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fafbfc;
}

.student-charge-form .payment-account-summary > div {
    min-width: 0;
    padding: 18px 20px;
}

.student-charge-form .payment-account-summary > div + div {
    border-left: 1px solid var(--color-border);
}

.student-charge-form .payment-account-summary span,
.student-charge-form .payment-account-summary strong {
    display: block;
}

.student-charge-form .payment-account-summary span {
    margin-bottom: 7px;
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.student-charge-form .payment-account-summary strong {
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 17px;
    line-height: 1.35;
}

/* ----------------------------------------------------------
   FORM GRID
---------------------------------------------------------- */

.student-charge-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.student-charge-form .form-field {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 8px;
}

.student-charge-form .form-field-full {
    grid-column: 1 / -1;
}

.student-charge-form .form-field label {
    display: block;
    margin: 0;
    color: var(--color-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* ----------------------------------------------------------
   INPUTS
---------------------------------------------------------- */

.student-charge-form .form-field input,
.student-charge-form .form-field select,
.student-charge-form .form-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: var(--color-dark);
    font: inherit;
    font-size: 13px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.student-charge-form .form-field input,
.student-charge-form .form-field select {
    height: 50px;
    padding: 0 14px;
}

.student-charge-form .form-field select {
    appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            #667085 50%
        ),
        linear-gradient(
            135deg,
            #667085 50%,
            transparent 50%
        );
    background-position:
        calc(100% - 19px) 22px,
        calc(100% - 14px) 22px;
    background-repeat: no-repeat;
    background-size: 5px 5px;
}

.student-charge-form .form-field textarea {
    min-height: 105px;
    padding: 13px 14px;
    resize: vertical;
    line-height: 1.55;
}

.student-charge-form .form-field input::placeholder,
.student-charge-form .form-field textarea::placeholder {
    color: #98a2b3;
}

.student-charge-form .form-field input:hover,
.student-charge-form .form-field select:hover,
.student-charge-form .form-field textarea:hover {
    border-color: #cfb468;
}

.student-charge-form .form-field input:focus,
.student-charge-form .form-field select:focus,
.student-charge-form .form-field textarea:focus {
    border-color: var(--color-primary);
    background: #fffdf7;
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, 0.12);
}

.student-charge-form .form-field small {
    display: block;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.45;
}

/* ----------------------------------------------------------
   QUANTITY AND PRICE FIELDS
---------------------------------------------------------- */

.student-charge-form input[type="number"] {
    font-variant-numeric: tabular-nums;
}

.student-charge-form input[type="date"] {
    color-scheme: light;
}

/* ----------------------------------------------------------
   CALCULATED TOTAL
---------------------------------------------------------- */

.manual-charge-total {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 18px;
    border: 1px solid #ead7a0;
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            #fffdf7 0%,
            #fff8e8 100%
        );
}

.manual-charge-total span,
.manual-charge-total strong {
    display: block;
}

.manual-charge-total span {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
}

.manual-charge-total strong {
    color: #8a6200;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.035em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------
   MODAL ACTIONS
---------------------------------------------------------- */

.student-charge-form .modal-actions {
    position: sticky;
    bottom: -28px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 8px -28px -28px;
    padding: 20px 28px;
    border-top: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow:
        0 -10px 30px
        rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(10px);
}

.student-charge-form .modal-actions .button {
    min-width: 132px;
    min-height: 48px;
}

/* ----------------------------------------------------------
   MOBILE
---------------------------------------------------------- */

@media (max-width: 680px) {

    .student-charge-modal {
        width: 100%;
        max-height: 94vh;
        border-radius: 20px 20px 0 0;
    }

    .student-charge-modal .modal-header {
        padding: 21px 19px;
    }

    .student-charge-form {
        padding: 20px 18px 24px;
    }

    .student-charge-form .payment-account-summary,
    .student-charge-form .form-grid {
        grid-template-columns: 1fr;
    }

    .student-charge-form .payment-account-summary > div + div {
        border-top: 1px solid var(--color-border);
        border-left: 0;
    }

    .student-charge-form .form-field-full {
        grid-column: auto;
    }

    .manual-charge-total {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .student-charge-form .modal-actions {
        bottom: -24px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin:
            8px -18px -24px;
        padding: 17px 18px;
    }

    .student-charge-form .modal-actions .button {
        width: 100%;
        min-width: 0;
    }
}




/* ==========================================================
   LIVE DASHBOARD — COLLECTION PROGRESS
   SAFETY SEARCH: APP-DASHBOARD-LIVE-CSS
========================================================== */

.dashboard-progress-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(280px, .55fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-progress-card {
    padding: 24px;
}

.dashboard-progress-copy {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-progress-copy h2 {
    margin: 0;
    color: var(--color-dark);
    font-size: 20px;
    letter-spacing: -.025em;
}

.dashboard-progress-copy > strong {
    color: var(--color-primary-dark);
    font-size: 28px;
    letter-spacing: -.04em;
}

.dashboard-progress-track {
    width: 100%;
    height: 10px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf1f5;
}

.dashboard-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
}

.dashboard-progress-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.dashboard-progress-values > div {
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
}

.dashboard-progress-values span,
.dashboard-progress-values strong {
    display: block;
}

.dashboard-progress-values span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dashboard-progress-values strong {
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 15px;
}

.dashboard-outstanding-value {
    color: var(--color-danger) !important;
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 24px 24px;
}

.dashboard-action-grid .button {
    width: 100%;
    min-height: 46px;
}

@media (max-width: 1050px) {
    .dashboard-progress-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .dashboard-progress-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .dashboard-progress-values,
    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }
}




/* ==========================================================
   KLASENTA
   ENTERPRISE FINANCE DASHBOARD V2
 *
 * PURPOSE:
 * Compact, scalable dashboard styling designed to support
 * large financial values without wrapping or oversized cards.
 *
 * SAFETY SEARCH:
 * APP-DASHBOARD-ENTERPRISE-V2
========================================================== */

/* ----------------------------------------------------------
   PAGE RHYTHM
---------------------------------------------------------- */

.dashboard {
    display: grid;
    gap: 22px;
}

.dashboard-header {
    margin-bottom: 0;
}

.dashboard-header h1 {
    max-width: 760px;
    font-size: clamp(38px, 4vw, 56px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.finance-period-banner {
    min-height: 64px;
    padding: 15px 20px;
    border-radius: 14px;
}

/* ----------------------------------------------------------
   PRIMARY KPI GRID
---------------------------------------------------------- */

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

.stat-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 154px;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 18px 18px;
    overflow: hidden;
    border-radius: 16px;
}

.stat-card-top {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.stat-label {
    min-width: 0;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.065em;
    line-height: 1.35;
    text-transform: uppercase;
}

.stat-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* Designed to hold values up to GH₵99,999,999.99 */
.stat-value {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 12px 0 8px;
    overflow: hidden;
    color: var(--color-dark);
    font-size: clamp(26px, 2.55vw, 40px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.055em;
    white-space: nowrap;
    text-overflow: clip;
    font-variant-numeric: tabular-nums lining-nums;
}

.stat-meta {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.45;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Outstanding value can use a danger accent without changing layout. */
.stat-card:nth-child(3) .stat-value {
    color: var(--color-danger);
}

/* ----------------------------------------------------------
   COLLECTION PROGRESS
---------------------------------------------------------- */

.dashboard-progress-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(260px, 0.45fr);
    gap: 16px;
    margin: 0;
}

.dashboard-progress-card {
    padding: 22px;
}

.dashboard-progress-copy {
    align-items: center;
}

.dashboard-progress-copy h2 {
    font-size: 19px;
}

.dashboard-progress-copy > strong {
    font-size: clamp(25px, 2.4vw, 36px);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dashboard-progress-track {
    height: 9px;
    margin-top: 18px;
}

.dashboard-progress-values {
    gap: 12px;
    margin-top: 16px;
}

.dashboard-progress-values > div {
    min-width: 0;
    padding: 13px 14px;
}

.dashboard-progress-values strong {
    overflow: hidden;
    font-size: clamp(13px, 1.25vw, 17px);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------
   QUICK ACTIONS
---------------------------------------------------------- */

.dashboard-quick-actions {
    min-width: 0;
}

.dashboard-action-grid {
    gap: 9px;
    padding: 18px 20px 20px;
}

.dashboard-action-grid .button {
    min-height: 43px;
    border-radius: 11px;
    font-size: 12px;
}

/* ----------------------------------------------------------
   ACTIVITY GRID
---------------------------------------------------------- */

.dashboard-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(280px, 0.45fr);
    gap: 16px;
}

.dashboard-card {
    min-width: 0;
    border-radius: 16px;
}

.dashboard-card .card-heading {
    padding: 20px 22px 17px;
}

.dashboard-card .card-heading h2 {
    font-size: 19px;
}

.data-table th,
.data-table td {
    padding: 13px 16px;
}

.collection-item {
    gap: 16px;
    padding: 16px 20px;
}

.collection-item > strong {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------
   LARGE-DESKTOP VALUE PROTECTION
---------------------------------------------------------- */

@media (min-width: 1280px) and (max-width: 1500px) {
    .stat-value {
        font-size: clamp(25px, 2.25vw, 36px);
    }

    .stat-card {
        padding-inline: 16px;
    }
}

/* ----------------------------------------------------------
   LAPTOP
---------------------------------------------------------- */

@media (max-width: 1180px) {
    .stat-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        min-height: 146px;
    }

    .stat-value {
        font-size: clamp(30px, 4vw, 42px);
    }

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

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

/* ----------------------------------------------------------
   TABLET
---------------------------------------------------------- */

@media (max-width: 760px) {
    .dashboard {
        gap: 18px;
    }

    .dashboard-header h1 {
        font-size: clamp(34px, 8vw, 46px);
    }

    .stat-grid {
        gap: 12px;
    }

    .stat-card {
        min-height: 138px;
        padding: 17px 15px 15px;
    }

    .stat-value {
        font-size: clamp(25px, 6vw, 34px);
    }

    .stat-meta {
        font-size: 9px;
    }

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

/* ----------------------------------------------------------
   MOBILE
---------------------------------------------------------- */

@media (max-width: 520px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 132px;
    }

    .stat-value {
        font-size: clamp(31px, 10vw, 42px);
    }

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

    .finance-period-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}



/* ==========================================================
   DEBTORS ANALYSIS CENTRE
   SAFETY SEARCH: APP-DEBTORS-ANALYSIS-CSS
========================================================== */

.debtors-analysis-centre {
    display: grid;
    gap: 20px;
}

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

.debtors-summary-grid article {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.debtors-summary-grid span,
.debtors-summary-grid strong,
.debtors-summary-grid small {
    display: block;
}

.debtors-summary-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.debtors-summary-grid strong {
    margin-top: 10px;
    overflow: hidden;
    color: var(--color-dark);
    font-size: clamp(19px, 1.8vw, 28px);
    line-height: 1;
    letter-spacing: -.04em;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.debtors-summary-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.debtors-aging-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 22px 24px;
}

.debtors-aging-grid > div {
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: #fafbfc;
}

.debtors-aging-grid span,
.debtors-aging-grid strong {
    display: block;
}

.debtors-aging-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.debtors-aging-grid strong {
    margin-top: 8px;
    overflow: hidden;
    font-size: clamp(16px, 1.55vw, 22px);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.debtors-aging-grid .is-critical {
    border-color: #fecaca;
    background: #fff7f7;
}

.debtors-aging-grid .is-critical strong {
    color: var(--color-danger);
}

.debtors-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.debtors-compact-table th,
.debtors-compact-table td {
    padding: 12px 14px;
}

.debtor-family-list,
.debtor-mini-list {
    display: grid;
}

.debtor-family-item,
.debtor-mini-list > a {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 20px;
    border-top: 1px solid var(--color-border);
    color: inherit;
    text-decoration: none;
}

.debtor-family-item:hover,
.debtor-mini-list > a:hover {
    background: #fafbfc;
}

.debtor-family-item > div,
.debtor-mini-list > a > div {
    min-width: 0;
}

.debtor-family-item strong,
.debtor-family-item span,
.debtor-mini-list strong,
.debtor-mini-list span {
    display: block;
}

.debtor-family-item > div strong,
.debtor-mini-list > a > div strong {
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.debtor-family-item span,
.debtor-mini-list span {
    margin-top: 4px;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 9px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.debtor-family-item > strong,
.debtor-mini-list > a > strong {
    flex: 0 0 auto;
    color: var(--color-danger);
    font-size: 12px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.report-row-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 1250px) {
    .debtors-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 950px) {
    .debtors-aging-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .debtors-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .debtors-summary-grid,
    .debtors-aging-grid {
        grid-template-columns: 1fr;
    }
}




/* ==========================================================
   DEBTORS ANALYSIS — FULL VALUE DISPLAY
   SAFETY SEARCH: APP-DEBTORS-FULL-VALUE-DISPLAY
========================================================== */

/* ----------------------------------------------------------
   EXECUTIVE SUMMARY
---------------------------------------------------------- */

.debtors-summary-grid {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.debtors-summary-grid article {
    min-height: 142px;
    padding: 18px 20px;
}

.debtors-summary-grid strong {
    overflow: visible;
    font-size: clamp(22px, 2vw, 32px);
    line-height: 1.08;
    white-space: normal;
    text-overflow: unset;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* ----------------------------------------------------------
   AGING ANALYSIS
---------------------------------------------------------- */

.debtors-aging-grid {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.debtors-aging-grid > div {
    min-height: 104px;
}

.debtors-aging-grid strong {
    overflow: visible;
    font-size: clamp(20px, 1.8vw, 28px);
    line-height: 1.1;
    white-space: normal;
    text-overflow: unset;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* ----------------------------------------------------------
   OTHER DEBTOR VALUES
---------------------------------------------------------- */

.debtor-family-item > strong,
.debtor-mini-list > a > strong,
.debtors-compact-table td,
.debtors-compact-table th {
    white-space: normal;
}

.debtor-family-item > strong,
.debtor-mini-list > a > strong {
    text-align: right;
    overflow-wrap: anywhere;
}

/* ----------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------- */

@media (max-width: 1100px) {
    .debtors-summary-grid,
    .debtors-aging-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .debtors-summary-grid,
    .debtors-aging-grid {
        grid-template-columns: 1fr;
    }

    .debtors-summary-grid strong,
    .debtors-aging-grid strong {
        font-size: 24px;
    }
}



/* ==========================================================
   EXPENSES & ACCOUNTING OVERVIEW
   SAFETY SEARCH: APP-EXPENSES-OVERVIEW-CSS
========================================================== */

.expenses-overview-page {
    display: grid;
    gap: 22px;
}

.expenses-overview-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.expenses-overview-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 54px);
    line-height: .98;
    letter-spacing: -.05em;
}

.expenses-overview-header p {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.expenses-header-actions {
    display: flex;
    gap: 10px;
}

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

.expense-kpi-card {
    display: flex;
    min-width: 0;
    min-height: 150px;
    flex-direction: column;
    justify-content: space-between;
    padding: 19px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
    box-shadow:
        0 14px 38px
        rgba(15, 23, 42, .05);
}

.expense-kpi-card span,
.expense-kpi-card strong,
.expense-kpi-card small {
    display: block;
}

.expense-kpi-card span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.expense-kpi-card small {
    margin-top: 7px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.expense-kpi-card strong {
    margin-top: 18px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(24px, 2.3vw, 36px);
    line-height: 1;
    letter-spacing: -.045em;
    font-variant-numeric: tabular-nums;
}

.expense-danger-value {
    color: var(--color-danger) !important;
}

.expenses-overview-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(280px, .5fr);
    gap: 18px;
}

.expense-outflow-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 22px 24px;
}

.expense-outflow-grid > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
}

.expense-outflow-grid span,
.expense-outflow-grid strong {
    display: block;
}

.expense-outflow-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.expense-outflow-grid strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(16px, 1.5vw, 22px);
    line-height: 1.08;
    font-variant-numeric: tabular-nums;
}

.expense-action-grid {
    display: grid;
    gap: 10px;
    padding: 18px 20px 22px;
}

.expense-action-grid .button {
    width: 100%;
    min-height: 44px;
}

.expenses-main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.6fr)
        minmax(290px, .4fr);
    gap: 18px;
}

.expense-supplier-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 22px 24px;
}

.expense-supplier-item {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
    color: inherit;
    text-decoration: none;
}

.expense-supplier-item:hover {
    border-color: #d8bd76;
    background: #fffdf7;
}

.expense-supplier-item > div {
    min-width: 0;
}

.expense-supplier-item span,
.expense-supplier-item strong {
    display: block;
}

.expense-supplier-item > div strong {
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.expense-supplier-item span {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
}

.expense-supplier-item > strong {
    flex: 0 0 auto;
    color: var(--color-danger);
    font-size: 13px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
    .expense-kpi-grid,
    .expense-outflow-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .expenses-overview-grid,
    .expenses-main-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .expenses-overview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .expenses-header-actions {
        width: 100%;
    }

    .expenses-header-actions .button {
        flex: 1;
    }

    .expense-kpi-grid,
    .expense-outflow-grid,
    .expense-supplier-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .expenses-header-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}



/* ==========================================================
   RECORD EXPENSE FORM
   SAFETY SEARCH: APP-EXPENSE-CREATE-CSS
========================================================== */

.expense-create-page {
    display: grid;
    gap: 22px;
}

.expense-create-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.expense-create-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.expense-create-header p {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.expense-entry-form {
    display: grid;
    gap: 18px;
}

.expense-form-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(330px, .65fr);
    gap: 18px;
}

.expense-form-card {
    min-width: 0;
}

.expense-form-body {
    padding: 22px 24px 26px;
}

.expense-entry-form .form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.expense-entry-form .form-field {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 8px;
}

.expense-entry-form .form-field-full {
    grid-column: 1 / -1;
}

.expense-entry-form label {
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .025em;
}

.expense-entry-form input,
.expense-entry-form select,
.expense-entry-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: var(--color-dark);
    font: inherit;
    font-size: 12px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.expense-entry-form input,
.expense-entry-form select {
    min-height: 48px;
    padding: 0 13px;
}

.expense-entry-form textarea {
    min-height: 104px;
    padding: 13px;
    resize: vertical;
    line-height: 1.55;
}

.expense-entry-form input:focus,
.expense-entry-form select:focus,
.expense-entry-form textarea:focus {
    border-color: var(--color-primary);
    background: #fffdf7;
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .12);
}

.expense-entry-form small {
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.expense-total-panel {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 18px;
    border: 1px solid #ead7a0;
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            #fffdf7 0%,
            #fff8e8 100%
        );
}

.expense-total-panel span,
.expense-total-panel strong {
    display: block;
}

.expense-total-panel span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 700;
}

.expense-total-panel strong {
    color: #8a6200;
    font-size: 23px;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.expense-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.expense-form-actions .button {
    min-width: 140px;
    min-height: 47px;
}

@media (max-width: 1100px) {
    .expense-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .expense-create-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .expense-entry-form .form-grid {
        grid-template-columns: 1fr;
    }

    .expense-entry-form .form-field-full {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .expense-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .expense-form-actions .button {
        width: 100%;
    }

    .expense-total-panel {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}



/* ==========================================================
   EXPENSE DETAILS
   SAFETY SEARCH: APP-EXPENSE-VIEW-CSS
========================================================== */

.expense-view-page { display:grid; gap:20px; }
.expense-view-header { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.expense-view-header h1 { margin:6px 0 0; color:var(--color-dark); font-size:clamp(34px,4vw,50px); line-height:1; letter-spacing:-.05em; }
.expense-view-header p { margin:10px 0 0; color:var(--color-muted); font-size:11px; }
.expense-view-actions { display:flex; gap:10px; }
.expense-view-status-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); overflow:hidden; border:1px solid var(--color-border); border-radius:14px; background:#fff; }
.expense-view-status-strip>div { min-width:0; padding:17px 19px; border-right:1px solid var(--color-border); }
.expense-view-status-strip>div:last-child { border-right:0; }
.expense-view-status-strip span,.expense-view-status-strip strong { display:block; }
.expense-view-status-strip>div>span { margin-bottom:7px; color:var(--color-muted); font-size:9px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.expense-view-total { overflow-wrap:anywhere; color:var(--color-dark); font-size:22px; font-variant-numeric:tabular-nums; }
.expense-view-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr); gap:18px; }
.expense-detail-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; }
.expense-detail-list>div { min-width:0; padding:16px 20px; border-top:1px solid var(--color-border); }
.expense-detail-list dt { color:var(--color-muted); font-size:9px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.expense-detail-list dd { margin:6px 0 0; overflow-wrap:anywhere; color:var(--color-dark); font-size:11px; font-weight:700; line-height:1.45; }
.expense-amount-breakdown { display:grid; }
.expense-amount-breakdown>div { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 20px; border-top:1px solid var(--color-border); }
.expense-amount-breakdown span,.expense-amount-breakdown strong { display:block; }
.expense-amount-breakdown span { color:var(--color-muted); font-size:10px; }
.expense-amount-breakdown strong { color:var(--color-dark); font-size:15px; font-variant-numeric:tabular-nums; }
.expense-amount-breakdown .is-total { background:#fffaf0; }
.expense-amount-breakdown .is-total strong { color:#8a6200; font-size:20px; }
.expense-text-block { display:grid; }
.expense-text-block>div { padding:18px 20px; border-top:1px solid var(--color-border); }
.expense-text-block span { color:var(--color-muted); font-size:9px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.expense-text-block p { margin:8px 0 0; color:var(--color-dark); font-size:11px; line-height:1.65; }
.expense-attachment-list,.expense-audit-list { display:grid; }
.expense-attachment-list a,.expense-audit-list>div { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 20px; border-top:1px solid var(--color-border); }
.expense-attachment-list a { color:inherit; text-decoration:none; }
.expense-attachment-list a:hover { background:#fafbfc; }
.expense-attachment-list strong,.expense-attachment-list span,.expense-audit-list span,.expense-audit-list strong,.expense-audit-list small { display:block; }
.expense-attachment-list span,.expense-audit-list small { margin-top:4px; color:var(--color-muted); font-size:9px; }
.expense-audit-list>div { align-items:flex-start; flex-direction:column; }
.expense-audit-list span { color:#8a6200; font-size:9px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.expense-audit-list strong { font-size:11px; line-height:1.45; }
@media (max-width:980px){ .expense-view-grid{grid-template-columns:1fr;} .expense-view-status-strip{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:700px){ .expense-view-header{align-items:flex-start;flex-direction:column;} .expense-view-actions{width:100%;flex-wrap:wrap;} .expense-view-actions .button{flex:1;} .expense-detail-list,.expense-view-status-strip{grid-template-columns:1fr;} .expense-view-status-strip>div{border-right:0;border-bottom:1px solid var(--color-border);} .expense-view-status-strip>div:last-child{border-bottom:0;} }
@media print{ .sidebar,.app-header,.expense-view-actions{display:none!important;} .content{margin:0!important;padding:0!important;} .expense-view-page{padding:12mm;} .dashboard-card,.expense-view-status-strip{break-inside:avoid;box-shadow:none;} }




/* ==========================================================
   EXPENSE VIEW — STATUS STRIP ALIGNMENT
   SAFETY SEARCH: APP-EXPENSE-STATUS-ALIGNMENT
========================================================== */

.expense-view-status-strip > div {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.expense-view-status-strip > div > strong {
    display: flex;
    width: 100%;
    align-items: center;
}

.expense-view-status-strip .status-badge {
    display: inline-flex;
    width: auto;
    min-width: 88px;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.expense-view-status-strip .expense-view-total {
    display: inline-flex;
    width: auto;
    align-items: center;
    min-height: 30px;
}



/* ==========================================================
   SUPPLIER DIRECTORY
   SAFETY SEARCH: APP-SUPPLIERS-CSS
========================================================== */

.suppliers-page{display:grid;gap:20px}
.suppliers-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.suppliers-header h1{margin:6px 0 0;color:var(--color-dark);font-size:clamp(36px,4vw,52px);line-height:.98;letter-spacing:-.05em}
.suppliers-header p{max-width:690px;margin:12px 0 0;color:var(--color-muted);font-size:13px;line-height:1.6}

.supplier-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.supplier-kpi-grid article{min-width:0;min-height:136px;padding:18px;border:1px solid var(--color-border);border-radius:15px;background:#fff}
.supplier-kpi-grid span,.supplier-kpi-grid strong,.supplier-kpi-grid small{display:block}
.supplier-kpi-grid span{color:var(--color-muted);font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.supplier-kpi-grid strong{margin-top:14px;overflow-wrap:anywhere;color:var(--color-dark);font-size:clamp(24px,2.3vw,34px);line-height:1;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.supplier-kpi-grid small{margin-top:10px;color:var(--color-muted);font-size:9px;line-height:1.45}
.supplier-danger-value{color:var(--color-danger)!important}

.supplier-directory-heading{align-items:center}
.supplier-directory-search{display:flex;gap:10px}
.supplier-directory-search input,.supplier-directory-search select{min-height:44px;border:1px solid var(--color-border);border-radius:11px;outline:none;background:#fff;font:inherit;font-size:11px}
.supplier-directory-search input{width:min(330px,40vw);padding:0 13px}
.supplier-directory-search select{padding:0 36px 0 12px}

.supplier-directory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:20px 22px 24px}
.supplier-directory-item{display:grid;min-width:0;gap:16px;padding:17px;border:1px solid var(--color-border);border-radius:14px;background:#fff;color:inherit;text-decoration:none;transition:border-color 160ms ease,box-shadow 160ms ease,transform 160ms ease}
.supplier-directory-item:hover{border-color:#d8bd76;box-shadow:0 12px 30px rgba(15,23,42,.07);transform:translateY(-2px)}

.supplier-card-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px}
.supplier-avatar{display:grid;width:42px;height:42px;place-items:center;border-radius:12px;background:#f7efd9;color:#8a6200;font-size:11px;font-weight:800}
.supplier-card-top>div:nth-child(2){min-width:0}
.supplier-card-top strong,.supplier-card-top span{display:block}
.supplier-card-top>div:nth-child(2) strong{overflow:hidden;font-size:12px;white-space:nowrap;text-overflow:ellipsis}
.supplier-card-top>div:nth-child(2) span{margin-top:4px;color:var(--color-muted);font-size:9px}

.supplier-card-contact,.supplier-card-finance{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.supplier-card-contact>div,.supplier-card-finance>div{min-width:0;padding:12px;border:1px solid var(--color-border);border-radius:11px;background:#fafbfc}
.supplier-card-contact span,.supplier-card-contact strong,.supplier-card-finance span,.supplier-card-finance strong{display:block}
.supplier-card-contact span,.supplier-card-finance span{color:var(--color-muted);font-size:8px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
.supplier-card-contact strong,.supplier-card-finance strong{margin-top:6px;overflow:hidden;color:var(--color-dark);font-size:10px;white-space:nowrap;text-overflow:ellipsis}

.supplier-card-footer{display:flex;justify-content:space-between;gap:12px;color:var(--color-muted);font-size:8px}

.supplier-modal{width:min(760px,calc(100vw - 40px))}
.supplier-form{padding:22px 26px 0;overflow-y:auto}
.supplier-form .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.supplier-form .form-field{display:grid;gap:8px}
.supplier-form .form-field-full{grid-column:1/-1}
.supplier-form label{color:var(--color-dark);font-size:10px;font-weight:800}
.supplier-form input,.supplier-form select,.supplier-form textarea{width:100%;border:1px solid var(--color-border);border-radius:11px;outline:none;background:#fff;font:inherit;font-size:12px}
.supplier-form input,.supplier-form select{min-height:48px;padding:0 13px}
.supplier-form textarea{min-height:96px;padding:13px;resize:vertical}
.supplier-form input:focus,.supplier-form select:focus,.supplier-form textarea:focus{border-color:var(--color-primary);box-shadow:0 0 0 4px rgba(200,155,44,.12)}
.supplier-form .modal-actions{position:sticky;bottom:0;margin:22px -26px 0;padding:18px 26px}

@media(max-width:1180px){
  .supplier-kpi-grid,.supplier-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .suppliers-header,.supplier-directory-heading{align-items:flex-start;flex-direction:column}
  .supplier-directory-search{width:100%;flex-direction:column}
  .supplier-directory-search input,.supplier-directory-search select{width:100%}
  .supplier-form .form-grid{grid-template-columns:1fr}
  .supplier-form .form-field-full{grid-column:auto}
}
@media(max-width:580px){
  .supplier-kpi-grid,.supplier-directory-grid{grid-template-columns:1fr}
  .supplier-card-contact,.supplier-card-finance{grid-template-columns:1fr}
}


/* ==========================================================
   SUPPLIER PROFILE
   SAFETY SEARCH: APP-SUPPLIER-VIEW-CSS
========================================================== */

.supplier-view-page {
    display: grid;
    gap: 20px;
}

.supplier-view-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.supplier-view-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.supplier-view-header p {
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 11px;
}

.supplier-view-actions {
    display: flex;
    gap: 10px;
}

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

.supplier-view-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.supplier-view-kpi-grid span,
.supplier-view-kpi-grid strong,
.supplier-view-kpi-grid small {
    display: block;
}

.supplier-view-kpi-grid > article > span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.supplier-view-kpi-grid > article > strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.supplier-view-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.supplier-positive-value {
    color: #087f3f !important;
}

.supplier-view-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, .55fr);
    gap: 18px;
}

.supplier-detail-list {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    margin: 0;
}

.supplier-detail-list > div {
    min-width: 0;
    padding: 17px 20px;
    border-top: 1px solid var(--color-border);
}

.supplier-detail-full {
    grid-column: 1 / -1;
}

.supplier-detail-list dt {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.supplier-detail-list dd {
    margin: 7px 0 0;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.55;
}

.supplier-record-list {
    display: grid;
}

.supplier-record-list > div {
    padding: 17px 20px;
    border-top: 1px solid var(--color-border);
}

.supplier-record-list span,
.supplier-record-list strong {
    display: block;
}

.supplier-record-list span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.supplier-record-list strong {
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 1050px) {
    .supplier-view-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .supplier-view-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .supplier-view-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .supplier-view-actions {
        width: 100%;
    }

    .supplier-view-actions .button {
        flex: 1;
    }

    .supplier-detail-list,
    .supplier-view-kpi-grid {
        grid-template-columns: 1fr;
    }

    .supplier-detail-full {
        grid-column: auto;
    }
}

/* ==========================================================
   EXPENSE CATEGORIES
   SAFETY SEARCH: APP-EXPENSE-CATEGORIES-CSS
========================================================== */

.expense-categories-page {
    display: grid;
    gap: 20px;
}

.expense-categories-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.expense-categories-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.expense-categories-header p {
    max-width: 690px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

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

.expense-category-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.expense-category-kpi-grid span,
.expense-category-kpi-grid strong,
.expense-category-kpi-grid small {
    display: block;
}

.expense-category-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.expense-category-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.expense-category-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.expense-category-directory-heading {
    align-items: center;
}

.expense-category-search {
    display: flex;
    gap: 10px;
}

.expense-category-search input,
.expense-category-search select {
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.expense-category-search input {
    width: min(330px, 40vw);
    padding: 0 13px;
}

.expense-category-search select {
    padding: 0 36px 0 12px;
}

.expense-category-table td:nth-child(4) strong {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.expense-category-edit {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.expense-category-modal {
    width: min(720px, calc(100vw - 40px));
}

.expense-category-form {
    padding: 22px 26px 0;
}

.expense-category-form .form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.expense-category-form .form-field {
    display: grid;
    gap: 8px;
}

.expense-category-form .form-field-full {
    grid-column: 1 / -1;
}

.expense-category-form label {
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 800;
}

.expense-category-form input,
.expense-category-form select,
.expense-category-form textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 12px;
}

.expense-category-form input,
.expense-category-form select {
    min-height: 48px;
    padding: 0 13px;
}

.expense-category-form textarea {
    min-height: 96px;
    padding: 13px;
    resize: vertical;
}

.expense-category-form input:focus,
.expense-category-form select:focus,
.expense-category-form textarea:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .12);
}

.expense-category-form .modal-actions {
    margin: 22px -26px 0;
    padding: 18px 26px;
}

@media (max-width: 1050px) {
    .expense-category-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .expense-categories-header,
    .expense-category-directory-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .expense-category-search {
        width: 100%;
        flex-direction: column;
    }

    .expense-category-search input,
    .expense-category-search select {
        width: 100%;
    }

    .expense-category-form .form-grid {
        grid-template-columns: 1fr;
    }

    .expense-category-form .form-field-full {
        grid-column: auto;
    }
}

@media (max-width: 580px) {
    .expense-category-kpi-grid {
        grid-template-columns: 1fr;
    }
}



/* ==========================================================
   EXPENSE EDIT
   SAFETY SEARCH: APP-EXPENSE-EDIT-CSS
========================================================== */

.expense-edit-page {
    display: grid;
    gap: 20px;
}

.expense-edit-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.expense-edit-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.expense-edit-header p {
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 11px;
}

.expense-edit-form {
    display: grid;
    gap: 18px;
}

.expense-edit-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(330px, .65fr);
    gap: 18px;
}

.expense-edit-form-body {
    padding: 22px 24px 26px;
}

.expense-edit-form .form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.expense-edit-form .form-field {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.expense-edit-form .form-field-full {
    grid-column: 1 / -1;
}

.expense-edit-form label {
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 800;
}

.expense-edit-form input,
.expense-edit-form select,
.expense-edit-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: var(--color-dark);
    font: inherit;
    font-size: 12px;
}

.expense-edit-form input,
.expense-edit-form select {
    min-height: 48px;
    padding: 0 13px;
}

.expense-edit-form textarea {
    min-height: 104px;
    padding: 13px;
    resize: vertical;
}

.expense-edit-form input:focus,
.expense-edit-form select:focus,
.expense-edit-form textarea:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .12);
}

.expense-edit-form input:disabled,
.expense-edit-form select:disabled,
.expense-edit-form textarea:disabled {
    border-color: #e2e8f0;
    background: #f4f6f8;
    color: #64748b;
    cursor: not-allowed;
}

.expense-edit-form small {
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.expense-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.expense-edit-actions .button {
    min-width: 140px;
    min-height: 47px;
}

@media (max-width: 1100px) {
    .expense-edit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .expense-edit-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .expense-edit-form .form-grid {
        grid-template-columns: 1fr;
    }

    .expense-edit-form .form-field-full {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .expense-edit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .expense-edit-actions .button {
        width: 100%;
    }
}



/* ==========================================================
   EXPENSE APPROVAL QUEUE
   SAFETY SEARCH: APP-EXPENSE-APPROVALS-CSS
========================================================== */

.expense-approvals-page {
    display: grid;
    gap: 20px;
}

.expense-approvals-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.expense-approvals-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.expense-approvals-header p {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

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

.expense-approval-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.expense-approval-kpi-grid span,
.expense-approval-kpi-grid strong,
.expense-approval-kpi-grid small {
    display: block;
}

.expense-approval-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.expense-approval-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.expense-approval-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.expense-approval-heading {
    align-items: center;
}

.expense-approval-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.expense-approval-tabs a {
    padding: 8px 11px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
}

.expense-approval-tabs a.is-active {
    border-color: var(--color-primary);
    background: #fff8e8;
    color: #8a6200;
}

.expense-approval-list {
    display: grid;
}

.expense-approval-item {
    display: grid;
    gap: 15px;
    padding: 18px 22px;
    border-top: 1px solid var(--color-border);
}

.expense-approval-main,
.expense-approval-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.expense-approval-main > div {
    min-width: 0;
}

.expense-approval-main span {
    display: block;
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 9px;
}

.expense-approval-meta {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.expense-approval-meta > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fafbfc;
}

.expense-approval-meta span,
.expense-approval-meta strong {
    display: block;
}

.expense-approval-meta span {
    color: var(--color-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.expense-approval-meta strong {
    margin-top: 5px;
    overflow: hidden;
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.expense-approval-footer > strong {
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

.expense-approval-actions {
    display: flex;
    gap: 8px;
}

.expense-approval-actions form {
    margin: 0;
}

.expense-rejection-note {
    max-width: 480px;
    text-align: right;
}

.expense-rejection-note span,
.expense-rejection-note strong {
    display: block;
}

.expense-rejection-note span {
    color: var(--color-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.expense-rejection-note strong {
    margin-top: 5px;
    color: var(--color-danger);
    font-size: 10px;
    line-height: 1.45;
}

.expense-reject-modal {
    width: min(620px, calc(100vw - 40px));
}

.expense-reject-form {
    padding: 22px 26px 0;
}

.expense-reject-form .form-field {
    display: grid;
    gap: 8px;
}

.expense-reject-form label {
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 800;
}

.expense-reject-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 13px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    outline: none;
    font: inherit;
    font-size: 12px;
    resize: vertical;
}

.expense-reject-form textarea:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .12);
}

.expense-reject-form .modal-actions {
    margin: 22px -26px 0;
    padding: 18px 26px;
}

@media (max-width: 1050px) {
    .expense-approval-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .expense-approvals-header,
    .expense-approval-heading,
    .expense-approval-main,
    .expense-approval-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .expense-approval-tabs {
        width: 100%;
    }

    .expense-approval-actions {
        width: 100%;
    }

    .expense-approval-actions form,
    .expense-approval-actions .button {
        flex: 1;
    }
}

@media (max-width: 580px) {
    .expense-approval-kpi-grid,
    .expense-approval-meta {
        grid-template-columns: 1fr;
    }
}



/* ==========================================================
   KLASENTA
   SUPPLIER PAYMENT
   FILE: assets/css/app.css

   PURPOSE:
   Styles the supplier payment workflow, including:
   - Page header
   - Payment summary cards
   - Outstanding expense allocation table
   - Payment detail form
   - Payment total panel
   - Action footer
   - Responsive behaviour

   SAFETY SEARCH:
   APP-SUPPLIER-PAYMENT-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   SUPPLIER PAYMENT PAGE WRAPPER
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-WRAPPER
========================================================== */

.supplier-payment-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-HEADER
========================================================== */

.supplier-payment-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.supplier-payment-header > div {
    min-width: 0;
}

.supplier-payment-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.supplier-payment-header p {
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.5;
}


/* ==========================================================
   SECTION 03
   PAYMENT SUMMARY CARDS
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-SUMMARY
========================================================== */

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

.supplier-payment-summary article {
    min-width: 0;
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
    box-shadow:
        0 14px 34px
        rgba(15, 23, 42, .045);
}

.supplier-payment-summary span,
.supplier-payment-summary strong,
.supplier-payment-summary small {
    display: block;
}

.supplier-payment-summary span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.supplier-payment-summary strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.supplier-payment-summary small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}


/* ==========================================================
   SECTION 04
   PAYMENT FORM LAYOUT
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-FORM
========================================================== */

.supplier-payment-form {
    display: grid;
    gap: 18px;
}

.supplier-payment-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(320px, .55fr);
    gap: 18px;
    align-items: start;
}


/* ==========================================================
   SECTION 05
   OUTSTANDING EXPENSE ALLOCATION TABLE
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-ALLOCATION
========================================================== */

.supplier-payment-table {
    width: 100%;
}

.supplier-payment-table th,
.supplier-payment-table td {
    vertical-align: middle;
}

.supplier-payment-table td:first-child {
    min-width: 220px;
}

.supplier-payment-table td:first-child strong,
.supplier-payment-table td:first-child span {
    display: block;
}

.supplier-payment-table td:first-child span {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.4;
}

.supplier-payment-table td:nth-child(3) strong {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.supplier-allocation-input {
    width: 130px;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--color-dark);
    font: inherit;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.supplier-allocation-input:focus {
    border-color: var(--color-primary);
    background: #fffdf7;
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .12);
}


/* ==========================================================
   SECTION 06
   PAYMENT DETAILS CARD
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-DETAILS
========================================================== */

.supplier-payment-details {
    min-width: 0;
}

.supplier-payment-fields {
    display: grid;
    gap: 16px;
    padding: 20px 22px 24px;
}

.supplier-payment-fields .form-field {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.supplier-payment-fields label {
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
}

.supplier-payment-fields input,
.supplier-payment-fields select,
.supplier-payment-fields textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: var(--color-dark);
    font: inherit;
    font-size: 12px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.supplier-payment-fields input,
.supplier-payment-fields select {
    min-height: 48px;
    padding: 0 13px;
}

.supplier-payment-fields textarea {
    min-height: 92px;
    padding: 13px;
    line-height: 1.55;
    resize: vertical;
}

.supplier-payment-fields input:focus,
.supplier-payment-fields select:focus,
.supplier-payment-fields textarea:focus {
    border-color: var(--color-primary);
    background: #fffdf7;
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .12);
}


/* ==========================================================
   SECTION 07
   PAYMENT TOTAL PANEL
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-TOTAL
========================================================== */

.supplier-payment-total {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 18px;
    border: 1px solid #ead7a0;
    border-radius: 12px;
    background:
        linear-gradient(
            135deg,
            #fffdf7 0%,
            #fff8e8 100%
        );
}

.supplier-payment-total span,
.supplier-payment-total strong {
    display: block;
}

.supplier-payment-total span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
}

.supplier-payment-total strong {
    overflow-wrap: anywhere;
    color: #8a6200;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}


/* ==========================================================
   SECTION 08
   FORM ACTIONS
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-ACTIONS
========================================================== */

.supplier-payment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.supplier-payment-actions .button {
    min-width: 140px;
    min-height: 47px;
}


/* ==========================================================
   SECTION 09
   RESPONSIVE — TABLET
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-TABLET
========================================================== */

@media (max-width: 1050px) {

    .supplier-payment-grid {
        grid-template-columns: 1fr;
    }

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

}


/* ==========================================================
   SECTION 10
   RESPONSIVE — MOBILE
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-MOBILE
========================================================== */

@media (max-width: 760px) {

    .supplier-payment-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .supplier-payment-header .button {
        width: 100%;
    }

    .supplier-payment-summary {
        grid-template-columns: 1fr;
    }

    .supplier-payment-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .supplier-payment-actions .button {
        width: 100%;
    }

    .supplier-payment-total {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

}


/* ==========================================================
   SECTION 11
   RESPONSIVE — SMALL MOBILE
   SAFETY SEARCH: APP-SUPPLIER-PAYMENT-SMALL-MOBILE
========================================================== */

@media (max-width: 520px) {

    .supplier-payment-fields {
        padding: 18px;
    }

    .supplier-allocation-input {
        width: 110px;
    }

}



/* ==========================================================
   KLASENTA
   ACCOUNTS PAYABLE DASHBOARD
   FILE: assets/css/app.css

   PURPOSE:
   Styles the Accounts Payable dashboard, including:
   - Page header
   - Summary cards
   - Ageing analysis
   - Filters
   - Open bills table
   - Supplier priority summary
   - Responsive behaviour

   SAFETY SEARCH:
   APP-ACCOUNTS-PAYABLE-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-WRAPPER
========================================================== */

.accounts-payable-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-HEADER
========================================================== */

.accounts-payable-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.accounts-payable-header > div {
    min-width: 0;
}

.accounts-payable-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.accounts-payable-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   SECTION 03
   SUMMARY CARDS
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-SUMMARY
========================================================== */

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

.accounts-payable-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.accounts-payable-kpi-grid span,
.accounts-payable-kpi-grid strong,
.accounts-payable-kpi-grid small {
    display: block;
}

.accounts-payable-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.accounts-payable-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.accounts-payable-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}


/* ==========================================================
   SECTION 04
   AGEING ANALYSIS
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-AGING
========================================================== */

.accounts-payable-aging-grid {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 22px 24px;
}

.accounts-payable-aging-grid a {
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    background: #fafbfc;
    color: inherit;
    text-decoration: none;
}

.accounts-payable-aging-grid a:hover,
.accounts-payable-aging-grid a.is-active {
    border-color: #d8bd76;
    background: #fffdf7;
}

.accounts-payable-aging-grid a.is-critical {
    border-color: #fecaca;
    background: #fff7f7;
}

.accounts-payable-aging-grid span,
.accounts-payable-aging-grid strong {
    display: block;
}

.accounts-payable-aging-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.accounts-payable-aging-grid strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(17px, 1.55vw, 23px);
    line-height: 1.08;
    font-variant-numeric: tabular-nums;
}

.accounts-payable-aging-grid a.is-critical strong {
    color: var(--color-danger);
}


/* ==========================================================
   SECTION 05
   FILTERS
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-FILTERS
========================================================== */

.accounts-payable-filters {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(180px, 1fr))
        auto;
    gap: 12px;
    align-items: end;
    padding: 20px 22px;
}

.accounts-payable-filters .form-field {
    display: grid;
    gap: 7px;
}

.accounts-payable-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.accounts-payable-filters select {
    width: 100%;
    min-height: 44px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.accounts-payable-filters select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.accounts-payable-filter-actions {
    display: flex;
    gap: 8px;
}

.accounts-payable-filter-actions .button {
    min-height: 44px;
}


/* ==========================================================
   SECTION 06
   OPEN BILLS TABLE
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-BILLS
========================================================== */

.accounts-payable-table td:nth-child(5),
.accounts-payable-table td:nth-child(6),
.accounts-payable-table td:nth-child(7) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.accounts-payable-table td:last-child {
    white-space: nowrap;
}


/* ==========================================================
   SECTION 07
   SUPPLIER PRIORITY SUMMARY
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-SUPPLIERS
========================================================== */

.accounts-payable-supplier-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 22px 24px;
}

.accounts-payable-supplier-grid a {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
    color: inherit;
    text-decoration: none;
}

.accounts-payable-supplier-grid a:hover {
    border-color: #d8bd76;
    background: #fffdf7;
}

.accounts-payable-supplier-grid a > div {
    min-width: 0;
}

.accounts-payable-supplier-grid span,
.accounts-payable-supplier-grid strong {
    display: block;
}

.accounts-payable-supplier-grid a > div strong {
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.accounts-payable-supplier-grid span {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
}

.accounts-payable-supplier-grid a > strong {
    flex: 0 0 auto;
    color: var(--color-danger);
    font-size: 12px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}


/* ==========================================================
   SECTION 08
   RESPONSIVE — TABLET
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-TABLET
========================================================== */

@media (max-width: 1150px) {

    .accounts-payable-kpi-grid,
    .accounts-payable-supplier-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .accounts-payable-aging-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* ==========================================================
   SECTION 09
   RESPONSIVE — MOBILE
   SAFETY SEARCH: APP-ACCOUNTS-PAYABLE-MOBILE
========================================================== */

@media (max-width: 760px) {

    .accounts-payable-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .accounts-payable-header .button {
        width: 100%;
    }

    .accounts-payable-kpi-grid,
    .accounts-payable-aging-grid,
    .accounts-payable-supplier-grid,
    .accounts-payable-filters {
        grid-template-columns: 1fr;
    }

    .accounts-payable-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

}


/* ==========================================================
   KLASENTA
   CASHBOOK
   FILE: assets/css/app.css

   PURPOSE:
   Styles the accounting Cashbook, including:
   - Page header
   - Summary cards
   - Filters
   - Cash movement table
   - Running balance
   - Responsive behaviour

   SAFETY SEARCH:
   APP-CASHBOOK-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH: APP-CASHBOOK-WRAPPER
========================================================== */

.cashbook-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH: APP-CASHBOOK-HEADER
========================================================== */

.cashbook-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.cashbook-header > div {
    min-width: 0;
}

.cashbook-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.cashbook-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   SECTION 03
   SUMMARY CARDS
   SAFETY SEARCH: APP-CASHBOOK-SUMMARY
========================================================== */

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

.cashbook-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.cashbook-kpi-grid span,
.cashbook-kpi-grid strong,
.cashbook-kpi-grid small {
    display: block;
}

.cashbook-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cashbook-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.cashbook-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.cashbook-positive-value {
    color: #087f3f !important;
}

.cashbook-danger-value {
    color: var(--color-danger) !important;
}


/* ==========================================================
   SECTION 04
   FILTERS
   SAFETY SEARCH: APP-CASHBOOK-FILTERS
========================================================== */

.cashbook-filters {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.4fr)
        repeat(2, minmax(140px, .8fr))
        minmax(220px, 1.2fr)
        auto;
    gap: 12px;
    align-items: end;
    padding: 20px 22px;
}

.cashbook-filters .form-field {
    display: grid;
    gap: 7px;
}

.cashbook-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.cashbook-filters input,
.cashbook-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.cashbook-filters input {
    padding: 0 12px;
}

.cashbook-filters select {
    padding: 0 36px 0 12px;
}

.cashbook-filters input:focus,
.cashbook-filters select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.cashbook-filter-actions {
    display: flex;
    gap: 8px;
}

.cashbook-filter-actions .button {
    min-height: 44px;
    white-space: nowrap;
}


/* ==========================================================
   SECTION 05
   CASHBOOK TABLE
   SAFETY SEARCH: APP-CASHBOOK-TABLE
========================================================== */

.cashbook-table td:nth-child(5),
.cashbook-table td:nth-child(6),
.cashbook-table td:nth-child(7),
.cashbook-table tfoot th:nth-last-child(-n+3) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cashbook-table tfoot th {
    border-top: 2px solid var(--color-border);
    background: #fafbfc;
    color: var(--color-dark);
}


/* ==========================================================
   SECTION 06
   RESPONSIVE — TABLET
   SAFETY SEARCH: APP-CASHBOOK-TABLET
========================================================== */

@media (max-width: 1180px) {

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

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

    .cashbook-filter-account,
    .cashbook-filter-search {
        grid-column: span 1;
    }

    .cashbook-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

}


/* ==========================================================
   SECTION 07
   RESPONSIVE — MOBILE
   SAFETY SEARCH: APP-CASHBOOK-MOBILE
========================================================== */

@media (max-width: 760px) {

    .cashbook-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .cashbook-header .button {
        width: 100%;
    }

    .cashbook-kpi-grid,
    .cashbook-filters {
        grid-template-columns: 1fr;
    }

    .cashbook-filter-actions {
        grid-column: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

}




/* ==========================================================
   KLASENTA
   JOURNAL DIRECTORY & ENTRY DETAILS
   FILE: assets/css/app.css

   PURPOSE:
   Styles the accounting Journal directory and individual
   journal entry details.

   SAFETY SEARCH:
   APP-JOURNAL-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPERS
   SAFETY SEARCH: APP-JOURNAL-WRAPPERS
========================================================== */

.journal-directory-page,
.journal-entry-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADERS
   SAFETY SEARCH: APP-JOURNAL-HEADERS
========================================================== */

.journal-directory-header,
.journal-entry-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.journal-directory-header > div,
.journal-entry-header > div {
    min-width: 0;
}

.journal-directory-header h1,
.journal-entry-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.journal-directory-header p,
.journal-entry-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.journal-entry-actions {
    display: flex;
    gap: 10px;
}


/* ==========================================================
   SECTION 03
   SUMMARY CARDS
   SAFETY SEARCH: APP-JOURNAL-SUMMARY
========================================================== */

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

.journal-kpi-grid article,
.journal-entry-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.journal-kpi-grid span,
.journal-kpi-grid strong,
.journal-kpi-grid small,
.journal-entry-kpi-grid span,
.journal-entry-kpi-grid strong,
.journal-entry-kpi-grid small {
    display: block;
}

.journal-kpi-grid span,
.journal-entry-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.journal-kpi-grid strong,
.journal-entry-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.journal-kpi-grid small,
.journal-entry-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}


/* ==========================================================
   SECTION 04
   JOURNAL DIRECTORY FILTERS
   SAFETY SEARCH: APP-JOURNAL-FILTERS
========================================================== */

.journal-directory-filters {
    display: grid;
    grid-template-columns:
        minmax(360px, 2fr)
        minmax(170px, .8fr)
        minmax(170px, .8fr);
    gap: 14px;
    align-items: end;
    padding: 20px 22px;
}

.journal-directory-filters .form-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.journal-directory-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.journal-directory-filters input,
.journal-directory-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.journal-directory-filters input {
    padding: 0 12px;
}

.journal-directory-filters select {
    padding: 0 36px 0 12px;
}

.journal-directory-filters input:focus,
.journal-directory-filters select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.journal-filter-search {
    grid-column: 1;
}

.journal-directory-filters .form-field:nth-of-type(4) {
    grid-column: 1;
}

.journal-directory-filters .form-field:nth-of-type(5) {
    grid-column: 2;
}

.journal-filter-actions {
    display: flex;
    grid-column: 3;
    justify-content: flex-end;
    gap: 8px;
}

.journal-filter-actions .button {
    min-height: 44px;
    white-space: nowrap;
}

@media (max-width: 980px) {

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

    .journal-filter-search {
        grid-column: 1 / -1;
    }

    .journal-directory-filters .form-field:nth-of-type(4),
    .journal-directory-filters .form-field:nth-of-type(5) {
        grid-column: auto;
    }

    .journal-filter-actions {
        grid-column: 1 / -1;
    }

}

@media (max-width: 700px) {

    .journal-directory-filters {
        grid-template-columns: 1fr;
    }

    .journal-filter-search,
    .journal-directory-filters .form-field:nth-of-type(4),
    .journal-directory-filters .form-field:nth-of-type(5),
    .journal-filter-actions {
        grid-column: auto;
    }

    .journal-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

}


/* ==========================================================
   SECTION 05
   JOURNAL TABLES
   SAFETY SEARCH: APP-JOURNAL-TABLES
========================================================== */

.journal-directory-table td:nth-child(7),
.journal-directory-table td:nth-child(8),
.journal-entry-table td:nth-child(4),
.journal-entry-table td:nth-child(5),
.journal-entry-table tfoot th:nth-last-child(-n+2) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.journal-entry-table tfoot th {
    border-top: 2px solid var(--color-border);
    background: #fafbfc;
    color: var(--color-dark);
}


/* ==========================================================
   SECTION 06
   JOURNAL ENTRY DETAILS
   SAFETY SEARCH: APP-JOURNAL-ENTRY-DETAILS
========================================================== */

.journal-entry-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, .55fr);
    gap: 18px;
}

.journal-entry-detail-list {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    margin: 0;
}

.journal-entry-detail-list > div {
    min-width: 0;
    padding: 17px 20px;
    border-top: 1px solid var(--color-border);
}

.journal-entry-detail-list dt {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.journal-entry-detail-list dd {
    margin: 7px 0 0;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.journal-entry-control-list {
    display: grid;
}

.journal-entry-control-list > div {
    padding: 17px 20px;
    border-top: 1px solid var(--color-border);
}

.journal-entry-control-list span,
.journal-entry-control-list strong {
    display: block;
}

.journal-entry-control-list span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.journal-entry-control-list strong {
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 12px;
}

.journal-positive-value {
    color: #087f3f !important;
}

.journal-danger-value {
    color: var(--color-danger) !important;
}


/* ==========================================================
   SECTION 07
   RESPONSIVE — TABLET
   SAFETY SEARCH: APP-JOURNAL-TABLET
========================================================== */

@media (max-width: 1180px) {

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

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

    .journal-filter-search {
        grid-column: span 2;
    }

    .journal-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .journal-entry-grid {
        grid-template-columns: 1fr;
    }

}


/* ==========================================================
   SECTION 08
   RESPONSIVE — MOBILE
   SAFETY SEARCH: APP-JOURNAL-MOBILE
========================================================== */

@media (max-width: 760px) {

    .journal-directory-header,
    .journal-entry-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .journal-directory-header .button,
    .journal-entry-actions {
        width: 100%;
    }

    .journal-entry-actions .button {
        flex: 1;
    }

    .journal-kpi-grid,
    .journal-entry-kpi-grid,
    .journal-directory-filters,
    .journal-entry-detail-list {
        grid-template-columns: 1fr;
    }

    .journal-filter-search,
    .journal-filter-actions {
        grid-column: auto;
    }

    .journal-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

}


/* ==========================================================
   SECTION 09
   PRINT
   SAFETY SEARCH: APP-JOURNAL-PRINT
========================================================== */

@media print {

    .sidebar,
    .app-header,
    .journal-entry-actions {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .journal-entry-page {
        padding: 12mm;
    }

    .dashboard-card,
    .journal-entry-kpi-grid article {
        box-shadow: none;
        break-inside: avoid;
    }

}


/* ==========================================================
   SECTION 10
   JOURNAL DIRECTORY REFINEMENTS
   SAFETY SEARCH: APP-JOURNAL-DIRECTORY-REFINEMENTS
========================================================== */

.journal-directory-filters .journal-filter-search input {
    min-width: 0;
    text-overflow: ellipsis;
}

.journal-directory-table th,
.journal-directory-table td {
    vertical-align: middle;
}

.journal-directory-table td:nth-child(2),
.journal-directory-table td:nth-child(7),
.journal-directory-table td:nth-child(8) {
    white-space: nowrap;
}

.journal-directory-table td:nth-child(3),
.journal-directory-table td:nth-child(5),
.journal-directory-table td:nth-child(6) {
    white-space: nowrap;
}

.journal-directory-table td:nth-child(4) {
    min-width: 220px;
}

@media (max-width: 1350px) {

    .journal-directory-filters {
        grid-template-columns:
            minmax(320px, 1.8fr)
            repeat(2, minmax(145px, .8fr))
            repeat(2, minmax(135px, .7fr));
    }

    .journal-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

}





/* ==========================================================
   KLASENTA
   CHART OF ACCOUNTS
   FILE: assets/css/app.css

   PURPOSE:
   Styles the Chart of Accounts directory and account form.

   SAFETY SEARCH:
   APP-CHART-OF-ACCOUNTS-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH: APP-CHART-OF-ACCOUNTS-WRAPPER
========================================================== */

.chart-accounts-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH: APP-CHART-OF-ACCOUNTS-HEADER
========================================================== */

.chart-accounts-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.chart-accounts-header > div {
    min-width: 0;
}

.chart-accounts-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.chart-accounts-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   SECTION 03
   SUMMARY CARDS
   SAFETY SEARCH: APP-CHART-OF-ACCOUNTS-SUMMARY
========================================================== */

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

.chart-accounts-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.chart-accounts-kpi-grid span,
.chart-accounts-kpi-grid strong,
.chart-accounts-kpi-grid small {
    display: block;
}

.chart-accounts-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.chart-accounts-kpi-grid strong {
    margin-top: 14px;
    color: var(--color-dark);
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.chart-accounts-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}


/* ==========================================================
   SECTION 04
   FILTERS
   SAFETY SEARCH: APP-CHART-OF-ACCOUNTS-FILTERS
========================================================== */

.chart-accounts-filters {
    display: grid;
    grid-template-columns:
        minmax(320px, 1.8fr)
        minmax(180px, .8fr)
        minmax(160px, .7fr)
        auto;
    gap: 12px;
    align-items: end;
    padding: 20px 22px;
}

.chart-accounts-filters .form-field {
    display: grid;
    gap: 7px;
}

.chart-accounts-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.chart-accounts-filters input,
.chart-accounts-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.chart-accounts-filters input {
    padding: 0 12px;
}

.chart-accounts-filters select {
    padding: 0 36px 0 12px;
}

.chart-accounts-filters input:focus,
.chart-accounts-filters select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.chart-account-filter-actions {
    display: flex;
    gap: 8px;
}

.chart-account-filter-actions .button {
    min-height: 44px;
}


/* ==========================================================
   SECTION 05
   ACCOUNT GROUPS
   SAFETY SEARCH: APP-CHART-OF-ACCOUNTS-GROUPS
========================================================== */

.chart-account-groups {
    display: grid;
}

.chart-account-group {
    border-top: 1px solid var(--color-border);
}

.chart-account-group > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 22px;
    background: #fafbfc;
}

.chart-account-group > header span,
.chart-account-group > header strong {
    display: block;
}

.chart-account-group > header span {
    color: #8a6200;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.chart-account-group > header strong {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
}

.chart-account-table td:first-child strong {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.chart-account-edit {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}


/* ==========================================================
   SECTION 06
   ACCOUNT FORM MODAL
   SAFETY SEARCH: APP-CHART-OF-ACCOUNTS-MODAL
========================================================== */

.chart-account-modal {
    width: min(760px, calc(100vw - 40px));
}

.chart-account-form {
    padding: 22px 26px 0;
}

.chart-account-form .form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.chart-account-form .form-field {
    display: grid;
    gap: 8px;
}

.chart-account-form label {
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 800;
}

.chart-account-form input,
.chart-account-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 12px;
}

.chart-account-form input {
    padding: 0 13px;
}

.chart-account-form select {
    padding: 0 36px 0 13px;
}

.chart-account-form input:focus,
.chart-account-form select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .12);
}

.chart-account-form .form-field-checkbox {
    align-content: center;
    min-height: 48px;
}

.chart-account-form .form-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: #fafbfc;
}

.chart-account-form .form-field-checkbox input {
    width: 16px;
    min-height: auto;
    height: 16px;
    padding: 0;
}

.chart-account-form .modal-actions {
    margin: 22px -26px 0;
    padding: 18px 26px;
}


/* ==========================================================
   SECTION 07
   RESPONSIVE — TABLET
   SAFETY SEARCH: APP-CHART-OF-ACCOUNTS-TABLET
========================================================== */

@media (max-width: 1050px) {

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

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

    .chart-account-search {
        grid-column: span 2;
    }

    .chart-account-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

}


/* ==========================================================
   SECTION 08
   RESPONSIVE — MOBILE
   SAFETY SEARCH: APP-CHART-OF-ACCOUNTS-MOBILE
========================================================== */

@media (max-width: 760px) {

    .chart-accounts-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-accounts-header .button {
        width: 100%;
    }

    .chart-accounts-kpi-grid,
    .chart-accounts-filters,
    .chart-account-form .form-grid {
        grid-template-columns: 1fr;
    }

    .chart-account-search,
    .chart-account-filter-actions {
        grid-column: auto;
    }

    .chart-account-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

}




/* ==========================================================
   KLASENTA
   ACCOUNTING PERIODS
   FILE: assets/css/app.css

   PURPOSE:
   Styles the Accounting Periods directory and period form.

   SAFETY SEARCH:
   APP-ACCOUNTING-PERIODS-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH: APP-ACCOUNTING-PERIODS-WRAPPER
========================================================== */

.accounting-periods-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH: APP-ACCOUNTING-PERIODS-HEADER
========================================================== */

.accounting-periods-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.accounting-periods-header > div {
    min-width: 0;
}

.accounting-periods-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.accounting-periods-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   SECTION 03
   SUMMARY CARDS
   SAFETY SEARCH: APP-ACCOUNTING-PERIODS-SUMMARY
========================================================== */

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

.accounting-periods-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.accounting-periods-kpi-grid span,
.accounting-periods-kpi-grid strong,
.accounting-periods-kpi-grid small {
    display: block;
}

.accounting-periods-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.accounting-periods-kpi-grid strong {
    margin-top: 14px;
    color: var(--color-dark);
    font-size: clamp(22px, 2.1vw, 32px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.accounting-periods-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}


/* ==========================================================
   SECTION 04
   PERIOD DIRECTORY
   SAFETY SEARCH: APP-ACCOUNTING-PERIODS-DIRECTORY
========================================================== */

.accounting-periods-table td:nth-child(2),
.accounting-periods-table td:nth-child(3) {
    white-space: nowrap;
}

.accounting-period-edit {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}


/* ==========================================================
   SECTION 05
   PERIOD FORM MODAL
   SAFETY SEARCH: APP-ACCOUNTING-PERIODS-MODAL
========================================================== */

.accounting-period-modal {
    width: min(680px, calc(100vw - 40px));
}

.accounting-period-form {
    padding: 22px 26px 0;
}

.accounting-period-form .form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.accounting-period-form .form-field {
    display: grid;
    gap: 8px;
}

.accounting-period-form .form-field-full {
    grid-column: 1 / -1;
}

.accounting-period-form label {
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 800;
}

.accounting-period-form input,
.accounting-period-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 12px;
}

.accounting-period-form input {
    padding: 0 13px;
}

.accounting-period-form select {
    padding: 0 36px 0 13px;
}

.accounting-period-form input:focus,
.accounting-period-form select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .12);
}

.accounting-period-form .modal-actions {
    margin: 22px -26px 0;
    padding: 18px 26px;
}


/* ==========================================================
   SECTION 06
   RESPONSIVE — TABLET
   SAFETY SEARCH: APP-ACCOUNTING-PERIODS-TABLET
========================================================== */

@media (max-width: 1050px) {

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

}


/* ==========================================================
   SECTION 07
   RESPONSIVE — MOBILE
   SAFETY SEARCH: APP-ACCOUNTING-PERIODS-MOBILE
========================================================== */

@media (max-width: 760px) {

    .accounting-periods-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .accounting-periods-header .button {
        width: 100%;
    }

    .accounting-periods-kpi-grid,
    .accounting-period-form .form-grid {
        grid-template-columns: 1fr;
    }

    .accounting-period-form .form-field-full {
        grid-column: auto;
    }

}



/* ==========================================================
   KLASENTA
   ACCOUNTING OVERVIEW
   FILE: assets/css/app.css

   PURPOSE:
   Styles the Accountant's Dashboard and financial command
   centre.

   SAFETY SEARCH:
   APP-ACCOUNTING-OVERVIEW-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-WRAPPER
========================================================== */

.accounting-overview-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-HEADER
========================================================== */

.accounting-overview-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.accounting-overview-header > div {
    min-width: 0;
}

.accounting-overview-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.accounting-overview-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.accounting-period-context {
    min-width: 250px;
    padding: 15px 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
    text-align: right;
}

.accounting-period-context span,
.accounting-period-context strong,
.accounting-period-context small {
    display: block;
}

.accounting-period-context span {
    color: var(--color-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.accounting-period-context strong {
    margin-top: 6px;
    color: var(--color-dark);
    font-size: 13px;
}

.accounting-period-context small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 9px;
}


/* ==========================================================
   SECTION 03
   PRIMARY KPI CARDS
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-KPI
========================================================== */

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

.accounting-overview-kpi-grid article,
.accounting-activity-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.accounting-overview-kpi-grid span,
.accounting-overview-kpi-grid strong,
.accounting-overview-kpi-grid small,
.accounting-activity-grid span,
.accounting-activity-grid strong,
.accounting-activity-grid small {
    display: block;
}

.accounting-overview-kpi-grid span,
.accounting-activity-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.accounting-overview-kpi-grid strong,
.accounting-activity-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.accounting-overview-kpi-grid small,
.accounting-activity-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.accounting-positive-value {
    color: #087f3f !important;
}

.accounting-danger-value {
    color: var(--color-danger) !important;
}


/* ==========================================================
   SECTION 04
   PERFORMANCE + QUICK ACTIONS
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-PERFORMANCE
========================================================== */

.accounting-overview-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, .55fr);
    gap: 18px;
}

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

.accounting-performance-grid > div {
    min-width: 0;
    padding: 20px 22px;
    border-top: 1px solid var(--color-border);
}

.accounting-performance-grid > div:nth-child(odd) {
    border-right: 1px solid var(--color-border);
}

.accounting-performance-grid span,
.accounting-performance-grid strong,
.accounting-performance-grid small {
    display: block;
}

.accounting-performance-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.accounting-performance-grid strong {
    margin-top: 10px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(21px, 2vw, 30px);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.accounting-performance-grid small {
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 9px;
}

.accounting-action-list {
    display: grid;
    gap: 10px;
    padding: 20px 22px 24px;
}

.accounting-action-list .button {
    width: 100%;
    min-height: 46px;
}


/* ==========================================================
   SECTION 05
   ALERTS
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-ALERTS
========================================================== */

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

.accounting-alert-grid a {
    display: block;
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.accounting-alert-grid a:hover {
    border-color: #d8bd76;
    background: #fffdf7;
}

.accounting-alert-grid a > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.accounting-alert-grid span,
.accounting-alert-grid strong,
.accounting-alert-grid small {
    display: block;
}

.accounting-alert-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.accounting-alert-grid strong {
    color: var(--color-dark);
    font-size: 20px;
}

.accounting-alert-grid small {
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}


/* ==========================================================
   SECTION 06
   CASH ACCOUNT BALANCES
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-CASH
========================================================== */

.accounting-cash-account-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 22px 24px;
}

.accounting-cash-account-grid a {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
    color: inherit;
    text-decoration: none;
}

.accounting-cash-account-grid a:hover {
    border-color: #d8bd76;
    background: #fffdf7;
}

.accounting-cash-account-grid a > div {
    min-width: 0;
}

.accounting-cash-account-grid span,
.accounting-cash-account-grid strong {
    display: block;
}

.accounting-cash-account-grid a > div strong {
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.accounting-cash-account-grid span {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
}

.accounting-cash-account-grid a > strong {
    flex: 0 0 auto;
    font-size: 12px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}


/* ==========================================================
   SECTION 07
   RECENT ACTIVITY
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-RECENT
========================================================== */

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

.accounting-recent-table td:nth-child(4) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}


/* ==========================================================
   SECTION 08
   RESPONSIVE — TABLET
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-TABLET
========================================================== */

@media (max-width: 1150px) {

    .accounting-overview-kpi-grid,
    .accounting-activity-grid,
    .accounting-cash-account-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .accounting-overview-grid,
    .accounting-recent-grid {
        grid-template-columns: 1fr;
    }

}


/* ==========================================================
   SECTION 09
   RESPONSIVE — MOBILE
   SAFETY SEARCH: APP-ACCOUNTING-OVERVIEW-MOBILE
========================================================== */

@media (max-width: 760px) {

    .accounting-overview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .accounting-period-context {
        width: 100%;
        text-align: left;
    }

    .accounting-overview-kpi-grid,
    .accounting-activity-grid,
    .accounting-alert-grid,
    .accounting-cash-account-grid,
    .accounting-performance-grid {
        grid-template-columns: 1fr;
    }

    .accounting-performance-grid > div:nth-child(odd) {
        border-right: 0;
    }

}



/* ==========================================================
   KLASENTA
   GENERAL LEDGER
   FILE: assets/css/app.css

   PURPOSE:
   Styles the General Ledger page, including:
   - Account and reporting context
   - Summary cards
   - Two-row filters
   - Ledger table
   - Running balance
   - Responsive behaviour

   SAFETY SEARCH:
   APP-GENERAL-LEDGER-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH: APP-GENERAL-LEDGER-WRAPPER
========================================================== */

.general-ledger-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH: APP-GENERAL-LEDGER-HEADER
========================================================== */

.general-ledger-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.general-ledger-header > div {
    min-width: 0;
}

.general-ledger-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.general-ledger-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   SECTION 03
   ACCOUNT CONTEXT
   SAFETY SEARCH: APP-GENERAL-LEDGER-CONTEXT
========================================================== */

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

.general-ledger-context > div {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.general-ledger-context span,
.general-ledger-context strong,
.general-ledger-context small {
    display: block;
}

.general-ledger-context span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.general-ledger-context strong {
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 14px;
}

.general-ledger-context small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 9px;
}


/* ==========================================================
   SECTION 04
   SUMMARY CARDS
   SAFETY SEARCH: APP-GENERAL-LEDGER-SUMMARY
========================================================== */

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

.general-ledger-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.general-ledger-kpi-grid span,
.general-ledger-kpi-grid strong,
.general-ledger-kpi-grid small {
    display: block;
}

.general-ledger-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.general-ledger-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.general-ledger-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.general-ledger-positive-value {
    color: #087f3f !important;
}

.general-ledger-danger-value {
    color: var(--color-danger) !important;
}


/* ==========================================================
   SECTION 05
   FILTERS
   SAFETY SEARCH: APP-GENERAL-LEDGER-FILTERS
========================================================== */

.general-ledger-filters {
    display: grid;
    grid-template-columns:
        minmax(320px, 1.7fr)
        minmax(220px, 1fr)
        minmax(150px, .7fr)
        minmax(150px, .7fr);
    gap: 14px;
    align-items: end;
    padding: 20px 22px;
}

.general-ledger-filters .form-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.general-ledger-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.general-ledger-filters input,
.general-ledger-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.general-ledger-filters input {
    padding: 0 12px;
}

.general-ledger-filters select {
    padding: 0 36px 0 12px;
}

.general-ledger-filters input:focus,
.general-ledger-filters select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.general-ledger-search-filter {
    grid-column: 1 / 3;
}

.general-ledger-filter-actions {
    display: flex;
    grid-column: 3 / 5;
    justify-content: flex-end;
    gap: 8px;
}

.general-ledger-filter-actions .button {
    min-height: 44px;
    white-space: nowrap;
}


/* ==========================================================
   SECTION 06
   LEDGER TABLE
   SAFETY SEARCH: APP-GENERAL-LEDGER-TABLE
========================================================== */

.general-ledger-table th,
.general-ledger-table td {
    vertical-align: middle;
}

.general-ledger-table td:nth-child(5),
.general-ledger-table td:nth-child(6),
.general-ledger-table td:nth-child(7),
.general-ledger-table tfoot th:nth-last-child(-n+3) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.general-ledger-table td:nth-child(4) {
    min-width: 240px;
}

.general-ledger-table tfoot th {
    border-top: 2px solid var(--color-border);
    background: #fafbfc;
    color: var(--color-dark);
}


/* ==========================================================
   SECTION 07
   RESPONSIVE — TABLET
   SAFETY SEARCH: APP-GENERAL-LEDGER-TABLET
========================================================== */

@media (max-width: 1100px) {

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

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

    .general-ledger-search-filter {
        grid-column: 1 / -1;
    }

    .general-ledger-filter-actions {
        grid-column: 1 / -1;
    }

}


/* ==========================================================
   SECTION 08
   RESPONSIVE — MOBILE
   SAFETY SEARCH: APP-GENERAL-LEDGER-MOBILE
========================================================== */

@media (max-width: 760px) {

    .general-ledger-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .general-ledger-header .button {
        width: 100%;
    }

    .general-ledger-context,
    .general-ledger-kpi-grid,
    .general-ledger-filters {
        grid-template-columns: 1fr;
    }

    .general-ledger-search-filter,
    .general-ledger-filter-actions {
        grid-column: auto;
    }

    .general-ledger-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

}



/* ==========================================================
   KLASENTA
   TRIAL BALANCE
   FILE: assets/css/app.css

   PURPOSE:
   Styles the Trial Balance report, including context,
   summary cards, filters, balances table and print output.

   SAFETY SEARCH:
   APP-TRIAL-BALANCE-CSS
========================================================== */

.trial-balance-page {
    display: grid;
    gap: 20px;
}

.trial-balance-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.trial-balance-header > div {
    min-width: 0;
}

.trial-balance-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.trial-balance-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.trial-balance-actions {
    display: flex;
    gap: 10px;
}

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

.trial-balance-context > div {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.trial-balance-context span,
.trial-balance-context strong,
.trial-balance-context small {
    display: block;
}

.trial-balance-context span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.trial-balance-context strong {
    margin-top: 7px;
    color: var(--color-dark);
    font-size: 14px;
}

.trial-balance-context small {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 9px;
}

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

.trial-balance-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.trial-balance-kpi-grid span,
.trial-balance-kpi-grid strong,
.trial-balance-kpi-grid small {
    display: block;
}

.trial-balance-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.trial-balance-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.trial-balance-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.trial-positive-value {
    color: #087f3f !important;
}

.trial-danger-value {
    color: var(--color-danger) !important;
}

.trial-balance-filters {
    display: grid;
    grid-template-columns:
        minmax(260px, 1.3fr)
        minmax(150px, .7fr)
        minmax(150px, .7fr)
        minmax(220px, 1fr)
        auto;
    gap: 14px;
    align-items: end;
    padding: 20px 22px;
}

.trial-balance-filters .form-field {
    display: grid;
    gap: 7px;
}

.trial-balance-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.trial-balance-filters input,
.trial-balance-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.trial-balance-filters input {
    padding: 0 12px;
}

.trial-balance-filters select {
    padding: 0 36px 0 12px;
}

.trial-balance-filters input:focus,
.trial-balance-filters select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(200, 155, 44, .10);
}

.trial-zero-toggle {
    display: flex;
    min-height: 44px;
    align-items: center;
}

.trial-zero-toggle label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.trial-zero-toggle input {
    width: 16px;
    min-height: auto;
    height: 16px;
    padding: 0;
}

.trial-balance-filter-actions {
    display: flex;
    gap: 8px;
}

.trial-balance-filter-actions .button {
    min-height: 44px;
    white-space: nowrap;
}

.trial-balance-table td:nth-child(4),
.trial-balance-table td:nth-child(5),
.trial-balance-table tfoot th:nth-last-child(-n+2) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.trial-balance-table tfoot th {
    border-top: 2px solid var(--color-border);
    background: #fafbfc;
    color: var(--color-dark);
}

@media (max-width: 1100px) {
    .trial-balance-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .trial-period-filter,
    .trial-zero-toggle,
    .trial-balance-filter-actions {
        grid-column: 1 / -1;
    }

    .trial-balance-filter-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 760px) {
    .trial-balance-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .trial-balance-actions {
        width: 100%;
    }

    .trial-balance-actions .button {
        flex: 1;
    }

    .trial-balance-context,
    .trial-balance-kpi-grid,
    .trial-balance-filters {
        grid-template-columns: 1fr;
    }

    .trial-period-filter,
    .trial-zero-toggle,
    .trial-balance-filter-actions {
        grid-column: auto;
    }

    .trial-balance-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media print {
    .sidebar,
    .app-header,
    .trial-balance-actions,
    .trial-balance-filters {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .trial-balance-page {
        padding: 12mm;
    }

    .dashboard-card,
    .trial-balance-kpi-grid article,
    .trial-balance-context > div {
        box-shadow: none;
        break-inside: avoid;
    }
}




/* ==========================================================
   SECTION 10
   BALANCE CHECK BADGE ALIGNMENT
   SAFETY SEARCH: APP-TRIAL-BALANCE-CHECK-ALIGNMENT
========================================================== */

.trial-balance-context > div:nth-child(2) > strong {
    display: flex;
    align-items: center;
    margin-top: 7px;
}

.trial-balance-context > div:nth-child(2) .status-badge {
    display: inline-flex;
    width: auto;
    min-width: 110px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    line-height: 1;
    text-align: center;
}




/* ==========================================================
   KLASENTA
   PROFIT & LOSS
   FILE:
   assets/css/app.css

   PURPOSE:
   Styles the Profit & Loss report.

   SAFETY SEARCH:
   APP-PROFIT-LOSS-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH:
   APP-PROFIT-LOSS-WRAPPER
========================================================== */

.profit-loss-page{
    display:grid;
    gap:20px;
}


/* ==========================================================
   SECTION 02
   HEADER
   SAFETY SEARCH:
   APP-PROFIT-LOSS-HEADER
========================================================== */

.profit-loss-header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:24px;
}

.profit-loss-header > div{
    min-width:0;
}

.profit-loss-header h1{
    margin:6px 0 0;
    color:var(--color-dark);
    font-size:clamp(36px,4vw,52px);
    line-height:.98;
    letter-spacing:-.05em;
}

.profit-loss-header p{
    max-width:720px;
    margin:12px 0 0;
    color:var(--color-muted);
    font-size:13px;
    line-height:1.6;
}

.profit-loss-actions{
    display:flex;
    gap:10px;
}


/* ==========================================================
   SECTION 03
   REPORT CONTEXT
   SAFETY SEARCH:
   APP-PROFIT-LOSS-CONTEXT
========================================================== */

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

.profit-loss-context > div{
    padding:17px 18px;
    border:1px solid var(--color-border);
    border-radius:14px;
    background:#fff;
}

.profit-loss-context span,
.profit-loss-context strong,
.profit-loss-context small{
    display:block;
}

.profit-loss-context span{
    color:var(--color-muted);
    font-size:9px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.profit-loss-context strong{
    margin-top:7px;
    font-size:14px;
}

.profit-loss-context small{
    margin-top:6px;
    color:var(--color-muted);
    font-size:9px;
}


/* ==========================================================
   SECTION 04
   KPI CARDS
   SAFETY SEARCH:
   APP-PROFIT-LOSS-KPI
========================================================== */

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

.profit-loss-kpi-grid article{
    min-height:136px;
    padding:18px;
    border:1px solid var(--color-border);
    border-radius:15px;
    background:#fff;
}

.profit-loss-kpi-grid span,
.profit-loss-kpi-grid strong,
.profit-loss-kpi-grid small{
    display:block;
}

.profit-loss-kpi-grid span{
    color:var(--color-muted);
    font-size:9px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.profit-loss-kpi-grid strong{
    margin-top:14px;
    font-size:clamp(22px,2vw,31px);
    line-height:1;
    letter-spacing:-.04em;
    font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
}

.profit-loss-kpi-grid small{
    margin-top:10px;
    color:var(--color-muted);
    font-size:9px;
    line-height:1.45;
}

.profit-loss-positive-value{color:#087f3f!important;}
.profit-loss-danger-value{color:var(--color-danger)!important;}


/* ==========================================================
   SECTION 05
   FILTERS
   SAFETY SEARCH:
   APP-PROFIT-LOSS-FILTERS
========================================================== */

.profit-loss-filters{
    display:grid;
    grid-template-columns:
        minmax(260px,1.3fr)
        minmax(150px,.7fr)
        minmax(150px,.7fr)
        minmax(220px,1fr)
        auto;
    gap:14px;
    align-items:end;
    padding:20px 22px;
}

.profit-loss-filters .form-field{
    display:grid;
    gap:7px;
}

.profit-loss-filters label{
    color:var(--color-muted);
    font-size:9px;
    font-weight:800;
    letter-spacing:.05em;
    text-transform:uppercase;
}

.profit-loss-filters input,
.profit-loss-filters select{
    width:100%;
    min-height:44px;
    padding:0 12px;
    border:1px solid var(--color-border);
    border-radius:10px;
    background:#fff;
    font:inherit;
    font-size:11px;
}

.profit-loss-filters select{
    padding-right:36px;
}

.profit-loss-filters input:focus,
.profit-loss-filters select:focus{
    border-color:var(--color-primary);
    box-shadow:0 0 0 4px rgba(200,155,44,.10);
}

.profit-loss-zero-toggle{
    display:flex;
    align-items:center;
    min-height:44px;
}

.profit-loss-zero-toggle label{
    display:flex;
    align-items:center;
    gap:9px;
    font-size:10px;
    font-weight:700;
    text-transform:none;
    letter-spacing:0;
    color:var(--color-dark);
}

.profit-loss-zero-toggle input{
    width:16px;
    height:16px;
    min-height:auto;
    padding:0;
}

.profit-loss-filter-actions{
    display:flex;
    gap:8px;
}


/* ==========================================================
   SECTION 06
   STATEMENT TABLES
   SAFETY SEARCH:
   APP-PROFIT-LOSS-TABLES
========================================================== */

.profit-loss-statement-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}

.profit-loss-table td:last-child,
.profit-loss-table tfoot th:last-child{
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
}

.profit-loss-table tfoot th{
    border-top:2px solid var(--color-border);
    background:#fafbfc;
}


/* ==========================================================
   SECTION 07
   NET RESULT
   SAFETY SEARCH:
   APP-PROFIT-LOSS-NET
========================================================== */

.profit-loss-net-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    padding:22px 24px;
}

.profit-loss-net-card span,
.profit-loss-net-card strong,
.profit-loss-net-card small{
    display:block;
}

.profit-loss-net-card span{
    color:var(--color-muted);
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
}

.profit-loss-net-card strong{
    margin-top:8px;
    font-size:clamp(28px,3vw,42px);
    line-height:1;
    letter-spacing:-.04em;
    font-variant-numeric:tabular-nums;
}

.profit-loss-net-card small{
    color:var(--color-muted);
    font-size:10px;
}


/* ==========================================================
   SECTION 08
   RESPONSIVE
   SAFETY SEARCH:
   APP-PROFIT-LOSS-RESPONSIVE
========================================================== */

@media (max-width:1100px){

    .profit-loss-kpi-grid,
    .profit-loss-statement-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

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

    .profit-loss-period-filter,
    .profit-loss-zero-toggle,
    .profit-loss-filter-actions{
        grid-column:1/-1;
    }
}

@media (max-width:760px){

    .profit-loss-header{
        flex-direction:column;
        align-items:flex-start;
    }

    .profit-loss-actions{
        width:100%;
    }

    .profit-loss-actions .button{
        flex:1;
    }

    .profit-loss-context,
    .profit-loss-kpi-grid,
    .profit-loss-statement-grid,
    .profit-loss-filters{
        grid-template-columns:1fr;
    }

    .profit-loss-filter-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
    }

    .profit-loss-net-card{
        flex-direction:column;
        align-items:flex-start;
    }
}


/* ==========================================================
   SECTION 09
   PRINT
   SAFETY SEARCH:
   APP-PROFIT-LOSS-PRINT
========================================================== */

@media print{

    .sidebar,
    .app-header,
    .profit-loss-actions,
    .profit-loss-filters{
        display:none!important;
    }

    .content{
        margin:0!important;
        padding:0!important;
    }

    .profit-loss-page{
        padding:12mm;
    }

    .dashboard-card,
    .profit-loss-kpi-grid article,
    .profit-loss-context > div{
        box-shadow:none;
        break-inside:avoid;
    }
}





/* ==========================================================
   KLASENTA
   BALANCE SHEET
   FILE:
   assets/css/app.css

   PURPOSE:
   Styles the Balance Sheet financial statement.

   SAFETY SEARCH:
   APP-BALANCE-SHEET-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH:
   APP-BALANCE-SHEET-WRAPPER
========================================================== */

.balance-sheet-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH:
   APP-BALANCE-SHEET-HEADER
========================================================== */

.balance-sheet-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.balance-sheet-header > div {
    min-width: 0;
}

.balance-sheet-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.balance-sheet-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.balance-sheet-actions {
    display: flex;
    gap: 10px;
}


/* ==========================================================
   SECTION 03
   REPORT CONTEXT
   SAFETY SEARCH:
   APP-BALANCE-SHEET-CONTEXT
========================================================== */

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

.balance-sheet-context > div {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.balance-sheet-context span,
.balance-sheet-context strong,
.balance-sheet-context small {
    display: block;
}

.balance-sheet-context span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.balance-sheet-context > div > strong {
    display: flex;
    align-items: center;
    min-height: 28px;
    margin-top: 7px;
    color: var(--color-dark);
    font-size: 14px;
}

.balance-sheet-context .status-badge {
    display: inline-flex;
    width: auto;
    min-width: 110px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    line-height: 1;
    text-align: center;
}

.balance-sheet-context small {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 9px;
}


/* ==========================================================
   SECTION 04
   SUMMARY CARDS
   SAFETY SEARCH:
   APP-BALANCE-SHEET-SUMMARY
========================================================== */

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

.balance-sheet-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.balance-sheet-kpi-grid span,
.balance-sheet-kpi-grid strong,
.balance-sheet-kpi-grid small {
    display: block;
}

.balance-sheet-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.balance-sheet-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.balance-sheet-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.balance-sheet-positive-value {
    color: #087f3f !important;
}

.balance-sheet-danger-value {
    color: var(--color-danger) !important;
}


/* ==========================================================
   SECTION 05
   FILTERS
   SAFETY SEARCH:
   APP-BALANCE-SHEET-FILTERS
========================================================== */

.balance-sheet-filters {
    display: grid;
    grid-template-columns:
        minmax(280px, 1.4fr)
        minmax(180px, .8fr)
        minmax(230px, 1fr)
        auto;
    gap: 14px;
    align-items: end;
    padding: 20px 22px;
}

.balance-sheet-filters .form-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.balance-sheet-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.balance-sheet-filters input,
.balance-sheet-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.balance-sheet-filters input {
    padding: 0 12px;
}

.balance-sheet-filters select {
    padding: 0 36px 0 12px;
}

.balance-sheet-filters input:focus,
.balance-sheet-filters select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.balance-sheet-zero-toggle {
    display: flex;
    min-height: 44px;
    align-items: center;
}

.balance-sheet-zero-toggle label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.balance-sheet-zero-toggle input {
    width: 16px;
    min-height: auto;
    height: 16px;
    padding: 0;
}

.balance-sheet-filter-actions {
    display: flex;
    gap: 8px;
}

.balance-sheet-filter-actions .button {
    min-height: 44px;
    white-space: nowrap;
}


/* ==========================================================
   SECTION 06
   STATEMENT LAYOUT
   SAFETY SEARCH:
   APP-BALANCE-SHEET-STATEMENT
========================================================== */

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

.balance-sheet-subsection {
    border-top: 1px solid var(--color-border);
}

.balance-sheet-subsection > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: #fafbfc;
}

.balance-sheet-subsection > header span,
.balance-sheet-subsection > header strong {
    display: block;
}

.balance-sheet-subsection > header span {
    color: #8a6200;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.balance-sheet-subsection > header strong {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.balance-sheet-inline-empty {
    padding: 18px 20px;
    color: var(--color-muted);
    font-size: 10px;
}

.balance-sheet-table td:last-child,
.balance-sheet-table tfoot th:last-child {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.balance-sheet-table tfoot th {
    border-top: 2px solid var(--color-border);
    background: #fafbfc;
    color: var(--color-dark);
}

.balance-sheet-result-row td {
    background: #fffdf7;
}


/* ==========================================================
   SECTION 07
   ACCOUNTING EQUATION
   SAFETY SEARCH:
   APP-BALANCE-SHEET-EQUATION
========================================================== */

.balance-sheet-equation-card {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
}

.balance-sheet-equation-card > div {
    min-width: 0;
}

.balance-sheet-equation-card > div span,
.balance-sheet-equation-card > div strong {
    display: block;
}

.balance-sheet-equation-card > div span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.balance-sheet-equation-card > div strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    font-size: clamp(24px, 2.5vw, 36px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.balance-sheet-equation-symbol {
    color: var(--color-muted);
    font-size: 26px;
    font-weight: 800;
}

.balance-sheet-equation-card > .status-badge {
    display: inline-flex;
    width: auto;
    min-width: 120px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 7px 14px;
    border-radius: 999px;
    line-height: 1;
    text-align: center;
}


/* ==========================================================
   SECTION 08
   RESPONSIVE — TABLET
   SAFETY SEARCH:
   APP-BALANCE-SHEET-TABLET
========================================================== */

@media (max-width: 1100px) {

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

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

    .balance-sheet-period-filter,
    .balance-sheet-zero-toggle,
    .balance-sheet-filter-actions {
        grid-column: 1 / -1;
    }

    .balance-sheet-filter-actions {
        justify-content: flex-end;
    }

    .balance-sheet-equation-card {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .balance-sheet-equation-symbol {
        display: none;
    }

}


/* ==========================================================
   SECTION 09
   RESPONSIVE — MOBILE
   SAFETY SEARCH:
   APP-BALANCE-SHEET-MOBILE
========================================================== */

@media (max-width: 760px) {

    .balance-sheet-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .balance-sheet-actions {
        width: 100%;
    }

    .balance-sheet-actions .button {
        flex: 1;
    }

    .balance-sheet-context,
    .balance-sheet-kpi-grid,
    .balance-sheet-filters,
    .balance-sheet-statement-grid,
    .balance-sheet-equation-card {
        grid-template-columns: 1fr;
    }

    .balance-sheet-period-filter,
    .balance-sheet-zero-toggle,
    .balance-sheet-filter-actions {
        grid-column: auto;
    }

    .balance-sheet-filter-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================
   SECTION 10
   PRINT
   SAFETY SEARCH:
   APP-BALANCE-SHEET-PRINT
========================================================== */

@media print {

    .sidebar,
    .app-header,
    .balance-sheet-actions,
    .balance-sheet-filters {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .balance-sheet-page {
        padding: 12mm;
    }

    .dashboard-card,
    .balance-sheet-kpi-grid article,
    .balance-sheet-context > div {
        box-shadow: none;
        break-inside: avoid;
    }

}




/* ==========================================================
   KLASENTA
   CASH FLOW STATEMENT
   FILE:
   assets/css/app.css

   PURPOSE:
   Styles the Cash Flow Statement.

   SAFETY SEARCH:
   APP-CASH-FLOW-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH:
   APP-CASH-FLOW-WRAPPER
========================================================== */

.cash-flow-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH:
   APP-CASH-FLOW-HEADER
========================================================== */

.cash-flow-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.cash-flow-header > div {
    min-width: 0;
}

.cash-flow-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.cash-flow-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.cash-flow-actions {
    display: flex;
    gap: 10px;
}


/* ==========================================================
   SECTION 03
   REPORT CONTEXT
   SAFETY SEARCH:
   APP-CASH-FLOW-CONTEXT
========================================================== */

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

.cash-flow-context > div {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.cash-flow-context span,
.cash-flow-context strong,
.cash-flow-context small {
    display: block;
}

.cash-flow-context span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cash-flow-context > div > strong {
    display: flex;
    align-items: center;
    min-height: 28px;
    margin-top: 7px;
    color: var(--color-dark);
    font-size: 14px;
}

.cash-flow-context .status-badge {
    display: inline-flex;
    width: auto;
    min-width: 110px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    line-height: 1;
    text-align: center;
}

.cash-flow-context small {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 9px;
}


/* ==========================================================
   SECTION 04
   SUMMARY CARDS
   SAFETY SEARCH:
   APP-CASH-FLOW-SUMMARY
========================================================== */

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

.cash-flow-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.cash-flow-kpi-grid span,
.cash-flow-kpi-grid strong,
.cash-flow-kpi-grid small {
    display: block;
}

.cash-flow-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cash-flow-kpi-grid strong {
    margin-top: 14px;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.cash-flow-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.cash-flow-positive-value {
    color: #087f3f !important;
}

.cash-flow-danger-value {
    color: var(--color-danger) !important;
}


/* ==========================================================
   SECTION 05
   FILTERS
   SAFETY SEARCH:
   APP-CASH-FLOW-FILTERS
========================================================== */

.cash-flow-filters {
    display: grid;
    grid-template-columns:
        minmax(300px, 1.5fr)
        minmax(170px, .75fr)
        minmax(170px, .75fr);
    gap: 14px;
    align-items: end;
    padding: 20px 22px;
}

.cash-flow-filters .form-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.cash-flow-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.cash-flow-filters input,
.cash-flow-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.cash-flow-filters input {
    padding: 0 12px;
}

.cash-flow-filters select {
    padding: 0 36px 0 12px;
}

.cash-flow-filters input:focus,
.cash-flow-filters select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.cash-flow-period-filter {
    grid-column: 1;
}

.cash-flow-zero-toggle {
    display: flex;
    grid-column: 1 / 3;
    min-height: 44px;
    align-items: center;
}

.cash-flow-zero-toggle label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--color-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.cash-flow-zero-toggle input {
    width: 16px;
    min-height: auto;
    height: 16px;
    padding: 0;
}

.cash-flow-filter-actions {
    display: flex;
    grid-column: 3;
    justify-content: flex-end;
    gap: 8px;
}

.cash-flow-filter-actions .button {
    min-height: 44px;
    white-space: nowrap;
}

/* ==========================================================
   CASH FLOW FILTERS — TABLET
   SAFETY SEARCH:
   APP-CASH-FLOW-FILTERS-TABLET
========================================================== */

@media (max-width: 980px) {

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

    .cash-flow-period-filter {
        grid-column: 1 / -1;
    }

    .cash-flow-zero-toggle,
    .cash-flow-filter-actions {
        grid-column: 1 / -1;
    }

    .cash-flow-filter-actions {
        justify-content: flex-end;
    }

}

/* ==========================================================
   CASH FLOW FILTERS — MOBILE
   SAFETY SEARCH:
   APP-CASH-FLOW-FILTERS-MOBILE
========================================================== */

@media (max-width: 700px) {

    .cash-flow-filters {
        grid-template-columns: 1fr;
    }

    .cash-flow-period-filter,
    .cash-flow-zero-toggle,
    .cash-flow-filter-actions {
        grid-column: auto;
    }

    .cash-flow-filter-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

/* ==========================================================
   SECTION 06
   ACTIVITY TABLES
   SAFETY SEARCH:
   APP-CASH-FLOW-SECTIONS
========================================================== */

.cash-flow-section-grid {
    display: grid;
    gap: 18px;
}

.cash-flow-section-grid .card-heading > strong {
    white-space: nowrap;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.cash-flow-table td:nth-child(6),
.cash-flow-table td:nth-child(7),
.cash-flow-table tfoot th:last-child {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cash-flow-table td:nth-child(3),
.cash-flow-table td:nth-child(5) {
    min-width: 220px;
}

.cash-flow-table tfoot th {
    border-top: 2px solid var(--color-border);
    background: #fafbfc;
    color: var(--color-dark);
}


/* ==========================================================
   SECTION 07
   RECONCILIATION
   SAFETY SEARCH:
   APP-CASH-FLOW-RECONCILIATION
========================================================== */

.cash-flow-reconciliation-card {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr)
        auto
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
}

.cash-flow-reconciliation-card > div {
    min-width: 0;
}

.cash-flow-reconciliation-card > div span,
.cash-flow-reconciliation-card > div strong {
    display: block;
}

.cash-flow-reconciliation-card > div span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cash-flow-reconciliation-card > div strong {
    margin-top: 8px;
    overflow-wrap: anywhere;
    font-size: clamp(21px, 2vw, 30px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.cash-flow-equation-symbol {
    color: var(--color-muted);
    font-size: 24px;
    font-weight: 800;
}

.cash-flow-reconciliation-card > .status-badge {
    display: inline-flex;
    width: auto;
    min-width: 120px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 7px 14px;
    border-radius: 999px;
    line-height: 1;
    text-align: center;
}


/* ==========================================================
   SECTION 08
   RESPONSIVE — TABLET
   SAFETY SEARCH:
   APP-CASH-FLOW-TABLET
========================================================== */

@media (max-width: 1100px) {

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

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

    .cash-flow-period-filter,
    .cash-flow-zero-toggle,
    .cash-flow-filter-actions {
        grid-column: 1 / -1;
    }

    .cash-flow-filter-actions {
        justify-content: flex-end;
    }

    .cash-flow-reconciliation-card {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .cash-flow-equation-symbol {
        display: none;
    }

}


/* ==========================================================
   SECTION 09
   RESPONSIVE — MOBILE
   SAFETY SEARCH:
   APP-CASH-FLOW-MOBILE
========================================================== */

@media (max-width: 760px) {

    .cash-flow-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .cash-flow-actions {
        width: 100%;
    }

    .cash-flow-actions .button {
        flex: 1;
    }

    .cash-flow-context,
    .cash-flow-kpi-grid,
    .cash-flow-filters,
    .cash-flow-reconciliation-card {
        grid-template-columns: 1fr;
    }

    .cash-flow-period-filter,
    .cash-flow-zero-toggle,
    .cash-flow-filter-actions {
        grid-column: auto;
    }

    .cash-flow-filter-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================
   SECTION 10
   PRINT
   SAFETY SEARCH:
   APP-CASH-FLOW-PRINT
========================================================== */

@media print {

    .sidebar,
    .app-header,
    .cash-flow-actions,
    .cash-flow-filters {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .cash-flow-page {
        padding: 12mm;
    }

    .dashboard-card,
    .cash-flow-kpi-grid article,
    .cash-flow-context > div {
        box-shadow: none;
        break-inside: avoid;
    }

}




/* ==========================================================
   KLASENTA
   ACCOUNTING REPORTS HUB
   FILE:
   assets/css/app.css

   PURPOSE:
   Styles the Accounting Reports reporting centre.

   SAFETY SEARCH:
   APP-ACCOUNTING-REPORTS-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH:
   APP-ACCOUNTING-REPORTS-WRAPPER
========================================================== */

.accounting-reports-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH:
   APP-ACCOUNTING-REPORTS-HEADER
========================================================== */

.accounting-reports-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.accounting-reports-header > div {
    min-width: 0;
}

.accounting-reports-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.accounting-reports-header p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   SECTION 03
   REPORTING CONTEXT
   SAFETY SEARCH:
   APP-ACCOUNTING-REPORTS-CONTEXT
========================================================== */

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

.accounting-reports-context > div {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
}

.accounting-reports-context span,
.accounting-reports-context strong,
.accounting-reports-context small {
    display: block;
}

.accounting-reports-context span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.accounting-reports-context strong {
    margin-top: 7px;
    color: var(--color-dark);
    font-size: 14px;
}

.accounting-reports-context small {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}


/* ==========================================================
   SECTION 04
   REPORT GROUPS
   SAFETY SEARCH:
   APP-ACCOUNTING-REPORTS-GROUPS
========================================================== */

.accounting-reports-groups {
    display: grid;
    gap: 18px;
}

.accounting-report-group .card-heading p {
    max-width: 720px;
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

.accounting-report-card-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 20px 22px 24px;
    border-top: 1px solid var(--color-border);
}

.accounting-report-card {
    display: flex;
    min-width: 0;
    min-height: 154px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fafbfc;
    color: inherit;
    text-decoration: none;
    transition:
        border-color .18s ease,
        background-color .18s ease,
        transform .18s ease;
}

.accounting-report-card:hover {
    border-color: #d8bd76;
    background: #fffdf7;
    transform: translateY(-2px);
}

.accounting-report-card > div {
    min-width: 0;
}

.accounting-report-card span,
.accounting-report-card h3,
.accounting-report-card p {
    display: block;
}

.accounting-report-card span {
    color: #8a6200;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.accounting-report-card h3 {
    margin: 10px 0 0;
    color: var(--color-dark);
    font-size: 15px;
    line-height: 1.2;
}

.accounting-report-card p {
    margin: 8px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.55;
}

.accounting-report-card > strong {
    flex: 0 0 auto;
    color: #8a6200;
    font-size: 20px;
    line-height: 1;
}


/* ==========================================================
   SECTION 05
   RESPONSIVE — TABLET
   SAFETY SEARCH:
   APP-ACCOUNTING-REPORTS-TABLET
========================================================== */

@media (max-width: 1100px) {

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

}


/* ==========================================================
   SECTION 06
   RESPONSIVE — MOBILE
   SAFETY SEARCH:
   APP-ACCOUNTING-REPORTS-MOBILE
========================================================== */

@media (max-width: 760px) {

    .accounting-reports-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .accounting-reports-header .button {
        width: 100%;
    }

    .accounting-reports-context,
    .accounting-report-card-grid {
        grid-template-columns: 1fr;
    }

}





/* ==========================================================
   KLASENTA
   USERS DIRECTORY
   FILE:
   assets/css/app.css

   PURPOSE:
   Styles the Administration Users Directory.

   SAFETY SEARCH:
   APP-USERS-DIRECTORY-CSS
========================================================== */


/* ==========================================================
   SECTION 01
   PAGE WRAPPER
   SAFETY SEARCH:
   APP-USERS-DIRECTORY-WRAPPER
========================================================== */

.users-directory-page {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   SECTION 02
   PAGE HEADER
   SAFETY SEARCH:
   APP-USERS-DIRECTORY-HEADER
========================================================== */

.users-directory-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.users-directory-header > div {
    min-width: 0;
}

.users-directory-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.users-directory-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   SECTION 03
   SUMMARY CARDS
   SAFETY SEARCH:
   APP-USERS-DIRECTORY-SUMMARY
========================================================== */

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

.users-directory-kpi-grid article {
    min-width: 0;
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.users-directory-kpi-grid span,
.users-directory-kpi-grid strong,
.users-directory-kpi-grid small {
    display: block;
}

.users-directory-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.users-directory-kpi-grid strong {
    margin-top: 14px;
    color: var(--color-dark);
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.users-directory-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.users-directory-positive-value {
    color: #087f3f !important;
}

.users-directory-danger-value {
    color: var(--color-danger) !important;
}


/* ==========================================================
   SECTION 04
   FILTERS
   SAFETY SEARCH:
   APP-USERS-DIRECTORY-FILTERS
========================================================== */

.users-directory-filters {
    display: grid;
    grid-template-columns:
        minmax(320px, 1.5fr)
        minmax(190px, .8fr)
        minmax(230px, 1fr)
        auto;
    gap: 14px;
    align-items: end;
    padding: 20px 22px;
}

.users-directory-filters .form-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.users-directory-filters label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.users-directory-filters input,
.users-directory-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.users-directory-filters input {
    padding: 0 12px;
}

.users-directory-filters select {
    padding: 0 36px 0 12px;
}

.users-directory-filters input:focus,
.users-directory-filters select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.users-directory-filter-actions {
    display: flex;
    gap: 8px;
}

.users-directory-filter-actions .button {
    min-height: 44px;
    white-space: nowrap;
}


/* ==========================================================
   SECTION 05
   USERS TABLE
   SAFETY SEARCH:
   APP-USERS-DIRECTORY-TABLE
========================================================== */

.users-directory-table td:nth-child(5),
.users-directory-table td:nth-child(6) {
    white-space: nowrap;
}

.users-directory-table .status-badge {
    display: inline-flex;
    width: auto;
    min-width: 76px;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    border-radius: 999px;
    line-height: 1;
    text-align: center;
}

.users-directory-security-note {
    display: block;
    margin-top: 6px;
    color: #8a6200;
    font-size: 8px;
    font-weight: 700;
}

.users-directory-muted {
    color: var(--color-muted);
    font-size: 10px;
}


/* ==========================================================
   SECTION 06
   RESPONSIVE — TABLET
   SAFETY SEARCH:
   APP-USERS-DIRECTORY-TABLET
========================================================== */

@media (max-width: 1100px) {

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

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

    .users-directory-search,
    .users-directory-filter-actions {
        grid-column: 1 / -1;
    }

    .users-directory-filter-actions {
        justify-content: flex-end;
    }

}


/* ==========================================================
   SECTION 07
   RESPONSIVE — MOBILE
   SAFETY SEARCH:
   APP-USERS-DIRECTORY-MOBILE
========================================================== */

@media (max-width: 760px) {

    .users-directory-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .users-directory-kpi-grid,
    .users-directory-filters {
        grid-template-columns: 1fr;
    }

    .users-directory-search,
    .users-directory-filter-actions {
        grid-column: auto;
    }

    .users-directory-filter-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================
   SECTION 08
   USERS DIRECTORY HEADER ACTION
   SAFETY SEARCH:
   APP-USERS-DIRECTORY-HEADER-ACTION
========================================================== */

.users-directory-header .button {
    flex: 0 0 auto;
}


/* ==========================================================
   KLASENTA
   CREATE USER
   SAFETY SEARCH:
   APP-USER-CREATE-CSS
========================================================== */

.user-create-page {
    display: grid;
    gap: 20px;
}

.user-create-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.user-create-header > div {
    min-width: 0;
}

.user-create-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.user-create-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.user-created-credentials {
    padding: 22px 24px;
    border-color: #b9e3ca;
    background: #f2fbf6;
}

.user-created-credentials span,
.user-created-credentials h2,
.user-created-credentials p {
    display: block;
}

.user-created-credentials span {
    color: #087f3f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.user-created-credentials h2 {
    margin: 8px 0 0;
    font-size: 22px;
}

.user-created-credentials dl {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
}

.user-created-credentials dl > div {
    padding: 14px;
    border: 1px solid #cdebd8;
    border-radius: 12px;
    background: #fff;
}

.user-created-credentials dt {
    color: var(--color-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.user-created-credentials dd {
    margin: 8px 0 0;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 14px;
    font-weight: 800;
}

.user-created-credentials p {
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

.user-create-form {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 22px;
    border-top: 1px solid var(--color-border);
}

.user-create-form .form-field {
    display: grid;
    gap: 7px;
}

.user-create-form label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.user-create-form input,
.user-create-form select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 12px;
}

.user-create-form input {
    padding: 0 13px;
}

.user-create-form select {
    padding: 0 36px 0 13px;
}

.user-create-form input:focus,
.user-create-form select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.user-create-identity-field {
    grid-column: 1 / -1;
}

.user-create-identity-control {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.user-create-identity-control input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.user-create-identity-control span {
    display: flex;
    min-height: 46px;
    align-items: center;
    padding: 0 14px;
    border-left: 1px solid var(--color-border);
    background: #fafbfc;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
}

.user-create-identity-field small {
    color: var(--color-muted);
    font-size: 9px;
}

.user-create-security-note {
    grid-column: 1 / -1;
    padding: 16px;
    border: 1px solid #ead79d;
    border-radius: 12px;
    background: #fffaf0;
}

.user-create-security-note strong,
.user-create-security-note p {
    display: block;
}

.user-create-security-note strong {
    color: #8a6200;
    font-size: 10px;
}

.user-create-security-note p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

.user-create-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 9px;
}

@media (max-width: 760px) {

    .user-create-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-create-header .button {
        width: 100%;
    }

    .user-created-credentials dl,
    .user-create-form {
        grid-template-columns: 1fr;
    }

    .user-create-identity-field,
    .user-create-security-note,
    .user-create-actions {
        grid-column: auto;
    }

    .user-create-identity-control {
        grid-template-columns: 1fr;
    }

    .user-create-identity-control span {
        border-top: 1px solid var(--color-border);
        border-left: 0;
    }

    .user-create-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}




/* ==========================================================
   KLASENTA
   CREATE USER — AUTOMATIC IDENTITY PREVIEW

   FILE:
   assets/css/app.css

   SAFETY SEARCH:
   APP-USER-CREATE-AUTO-IDENTITY-CSS
========================================================== */

.user-create-identity-preview {
    display: grid;
    grid-column: 1 / -1;
    gap: 7px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
}

.user-create-identity-preview strong {
    color: var(--color-dark);
    font-size: 10px;
}

.user-create-identity-preview p {
    margin: 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

.user-create-identity-preview span {
    display: block;
    overflow-wrap: anywhere;
    color: #8a6200;
    font-size: 14px;
    font-weight: 800;
}

.user-create-identity-preview small {
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

@media (max-width: 760px) {

    .user-create-identity-preview {
        grid-column: auto;
    }

}





Library
/
Golden Standard Invoicing app
/
user-profile.css


/* ==========================================================
   KLASENTA
   USER PROFILE
   FILE:
   assets/css/app.css
   SAFETY SEARCH:
   APP-USER-PROFILE-CSS
========================================================== */

.users-directory-user-link {
    display: inline-grid;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.users-directory-user-link:hover strong {
    color: #8a6200;
}

.user-profile-page {
    display: grid;
    gap: 20px;
}

.user-profile-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.user-profile-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.user-profile-header p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.user-profile-identity-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
}

.user-profile-avatar {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #f7edd2;
    color: #8a6200;
    font-size: 21px;
    font-weight: 800;
}

.user-profile-identity-copy span,
.user-profile-identity-copy h2,
.user-profile-identity-copy p {
    display: block;
}

.user-profile-identity-copy span {
    color: var(--color-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.user-profile-identity-copy h2 {
    margin: 7px 0 0;
    color: var(--color-dark);
    font-size: 22px;
}

.user-profile-identity-copy p {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
    color: var(--color-muted);
    font-size: 11px;
}

.user-profile-identity-status {
    display: grid;
    justify-items: end;
    gap: 8px;
}

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

.user-profile-kpi-grid article {
    min-height: 136px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.user-profile-kpi-grid span,
.user-profile-kpi-grid strong,
.user-profile-kpi-grid small {
    display: block;
}

.user-profile-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.user-profile-kpi-grid strong {
    margin-top: 14px;
    color: var(--color-dark);
    font-size: 20px;
}

.user-profile-kpi-grid small {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

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

.user-profile-detail-list {
    display: grid;
    margin: 0;
}

.user-profile-detail-list > div {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
    gap: 18px;
    padding: 15px 20px;
    border-top: 1px solid var(--color-border);
}

.user-profile-detail-list dt {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.user-profile-detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 11px;
    font-weight: 700;
}

.user-profile-list {
    display: grid;
}

.user-profile-list > div {
    display: grid;
    gap: 5px;
    padding: 15px 20px;
    border-top: 1px solid var(--color-border);
}

.user-profile-list strong {
    color: var(--color-dark);
    font-size: 11px;
}

.user-profile-list span,
.user-profile-list small {
    color: var(--color-muted);
    font-size: 9px;
}

.user-profile-audit-table td:first-child,
.user-profile-audit-table td:nth-child(3),
.user-profile-audit-table td:nth-child(4) {
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .user-profile-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-profile-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .user-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-profile-header .button {
        width: 100%;
    }

    .user-profile-identity-card {
        grid-template-columns: 1fr;
    }

    .user-profile-identity-status {
        justify-items: start;
    }

    .user-profile-kpi-grid {
        grid-template-columns: 1fr;
    }

    .user-profile-detail-list > div {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}


/* ==========================================================
   KLASENTA
   USERS DIRECTORY POLISH + USER EDIT

   FILE:
   assets/css/app.css

   SAFETY SEARCH:
   APP-USERS-EDIT-POLISH-CSS
========================================================== */

.users-directory-clickable-row {
    cursor: pointer;
    transition:
        background-color .18s ease,
        box-shadow .18s ease;
}

.users-directory-clickable-row:hover,
.users-directory-clickable-row:focus {
    background: #fffaf0;
    outline: none;
}

.users-directory-clickable-row:focus {
    box-shadow:
        inset 3px 0 0
        var(--color-primary);
}

.users-directory-role-badge,
.user-profile-role-badge {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.role-badge-super {
    background: #eee8ff;
    color: #6543a6;
}

.role-badge-admin {
    background: #e8f0ff;
    color: #275da8;
}

.role-badge-principal {
    background: #e6f7ef;
    color: #087f3f;
}

.role-badge-proprietor {
    background: #ffe9e9;
    color: #a63333;
}

.role-badge-accounts {
    background: #fff3d2;
    color: #8a6200;
}

.role-badge-teacher {
    background: #e8f7fa;
    color: #176d7b;
}

.role-badge-neutral {
    background: #eef1f5;
    color: #526174;
}

.user-profile-header-actions {
    display: flex;
    gap: 10px;
}

.user-edit-page {
    display: grid;
    gap: 20px;
}

.user-edit-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.user-edit-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.user-edit-header p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.user-edit-form {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 22px;
    border-top: 1px solid var(--color-border);
}

.user-edit-form .form-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.user-edit-form label {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.user-edit-form input[type="text"],
.user-edit-form select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 12px;
}

.user-edit-form input[type="text"] {
    padding: 0 13px;
}

.user-edit-form select {
    padding: 0 36px 0 13px;
}

.user-edit-form input[type="text"]:focus,
.user-edit-form select:focus {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 4px
        rgba(200, 155, 44, .10);
}

.user-edit-identity-field {
    grid-column: 1 / -1;
}

.user-edit-readonly-value {
    min-height: 46px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fafbfc;
    color: var(--color-dark);
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.user-edit-identity-field small {
    color: var(--color-muted);
    font-size: 9px;
}

.user-edit-security-options {
    display: grid;
    grid-column: 1 / -1;
    gap: 10px;
}

.user-edit-security-options > label {
    display: grid;
    grid-template-columns:
        auto
        minmax(0, 1fr);
    align-items: flex-start;
    gap: 11px;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
    letter-spacing: 0;
    text-transform: none;
}

.user-edit-security-options input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
}

.user-edit-security-options span,
.user-edit-security-options strong,
.user-edit-security-options small {
    display: block;
}

.user-edit-security-options strong {
    color: var(--color-dark);
    font-size: 10px;
}

.user-edit-security-options small {
    margin-top: 5px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 1.45;
}

.user-edit-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 9px;
}

@media (max-width: 760px) {

    .user-profile-header-actions {
        display: grid;
        width: 100%;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .user-edit-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-edit-header .button {
        width: 100%;
    }

    .user-edit-form {
        grid-template-columns: 1fr;
    }

    .user-edit-identity-field,
    .user-edit-security-options,
    .user-edit-actions {
        grid-column: auto;
    }

    .user-edit-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}



/* ==========================================================
   KLASENTA
   ADMINISTRATOR PASSWORD RESET

   FILE:
   assets/css/app.css

   SAFETY SEARCH:
   APP-USER-RESET-PASSWORD-CSS
========================================================== */

.user-reset-password-page {
    display: grid;
    gap: 20px;
}

.user-reset-password-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.user-reset-password-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.user-reset-password-header p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

.password-reset-result {
    padding: 22px 24px;
    border-color: #b9e3ca;
    background: #f2fbf6;
}

.password-reset-result > span {
    color: #087f3f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.password-reset-result h2 {
    margin: 8px 0 0;
    font-size: 22px;
}

.password-reset-result dl,
.password-reset-confirmation-body dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
}

.password-reset-result dl > div,
.password-reset-confirmation-body dl > div {
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
}

.password-reset-result dt,
.password-reset-confirmation-body dt {
    color: var(--color-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.password-reset-result dd,
.password-reset-confirmation-body dd {
    margin: 8px 0 0;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 14px;
    font-weight: 800;
}

.password-reset-result > p {
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

.password-reset-result-actions,
.password-reset-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 18px;
}

.password-reset-confirmation-body {
    padding: 22px;
    border-top: 1px solid var(--color-border);
}

/* ==========================================================
   APP-USER-RESET-WARNING
========================================================== */

.password-reset-warning{

    margin-top:20px;

    padding:20px;

    border:1px solid #E8D39A;

    border-radius:14px;

    background:#FFF8EA;

}

.password-reset-warning-title{

    margin-bottom:14px;

    color:#8C6500;

    font-size:12px;

    font-weight:800;

    text-transform:uppercase;

    letter-spacing:.06em;

}

.password-reset-impact-list{

    margin:0;

    padding:0;

    list-style:none;

    display:grid;

    gap:12px;

}

.password-reset-impact-list li{

    position:relative;

    padding-left:28px;

    color:var(--color-dark);

    font-size:13px;

    line-height:1.5;

    font-weight:600;

}

.password-reset-impact-list li::before{

    content:"✓";

    position:absolute;

    left:0;

    top:0;

    width:18px;

    height:18px;

    border-radius:50%;

    background:#DDF5E6;

    color:#128148;

    font-size:11px;

    font-weight:800;

    display:flex;

    align-items:center;

    justify-content:center;

}

/* ==========================================================
   APP-USER-RESET-CHECKBOX
========================================================== */

.password-reset-confirm-checkbox{
    display:flex;
    align-items:center;
    gap:12px;

    margin-top:18px;
    padding:16px 18px;

    border:1px solid var(--color-border);
    border-radius:12px;
    background:#fafbfc;

    cursor:pointer;
}

.password-reset-confirm-checkbox input{
    flex:0 0 18px;
    width:18px;
    height:18px;
    margin:0;
}

.password-reset-confirm-checkbox span{
    flex:1;
    margin:0;

    color:var(--color-dark);
    font-size:13px;
    font-weight:600;
    line-height:1.5;
}

.password-reset-confirm-checkbox input {
    width: 17px;
    height: 17px;
}

@media (max-width: 760px) {
    .user-reset-password-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-reset-password-header .button {
        width: 100%;
    }

    .password-reset-result dl,
    .password-reset-confirmation-body dl {
        grid-template-columns: 1fr;
    }

    .password-reset-result-actions,
    .password-reset-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    .sidebar,
    .app-header,
    .user-reset-password-header,
    .password-reset-result-actions {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .password-reset-result {
        border: 0;
        box-shadow: none;
    }
}


/* ==========================================================
   KLASENTA
   FORCED PASSWORD CHANGE
   SAFETY SEARCH:
   APP-CHANGE-PASSWORD-CSS
========================================================== */

.password-change-layout {
    display: grid;
    width: min(1180px, calc(100% - 40px));
    min-height: 680px;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(420px, .95fr);
    margin: 34px auto;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow:
        0 30px 80px
        rgba(16, 29, 50, .18);
}

.password-change-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px, 6vw, 78px);
    background:
        linear-gradient(
            145deg,
            rgba(22, 35, 58, .98),
            rgba(22, 35, 58, .91)
        );
    color: #fff;
}

.password-change-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 54px;
}

.password-change-brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.password-change-brand strong,
.password-change-brand span {
    display: block;
}

.password-change-brand strong {
    font-size: 14px;
}

.password-change-brand span {
    margin-top: 4px;
    color: rgba(255, 255, 255, .68);
    font-size: 10px;
}

.password-change-panel h1 {
    max-width: 540px;
    margin: 12px 0 0;
    font-size: clamp(38px, 5vw, 66px);
    line-height: .98;
    letter-spacing: -.055em;
}

.password-change-panel > p {
    max-width: 520px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    line-height: 1.7;
}

.password-policy-card {
    max-width: 520px;
    margin-top: 30px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
}

.password-policy-card strong {
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.password-policy-card ul {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding-left: 18px;
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
}

.password-change-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 5vw, 62px);
    background: #f7f8fb;
}

.password-change-card {
    width: 100%;
    max-width: 460px;
}

.password-change-logout {
    display: block;
    margin-top: 16px;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 900px) {
    .password-change-layout {
        grid-template-columns: 1fr;
    }

    .password-change-panel {
        padding: 42px 30px;
    }
}

@media (max-width: 560px) {
    .password-change-layout {
        width: min(100% - 20px, 1180px);
        margin: 10px auto;
        border-radius: 18px;
    }

    .password-change-form-panel {
        padding: 28px 18px;
    }
}



/* ==========================================================
   KLASENTA
   VERIFIED PASSWORD RESET OUTPUT

   FILE:
   assets/css/app.css

   SAFETY SEARCH:
   APP-USER-RESET-VERIFIED-OUTPUT-CSS
========================================================== */

.password-reset-generated-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.password-reset-generated-value code {
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-family:
        "Courier New",
        monospace;
    font-size: 14px;
    font-weight: 800;
}

.password-reset-copy-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    color: var(--color-dark);
    cursor: pointer;
    font: inherit;
    font-size: 9px;
    font-weight: 800;
}

.password-reset-copy-button:hover {
    border-color: var(--color-primary);
    background: #fffaf0;
}

@media (max-width: 560px) {

    .password-reset-generated-value {
        align-items: flex-start;
        flex-direction: column;
    }

}



/* ==========================================================
   APP-CHANGE-PASSWORD-TOGGLE-FIX
========================================================== */

.password-change-card .password-field {
    width: 100%;
}

.password-change-card .password-field input {
    width: 100%;
    padding-right: 72px;
}





/* ==========================================================
   KLASENTA
   TRUSTED DEVICE SECURITY

   FILE:
   assets/css/app.css

   SAFETY SEARCH:
   APP-TRUSTED-DEVICE-CSS
========================================================== */

.device-pending-layout {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.device-pending-card {
    width: min(100%, 560px);
    padding: 36px;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    background: #fff;
    box-shadow:
        0 28px 70px
        rgba(16, 29, 50, .14);
}

.device-pending-mark {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border-radius: 16px;
    background: #f7edd2;
    color: #8a6200;
    font-size: 18px;
    font-weight: 800;
}

.device-pending-card h1 {
    margin: 8px 0 0;
    color: var(--color-dark);
    font-size: clamp(34px, 5vw, 48px);
    line-height: 1;
    letter-spacing: -.045em;
}

.device-pending-card > p {
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.6;
}

.device-pending-details {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 0;
}

.device-pending-details > div {
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fafbfc;
}

.device-pending-details dt {
    color: var(--color-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.device-pending-details dd {
    margin: 7px 0 0;
    overflow-wrap: anywhere;
    color: var(--color-dark);
    font-size: 11px;
    font-weight: 800;
}

.device-pending-note {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #ead79d;
    border-radius: 12px;
    background: #fffaf0;
}

.device-pending-note strong {
    color: #8a6200;
    font-size: 10px;
}

.device-pending-note p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.5;
}

.trusted-devices-page {
    display: grid;
    gap: 20px;
}

.trusted-devices-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.trusted-devices-header h1 {
    margin: 6px 0 0;
    color: var(--color-dark);
    font-size: clamp(36px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.05em;
}

.trusted-devices-header p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
}

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

.trusted-device-kpi-grid article {
    min-height: 126px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: #fff;
}

.trusted-device-kpi-grid span,
.trusted-device-kpi-grid strong,
.trusted-device-kpi-grid small {
    display: block;
}

.trusted-device-kpi-grid span {
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.trusted-device-kpi-grid strong {
    margin-top: 12px;
    color: var(--color-dark);
    font-size: 27px;
}

.trusted-device-kpi-grid small {
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 9px;
}

.trusted-devices-table td:first-child strong,
.trusted-devices-table td:first-child span,
.trusted-devices-table td:nth-child(2) strong,
.trusted-devices-table td:nth-child(2) span {
    display: block;
}

.trusted-devices-table td:first-child span,
.trusted-devices-table td:nth-child(2) span {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 9px;
}

.trusted-device-status {
    display: inline-flex;
    min-width: 76px;
    min-height: 27px;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.trusted-device-status-pending {
    background: #fff3d2;
    color: #8a6200;
}

.trusted-device-status-approved {
    background: #e6f7ef;
    color: #087f3f;
}

.trusted-device-status-rejected,
.trusted-device-status-revoked {
    background: #ffe9e9;
    color: #a63333;
}

.trusted-device-actions {
    display: flex;
    gap: 7px;
}

.trusted-device-actions .button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 9px;
}

@media (max-width: 1000px) {

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

}

@media (max-width: 680px) {

    .device-pending-layout {
        padding: 12px;
    }

    .device-pending-card {
        padding: 24px 18px;
    }

    .device-pending-details,
    .trusted-device-kpi-grid {
        grid-template-columns: 1fr;
    }

    .trusted-devices-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .trusted-devices-header .button {
        width: 100%;
    }

}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   INBOX

   SAFETY SEARCH:
   COMM-INBOX-STYLES
========================================================== */

.communications-inbox-page {
    display: grid;
    gap: 24px;
}

.communications-inbox-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.communications-inbox-header h1 {
    margin: 4px 0 8px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: .95;
    letter-spacing: -.045em;
}

.communications-inbox-header p {
    max-width: 720px;
    margin: 0;
    color: #61708a;
    line-height: 1.6;
}

.communications-inbox-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.communications-inbox-summary-grid article {
    min-height: 132px;
    padding: 20px;
    border: 1px solid #dfe6ef;
    border-radius: 16px;
    background: #fff;
}

.communications-inbox-summary-grid span,
.communications-inbox-summary-grid small {
    display: block;
}

.communications-inbox-summary-grid span {
    color: #66758f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.communications-inbox-summary-grid strong {
    display: block;
    margin: 16px 0 8px;
    color: #10213d;
    font-size: 31px;
    line-height: 1;
}

.communications-inbox-summary-grid small {
    color: #71809a;
    font-size: 12px;
}

.communications-inbox-accent-value {
    color: #b57a00 !important;
}

.communications-inbox-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.communications-mailbox-navigation,
.communications-inbox-directory {
    border: 1px solid #dfe6ef;
    border-radius: 18px;
    background: #fff;
}

.communications-mailbox-navigation {
    display: grid;
    gap: 6px;
    padding: 12px;
    position: sticky;
    top: 24px;
}

.communications-mailbox-navigation a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 46px;
    padding: 0 13px;
    border-radius: 11px;
    color: #263650;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.communications-mailbox-navigation a:hover,
.communications-mailbox-navigation a.is-active {
    background: #17243a;
    color: #fff;
}

.communications-mailbox-navigation strong {
    min-width: 26px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf1f6;
    color: #52627b;
    text-align: center;
    font-size: 11px;
}

.communications-mailbox-navigation a.is-active strong {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.communications-inbox-directory {
    overflow: hidden;
}

.communications-inbox-filters {
    display: grid;
    grid-template-columns:
        minmax(240px, 1fr)
        minmax(150px, .35fr)
        auto
        auto
        auto
        auto;
    gap: 12px;
    align-items: end;
    padding: 20px;
    border-bottom: 1px solid #e4e9f1;
}

.communications-inbox-search {
    min-width: 0;
}

.communications-inbox-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: #3b4b64;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.communications-inbox-check input {
    width: 16px;
    height: 16px;
}

.communications-inbox-directory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #e4e9f1;
}

.communications-inbox-directory-header h2 {
    margin: 3px 0 0;
    font-size: 22px;
}

.communications-inbox-directory-header small {
    color: #71809a;
}

.communications-inbox-message-list {
    display: grid;
}

.communications-inbox-message {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f5;
    color: inherit;
    text-decoration: none;
    transition:
        background-color .2s ease,
        transform .2s ease;
}

.communications-inbox-message:last-child {
    border-bottom: 0;
}

.communications-inbox-message:hover {
    background: #f8fafc;
}

.communications-inbox-message.is-unread {
    background: #fffaf0;
}

.communications-inbox-message.is-unread:hover {
    background: #fff6df;
}

.communications-inbox-message-marker {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
}

.communications-inbox-message-marker > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #edf1f6;
    color: #14223a;
    font-size: 14px;
    font-weight: 900;
}

.communications-inbox-message.is-unread
.communications-inbox-message-marker > span {
    background: #f4e6bd;
    color: #8a6100;
}

.communications-inbox-message-marker small {
    color: #d1a125;
    font-size: 14px;
}

.communications-inbox-message-main {
    min-width: 0;
}

.communications-inbox-message-meta,
.communications-inbox-message-subject,
.communications-inbox-message-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.communications-inbox-message-meta {
    justify-content: space-between;
}

.communications-inbox-message-meta strong {
    color: #16243c;
    font-size: 14px;
}

.communications-inbox-message.is-unread
.communications-inbox-message-meta strong {
    font-weight: 900;
}

.communications-inbox-message-meta > span {
    color: #71809a;
    font-size: 12px;
    white-space: nowrap;
}

.communications-inbox-message-subject {
    flex-wrap: wrap;
    margin-top: 6px;
}

.communications-inbox-message-subject h3 {
    min-width: 0;
    margin: 0;
    color: #17243a;
    font-size: 16px;
    line-height: 1.35;
}

.communications-inbox-message.is-unread
.communications-inbox-message-subject h3 {
    font-weight: 900;
}

.communications-priority,
.communications-attachment-count {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.communications-priority-high {
    background: #fff0cd;
    color: #946200;
}

.communications-priority-urgent {
    background: #fee4e4;
    color: #b42318;
}

.communications-attachment-count {
    background: #eef2f7;
    color: #52627b;
}

.communications-inbox-message-main > p {
    margin: 8px 0;
    color: #62718a;
    font-size: 13px;
    line-height: 1.55;
}

.communications-inbox-message-footer {
    flex-wrap: wrap;
    color: #8290a6;
    font-size: 11px;
}

.communications-inbox-message-footer span:not(:last-child)::after {
    content: "•";
    margin-left: 10px;
    color: #c0c8d4;
}

.communications-inbox-empty {
    display: grid;
    justify-items: center;
    padding: 72px 24px;
    text-align: center;
}

.communications-inbox-empty-mark {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: #f3e8c9;
    color: #8c6400;
    font-weight: 900;
}

.communications-inbox-empty h3 {
    margin: 20px 0 8px;
    color: #16243c;
    font-size: 24px;
}

.communications-inbox-empty p {
    max-width: 500px;
    margin: 0 0 22px;
    color: #687891;
    line-height: 1.65;
}

.communications-inbox-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    border-top: 1px solid #e4e9f1;
}

.communications-inbox-pagination span {
    color: #687891;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .communications-inbox-filters {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(150px, .5fr)
            repeat(2, auto);
    }
}

@media (max-width: 980px) {
    .communications-inbox-summary-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .communications-inbox-layout {
        grid-template-columns: 1fr;
    }

    .communications-mailbox-navigation {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
        position: static;
    }

    .communications-mailbox-navigation a {
        justify-content: center;
    }

    .communications-mailbox-navigation strong {
        display: none;
    }
}

@media (max-width: 760px) {
    .communications-inbox-header {
        display: grid;
    }

    .communications-inbox-header .button {
        width: 100%;
    }

    .communications-inbox-summary-grid {
        grid-template-columns: 1fr;
    }

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

    .communications-inbox-filters {
        grid-template-columns: 1fr;
    }

    .communications-inbox-check {
        min-height: auto;
    }

    .communications-inbox-message {
        grid-template-columns: 38px minmax(0, 1fr);
        padding-inline: 15px;
    }

    .communications-inbox-message-marker > span {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .communications-inbox-message-meta {
        align-items: flex-start;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   INBOX FILTER BAR — TWO ROW FIX

   SAFETY SEARCH:
   COMM-INBOX-FILTERS-TWO-ROW
========================================================== */

.communications-inbox-filters {
    display: grid;
    grid-template-columns:
        minmax(280px, 1fr)
        minmax(170px, 220px)
        auto
        auto;
    gap: 14px;
    align-items: end;
    padding: 20px;
}

.communications-inbox-search {
    grid-column: 1 / 2;
}

.communications-inbox-filters .form-field:nth-of-type(2) {
    grid-column: 2 / 3;
}

.communications-inbox-check {
    min-height: 44px;
}

.communications-inbox-filters .button {
    min-height: 44px;
    white-space: nowrap;
}

/* Second row */
.communications-inbox-filters .communications-inbox-check:first-of-type {
    grid-column: 1 / 2;
}

.communications-inbox-filters .communications-inbox-check:nth-of-type(2) {
    grid-column: 2 / 3;
}

.communications-inbox-filters button[type="submit"] {
    grid-column: 3 / 4;
}

.communications-inbox-filters .button-ghost {
    grid-column: 4 / 5;
}

/* Ensure fields fill their allocated columns */
.communications-inbox-filters input[type="search"],
.communications-inbox-filters select {
    width: 100%;
    min-width: 0;
}

/* Tablet */
@media (max-width: 1100px) {
    .communications-inbox-filters {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(150px, 190px);
    }

    .communications-inbox-search,
    .communications-inbox-filters .form-field:nth-of-type(2),
    .communications-inbox-filters .communications-inbox-check:first-of-type,
    .communications-inbox-filters .communications-inbox-check:nth-of-type(2),
    .communications-inbox-filters button[type="submit"],
    .communications-inbox-filters .button-ghost {
        grid-column: auto;
    }
}

/* Mobile */
@media (max-width: 700px) {
    .communications-inbox-filters {
        grid-template-columns: 1fr;
    }

    .communications-inbox-filters > * {
        grid-column: 1 !important;
        width: 100%;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   INBOX FILTER FIELD POLISH

   SAFETY SEARCH:
   COMM-INBOX-FIELD-POLISH
========================================================== */

.communications-inbox-filters .form-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.communications-inbox-filters .form-field label {
    color: #243550;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}

.communications-inbox-filters input[type="search"],
.communications-inbox-filters select {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d6deea;
    border-radius: 12px;
    background: #ffffff;
    color: #17243a;
    font: inherit;
    font-size: 14px;
    outline: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.communications-inbox-filters input[type="search"]::placeholder {
    color: #95a0b2;
}

.communications-inbox-filters input[type="search"]:hover,
.communications-inbox-filters select:hover {
    border-color: #bcc7d6;
}

.communications-inbox-filters input[type="search"]:focus,
.communications-inbox-filters select:focus {
    border-color: #c79b28;
    box-shadow: 0 0 0 4px rgba(199, 155, 40, .14);
    background: #fffdf8;
}

.communications-inbox-filters select {
    cursor: pointer;
    appearance: none;
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, #5e6c82 50%),
        linear-gradient(135deg, #5e6c82 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 19px,
        calc(100% - 13px) 19px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.communications-inbox-search input {
    background-image:
        linear-gradient(45deg, transparent 48%, #71809a 48%, #71809a 58%, transparent 58%);
}

/* Give search more visual dominance */
.communications-inbox-search {
    grid-column: 1 / 3;
}

.communications-inbox-filters .form-field:nth-of-type(2) {
    grid-column: 3 / 5;
}

/* Second row */
.communications-inbox-filters .communications-inbox-check:first-of-type {
    grid-column: 1 / 2;
}

.communications-inbox-filters .communications-inbox-check:nth-of-type(2) {
    grid-column: 2 / 3;
}

.communications-inbox-filters button[type="submit"] {
    grid-column: 3 / 4;
}

.communications-inbox-filters .button-ghost {
    grid-column: 4 / 5;
}

/* Tablet and mobile reset */
@media (max-width: 1100px) {
    .communications-inbox-search,
    .communications-inbox-filters .form-field:nth-of-type(2),
    .communications-inbox-filters .communications-inbox-check:first-of-type,
    .communications-inbox-filters .communications-inbox-check:nth-of-type(2),
    .communications-inbox-filters button[type="submit"],
    .communications-inbox-filters .button-ghost {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .communications-inbox-filters input[type="search"],
    .communications-inbox-filters select {
        height: 48px;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   COMPOSE MESSAGE

   SAFETY SEARCH:
   COMM-COMPOSE-STYLES
========================================================== */

.communications-compose-page {
    display: grid;
    gap: 24px;
}

.communications-compose-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.communications-compose-header h1 {
    margin: 4px 0 8px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: .95;
    letter-spacing: -.045em;
}

.communications-compose-header p {
    max-width: 720px;
    margin: 0;
    color: #61708a;
    line-height: 1.6;
}

.communications-compose-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.communications-compose-card,
.communications-compose-guidance {
    border: 1px solid #dfe6ef;
    border-radius: 18px;
    background: #fff;
}

.communications-compose-card {
    display: grid;
    gap: 24px;
    padding: 24px;
}

.communications-compose-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e6ebf2;
}

.communications-compose-section-heading h2,
.communications-compose-guidance h2 {
    margin: 4px 0 0;
    color: #17243a;
    font-size: 24px;
}

.communications-compose-secure-badge {
    padding: 7px 11px;
    border-radius: 999px;
    background: #edf8f2;
    color: #087642;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.communications-compose-recipient-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.communications-compose-subject-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 16px;
}

.communications-compose-card .form-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.communications-compose-card .form-field label {
    color: #243550;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}

.communications-compose-card .form-field label span {
    color: #b42318;
}

.communications-compose-card input[type="text"],
.communications-compose-card select,
.communications-compose-card textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #d6deea;
    border-radius: 12px;
    background: #fff;
    color: #17243a;
    font: inherit;
    font-size: 14px;
    outline: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.communications-compose-card input[type="text"],
.communications-compose-card
.communications-compose-subject-row select {
    height: 48px;
    padding: 0 14px;
}

.communications-compose-card select[multiple] {
    min-height: 154px;
    padding: 8px;
}

.communications-compose-card select[multiple] option {
    padding: 9px 10px;
    border-radius: 7px;
}

.communications-compose-card select[multiple] option:checked {
    background: #17243a linear-gradient(0deg, #17243a 0%, #17243a 100%);
    color: #fff;
}

.communications-compose-card textarea {
    min-height: 260px;
    padding: 15px;
    resize: vertical;
    line-height: 1.65;
}

.communications-compose-card input::placeholder,
.communications-compose-card textarea::placeholder {
    color: #99a5b7;
}

.communications-compose-card input:hover,
.communications-compose-card select:hover,
.communications-compose-card textarea:hover {
    border-color: #bcc7d6;
}

.communications-compose-card input:focus,
.communications-compose-card select:focus,
.communications-compose-card textarea:focus {
    border-color: #c79b28;
    background: #fffdf8;
    box-shadow: 0 0 0 4px rgba(199, 155, 40, .14);
}

.communications-compose-card .form-field small {
    color: #7a879b;
    font-size: 11px;
    line-height: 1.5;
}

.communications-compose-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e6ebf2;
}

.communications-compose-guidance {
    padding: 22px;
    position: sticky;
    top: 24px;
}

.communications-compose-guidance > p {
    margin: 12px 0 20px;
    color: #66758f;
    font-size: 13px;
    line-height: 1.65;
}

.communications-compose-guidance dl {
    display: grid;
    gap: 15px;
    margin: 0;
}

.communications-compose-guidance dl div {
    padding-bottom: 15px;
    border-bottom: 1px solid #edf0f5;
}

.communications-compose-guidance dt {
    margin-bottom: 4px;
    color: #17243a;
    font-size: 12px;
    font-weight: 900;
}

.communications-compose-guidance dd {
    margin: 0;
    color: #6f7d92;
    font-size: 12px;
    line-height: 1.55;
}

.communications-compose-note {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #ead18a;
    border-radius: 12px;
    background: #fffaf0;
}

.communications-compose-note strong {
    color: #7a5600;
    font-size: 12px;
}

.communications-compose-note p {
    margin: 6px 0 0;
    color: #7b6840;
    font-size: 11px;
    line-height: 1.55;
}

@media (max-width: 1100px) {
    .communications-compose-layout {
        grid-template-columns: 1fr;
    }

    .communications-compose-guidance {
        position: static;
    }
}

@media (max-width: 780px) {
    .communications-compose-header {
        display: grid;
    }

    .communications-compose-header .button {
        width: 100%;
    }

    .communications-compose-recipient-grid,
    .communications-compose-subject-row {
        grid-template-columns: 1fr;
    }

    .communications-compose-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .communications-compose-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .communications-compose-actions .button {
        width: 100%;
    }
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   STACKED COMPOSE RECIPIENTS

   SAFETY SEARCH:
   COMM-COMPOSE-STACKED-RECIPIENTS
========================================================== */

.communications-compose-recipient-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.communications-compose-recipient-grid .form-field {
    width: 100%;
    min-width: 0;
}

.communications-compose-recipient-grid select[multiple] {
    width: 100%;
    min-height: 120px;
}

/* CC and BCC can be slightly shorter than To */
.communications-compose-recipient-grid .form-field:nth-child(2)
select[multiple],
.communications-compose-recipient-grid .form-field:nth-child(3)
select[multiple] {
    min-height: 100px;
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   COMPACT STACKED RECIPIENTS

   SAFETY SEARCH:
   COMM-COMPOSE-COMPACT-RECIPIENTS
========================================================== */

.communications-compose-recipient-grid {
    gap: 14px;
}

.communications-compose-recipient-grid select[multiple] {
    min-height: 74px;
    max-height: 92px;
    padding: 6px 8px;
}

.communications-compose-recipient-grid .form-field:nth-child(2)
select[multiple],
.communications-compose-recipient-grid .form-field:nth-child(3)
select[multiple] {
    min-height: 64px;
    max-height: 76px;
}

.communications-compose-recipient-grid select[multiple] option {
    padding: 7px 9px;
}

.communications-compose-recipient-grid .form-field small {
    margin-top: 2px;
}

.communications-compose-card {
    gap: 18px;
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   RECIPIENT AUTOCOMPLETE

   SAFETY SEARCH:
   COMM-RECIPIENT-AUTOCOMPLETE-STYLES
========================================================== */

.communications-compose-recipient-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.communications-recipient-field {
    position: relative;
}

.communications-recipient-control {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 50px;
    padding: 7px 10px;
    border: 1px solid #d6deea;
    border-radius: 12px;
    background: #fff;
    cursor: text;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.communications-recipient-control:hover {
    border-color: #bcc7d6;
}

.communications-recipient-control:focus-within {
    border-color: #c79b28;
    background: #fffdf8;
    box-shadow: 0 0 0 4px rgba(199, 155, 40, .14);
}

.communications-recipient-control.is-invalid {
    border-color: #d92d20;
    box-shadow: 0 0 0 4px rgba(217, 45, 32, .1);
}

.communications-recipient-chips {
    display: contents;
}

.communications-recipient-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 34px;
    padding: 5px 8px 5px 11px;
    border-radius: 999px;
    background: #17243a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.communications-recipient-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communications-recipient-chip small {
    color: #cdd6e4;
    font-size: 10px;
    font-weight: 600;
}

.communications-recipient-chip-remove {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.communications-recipient-chip-remove:hover,
.communications-recipient-chip-remove:focus-visible {
    background: rgba(255, 255, 255, .25);
    outline: none;
}

.communications-recipient-input {
    flex: 1 1 210px;
    width: auto !important;
    min-width: 160px !important;
    height: 34px !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #17243a;
    font: inherit;
    font-size: 14px;
}

.communications-recipient-input::placeholder {
    color: #98a4b6;
}

.communications-recipient-suggestions {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    padding: 7px;
    border: 1px solid #d9e1ec;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(18, 33, 58, .16);
}

.communications-recipient-suggestion {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #17243a;
    text-align: left;
    cursor: pointer;
}

.communications-recipient-suggestion:hover,
.communications-recipient-suggestion.is-active {
    background: #f3f6fa;
}

.communications-recipient-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #f3e8c9;
    color: #8b6300;
    font-size: 12px;
    font-weight: 900;
}

.communications-recipient-suggestion-copy {
    min-width: 0;
}

.communications-recipient-suggestion-copy strong,
.communications-recipient-suggestion-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communications-recipient-suggestion-copy strong {
    color: #17243a;
    font-size: 13px;
}

.communications-recipient-suggestion-copy span {
    margin-top: 3px;
    color: #71809a;
    font-size: 11px;
}

.communications-recipient-empty {
    padding: 14px;
    color: #71809a;
    font-size: 12px;
    text-align: center;
}

.communications-recipient-field small.is-error {
    color: #b42318;
    font-weight: 700;
}

@media (max-width: 700px) {
    .communications-recipient-chip {
        max-width: 100%;
    }

    .communications-recipient-input {
        flex-basis: 100%;
        min-width: 100% !important;
    }
}





/* ==========================================================
   KLASENTA COMMUNICATIONS
   SENT

   SAFETY SEARCH:
   COMM-SENT-STYLES
========================================================== */

.communications-sent-page {
    display: grid;
    gap: 24px;
}

.communications-sent-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.communications-sent-header h1 {
    margin: 4px 0 8px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: .95;
    letter-spacing: -.045em;
}

.communications-sent-header p {
    max-width: 720px;
    margin: 0;
    color: #61708a;
    line-height: 1.6;
}

.communications-sent-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.communications-sent-summary-grid article {
    min-height: 132px;
    padding: 20px;
    border: 1px solid #dfe6ef;
    border-radius: 16px;
    background: #fff;
}

.communications-sent-summary-grid span,
.communications-sent-summary-grid small {
    display: block;
}

.communications-sent-summary-grid span {
    color: #66758f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.communications-sent-summary-grid strong {
    display: block;
    margin: 16px 0 8px;
    color: #10213d;
    font-size: 31px;
    line-height: 1;
}

.communications-sent-summary-grid small {
    color: #71809a;
    font-size: 12px;
}

.communications-sent-accent-value {
    color: #b57a00 !important;
}

.communications-sent-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.communications-sent-directory {
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 18px;
    background: #fff;
}

.communications-sent-filters {
    display: grid;
    grid-template-columns:
        minmax(280px, 1fr)
        minmax(170px, 220px)
        auto
        auto
        auto;
    gap: 14px;
    align-items: end;
    padding: 20px;
    border-bottom: 1px solid #e4e9f1;
}

.communications-sent-filters .form-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.communications-sent-filters .form-field label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.communications-sent-filters input[type="search"],
.communications-sent-filters select {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 16px;
    border: 1px solid #d6deea;
    border-radius: 14px;
    background: #fff;
    color: #17243a;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.communications-sent-filters input:focus,
.communications-sent-filters select:focus {
    border-color: #c79b28;
    box-shadow: 0 0 0 4px rgba(199, 155, 40, .14);
}

.communications-sent-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    color: #3b4b64;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.communications-sent-directory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #e4e9f1;
}

.communications-sent-directory-header h2 {
    margin: 3px 0 0;
    font-size: 22px;
}

.communications-sent-directory-header small {
    color: #71809a;
}

.communications-sent-message-list {
    display: grid;
}

.communications-sent-message {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f5;
    color: inherit;
    text-decoration: none;
}

.communications-sent-message:last-child {
    border-bottom: 0;
}

.communications-sent-message:hover {
    background: #f8fafc;
}

.communications-sent-message-marker {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
}

.communications-sent-message-marker > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #e8eef7;
    color: #17243a;
    font-size: 11px;
    font-weight: 900;
}

.communications-sent-message-marker small {
    color: #d1a125;
    font-size: 14px;
}

.communications-sent-message-main {
    min-width: 0;
}

.communications-sent-message-meta,
.communications-sent-message-subject,
.communications-sent-message-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.communications-sent-message-meta {
    justify-content: space-between;
}

.communications-sent-message-meta strong {
    min-width: 0;
    overflow: hidden;
    color: #16243c;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communications-sent-message-meta > span {
    color: #71809a;
    font-size: 12px;
    white-space: nowrap;
}

.communications-sent-message-subject {
    flex-wrap: wrap;
    margin-top: 6px;
}

.communications-sent-message-subject h3 {
    min-width: 0;
    margin: 0;
    color: #17243a;
    font-size: 16px;
    line-height: 1.35;
}

.communications-sent-message-main > p {
    margin: 8px 0;
    color: #62718a;
    font-size: 13px;
    line-height: 1.55;
}

.communications-sent-message-footer {
    flex-wrap: wrap;
    color: #8290a6;
    font-size: 11px;
}

.communications-sent-message-footer span:not(:last-child)::after {
    content: "•";
    margin-left: 10px;
    color: #c0c8d4;
}

.communications-sent-empty {
    display: grid;
    justify-items: center;
    padding: 72px 24px;
    text-align: center;
}

.communications-sent-empty-mark {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: #e8eef7;
    color: #17243a;
    font-weight: 900;
}

.communications-sent-empty h3 {
    margin: 20px 0 8px;
    color: #16243c;
    font-size: 24px;
}

.communications-sent-empty p {
    max-width: 500px;
    margin: 0 0 22px;
    color: #687891;
    line-height: 1.65;
}

.communications-sent-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    border-top: 1px solid #e4e9f1;
}

.communications-sent-pagination span {
    color: #687891;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .communications-sent-filters {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(160px, 200px);
    }
}

@media (max-width: 980px) {
    .communications-sent-summary-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .communications-sent-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .communications-sent-header {
        display: grid;
    }

    .communications-sent-header .button {
        width: 100%;
    }

    .communications-sent-summary-grid,
    .communications-sent-filters {
        grid-template-columns: 1fr;
    }

    .communications-sent-message {
        grid-template-columns: 38px minmax(0, 1fr);
        padding-inline: 15px;
    }

    .communications-sent-message-marker > span {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }
}




/* ==========================================================
   COMMUNICATIONS
   Primary Compose Button
   ========================================================== */

.communications-mailbox-compose{
    display:flex;
    align-items:center;
    justify-content:center;

    width:100%;
    margin-bottom:12px;
    padding:14px 18px;

    background:#C79B28;
    color:#ffffff !important;

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

    font-size:15px;
    font-weight:700;
    text-decoration:none;

    transition:all .20s ease;
    box-shadow:0 8px 22px rgba(199,155,40,.25);
}

.communications-mailbox-compose:hover{
    background:#B5891E;
    color:#ffffff;
    transform:translateY(-1px);
    box-shadow:0 12px 28px rgba(199,155,40,.35);
}

.communications-mailbox-compose:active{
    transform:translateY(0);
}

.communications-mailbox-compose::before{
    content:"+";
    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:24px;
    height:24px;

    margin-right:10px;

    border-radius:50%;
    background:rgba(255,255,255,.18);

    font-size:18px;
    font-weight:700;
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   MAILBOX MESSAGE REFINEMENTS

   SAFETY SEARCH:
   COMM-MAILBOX-MESSAGE-REFINEMENTS
========================================================== */

/* Read messages remain calm and neutral. */
.communications-inbox-message {
    background: #ffffff;
}

/* Unread messages use a restrained gold tint rather than a heavy fill. */
.communications-inbox-message.is-unread {
    background: #fffaf0;
}

.communications-inbox-message:hover,
.communications-sent-message:hover {
    background: #f8fafc;
}

.communications-inbox-message.is-unread:hover {
    background: #fff7e3;
}

/* Keyboard and click feedback. */
.communications-inbox-message:focus-visible,
.communications-sent-message:focus-visible {
    outline: 3px solid rgba(199, 155, 40, .22);
    outline-offset: -3px;
}

.communications-inbox-message:active,
.communications-sent-message:active {
    background: #f2f5f9;
}

/* Sender is supportive; the subject is the main scanning anchor. */
.communications-inbox-message-meta strong,
.communications-sent-message-meta strong {
    font-weight: 600;
}

.communications-inbox-message-subject h3,
.communications-sent-message-subject h3 {
    font-weight: 800;
}

.communications-inbox-message.is-unread
.communications-inbox-message-meta strong,
.communications-inbox-message.is-unread
.communications-inbox-message-subject h3 {
    font-weight: 800;
}

/* Time is consistently right-aligned and visually secondary. */
.communications-inbox-message-meta > span,
.communications-sent-message-meta > span {
    min-width: 58px;
    margin-left: auto;
    color: #7e8ca1;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
}

/* Premium priority pills. */
.communications-priority {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1;
    text-transform: none;
}

.communications-priority::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.communications-priority-high {
    border-color: #f2d48b;
    background: #fff5d9;
    color: #956600;
}

.communications-priority-urgent {
    border-color: #f2b8b5;
    background: #fff0ef;
    color: #b42318;
}

/* Improve preview readability and scanning rhythm. */
.communications-inbox-message-main > p,
.communications-sent-message-main > p {
    max-width: 880px;
    color: #5f6f87;
}

.communications-inbox-message-footer,
.communications-sent-message-footer {
    color: #8a97aa;
}

/* Sent is historical and does not need an attention badge. */
.communications-mailbox-links
a[href*="page=communications-sent"] strong {
    display: none;
}

/* Keep badge alignment stable where a count is shown. */
.communications-mailbox-links a {
    min-width: 0;
}

.communications-mailbox-links a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   DRAFTS

   SAFETY SEARCH:
   COMM-DRAFTS-STYLES
========================================================== */

.communications-draft-message {
    background: #ffffff;
}

.communications-draft-message:hover {
    background: #f8fafc;
}

.communications-draft-message
.communications-sent-message-marker > span {
    background: #fff2c9;
    color: #8b6200;
}

.communications-draft-message
.communications-sent-message-footer span:first-child {
    color: #a47300;
    font-weight: 800;
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   DRAFT FILTER BAR — TWO ROW LAYOUT

   SAFETY SEARCH:
   COMM-DRAFT-FILTER-TWO-ROW
========================================================== */

.communications-drafts-page .communications-sent-filters {
    display: grid;
    grid-template-columns:
        minmax(320px, 1fr)
        minmax(180px, 220px);
    gap: 14px 16px;
    align-items: end;
    padding: 20px;
}

/* Row 1 */
.communications-drafts-page .communications-sent-search {
    grid-column: 1 / 2;
}

.communications-drafts-page
.communications-sent-filters
.form-field:nth-of-type(2) {
    grid-column: 2 / 3;
}

/* Row 2 */
.communications-drafts-page .communications-sent-check {
    grid-column: 1 / 2;
    min-height: 46px;
    align-self: center;
}

.communications-drafts-page
.communications-sent-filters
button[type="submit"] {
    grid-column: 2 / 3;
    justify-self: start;
    min-width: 132px;
}

.communications-drafts-page
.communications-sent-filters
.button-ghost {
    grid-column: 2 / 3;
    justify-self: end;
    align-self: center;
    margin-top: -46px;
}

/* Field polish */
.communications-drafts-page
.communications-sent-filters
input[type="search"],
.communications-drafts-page
.communications-sent-filters
select {
    height: 50px;
    border-radius: 13px;
}

.communications-drafts-page
.communications-sent-filters
.form-field label {
    margin-bottom: 1px;
}

/* Tablet */
@media (max-width: 900px) {
    .communications-drafts-page .communications-sent-filters {
        grid-template-columns: 1fr;
    }

    .communications-drafts-page
    .communications-sent-filters > * {
        grid-column: 1 !important;
        width: 100%;
    }

    .communications-drafts-page
    .communications-sent-filters
    .button-ghost {
        margin-top: 0;
        justify-self: stretch;
    }

    .communications-drafts-page
    .communications-sent-filters
    button[type="submit"] {
        justify-self: stretch;
    }
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   DRAFT FILTER INTERACTION RESTORE

   SAFETY SEARCH:
   COMM-DRAFT-FILTER-INTERACTIONS
========================================================== */

.communications-drafts-page
.communications-sent-filters
input[type="search"],
.communications-drafts-page
.communications-sent-filters
select {
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease,
        transform .2s ease;
}

.communications-drafts-page
.communications-sent-filters
input[type="search"]:hover,
.communications-drafts-page
.communications-sent-filters
select:hover {
    border-color: #bcc7d6;
    background-color: #fbfcfe;
}

.communications-drafts-page
.communications-sent-filters
input[type="search"]:focus,
.communications-drafts-page
.communications-sent-filters
select:focus,
.communications-drafts-page
.communications-sent-filters
input[type="search"]:focus-visible,
.communications-drafts-page
.communications-sent-filters
select:focus-visible {
    outline: none;
    border-color: #c79b28;
    background-color: #fffdf8;
    box-shadow: 0 0 0 4px rgba(199, 155, 40, .14);
}

/* Gold hover state */
.communications-drafts-page
.communications-sent-filters
input[type="search"]:hover,
.communications-drafts-page
.communications-sent-filters
select:hover {
    border-color: #c79b28;
    background: #fffdf8;
    box-shadow: 0 0 0 3px rgba(199, 155, 40, 0.12);
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   DRAFT EDITOR

   SAFETY SEARCH:
   COMM-DRAFT-EDIT-STYLES
========================================================== */

.communications-draft-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid #ecd183;
    border-radius: 999px;
    background: #fff5d9;
    color: #8b6200;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.communications-draft-edit-page
.communications-compose-card
input[type="text"]:hover,
.communications-draft-edit-page
.communications-compose-card
select:hover,
.communications-draft-edit-page
.communications-compose-card
textarea:hover,
.communications-draft-edit-page
.communications-recipient-control:hover {
    border-color: #c79b28;
    background-color: #fffdf8;
    box-shadow: 0 0 0 3px rgba(199, 155, 40, .12);
}

.communications-draft-edit-page
.communications-compose-actions {
    flex-wrap: wrap;
}

@media (max-width: 780px) {
    .communications-draft-edit-page
    .communications-compose-actions {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   KLASENTA COMMUNICATIONS
   DRAFT EDITOR ACTION BUTTON POLISH

   SAFETY SEARCH:
   COMM-DRAFT-EDIT-ACTION-BUTTONS
========================================================== */

.communications-draft-edit-page
.communications-compose-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Cancel button */
.communications-draft-edit-page
.communications-compose-actions
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    min-height: 52px;
    padding: 0 22px;

    border: 1px solid #d8e0ec;
    border-radius: 12px;
    background: #ffffff;

    color: #17243a;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;

    transition:
        border-color .2s ease,
        background-color .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.communications-draft-edit-page
.communications-compose-actions
.button-ghost:hover {
    border-color: #c79b28;
    background: #fffdf8;
    color: #9a6b00;
    box-shadow: 0 0 0 3px rgba(199, 155, 40, .12);
    transform: translateY(-1px);
}

/* Save changes button */
.communications-draft-edit-page
.communications-compose-actions
.button-secondary {
    min-width: 138px;
    min-height: 52px;
}

/* Send button */
.communications-draft-edit-page
.communications-compose-actions
.button-primary {
    min-width: 140px;
    min-height: 52px;
}

@media (max-width: 780px) {
    .communications-draft-edit-page
    .communications-compose-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .communications-draft-edit-page
    .communications-compose-actions
    .button {
        width: 100%;
    }
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   CONVERSATION VIEW

   SAFETY SEARCH:
   COMM-THREAD-STYLES
========================================================== */

.communications-thread-page {
    display: grid;
    gap: 24px;
}

.communications-thread-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.communications-thread-header h1 {
    max-width: 880px;
    margin: 5px 0 10px;
    color: #10213d;
    font-size: clamp(34px, 4.5vw, 58px);
    line-height: 1;
    letter-spacing: -.04em;
}

.communications-thread-reference {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.communications-thread-reference span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf1f6;
    color: #66758f;
    font-size: 11px;
    font-weight: 700;
}

.communications-thread-reference
.communications-thread-locked {
    border: 1px solid #f0c6c2;
    background: #fff0ef;
    color: #b42318;
}

.communications-thread-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.communications-thread-workspace {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.communications-thread-participants,
.communications-thread-reply {
    padding: 22px;
    border: 1px solid #dfe6ef;
    border-radius: 18px;
    background: #fff;
}

.communications-thread-participants {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.communications-thread-participants h2,
.communications-thread-reply-heading h2 {
    margin: 4px 0 0;
    color: #17243a;
    font-size: 20px;
}

.communications-thread-participant-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.communications-thread-participant-list span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f4f8;
    color: #4e5f78;
    font-size: 11px;
    font-weight: 700;
}

.communications-thread-messages {
    display: grid;
    gap: 14px;
}

.communications-thread-message {
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 18px;
    background: #fff;
}

.communications-thread-message.is-current-user {
    border-color: #ead18e;
    background: #fffdf8;
}

.communications-thread-message-header {
    display: grid;
    grid-template-columns:
        48px
        minmax(0, 1fr)
        auto;
    gap: 13px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f5;
}

.communications-thread-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: #e8eef7;
    color: #17243a;
    font-size: 12px;
    font-weight: 900;
}

.communications-thread-message.is-current-user
.communications-thread-avatar {
    background: #f7e9ba;
    color: #8a6100;
}

.communications-thread-sender {
    min-width: 0;
}

.communications-thread-sender strong,
.communications-thread-sender span {
    display: block;
}

.communications-thread-sender strong {
    overflow: hidden;
    color: #16243c;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communications-thread-sender span {
    margin-top: 3px;
    color: #7a889e;
    font-size: 11px;
}

.communications-thread-message-time {
    display: grid;
    justify-items: end;
    gap: 7px;
}

.communications-thread-message-time > span {
    color: #7e8ca1;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.communications-thread-recipient-details {
    margin: 16px 20px 0;
}

.communications-thread-recipient-details summary {
    color: #8c6504;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.communications-thread-recipient-details dl {
    display: grid;
    gap: 7px;
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f7f9fc;
}

.communications-thread-recipient-details dl > div {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
}

.communications-thread-recipient-details dt {
    color: #7d8aa0;
    font-size: 10px;
    font-weight: 900;
}

.communications-thread-recipient-details dd {
    margin: 0;
    color: #43536d;
    font-size: 12px;
    line-height: 1.5;
}

.communications-thread-message-body {
    padding: 24px 20px 28px;
    color: #35445d;
    font-size: 14px;
    line-height: 1.8;
    white-space: normal;
}

.communications-thread-attachments {
    margin: 0 20px 20px;
    padding: 16px;
    border: 1px solid #e2e7ef;
    border-radius: 14px;
    background: #f8fafc;
}

.communications-thread-attachments > span {
    display: block;
    margin-bottom: 10px;
    color: #7a879b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.communications-thread-attachments > div {
    display: grid;
    gap: 8px;
}

.communications-thread-attachments a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    border: 1px solid #dce3ed;
    border-radius: 11px;
    background: #fff;
    color: #283851;
    text-decoration: none;
}

.communications-thread-attachments a:hover {
    border-color: #c79b28;
    background: #fffdf8;
    box-shadow: 0 0 0 3px rgba(199,155,40,.1);
}

.communications-thread-attachments strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communications-thread-attachments small {
    color: #8190a6;
    white-space: nowrap;
}

.communications-thread-message-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #edf0f5;
    background: #fafbfd;
}

.communications-thread-message-footer span {
    color: #8793a5;
    font-size: 10px;
}

.communications-thread-message-footer
span:not(:last-child)::after {
    content: "•";
    margin-left: 8px;
    color: #c2cad6;
}

.communications-thread-reply-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.communications-thread-reply-heading > span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf1f6;
    color: #66758f;
    font-size: 11px;
    font-weight: 800;
}

.communications-thread-reply textarea {
    width: 100%;
    min-height: 170px;
    padding: 17px;
    border: 1px solid #d7dfe9;
    border-radius: 14px;
    background: #fff;
    color: #17243a;
    font: inherit;
    line-height: 1.65;
    resize: vertical;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.communications-thread-reply textarea:hover {
    border-color: #c79b28;
    background: #fffdf8;
    box-shadow: 0 0 0 3px rgba(199,155,40,.12);
}

.communications-thread-reply textarea:focus {
    outline: none;
    border-color: #c79b28;
    background: #fffdf8;
    box-shadow: 0 0 0 4px rgba(199,155,40,.18);
}

.communications-thread-reply form footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
}

.communications-thread-reply form footer p {
    margin: 0;
    color: #77869b;
    font-size: 11px;
    line-height: 1.55;
}

.communications-thread-lock-notice {
    padding: 16px;
    border: 1px solid #efc3bf;
    border-radius: 13px;
    background: #fff2f1;
    color: #9d2d25;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .communications-thread-layout {
        grid-template-columns: 1fr;
    }

    .communications-thread-participants {
        align-items: flex-start;
        flex-direction: column;
    }

    .communications-thread-participant-list {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .communications-thread-header,
    .communications-thread-reply-heading,
    .communications-thread-reply form footer {
        align-items: stretch;
        flex-direction: column;
    }

    .communications-thread-header .button,
    .communications-thread-reply form footer .button {
        width: 100%;
    }

    .communications-thread-message-header {
        grid-template-columns:
            42px
            minmax(0, 1fr);
    }

    .communications-thread-message-time {
        grid-column: 2;
        justify-items: start;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   ARCHIVE

   SAFETY SEARCH:
   COMM-ARCHIVE-STYLES
========================================================== */

.communications-archive-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 20px 0;
    border-bottom: 1px solid #e4e9f1;
}

.communications-archive-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 11px 11px 0 0;
    color: #5c6b83;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.communications-archive-tabs a:hover,
.communications-archive-tabs a.is-active {
    background: #17243a;
    color: #fff;
}

.communications-archive-tabs span {
    min-width: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    text-align: center;
    font-size: 10px;
}

.communications-archive-filters {
    grid-template-columns:
        minmax(280px, 1fr)
        minmax(180px, 220px)
        auto
        auto;
}

.communications-archive-message {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    border-bottom: 1px solid #edf0f5;
}

.communications-archive-message:last-child {
    border-bottom: 0;
}

.communications-archive-message
.communications-sent-message {
    border-bottom: 0;
}

.communications-archive-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    border-left: 1px solid #edf0f5;
    background: #fbfcfe;
}

.communications-archive-actions form {
    margin: 0;
}

.communications-archive-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.communications-archive-page
.communications-sent-filters
input:hover,
.communications-archive-page
.communications-sent-filters
select:hover {
    border-color: #c79b28;
    background: #fffdf8;
    box-shadow: 0 0 0 3px rgba(199, 155, 40, .12);
}

@media (max-width: 900px) {
    .communications-archive-message {
        grid-template-columns: 1fr;
    }

    .communications-archive-actions {
        border-top: 1px solid #edf0f5;
        border-left: 0;
    }
}

@media (max-width: 760px) {
    .communications-archive-filters {
        grid-template-columns: 1fr;
    }

    .communications-archive-tabs {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .communications-archive-tabs a {
        justify-content: center;
    }

    .communications-archive-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .communications-archive-actions .button {
        width: 100%;
    }
}



/* ==========================================================
   ARCHIVE RESET BUTTON
========================================================== */

.communications-archive-page .button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid #d9e1ec;
    border-radius: 14px;
    background: #ffffff;
    color: #5b6678;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .22s ease;
}

.communications-archive-page .button-ghost:hover {
    border-color: #c79b28;
    background: #fff9eb;
    color: #16233a;
    box-shadow: 0 10px 24px rgba(199,155,40,.18);
}

.communications-archive-page .button-ghost:active {
    transform: translateY(1px);
}

.communications-archive-page .button-ghost:focus {
    outline: none;
    border-color: #c79b28;
    box-shadow: 0 0 0 4px rgba(199,155,40,.15);
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   LIVE THREAD NOTICE

   SAFETY SEARCH:
   COMM-THREAD-LIVE-STYLES
========================================================== */

.communications-thread-live-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #e6c568;
    border-radius: 14px;
    background: #fff8df;
    color: #6f5208;
}

.communications-thread-live-notice[hidden] {
    display: none;
}

.communications-thread-live-notice > div {
    display: grid;
    gap: 3px;
}

.communications-thread-live-notice strong {
    color: #604500;
    font-size: 13px;
}

.communications-thread-live-notice span {
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 680px) {
    .communications-thread-live-notice {
        align-items: stretch;
        flex-direction: column;
    }

    .communications-thread-live-notice .button {
        width: 100%;
    }
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   INBOX MAIL ACTIONS

   SAFETY SEARCH:
   COMM-INBOX-MAIL-ACTIONS
========================================================== */

.communications-inbox-message-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    border-bottom: 1px solid #edf0f5;
    background: #ffffff;
}

.communications-inbox-message-row:last-child {
    border-bottom: 0;
}

.communications-inbox-message-row.is-unread {
    background: #fffaf0;
}

.communications-inbox-message-row
.communications-inbox-message {
    border-bottom: 0;
    background: transparent;
}

.communications-inbox-message-row:hover {
    background: #f8fafc;
}

.communications-inbox-message-row.is-unread:hover {
    background: #fff6df;
}

.communications-inbox-message-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 14px 16px;
    border-left: 1px solid #edf0f5;
    background: rgba(250, 252, 254, .88);
}

.communications-inbox-message-actions form {
    margin: 0;
}

.communications-mail-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d9e1ec;
    border-radius: 10px;
    background: #ffffff;
    color: #44536a;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition:
        border-color .2s ease,
        background-color .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.communications-mail-action:hover,
.communications-mail-action:focus-visible {
    border-color: #c79b28;
    background: #fffaf0;
    color: #8b6200;
    box-shadow: 0 0 0 3px rgba(199, 155, 40, .12);
    outline: none;
}

.communications-mail-action:active {
    transform: translateY(1px);
}

.communications-mail-action.is-danger:hover,
.communications-mail-action.is-danger:focus-visible {
    border-color: #d92d20;
    background: #fff3f2;
    color: #b42318;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, .10);
}

@media (max-width: 1050px) {
    .communications-inbox-message-row {
        grid-template-columns: 1fr;
    }

    .communications-inbox-message-actions {
        flex-wrap: wrap;
        border-top: 1px solid #edf0f5;
        border-left: 0;
        padding-top: 10px;
    }
}

@media (max-width: 620px) {
    .communications-inbox-message-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .communications-inbox-message-actions form,
    .communications-mail-action {
        width: 100%;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   INBOX CENTRAL ACTION BAR

   SAFETY SEARCH:
   COMMUNICATIONS-INBOX-CENTRAL-ACTIONS
========================================================== */

.communications-inbox-actionbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4e9f1;
    background: #f9fbfd;
}

.communications-inbox-actionbar-status {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.communications-inbox-actionbar-status strong {
    color: #16233a;
    font-size: 13px;
    font-weight: 900;
}

.communications-inbox-actionbar-status span {
    color: #71809a;
    font-size: 11px;
}

.communications-inbox-actionbar-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.communications-inbox-actionbar-controls[hidden] {
    display: none;
}

.communications-inbox-actionbar-controls form {
    margin: 0;
}

.communications-inbox-actionbar-controls .button {
    min-height: 42px;
    white-space: nowrap;
}

.communications-inbox-message-row {
    display: block;
    cursor: pointer;
    transition:
        background-color .18s ease,
        box-shadow .18s ease;
}

.communications-inbox-message-row:focus-visible {
    outline: none;
    box-shadow:
        inset 4px 0 0 #c79b28,
        0 0 0 3px rgba(199, 155, 40, .12);
}

.communications-inbox-message-row.is-selected {
    background: #fff5d8;
    box-shadow: inset 4px 0 0 #c79b28;
}

.communications-inbox-message-row.is-selected
.communications-inbox-message {
    background: transparent;
}

.communications-inbox-message-row:hover {
    background: #f7f9fc;
}

.communications-inbox-message-row.is-unread:hover,
.communications-inbox-message-row.is-unread.is-selected {
    background: #fff3cf;
}

.button-danger {
    border-color: #efc3bf;
    background: #fff7f6;
    color: #b42318;
}

.button-danger:hover,
.button-danger:focus-visible {
    border-color: #d92d20;
    background: #fff0ee;
    color: #912018;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, .10);
}

@media (max-width: 900px) {
    .communications-inbox-actionbar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .communications-inbox-actionbar-controls {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .communications-inbox-actionbar-controls form,
    .communications-inbox-actionbar-controls .button {
        width: 100%;
    }
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   INBOX COMPACT PAGE CONTEXT

   PURPOSE:
   Replaces the duplicated mailbox summary cards with one
   compact Inbox count beneath the page title.

   SAFETY SEARCH:
   COMM-INBOX-COMPACT-CONTEXT
========================================================== */

.communications-inbox-context {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 0;
    color: #6f7d94;
    font-size: 13px;
    line-height: 1.5;
}

.communications-inbox-context strong {
    color: #16233a;
    font-weight: 900;
}

.communications-inbox-page
.communications-inbox-layout {
    margin-top: 22px;
}

@media (max-width: 680px) {
    .communications-inbox-page
    .communications-inbox-layout {
        margin-top: 16px;
    }
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   MAILBOX BULK ACTION TOOLBAR

   SAFETY SEARCH:
   COMMUNICATIONS-MAILBOX-BULK-ACTIONS
========================================================== */

.communications-mailbox-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px;
    border-bottom: 1px solid #dfe5ee;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
}

.communications-mailbox-toolbar-selection {
    display: flex;
    align-items: center;
    gap: 16px;
}

.communications-mailbox-toolbar-selection label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #16233a;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.communications-mailbox-toolbar-selection input,
.communications-mailbox-row-selector input {
    width: 17px;
    height: 17px;
    accent-color: #c79b28;
    cursor: pointer;
}

.communications-mailbox-toolbar-selection strong {
    color: #6f7d94;
    font-size: 11px;
}

.communications-mailbox-toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.communications-mailbox-toolbar-actions
[data-mailbox-selected-inputs] {
    display: none;
}

.communications-mailbox-toolbar-actions .button {
    min-height: 40px;
    padding-inline: 13px;
    white-space: nowrap;
}

.communications-mailbox-toolbar-actions .button:disabled {
    border-color: #e4e8ef;
    background: #f4f6f9;
    color: #a7b0bf;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
}

.communications-inbox-message-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: stretch;
    cursor: pointer;
}

.communications-mailbox-row-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #edf0f5;
}

.communications-inbox-message-row.is-selected {
    background: #fff4cf;
    box-shadow: inset 4px 0 0 #c79b28;
}

.communications-inbox-message-row.is-selected
.communications-inbox-message,
.communications-inbox-message-row.is-selected
.communications-mailbox-row-selector {
    background: transparent;
}

.communications-inbox-message-row:hover {
    background: #f7f9fc;
}

.communications-inbox-message-row.is-unread:hover,
.communications-inbox-message-row.is-unread.is-selected {
    background: #fff1c3;
}

.communications-inbox-message-row:focus-visible {
    outline: none;
    box-shadow:
        inset 4px 0 0 #c79b28,
        0 0 0 3px rgba(199, 155, 40, .12);
}

.button-danger {
    border-color: #efc3bf;
    background: #fff7f6;
    color: #b42318;
}

.button-danger:hover:not(:disabled),
.button-danger:focus-visible:not(:disabled) {
    border-color: #d92d20;
    background: #fff0ee;
    color: #912018;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, .10);
}

@media (max-width: 980px) {
    .communications-mailbox-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .communications-mailbox-toolbar-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .communications-mailbox-toolbar-actions .button {
        width: 100%;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   SENT BULK MAILBOX LAYOUT

   PURPOSE:
   Extends the reusable mailbox toolbar and selection system
   to the Sent directory.

   SAFETY SEARCH:
   COMM-SENT-BULK-ACTIONS
========================================================== */

.communications-sent-context {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0 0;
    color: #6f7d94;
    font-size: 13px;
    line-height: 1.5;
}

.communications-sent-context strong {
    color: #16233a;
    font-weight: 900;
}

.communications-sent-page
.communications-sent-layout {
    margin-top: 22px;
}

.communications-sent-message-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: stretch;
    cursor: pointer;
    transition:
        background-color .18s ease,
        box-shadow .18s ease;
}

.communications-sent-message-row
.communications-mailbox-row-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #edf0f5;
}

.communications-sent-message-row
.communications-sent-message {
    width: 100%;
    border-bottom: 1px solid #edf0f5;
    background: transparent;
}

.communications-sent-message-row:hover {
    background: #f7f9fc;
}

.communications-sent-message-row.is-selected {
    background: #fff4cf;
    box-shadow: inset 4px 0 0 #c79b28;
}

.communications-sent-message-row.is-selected
.communications-sent-message,
.communications-sent-message-row.is-selected
.communications-mailbox-row-selector {
    background: transparent;
}

.communications-sent-message-row:focus-visible {
    outline: none;
    box-shadow:
        inset 4px 0 0 #c79b28,
        0 0 0 3px rgba(199, 155, 40, .12);
}

@media (max-width: 680px) {
    .communications-sent-page
    .communications-sent-layout {
        margin-top: 16px;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   CONVERSATION SUBJECT HEADER

   SAFETY SEARCH:
   COMM-THREAD-SUBJECT-HEADER
========================================================== */

.communications-thread-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 28px;
    margin-bottom: 24px;
}

.communications-thread-header > div {
    min-width: 0;
}

.communications-thread-header h1 {
    max-width: 920px;
    margin: 8px 0 14px;
    color: #16233a;
    font-size: clamp(34px, 4.4vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.communications-thread-reference {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.communications-thread-reference > span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #e3e8f0;
    border-radius: 999px;
    background: #f7f9fc;
    color: #66758d;
    font-size: 11px;
    font-weight: 800;
}

.communications-thread-header > .button {
    min-width: 132px;
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 900px) {
    .communications-thread-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .communications-thread-header h1 {
        max-width: 100%;
        font-size: clamp(32px, 8vw, 48px);
    }

    .communications-thread-header > .button {
        justify-self: start;
        min-width: 0;
        margin-top: 0;
    }
}

@media (max-width: 620px) {
    .communications-thread-header h1 {
        margin-top: 6px;
        font-size: 32px;
        line-height: 1.06;
        letter-spacing: -0.035em;
    }

    .communications-thread-reference > span {
        min-height: 28px;
        padding-inline: 10px;
        font-size: 10px;
    }
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   ARCHIVE BULK MAILBOX LAYOUT

   SAFETY SEARCH:
   COMM-ARCHIVE-BULK-ACTIONS
========================================================== */

.communications-archive-context {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 0;
    color: #6f7d94;
    font-size: 13px;
    line-height: 1.5;
}

.communications-archive-context strong {
    color: #16233a;
    font-weight: 900;
}

.communications-archive-page
.communications-sent-layout {
    margin-top: 22px;
}

.communications-archive-message {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: stretch;
    cursor: pointer;
    transition:
        background-color .18s ease,
        box-shadow .18s ease;
}

.communications-archive-message
.communications-mailbox-row-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #edf0f5;
}

.communications-archive-message
.communications-sent-message {
    width: 100%;
    border-bottom: 1px solid #edf0f5;
    background: transparent;
}

.communications-archive-message:hover {
    background: #f7f9fc;
}

.communications-archive-message.is-selected {
    background: #fff4cf;
    box-shadow: inset 4px 0 0 #c79b28;
}

.communications-archive-message.is-selected
.communications-sent-message,
.communications-archive-message.is-selected
.communications-mailbox-row-selector {
    background: transparent;
}

.communications-archive-message:focus-visible {
    outline: none;
    box-shadow:
        inset 4px 0 0 #c79b28,
        0 0 0 3px rgba(199, 155, 40, .12);
}

@media (max-width: 680px) {
    .communications-archive-page
    .communications-sent-layout {
        margin-top: 16px;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   COMPOSE FINAL REFINEMENTS

   SAFETY SEARCH:
   COMM-COMPOSE-FINAL-STYLES
========================================================== */

.communications-compose-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 24px;
    margin-bottom: 24px;
}

.communications-compose-header > div {
    min-width: 0;
}

.communications-compose-header h1 {
    margin: 7px 0 0;
}

.communications-compose-context {
    margin: 8px 0 0;
    color: #6f7d94;
    font-size: 13px;
    font-weight: 700;
}

.communications-compose-header > .button {
    min-width: 132px;
    margin-top: 8px;
    text-align: center;
}

.communications-compose-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.communications-compose-actions
.communications-compose-cancel {
    margin-right: auto;
}

.communications-compose-actions .button {
    min-height: 46px;
}

@media (max-width: 900px) {
    .communications-compose-header {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .communications-compose-header > .button {
        justify-self: start;
        min-width: 0;
        margin-top: 0;
    }
}

@media (max-width: 680px) {
    .communications-compose-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .communications-compose-actions
    .communications-compose-cancel {
        margin-right: 0;
    }

    .communications-compose-actions .button {
        width: 100%;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   DRAFTS BULK MAILBOX LAYOUT

   SAFETY SEARCH:
   COMM-DRAFTS-BULK-ACTIONS
========================================================== */

.communications-drafts-context {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0 0;
    color: #6f7d94;
    font-size: 13px;
    line-height: 1.5;
}

.communications-drafts-context strong {
    color: #16233a;
    font-weight: 900;
}

.communications-drafts-page
.communications-sent-layout {
    margin-top: 22px;
}

.communications-draft-message-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: stretch;
    cursor: pointer;
    transition:
        background-color .18s ease,
        box-shadow .18s ease;
}

.communications-draft-message-row
.communications-mailbox-row-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #edf0f5;
}

.communications-draft-message-row
.communications-sent-message {
    width: 100%;
    border-bottom: 1px solid #edf0f5;
    background: transparent;
}

.communications-draft-message-row:hover {
    background: #f7f9fc;
}

.communications-draft-message-row.is-selected {
    background: #fff4cf;
    box-shadow: inset 4px 0 0 #c79b28;
}

.communications-draft-message-row.is-selected
.communications-sent-message,
.communications-draft-message-row.is-selected
.communications-mailbox-row-selector {
    background: transparent;
}

.communications-draft-message-row:focus-visible {
    outline: none;
    box-shadow:
        inset 4px 0 0 #c79b28,
        0 0 0 3px rgba(199, 155, 40, .12);
}

@media (max-width: 680px) {
    .communications-drafts-page
    .communications-sent-layout {
        margin-top: 16px;
    }
}



/* ==========================================================
   KLASENTA COMMUNICATIONS
   DRAFT EDIT FINAL REFINEMENTS

   SAFETY SEARCH:
   COMM-DRAFT-EDIT-FINAL-STYLES
========================================================== */

.communications-draft-edit-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 7px;
}

.communications-draft-edit-title-row h1 {
    margin: 0;
}

.communications-draft-edit-context {
    margin: 8px 0 0;
    color: #6f7d94;
    font-size: 13px;
    font-weight: 700;
}

.communications-draft-edit-page
.communications-compose-section-heading {
    align-items: center;
}

.communications-draft-edit-page
.communications-compose-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.communications-draft-edit-page
.communications-draft-edit-cancel {
    margin-right: auto;
}

.communications-draft-edit-page
.communications-compose-actions .button {
    min-height: 46px;
}

.communications-draft-edit-page
.alert-success {
    border-color: #b7dfc5;
    background: #f1fbf4;
    color: #176b3a;
}

@media (max-width: 680px) {
    .communications-draft-edit-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .communications-draft-edit-page
    .communications-compose-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .communications-draft-edit-page
    .communications-draft-edit-cancel {
        margin-right: 0;
    }

    .communications-draft-edit-page
    .communications-compose-actions .button {
        width: 100%;
    }
}




/* ==========================================================
   KLASENTA COMMUNICATIONS
   TRASH MAILBOX

   SAFETY SEARCH:
   COMM-TRASH-PAGE-STYLES
========================================================== */

.communications-trash-context {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 0;
    color: #6f7d94;
    font-size: 13px;
    line-height: 1.5;
}

.communications-trash-context strong {
    color: #16233a;
    font-weight: 900;
}

.communications-trash-page
.communications-sent-layout {
    margin-top: 22px;
}

.communications-trash-message {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: stretch;
    cursor: pointer;
    transition:
        background-color .18s ease,
        box-shadow .18s ease;
}

.communications-trash-message
.communications-mailbox-row-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #edf0f5;
}

.communications-trash-message
.communications-sent-message {
    width: 100%;
    border-bottom: 1px solid #edf0f5;
    background: transparent;
}

.communications-trash-message:hover {
    background: #f7f9fc;
}

.communications-trash-message.is-selected {
    background: #fff4cf;
    box-shadow: inset 4px 0 0 #c79b28;
}

.communications-trash-message.is-selected
.communications-sent-message,
.communications-trash-message.is-selected
.communications-mailbox-row-selector {
    background: transparent;
}

.communications-trash-message:focus-visible {
    outline: none;
    box-shadow:
        inset 4px 0 0 #c79b28,
        0 0 0 3px rgba(199, 155, 40, .12);
}

@media (max-width: 680px) {
    .communications-trash-page
    .communications-sent-layout {
        margin-top: 16px;
    }
}



/* ==========================================================
   COMMUNICATIONS
   FILTER RESET LINK
========================================================== */

.communications-filter-reset{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 8px;
    min-height:44px;

    color:#5f48c7;
    font-weight:700;
    font-size:14px;

    text-decoration:none;

    transition:
        color .18s ease,
        opacity .18s ease;
}

.communications-filter-reset:hover{
    color:#16233a;
}

.communications-filter-reset:focus-visible{
    outline:none;
    color:#16233a;
}


/* ==========================================================
   COMMUNICATIONS — FILTER RESET BUTTON
========================================================== */

.communications-filter-reset-button {
    min-height: 50px;
    padding-inline: 18px;
    white-space: nowrap;
}