:root {
    --brand-blue: #0a5daa;
    --brand-blue-dark: #074b8a;
    --brand-blue-soft: #eaf3fb;

    --brand-red: #8b1e2d;
    --brand-red-dark: #6e1723;
    --brand-red-soft: #f8e9eb;

    --brand-black: #111317;
    --brand-navy-black: #0b1623;

    --brand-white: #ffffff;

    --surface-bg: #f4f6f9;
    --surface-soft: #f8fafc;

    --text-main: #15191f;
    --text-muted: #667085;

    --border-soft: #e2e7ee;

    --sidebar-width: 272px;

    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 10px;

    --card-shadow:
        0 12px 30px
        rgba(17, 19, 23, 0.06);
}


.authenticated-body {
    margin: 0;

    min-height: 100vh;

    background:
        var(--surface-bg);

    color:
        var(--text-main);
}


.app-frame {
    min-height: 100vh;
}


.app-sidebar {
    position: fixed;

    inset:
        0 auto 0 0;

    z-index: 1000;

    width:
        var(--sidebar-width);

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            var(--brand-navy-black),
            #080d13
        );

    color:
        var(--brand-white);

    border-right:
        1px solid
        rgba(255,255,255,0.05);

    overflow-y: auto;
}


.brand-area {
    padding:
        24px 22px 20px;

    border-bottom:
        1px solid
        rgba(255,255,255,0.08);
}


.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;

    color:
        var(--brand-white);
}


.brand-logo {
    width: 58px;
    height: 58px;

    object-fit: contain;

    padding: 5px;

    border-radius: 13px;

    background:
        var(--brand-white);
}


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


.brand-copy strong {
    font-size: 20px;

    letter-spacing: 0.06em;

    color:
        var(--brand-white);
}


.brand-copy span {
    margin-top: 3px;

    font-size: 11px;

    color:
        rgba(255,255,255,0.62);
}


.sidebar-navigation {
    flex: 1;

    padding:
        18px 14px;
}


.nav-section-title {
    margin:
        18px 10px 9px;

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

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

    letter-spacing: 0.15em;
}


.admin-section {
    margin-top: 28px;

    color:
        #db9ca5;
}


.nav-link-item {
    min-height: 46px;

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

    margin-bottom: 4px;

    padding:
        9px 11px;

    border-radius:
        var(--radius-md);

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

    text-decoration: none;

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

    transition:
        background 140ms ease,
        color 140ms ease;
}


.nav-link-item:hover {
    color:
        var(--brand-white);

    background:
        rgba(255,255,255,0.07);
}


.nav-link-item.active {
    color:
        var(--brand-white);

    background:
        var(--brand-blue);

    box-shadow:
        inset 3px 0 0
        var(--brand-red);
}


.nav-link-item.is-disabled {
    opacity: 0.42;

    cursor: default;
}


.nav-symbol {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    display: grid;
    place-items: center;

    border-radius: 8px;

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

    color:
        var(--brand-white);

    font-size: 10px;
    font-weight: 900;
}


.red-symbol {
    background:
        rgba(139,30,45,0.46);
}


.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;

    padding:
        18px;

    border-top:
        1px solid
        rgba(255,255,255,0.08);
}


.user-avatar,
.small-avatar {
    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        var(--brand-blue);

    color:
        var(--brand-white);

    font-weight: 800;
}


.user-avatar {
    width: 42px;
    height: 42px;
}


.small-avatar {
    width: 35px;
    height: 35px;

    font-size: 12px;
}


.user-summary {
    min-width: 0;
}


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


.user-summary strong {
    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 13px;
}


.user-summary span {
    margin-top: 3px;

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

    font-size: 11px;
}


.app-main {
    min-height: 100vh;

    margin-left:
        var(--sidebar-width);

    display: flex;
    flex-direction: column;
}


.app-topbar {
    position: sticky;

    top: 0;

    z-index: 800;

    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 22px;

    padding:
        13px 28px;

    border-bottom:
        1px solid
        var(--border-soft);

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

    backdrop-filter:
        blur(12px);
}


.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}


.topbar-company {
    margin: 0 0 2px;

    color:
        var(--brand-red);

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

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


.topbar-title {
    margin: 0;

    font-size: 21px;
    font-weight: 800;
}


.menu-toggle {
    display: none;

    width: 40px;
    height: 40px;

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

    border-radius: 10px;

    background:
        var(--brand-white);

    color:
        var(--brand-black);

    cursor: pointer;
}


.topbar-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}


.topbar-profile {
    display: flex;
    align-items: center;
    gap: 9px;

    padding:
        5px 9px;

    border-radius: 11px;

    text-decoration: none;

    color:
        var(--brand-black);
}


.topbar-profile:hover {
    background:
        var(--surface-bg);
}


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


.topbar-profile strong {
    font-size: 12px;
}


.topbar-profile span {
    margin-top: 2px;

    color:
        var(--text-muted);

    font-size: 10px;
}


.topbar-logout {
    margin: 0;
}


.topbar-signout {
    min-height: 38px;

    padding:
        8px 13px;

    border:
        1px solid
        #e6c8cd;

    border-radius: 9px;

    background:
        var(--brand-red-soft);

    color:
        var(--brand-red);

    cursor: pointer;

    font-weight: 700;
}


.topbar-signout:hover {
    background:
        var(--brand-red);

    color:
        var(--brand-white);
}


.flash-zone {
    padding:
        18px 28px 0;
}


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

    gap: 20px;

    max-width: 1200px;

    margin:
        0 auto 10px;

    padding:
        13px 15px;

    border-radius: 11px;

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

    background:
        var(--brand-white);
}


.alert-success {
    border-left:
        4px solid
        var(--brand-blue);
}


.alert-warning {
    border-left:
        4px solid
        var(--brand-red);
}


.alert-danger,
.alert-error {
    border-left:
        4px solid
        var(--brand-red);

    background:
        var(--brand-red-soft);
}


.alert-close {
    border: 0;

    background: transparent;

    color:
        var(--text-muted);

    font-size: 20px;

    cursor: pointer;
}


.app-content {
    width: 100%;

    max-width: 1500px;

    margin:
        0 auto;

    padding:
        28px;
}


.app-footer {
    margin-top: auto;

    display: flex;
    justify-content: space-between;

    padding:
        18px 28px;

    color:
        #8993a0;

    font-size: 11px;
}


.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 24px;

    margin-bottom: 24px;
}


.page-intro h2 {
    margin:
        3px 0 6px;

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

    letter-spacing: -0.025em;
}


.page-intro p {
    margin: 0;

    color:
        var(--text-muted);
}


.section-kicker {
    margin: 0;

    color:
        var(--brand-blue);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.13em;

    text-transform: uppercase;
}


.red-kicker {
    color:
        var(--brand-red);
}


.brand-button,
.dark-button,
.outline-button {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        9px 15px;

    border-radius: 10px;

    text-decoration: none;

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

    cursor: pointer;
}


.brand-button {
    border:
        1px solid
        var(--brand-blue);

    background:
        var(--brand-blue);

    color:
        var(--brand-white);

    box-shadow:
        0 8px 18px
        rgba(10,93,170,0.17);
}


.brand-button:hover {
    background:
        var(--brand-blue-dark);

    color:
        var(--brand-white);
}


.dark-button {
    border:
        1px solid
        var(--brand-black);

    background:
        var(--brand-black);

    color:
        var(--brand-white);
}


.outline-button {
    border:
        1px solid
        var(--border-soft);

    background:
        var(--brand-white);

    color:
        var(--brand-black);
}


.metric-grid {
    display: grid;

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

    gap: 14px;

    margin-bottom: 22px;
}


.metric-card {
    position: relative;

    min-height: 154px;

    padding: 20px;

    overflow: hidden;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--brand-white);

    box-shadow:
        var(--card-shadow);
}


.metric-card::before {
    content: "";

    position: absolute;

    inset:
        0 auto 0 0;

    width: 4px;
}


.metric-blue::before {
    background:
        var(--brand-blue);
}


.metric-red::before {
    background:
        var(--brand-red);
}


.metric-black::before {
    background:
        var(--brand-black);
}


.metric-label {
    color:
        var(--text-muted);

    font-size: 12px;
    font-weight: 700;
}


.metric-card strong {
    display: block;

    margin:
        17px 0 9px;

    font-size: 31px;

    letter-spacing: -0.04em;
}


.metric-card .money-value {
    font-size: 22px;
}


.metric-card span {
    color:
        #8b95a2;

    font-size: 11px;
}


.admin-security-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;

    padding: 16px 18px;

    border:
        1px solid
        #e2c4c9;

    border-radius:
        var(--radius-lg);

    background:
        linear-gradient(
            90deg,
            var(--brand-red-soft),
            var(--brand-white)
        );
}


.admin-security-banner > div {
    display: flex;
    align-items: center;
    gap: 12px;
}


.admin-security-banner p {
    margin: 3px 0 0;

    color:
        var(--text-muted);

    font-size: 12px;
}


.security-indicator {
    width: 12px;
    height: 12px;

    border-radius: 50%;

    background:
        var(--brand-red);

    box-shadow:
        0 0 0 5px
        rgba(139,30,45,0.10);
}


.admin-only-label {
    color:
        var(--brand-red);

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.12em;
}


.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.7fr)
        minmax(320px, 0.8fr);

    gap: 18px;
}


.panel-card {
    min-width: 0;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--brand-white);

    box-shadow:
        var(--card-shadow);
}


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


.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding:
        20px 21px;

    border-bottom:
        1px solid
        var(--border-soft);
}


.panel-heading h3 {
    margin:
        4px 0 0;

    font-size: 17px;
}


.responsive-table {
    width: 100%;

    overflow-x: auto;
}


.app-table {
    width: 100%;

    border-collapse: collapse;
}


.app-table th {
    position: sticky;

    top: 0;

    padding:
        12px 14px;

    background:
        #f8fafc;

    color:
        #667085;

    border-bottom:
        1px solid
        var(--border-soft);

    text-align: left;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 0.07em;

    text-transform: uppercase;

    white-space: nowrap;
}


.app-table td {
    padding:
        13px 14px;

    border-bottom:
        1px solid
        #edf0f3;

    font-size: 12px;

    vertical-align: middle;
}


.app-table tbody tr:hover {
    background:
        #fbfcfd;
}


.empty-table {
    padding: 36px !important;

    color:
        var(--text-muted);

    text-align: center;
}


.status-pill {
    display: inline-flex;
    align-items: center;

    min-height: 24px;

    padding:
        4px 9px;

    border-radius: 999px;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.05em;
}


.status-blue {
    color:
        var(--brand-blue-dark);

    background:
        var(--brand-blue-soft);
}


.status-red {
    color:
        var(--brand-red-dark);

    background:
        var(--brand-red-soft);
}


.status-dark {
    color:
        var(--brand-white);

    background:
        var(--brand-black);
}


.status-muted {
    color:
        #626b76;

    background:
        #e9edf1;
}


.activity-list,
.security-list {
    padding:
        6px 20px 15px;
}


.activity-item {
    display: grid;

    grid-template-columns:
        11px 1fr;

    gap: 11px;

    padding:
        14px 0;

    border-bottom:
        1px solid
        #edf0f3;
}


.activity-dot {
    width: 7px;
    height: 7px;

    margin-top: 5px;

    border-radius: 50%;

    background:
        var(--brand-blue);
}


.activity-item strong {
    font-size: 12px;
}


.activity-item p,
.security-list-item p {
    margin:
        4px 0;

    color:
        var(--text-muted);

    font-size: 11px;
}


.activity-item span,
.security-list-item span:not(.status-pill) {
    color:
        #929ba7;

    font-size: 10px;
}


.security-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding:
        14px 0;

    border-bottom:
        1px solid
        #edf0f3;
}


.security-list-item strong {
    font-size: 12px;
}


.security-clean,
.empty-state-small {
    padding: 26px 0;

    color:
        var(--text-muted);

    font-size: 12px;

    text-align: center;
}


/* =========================================================
   RECORD LISTS
   ========================================================= */

.record-summary-grid {
    display: grid;

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

    gap: 12px;

    margin-bottom: 18px;
}


.record-summary-card {
    padding: 16px 17px;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--brand-white);
}


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


.record-summary-card span {
    color:
        var(--text-muted);

    font-size: 10px;

    text-transform: uppercase;
}


.record-summary-card strong {
    margin-top: 7px;

    font-size: 23px;
}


.filter-card {
    margin-bottom: 18px;

    padding: 15px;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--brand-white);
}


.filter-grid {
    display: grid;

    grid-template-columns:
        minmax(260px, 1fr)
        220px
        auto;

    gap: 10px;
}


.app-input,
.app-select,
.app-textarea {
    width: 100%;

    border:
        1px solid
        #cfd6df;

    border-radius: 9px;

    background:
        var(--brand-white);

    color:
        var(--text-main);

    outline: none;

    font: inherit;
}


.app-input,
.app-select {
    min-height: 42px;

    padding:
        9px 11px;
}


.app-textarea {
    min-height: 112px;

    padding:
        11px;

    resize: vertical;
}


.app-input:focus,
.app-select:focus,
.app-textarea:focus {
    border-color:
        var(--brand-blue);

    box-shadow:
        0 0 0 3px
        rgba(10,93,170,0.11);
}


.table-card {
    border:
        1px solid
        var(--border-soft);

    border-radius:
        var(--radius-lg);

    overflow: hidden;

    background:
        var(--brand-white);

    box-shadow:
        var(--card-shadow);
}


.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding:
        14px 16px;

    border-top:
        1px solid
        var(--border-soft);

    color:
        var(--text-muted);

    font-size: 11px;
}


.pagination-links {
    display: flex;

    gap: 5px;
}


.page-link-item {
    min-width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    padding:
        0 8px;

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

    border-radius: 8px;

    background:
        var(--brand-white);

    color:
        var(--brand-black);

    text-decoration: none;

    font-size: 11px;
    font-weight: 700;
}


.page-link-item.active {
    border-color:
        var(--brand-blue);

    background:
        var(--brand-blue);

    color:
        var(--brand-white);
}


.action-links {
    display: flex;

    gap: 6px;

    white-space: nowrap;
}


.table-action {
    display: inline-flex;
    align-items: center;

    min-height: 29px;

    padding:
        5px 8px;

    border-radius: 7px;

    background:
        var(--brand-blue-soft);

    color:
        var(--brand-blue-dark);

    text-decoration: none;

    font-size: 10px;
    font-weight: 800;
}


.table-action.edit-action {
    background:
        #f0f1f3;

    color:
        var(--brand-black);
}


/* =========================================================
   FORMS
   ========================================================= */

.form-shell {
    max-width: 1180px;
}


.form-card {
    margin-bottom: 17px;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--brand-white);

    box-shadow:
        var(--card-shadow);
}


.form-section-heading {
    padding:
        18px 20px;

    border-bottom:
        1px solid
        var(--border-soft);
}


.form-section-heading h3 {
    margin: 0;

    font-size: 16px;
}


.form-section-heading p {
    margin:
        5px 0 0;

    color:
        var(--text-muted);

    font-size: 11px;
}


.form-section-body {
    padding: 20px;
}


.two-column-form {
    display: grid;

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

    gap:
        17px 18px;
}


.form-field label {
    display: block;

    margin-bottom: 6px;

    color:
        #344054;

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


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


.field-help {
    margin:
        5px 0 0;

    color:
        #88929e;

    font-size: 10px;
}


.form-error {
    margin-top: 5px;

    color:
        var(--brand-red);

    font-size: 10px;
    font-weight: 700;
}


.form-error-summary {
    margin-bottom: 17px;

    padding: 14px;

    border:
        1px solid
        #e4bdc3;

    border-radius: 10px;

    background:
        var(--brand-red-soft);

    color:
        var(--brand-red-dark);
}


.relative-grid {
    display: grid;

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

    gap: 13px;
}


.relative-card {
    padding: 15px;

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

    border-radius: 11px;

    background:
        var(--surface-soft);
}


.relative-card h4 {
    margin:
        0 0 12px;

    color:
        var(--brand-blue-dark);

    font-size: 12px;
}


.relative-fields {
    display: grid;

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

    gap: 10px;
}


.form-actions {
    display: flex;
    justify-content: flex-end;

    gap: 9px;

    margin-top: 18px;
}


.assignment-warning {
    margin-bottom: 17px;

    padding: 13px;

    border-left:
        4px solid
        var(--brand-red);

    border-radius: 8px;

    background:
        var(--brand-red-soft);

    color:
        var(--brand-red-dark);

    font-size: 11px;
}


/* =========================================================
   DETAIL PAGE
   ========================================================= */

.profile-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 22px;

    margin-bottom: 18px;

    padding: 23px;

    border-radius:
        var(--radius-xl);

    color:
        var(--brand-white);

    background:
        linear-gradient(
            130deg,
            var(--brand-navy-black),
            var(--brand-blue-dark)
        );
}


.profile-main {
    display: flex;
    align-items: center;

    gap: 16px;
}


.profile-monogram {
    width: 65px;
    height: 65px;

    display: grid;
    place-items: center;

    border-radius: 17px;

    background:
        var(--brand-white);

    color:
        var(--brand-blue-dark);

    font-size: 20px;
    font-weight: 900;
}


.profile-hero h2 {
    margin:
        4px 0 6px;

    font-size: 25px;
}


.profile-hero p {
    margin: 0;

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

    font-size: 11px;
}


.profile-actions-inline {
    display: flex;
    gap: 8px;
}


.profile-actions-inline .outline-button {
    border-color:
        rgba(255,255,255,0.25);

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

    color:
        var(--brand-white);
}


.detail-grid {
    display: grid;

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

    gap: 12px;

    margin-bottom: 18px;
}


.detail-card {
    padding: 17px;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--brand-white);
}


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


.detail-card span {
    color:
        var(--text-muted);

    font-size: 10px;

    text-transform: uppercase;
}


.detail-card strong {
    margin-top: 7px;

    font-size: 13px;

    word-break: break-word;
}


.content-section {
    margin-bottom: 18px;

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

    border-radius:
        var(--radius-lg);

    overflow: hidden;

    background:
        var(--brand-white);

    box-shadow:
        var(--card-shadow);
}


.content-section-heading {
    display: flex;
    justify-content: space-between;

    padding:
        17px 19px;

    border-bottom:
        1px solid
        var(--border-soft);
}


.content-section-heading h3 {
    margin: 0;

    font-size: 15px;
}


.content-section-body {
    padding: 19px;
}


.notes-block {
    white-space: pre-wrap;

    color:
        #475467;

    font-size: 12px;

    line-height: 1.7;
}


@media (max-width: 1200px) {

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

}


@media (max-width: 1024px) {

    .app-sidebar {
        transform:
            translateX(-100%);

        transition:
            transform 180ms ease;
    }


    .app-sidebar.open {
        transform:
            translateX(0);
    }


    .app-main {
        margin-left: 0;
    }


    .menu-toggle {
        display: grid;
        place-items: center;
    }


    .sidebar-overlay {
        position: fixed;

        inset: 0;

        z-index: 950;

        background:
            rgba(0,0,0,0.45);
    }


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


    .panel-wide {
        grid-row: auto;
    }

}


@media (max-width: 760px) {

    .app-topbar {
        padding:
            12px 15px;
    }


    .app-content {
        padding:
            20px 15px;
    }


    .topbar-profile > div:last-child {
        display: none;
    }


    .metric-grid,
    .record-summary-grid,
    .detail-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .page-intro {
        align-items: flex-start;

        flex-direction: column;
    }


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


    .two-column-form,
    .relative-grid {
        grid-template-columns: 1fr;
    }


    .profile-hero {
        flex-direction: column;
    }

}


@media (max-width: 520px) {

    .metric-grid,
    .record-summary-grid,
    .detail-grid,
    .relative-fields {
        grid-template-columns: 1fr;
    }


    .topbar-signout {
        padding:
            8px 9px;

        font-size: 11px;
    }


    .table-footer {
        align-items: flex-start;

        flex-direction: column;
    }

}
/* =========================================================
   PAYMENT RECEIPT
   ========================================================= */

.receipt-sheet {
    max-width: 980px;

    margin-left: auto;
    margin-right: auto;
}


.receipt-brand {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-bottom: 28px;

    padding-bottom: 20px;

    border-bottom:
        3px solid
        var(--brand-blue);
}


.receipt-brand img {
    width: 90px;
    height: 72px;

    object-fit: contain;
}


.receipt-brand h2 {
    margin: 0;

    color:
        var(--brand-blue-dark);

    font-size: 23px;
}


.receipt-brand p {
    margin:
        5px 0 0;

    color:
        var(--brand-red);

    font-weight: 700;
}


.receipt-footer {
    margin-top: 30px;

    padding-top: 14px;

    border-top:
        1px solid
        var(--border-soft);

    color:
        var(--text-muted);

    text-align: center;

    font-size: 10px;
}


@media print {

    .app-sidebar,
    .app-topbar,
    .app-footer,
    .flash-zone,
    .no-print {
        display: none !important;
    }


    .app-main {
        margin-left: 0 !important;
    }


    .app-content {
        max-width: none !important;

        padding: 0 !important;
    }


    .receipt-sheet {
        border: 0 !important;

        box-shadow: none !important;
    }


    body {
        background: white !important;
    }

}

/* =========================================================
   PHASE 9 — MANAGEMENT REPORTS
   ========================================================= */

.report-period-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 20px;

    padding: 20px;

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

    border-left:
        4px solid
        var(--brand-blue);

    border-radius:
        var(--radius-lg);

    background:
        var(--brand-white);

    box-shadow:
        var(--card-shadow);
}


.report-period-label {
    display: block;

    margin-bottom: 4px;

    color:
        var(--brand-red);

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.13em;
}


.report-period-card strong {
    font-size: 21px;
}


.report-period-card p {
    margin:
        5px 0 0;

    color:
        var(--text-muted);

    font-size: 11px;
}


.report-period-form {
    display: flex;
    align-items: center;

    gap: 9px;
}


.report-period-form .app-input {
    min-width: 170px;
}


.report-kpi-grid {
    display: grid;

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

    gap: 14px;

    margin-bottom: 18px;
}


.report-grid {
    display: grid;

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

    gap: 18px;

    margin-bottom: 18px;
}


.report-full-panel {
    margin-bottom: 18px;
}


.report-context-label {
    padding:
        6px 9px;

    border-radius:
        999px;

    background:
        var(--brand-blue-soft);

    color:
        var(--brand-blue-dark);

    font-size: 9px;
    font-weight: 800;
}


.report-chart-list {
    padding:
        12px 20px 20px;
}


.report-bar-row {
    padding:
        13px 0;

    border-bottom:
        1px solid
        #edf0f3;
}


.report-bar-row:last-child {
    border-bottom: 0;
}


.report-bar-heading {
    display: flex;
    justify-content: space-between;

    gap: 18px;

    margin-bottom: 8px;
}


.report-bar-heading strong,
.report-bar-heading span {
    display: block;
}


.report-bar-heading strong {
    font-size: 12px;
}


.report-bar-heading span {
    margin-top: 3px;

    color:
        var(--text-muted);

    font-size: 10px;
}


.report-bar-value {
    text-align: right;
}


.report-progress {
    width: 100%;
    height: 8px;

    overflow: hidden;

    border: 0;

    border-radius:
        999px;

    background:
        #edf0f3;

    appearance: none;
}


.report-progress::-webkit-progress-bar {
    border-radius:
        999px;

    background:
        #edf0f3;
}


.report-progress::-webkit-progress-value {
    border-radius:
        999px;

    background:
        var(--brand-blue);
}


.report-progress::-moz-progress-bar {
    border-radius:
        999px;

    background:
        var(--brand-blue);
}


.report-progress.progress-red::-webkit-progress-value {
    background:
        var(--brand-red);
}


.report-progress.progress-red::-moz-progress-bar {
    background:
        var(--brand-red);
}


.report-progress.progress-dark::-webkit-progress-value {
    background:
        var(--brand-black);
}


.report-progress.progress-dark::-moz-progress-bar {
    background:
        var(--brand-black);
}


.report-progress.progress-muted::-webkit-progress-value {
    background:
        #a3abb6;
}


.report-progress.progress-muted::-moz-progress-bar {
    background:
        #a3abb6;
}


.report-trend-list {
    padding:
        15px 20px 5px;
}


.trend-row {
    display: grid;

    grid-template-columns:
        82px
        minmax(
            140px,
            1fr
        )
        150px;

    align-items: center;

    gap: 14px;

    padding:
        8px 0;
}


.trend-month {
    color:
        var(--text-muted);

    font-size: 10px;
    font-weight: 700;
}


.trend-value {
    text-align: right;

    font-size: 11px;
}


.report-note {
    margin:
        12px 20px 20px;

    padding:
        11px 13px;

    border-radius: 9px;

    background:
        var(--surface-soft);

    color:
        var(--text-muted);

    font-size: 10px;
}


.ranking-list {
    padding:
        8px 19px 16px;
}


.ranking-row {
    display: grid;

    grid-template-columns:
        32px
        minmax(
            0,
            1fr
        )
        auto;

    align-items: center;

    gap: 11px;

    padding:
        12px 0;

    border-bottom:
        1px solid
        #edf0f3;

    color:
        var(--brand-black);

    text-decoration: none;
}


.ranking-row:last-child {
    border-bottom: 0;
}


.ranking-row:hover {
    color:
        var(--brand-blue);
}


.ranking-position {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    border-radius: 8px;

    background:
        var(--brand-blue-soft);

    color:
        var(--brand-blue-dark);

    font-size: 10px;
    font-weight: 900;
}


.ranking-red {
    background:
        var(--brand-red-soft);

    color:
        var(--brand-red);
}


.ranking-row > div strong,
.ranking-row > div span {
    display: block;
}


.ranking-row > div strong {
    font-size: 11px;
}


.ranking-row > div span {
    margin-top: 3px;

    color:
        var(--text-muted);

    font-size: 9px;
}


.ranking-amount {
    font-size: 11px;
}


.report-empty {
    padding:
        28px 10px;

    color:
        var(--text-muted);

    text-align: center;

    font-size: 11px;
}


.report-export-section {
    margin-top: 20px;

    padding: 21px;

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

    border-radius:
        var(--radius-xl);

    background:
        var(--brand-white);

    box-shadow:
        var(--card-shadow);
}


.report-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 18px;
}


.report-section-heading h3 {
    margin:
        4px 0 6px;

    font-size: 19px;
}


.report-section-heading p {
    max-width: 700px;

    margin: 0;

    color:
        var(--text-muted);

    font-size: 11px;
}


.secure-export-badge {
    padding:
        7px 10px;

    border-radius:
        999px;

    background:
        var(--brand-red-soft);

    color:
        var(--brand-red);

    font-size: 8px;
    font-weight: 900;

    letter-spacing: 0.1em;
}


.report-export-grid {
    display: grid;

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

    gap: 12px;
}


.export-card {
    display: flex;
    flex-direction: column;

    min-height: 220px;

    padding: 17px;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--surface-soft);
}


.export-icon {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    margin-bottom: 13px;

    border-radius: 10px;

    background:
        var(--brand-blue);

    color:
        var(--brand-white);

    font-size: 11px;
    font-weight: 900;
}


.export-icon-dark {
    background:
        var(--brand-black);
}


.export-icon-red {
    background:
        var(--brand-red);
}


.export-card h4 {
    margin:
        0 0 7px;

    font-size: 14px;
}


.export-card p {
    flex: 1;

    margin:
        0 0 15px;

    color:
        var(--text-muted);

    font-size: 10px;

    line-height: 1.55;
}


.export-card form {
    margin: 0;
}


.export-button {
    width: 100%;
}


.report-security-note {
    margin-top: 16px;

    padding: 12px 14px;

    border-left:
        4px solid
        var(--brand-red);

    border-radius: 8px;

    background:
        var(--brand-red-soft);

    color:
        #663039;

    font-size: 10px;

    line-height: 1.6;
}


@media (max-width: 1200px) {

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

}


@media (max-width: 900px) {

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


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

}


@media (max-width: 650px) {

    .report-period-card {
        align-items: stretch;

        flex-direction: column;
    }


    .report-period-form {
        align-items: stretch;

        flex-direction: column;
    }


    .report-period-form .app-input {
        min-width: 0;
    }


    .report-kpi-grid,
    .report-export-grid {
        grid-template-columns:
            1fr;
    }


    .trend-row {
        grid-template-columns:
            70px
            minmax(
                90px,
                1fr
            );

        gap: 9px;
    }


    .trend-value {
        grid-column:
            1 / -1;

        text-align: right;
    }


    .report-section-heading {
        flex-direction: column;
    }

}


/* =========================================================
   PHASE 10 — USER MANAGEMENT / ACCESS CONTROL
   ========================================================= */

.access-policy-banner {
    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 18px;

    padding: 16px 18px;

    border:
        1px solid
        #d8e5f2;

    border-left:
        4px solid
        var(--brand-blue);

    border-radius:
        var(--radius-lg);

    background:
        linear-gradient(
            90deg,
            var(--brand-blue-soft),
            var(--brand-white)
        );
}


.access-policy-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background:
        var(--brand-blue);

    color:
        var(--brand-white);

    font-size: 10px;
    font-weight: 900;
}


.access-policy-banner strong {
    font-size: 13px;
}


.access-policy-banner p {
    margin:
        4px 0 0;

    color:
        var(--text-muted);

    font-size: 11px;

    line-height: 1.5;
}


.role-badge {
    display: inline-flex;

    min-height: 24px;

    align-items: center;

    padding:
        4px 9px;

    border-radius:
        999px;

    font-size: 9px;
    font-weight: 900;

    letter-spacing:
        0.04em;
}


.role-admin {
    background:
        var(--brand-red-soft);

    color:
        var(--brand-red);
}


.role-staff {
    background:
        var(--brand-blue-soft);

    color:
        var(--brand-blue-dark);
}


.permission-all {
    color:
        var(--brand-red);

    font-size: 10px;
}


.permission-security-banner {
    margin-bottom: 18px;

    padding: 14px;

    border:
        1px solid
        #e4c9ce;

    border-radius: 10px;

    background:
        var(--brand-red-soft);
}


.permission-security-banner strong,
.permission-security-banner span {
    display: block;
}


.permission-security-banner strong {
    color:
        var(--brand-red-dark);

    font-size: 12px;
}


.permission-security-banner span {
    margin-top: 5px;

    color:
        #6e4249;

    font-size: 10px;

    line-height: 1.55;
}


.permission-preset-row {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 18px;
}


.permission-preset-button {
    min-height: 34px;

    padding:
        7px 11px;

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

    border-radius:
        8px;

    background:
        var(--brand-white);

    color:
        var(--brand-black);

    cursor: pointer;

    font-size: 10px;
    font-weight: 800;
}


.permission-preset-button:hover {
    border-color:
        var(--brand-blue);

    color:
        var(--brand-blue-dark);

    background:
        var(--brand-blue-soft);
}


.permission-groups {
    display: grid;

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

    gap: 13px;
}


.permission-group-card {
    border:
        1px solid
        var(--border-soft);

    border-radius: 12px;

    overflow: hidden;

    background:
        var(--surface-soft);
}


.permission-group-heading {
    padding:
        12px 14px;

    border-bottom:
        1px solid
        var(--border-soft);

    background:
        var(--brand-white);
}


.permission-group-heading h4 {
    margin: 0;

    color:
        var(--brand-black);

    font-size: 12px;
}


.permission-option-list {
    padding:
        5px 13px;
}


.permission-option {
    display: grid;

    grid-template-columns:
        20px
        minmax(
            0,
            1fr
        )
        auto;

    align-items: center;

    gap: 10px;

    padding:
        11px 0;

    border-bottom:
        1px solid
        #e9edf1;

    cursor: pointer;
}


.permission-option:last-child {
    border-bottom: 0;
}


.permission-option input {
    width: 16px;
    height: 16px;

    accent-color:
        var(--brand-blue);
}


.permission-option-copy strong,
.permission-option-copy small {
    display: block;
}


.permission-option-copy strong {
    font-size: 11px;
}


.permission-option-copy small {
    margin-top: 3px;

    color:
        var(--text-muted);

    font-size: 9px;

    line-height: 1.4;
}


.permission-risk {
    padding:
        4px 6px;

    border-radius:
        999px;

    font-size: 7px;
    font-weight: 900;
}


.permission-risk-low,
.permission-risk-standard {
    background:
        var(--brand-blue-soft);

    color:
        var(--brand-blue-dark);
}


.permission-risk-elevated {
    background:
        #f0f1f3;

    color:
        var(--brand-black);
}


.permission-risk-high {
    background:
        var(--brand-red-soft);

    color:
        var(--brand-red);
}


.password-policy-note {
    padding: 11px;

    border-radius: 9px;

    background:
        var(--surface-soft);

    color:
        var(--text-muted);

    font-size: 10px;
}


.password-policy-note strong,
.password-policy-note span {
    display: block;
}


.password-policy-note span {
    margin-top: 4px;
}


.switch-label {
    display: inline-flex !important;

    align-items: center;

    gap: 8px;

    cursor: pointer;
}


.switch-label input {
    width: 16px;
    height: 16px;

    accent-color:
        var(--brand-blue);
}


.admin-full-access-card {
    padding: 17px;

    border:
        1px solid
        #e1c0c6;

    border-left:
        4px solid
        var(--brand-red);

    border-radius: 11px;

    background:
        var(--brand-red-soft);
}


.admin-full-access-card strong {
    color:
        var(--brand-red-dark);
}


.admin-full-access-card p {
    margin:
        6px 0 0;

    color:
        #70434a;

    font-size: 10px;
}


.effective-permission-grid {
    display: grid;

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

    gap: 12px;
}


.effective-permission-group {
    padding: 14px;

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

    border-radius: 11px;

    background:
        var(--surface-soft);
}


.effective-permission-group h4 {
    margin:
        0 0 9px;

    font-size: 11px;
}


.effective-permission-item {
    display: flex;
    justify-content: space-between;

    gap: 10px;

    padding:
        7px 0;

    border-bottom:
        1px solid
        #e9edf1;

    font-size: 9px;
}


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


.effective-permission-item.granted strong {
    color:
        var(--brand-blue);
}


.effective-permission-item.denied {
    color:
        #8d949d;
}


.effective-permission-item.denied strong {
    color:
        var(--brand-red);
}


.user-security-grid {
    display: grid;

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

    gap: 17px;
}


.user-action-spacing {
    margin-top: 13px;
}


.session-control-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 16px;

    padding: 13px;

    border-radius: 10px;

    background:
        var(--surface-soft);
}


.session-control-stat span {
    color:
        var(--text-muted);

    font-size: 10px;
}


.session-control-stat strong {
    font-size: 22px;
}


.brand-danger-button {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        9px 15px;

    border:
        1px solid
        var(--brand-red);

    border-radius: 10px;

    background:
        var(--brand-red);

    color:
        var(--brand-white);

    cursor: pointer;

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


.brand-danger-button:hover {
    background:
        var(--brand-red-dark);
}


@media (max-width: 850px) {

    .permission-groups,
    .effective-permission-grid,
    .user-security-grid {
        grid-template-columns:
            1fr;
    }

}
