/* =========================================================================
   ProcureIT — Christian Family Church Johannesburg
   Design language: "Ink & Crimson". Warm near-black, bone paper, the church's
   signal red used sparingly for identity and decision points. Serif headings
   against a neutral sans give the system an institutional, printed feel.
   ========================================================================= */

:root {
    /* Warm neutrals */
    --ink-900: #14100D;
    --ink-850: #1B1611;
    --ink-800: #221C16;
    --ink-700: #33291F;
    --ink-600: #4A3D33;
    --ink-500: #6B5C50;
    --ink-400: #8C7E72;
    --ink-300: #B2A496;
    --ink-200: #D9CFC3;
    --ink-150: #E6DDD2;
    --ink-100: #EFE8DE;
    --bone-50: #FAF7F2;
    --bone-100: #F4EFE7;
    --paper: #FFFFFF;

    /* Brand + semantics */
    --crimson-700: #8E1B14;
    --crimson-600: #C0281F;
    --crimson-500: #D8433A;
    --crimson-100: #F7DCD9;
    --crimson-50: #FCF0EE;

    --brass-700: #8A6820;
    --brass-600: #B0862B;
    --brass-100: #F4E6C6;
    --brass-50: #FBF5E7;

    --moss-700: #2F5340;
    --moss-600: #3E6B4E;
    --moss-100: #D9E7DD;
    --moss-50: #EDF4EF;

    --petrol-700: #1F4653;
    --petrol-600: #2A5C6E;
    --petrol-100: #D5E5EA;
    --petrol-50: #EBF3F5;

    --plum-600: #6B4E7A;
    --plum-50: #F2ECF5;

    /* Type */
    --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Cascadia Mono", "SF Mono", ui-monospace, Consolas, "Liberation Mono", monospace;

    /* Structure */
    --rail: 258px;
    --topbar: 62px;
    --radius: 3px;
    --radius-lg: 5px;

    --shadow-sm: 0 1px 2px rgba(20, 16, 13, .06), 0 1px 1px rgba(20, 16, 13, .04);
    --shadow-md: 0 2px 6px rgba(20, 16, 13, .07), 0 8px 20px -10px rgba(20, 16, 13, .16);
    --shadow-lg: 0 10px 40px -12px rgba(20, 16, 13, .28);
}

/* ---------- Base ---------------------------------------------------------- */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

img, svg, video { max-width: 100%; }

button, input, select, textarea { font: inherit; }

body {
    margin: 0;
    background: var(--bone-50);
    color: var(--ink-800);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink-900);
    font-weight: 600;
    letter-spacing: -.01em;
    margin: 0;
}

a {
    color: var(--crimson-600);
    text-decoration: none;
}

a:hover {
    color: var(--crimson-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}

code, .mono {
    font-family: var(--font-mono);
    font-size: .92em;
    letter-spacing: -.01em;
}

::selection {
    background: var(--crimson-100);
    color: var(--ink-900);
}

:focus-visible {
    outline: 2px solid var(--crimson-600);
    outline-offset: 2px;
}

/* Custom scrollbars keep the warm palette all the way to the edges. */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-200) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-thumb {
    background: var(--ink-200);
    border: 3px solid transparent;
    background-clip: content-box;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--ink-300);
    background-clip: content-box;
}

/* ---------- Shell --------------------------------------------------------- */

.shell {
    min-height: 100vh;
}

.rail {
    width: var(--rail);
    flex: 0 0 var(--rail);
    background: var(--ink-900);
    color: var(--ink-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    border-right: 1px solid #000;
}

.rail::after {
    /* hairline of brand colour running the full height */
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--crimson-600) 0%, var(--crimson-700) 32%, transparent 78%);
    opacity: .85;
}

.rail__brand {
    padding: 20px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    display: flex;
    align-items: center;
    gap: 12px;
}

.rail__brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.rail__wordmark {
    font-family: var(--font-display);
    font-size: 17px;
    color: #fff;
    letter-spacing: .01em;
    font-weight: 600;
}

.rail__wordmark em {
    font-style: normal;
    color: var(--crimson-500);
}

.rail__sub {
    margin-top: 5px;
    font-size: 8.5px;
    letter-spacing: .22em;
    color: var(--ink-400);
    text-transform: uppercase;
    font-weight: 600;
}

.rail__nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px 20px;
}

.rail__section {
    margin: 18px 0 7px;
    padding: 0 10px;
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #6E625A;
    font-weight: 700;
}

.rail__section:first-child {
    margin-top: 2px;
}

.rail__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    margin: 1px 0;
    border-radius: var(--radius);
    color: #BCAFA3;
    font-size: 13.5px;
    font-weight: 500;
    position: relative;
    transition: background .13s ease, color .13s ease;
}

.rail__link:hover {
    background: rgba(255, 255, 255, .05);
    color: #F2EBE3;
    text-decoration: none;
}

.rail__link.active {
    background: rgba(216, 67, 58, .13);
    color: #fff;
}

.rail__link.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--crimson-500);
    border-radius: 0 2px 2px 0;
}

.rail__link svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    opacity: .85;
}

.rail__count {
    margin-left: auto;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .1);
    color: #E4DAD0;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
}

.rail__count--alert {
    background: var(--crimson-600);
    color: #fff;
}

.rail__foot {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.rail__role {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: var(--radius);
    padding: 11px 12px;
}

.rail__role-label {
    font-size: 8.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #6E625A;
    font-weight: 700;
}

.rail__role-value {
    color: #EFE6DC;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 4px;
}

.rail__role-dept {
    color: var(--ink-400);
    font-size: 11px;
    margin-top: 1px;
}

/* ---------- Main column --------------------------------------------------- */

/* The rail is fixed, so the main column simply clears it with a margin. */
.main {
    margin-left: var(--rail);
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 900px) {
    .rail { transform: translateX(-100%); }
    .main { margin-left: 0; }
}

.topbar {
    height: var(--topbar);
    background: var(--paper);
    border-bottom: 1px solid var(--ink-150);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar__title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__spacer {
    flex: 1;
}

.iconbtn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background .12s ease, color .12s ease;
}

.iconbtn:hover {
    background: var(--bone-100);
    color: var(--ink-800);
}

.iconbtn__dot {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--crimson-600);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--paper);
    font-family: var(--font-mono);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ink-700);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
    flex: 0 0 32px;
}

.avatar--sm {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    font-size: 9.5px;
}

.avatar--lg {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    font-size: 15px;
}

.userchip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: 20px;
    border: 1px solid var(--ink-150);
    background: var(--paper);
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}

.userchip:hover {
    border-color: var(--ink-200);
    background: var(--bone-50);
}

.userchip__name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-800);
    line-height: 1.2;
}

.userchip__role {
    font-size: 10px;
    color: var(--ink-400);
    line-height: 1.2;
}

.content {
    flex: 1;
    padding: 26px 26px 56px;
    max-width: 1560px;
    width: 100%;
}

/* ---------- Page header --------------------------------------------------- */

.pagehead {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.pagehead__eyebrow {
    font-size: 9.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--crimson-600);
    font-weight: 700;
    margin-bottom: 6px;
}

.pagehead h1 {
    font-size: 26px;
    line-height: 1.18;
}

.pagehead__sub {
    color: var(--ink-500);
    font-size: 13.5px;
    margin-top: 6px;
    max-width: 74ch;
}

.pagehead__actions {
    margin-left: auto;
    display: flex;
    gap: 9px;
    align-items: center;
    flex-wrap: wrap;
}

/* ---------- Surfaces ------------------------------------------------------ */

.card {
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card__head {
    padding: 15px 18px;
    border-bottom: 1px solid var(--ink-100);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card__title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-900);
}

.card__hint {
    font-size: 12px;
    color: var(--ink-400);
    margin-top: 2px;
}

.card__body {
    padding: 18px;
}

.card__body--flush {
    padding: 0;
}

.card__actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--main {
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

@media (max-width: 1240px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--main, .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
    .grid--4 { grid-template-columns: minmax(0, 1fr); }
    .content { padding: 18px 14px 48px; }
}

/* ---------- Stat tiles ---------------------------------------------------- */

.stat {
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    padding: 16px 17px 15px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent, var(--ink-300));
}

.stat__label {
    font-size: 9.5px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--ink-400);
    font-weight: 700;
}

.stat__value {
    font-family: var(--font-display);
    font-size: 27px;
    line-height: 1.1;
    color: var(--ink-900);
    margin-top: 9px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.stat__meta {
    font-size: 11.5px;
    color: var(--ink-500);
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat__icon {
    position: absolute;
    right: 13px;
    top: 13px;
    color: var(--accent, var(--ink-200));
    opacity: .22;
}

.stat__icon svg {
    width: 34px;
    height: 34px;
}

/* ---------- Chips --------------------------------------------------------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1.5;
}

.chip::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 5px;
}

.chip--neutral { background: var(--ink-100); color: var(--ink-600); border-color: var(--ink-150); }
.chip--muted { background: var(--bone-100); color: var(--ink-400); border-color: var(--ink-150); }
.chip--pending { background: var(--brass-50); color: var(--brass-700); border-color: var(--brass-100); }
.chip--info { background: var(--petrol-50); color: var(--petrol-700); border-color: var(--petrol-100); }
.chip--approved { background: var(--moss-50); color: var(--moss-700); border-color: var(--moss-100); }
.chip--returned { background: var(--crimson-50); color: var(--crimson-700); border-color: var(--crimson-100); }
.chip--urgent { background: var(--crimson-600); color: #fff; border-color: var(--crimson-700); }
.chip--critical { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }
.chip--type-normal { background: var(--ink-100); color: var(--ink-600); border-color: var(--ink-150); }
.chip--type-emergency { background: var(--crimson-600); color: #fff; border-color: var(--crimson-700); }
.chip--type-event { background: var(--plum-50); color: var(--plum-600); border-color: #E0D4E8; }

.chip--plain::before { display: none; }

/* ---------- Buttons ------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .13s ease, border-color .13s ease, color .13s ease, box-shadow .13s ease;
    text-decoration: none;
}

.btn:disabled, .btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

.btn svg {
    width: 15px;
    height: 15px;
}

.btn--primary {
    background: var(--crimson-600);
    color: #fff;
    border-color: var(--crimson-700);
    box-shadow: 0 1px 2px rgba(142, 27, 20, .25);
}

.btn--primary:hover:not(:disabled) {
    background: var(--crimson-700);
    color: #fff;
    text-decoration: none;
}

.btn--ink {
    background: var(--ink-900);
    color: #fff;
    border-color: #000;
}

.btn--ink:hover:not(:disabled) {
    background: var(--ink-700);
    color: #fff;
    text-decoration: none;
}

.btn--approve {
    background: var(--moss-600);
    color: #fff;
    border-color: var(--moss-700);
}

.btn--approve:hover:not(:disabled) {
    background: var(--moss-700);
    color: #fff;
    text-decoration: none;
}

.btn--ghost {
    background: var(--paper);
    color: var(--ink-700);
    border-color: var(--ink-200);
}

.btn--ghost:hover:not(:disabled) {
    background: var(--bone-100);
    border-color: var(--ink-300);
    color: var(--ink-900);
    text-decoration: none;
}

.btn--danger-ghost {
    background: var(--paper);
    color: var(--crimson-700);
    border-color: var(--crimson-100);
}

.btn--danger-ghost:hover:not(:disabled) {
    background: var(--crimson-50);
    border-color: var(--crimson-500);
    color: var(--crimson-700);
    text-decoration: none;
}

.btn--quiet {
    background: transparent;
    color: var(--ink-500);
    border-color: transparent;
    height: 30px;
    padding: 0 9px;
}

.btn--quiet:hover:not(:disabled) {
    background: var(--bone-100);
    color: var(--ink-800);
    text-decoration: none;
}

.btn--sm {
    height: 28px;
    font-size: 12px;
    padding: 0 10px;
}

.btn--sm svg { width: 13px; height: 13px; }

.btn--lg {
    height: 40px;
    font-size: 14px;
    padding: 0 20px;
}

.btn--block { width: 100%; }

/* ---------- Forms --------------------------------------------------------- */

.field {
    display: block;
    margin-bottom: 15px;
}

.field__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-bottom: 5px;
}

.field__hint {
    font-size: 11.5px;
    color: var(--ink-400);
    margin-top: 4px;
}

.field__error {
    font-size: 11.5px;
    color: var(--crimson-600);
    margin-top: 4px;
    font-weight: 500;
}

.input,
.textarea,
.select {
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    padding: 8px 11px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: var(--ink-900);
    transition: border-color .12s ease, box-shadow .12s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--crimson-600);
    box-shadow: 0 0 0 3px var(--crimson-50);
}

.input::placeholder, .textarea::placeholder {
    color: var(--ink-300);
}

.textarea {
    min-height: 82px;
    resize: vertical;
    line-height: 1.55;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C7E72' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.input--money {
    font-family: var(--font-mono);
    text-align: right;
}

.checkline {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    color: var(--ink-700);
    cursor: pointer;
}

.checkline input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    accent-color: var(--crimson-600);
    cursor: pointer;
}

/* ---------- Tables -------------------------------------------------------- */

.table-wrap {
    overflow-x: auto;
}

table.dt {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.dt thead th {
    background: var(--bone-100);
    border-bottom: 1px solid var(--ink-150);
    border-top: 1px solid var(--ink-150);
    padding: 9px 14px;
    text-align: left;
    font-size: 9.5px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--ink-500);
    font-weight: 700;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

table.dt tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--ink-100);
    vertical-align: top;
    color: var(--ink-700);
}

table.dt tbody tr:hover td {
    background: var(--bone-50);
}

table.dt tbody tr.is-selected td {
    background: var(--crimson-50);
}

table.dt tbody tr.is-muted td {
    color: var(--ink-400);
}

table.dt .num {
    text-align: right;
    font-family: var(--font-mono);
    white-space: nowrap;
    font-size: 12.5px;
}

table.dt .strong {
    color: var(--ink-900);
    font-weight: 600;
}

table.dt tfoot td {
    padding: 12px 14px;
    border-top: 2px solid var(--ink-800);
    font-weight: 700;
    color: var(--ink-900);
    background: var(--bone-50);
}

.row-link {
    cursor: pointer;
}

/* ---------- Misc utility -------------------------------------------------- */

.stack { display: flex; flex-direction: column; }
.stack-2 { gap: 2px; }
.stack-4 { gap: 4px; }
.stack-8 { gap: 8px; }
.stack-12 { gap: 12px; }
.stack-16 { gap: 16px; }
.row { display: flex; align-items: center; }
.row-8 { gap: 8px; }
.row-12 { gap: 12px; }
.row-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-400); }
.soft { color: var(--ink-500); }
.tiny { font-size: 11.5px; }
.small { font-size: 12.5px; }
.strong { font-weight: 600; color: var(--ink-900); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.eyebrow {
    font-size: 9.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-400);
    font-weight: 700;
}

.money {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.divider {
    height: 1px;
    background: var(--ink-100);
    margin: 16px 0;
}

.ref {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-600);
    background: var(--bone-100);
    border: 1px solid var(--ink-150);
    padding: 1px 6px;
    border-radius: 2px;
    letter-spacing: -.02em;
    white-space: nowrap;
}

/* ---------- Empty & callouts --------------------------------------------- */

.empty {
    text-align: center;
    padding: 52px 24px;
    color: var(--ink-400);
}

.empty svg {
    width: 38px;
    height: 38px;
    color: var(--ink-200);
    margin-bottom: 12px;
}

.empty__title {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--ink-700);
    margin-bottom: 5px;
}

.callout {
    border-left: 3px solid var(--ink-300);
    background: var(--bone-100);
    padding: 12px 15px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 13px;
    color: var(--ink-700);
}

.callout__title {
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 3px;
    font-size: 12.5px;
}

.callout--urgent { border-color: var(--crimson-600); background: var(--crimson-50); color: var(--crimson-700); }
.callout--urgent .callout__title { color: var(--crimson-700); }
.callout--warn { border-color: var(--brass-600); background: var(--brass-50); color: var(--brass-700); }
.callout--warn .callout__title { color: var(--brass-700); }
.callout--good { border-color: var(--moss-600); background: var(--moss-50); color: var(--moss-700); }
.callout--good .callout__title { color: var(--moss-700); }
.callout--info { border-color: var(--petrol-600); background: var(--petrol-50); color: var(--petrol-700); }
.callout--info .callout__title { color: var(--petrol-700); }

/* ---------- Timeline ------------------------------------------------------ */

.timeline {
    position: relative;
    padding-left: 22px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--ink-150);
}

.tl-item {
    position: relative;
    padding-bottom: 17px;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
    content: "";
    position: absolute;
    left: -21px;
    top: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--ink-300);
}

.tl-item--good::before { border-color: var(--moss-600); }
.tl-item--bad::before { border-color: var(--crimson-600); }
.tl-item--warn::before { border-color: var(--brass-600); }
.tl-item--info::before { border-color: var(--petrol-600); }

.tl-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-900);
}

.tl-meta {
    font-size: 11.5px;
    color: var(--ink-400);
    margin-top: 1px;
}

.tl-body {
    font-size: 12.5px;
    color: var(--ink-600);
    margin-top: 4px;
    line-height: 1.5;
}

/* ---------- Notification panel ------------------------------------------- */

.panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 60;
    overflow: hidden;
}

.panel__head {
    padding: 12px 15px;
    border-bottom: 1px solid var(--ink-100);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bone-50);
}

.panel__title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
}

.panel__list {
    max-height: 420px;
    overflow-y: auto;
}

.panel__foot {
    padding: 9px 14px;
    border-top: 1px solid var(--ink-100);
    background: var(--bone-50);
    text-align: center;
}

.note {
    display: flex;
    gap: 11px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--ink-100);
    cursor: pointer;
    transition: background .12s ease;
    text-align: left;
    width: 100%;
    background: none;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.note:hover { background: var(--bone-50); }
.note:last-child { border-bottom: none; }

.note--unread { background: var(--crimson-50); }
.note--unread:hover { background: #FBE9E6; }

.note__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-top: 6px;
    flex: 0 0 7px;
    background: var(--ink-300);
}

.note__dot--Info { background: var(--petrol-600); }
.note__dot--Success { background: var(--moss-600); }
.note__dot--Warning { background: var(--brass-600); }
.note__dot--Urgent { background: var(--crimson-600); }

.note__title {
    font-size: 12.8px;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.35;
}

.note__body {
    font-size: 12px;
    color: var(--ink-500);
    margin-top: 2px;
    line-height: 1.45;
}

.note__time {
    font-size: 10.5px;
    color: var(--ink-300);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 236px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 60;
    overflow: hidden;
    padding: 5px;
}

.menu__item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    font-size: 13px;
    color: var(--ink-700);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    font-family: var(--font-sans);
}

.menu__item:hover {
    background: var(--bone-100);
    color: var(--ink-900);
    text-decoration: none;
}

.menu__item svg { width: 15px; height: 15px; opacity: .7; }

.menu__head {
    padding: 11px 12px;
    border-bottom: 1px solid var(--ink-100);
    margin: -5px -5px 5px;
    background: var(--bone-50);
}

.menu__sep { height: 1px; background: var(--ink-100); margin: 5px -5px; }

.backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: default;
}

/* ---------- Toasts -------------------------------------------------------- */

.toasts {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 9px;
    pointer-events: none;
}

.toast {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    min-width: 300px;
    max-width: 400px;
    background: var(--ink-900);
    color: #F2EBE3;
    border-radius: var(--radius);
    padding: 13px 15px;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toast-in .22s cubic-bezier(.2, .9, .3, 1);
    border-left: 3px solid var(--ink-500);
}

.toast--Success { border-left-color: #67A67F; }
.toast--Warning { border-left-color: #D9AC4F; }
.toast--Urgent { border-left-color: var(--crimson-500); }
.toast--Info { border-left-color: #6FA3B5; }

.toast__title { font-size: 13px; font-weight: 600; color: #fff; }
.toast__body { font-size: 12px; color: #B7ABA0; margin-top: 2px; line-height: 1.45; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

/* ---------- Tabs ---------------------------------------------------------- */

.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--ink-150);
    margin-bottom: 18px;
    overflow-x: auto;
}

.tab {
    padding: 9px 15px;
    border: none;
    background: none;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-400);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.tab:hover { color: var(--ink-700); }

.tab.active {
    color: var(--crimson-700);
    border-bottom-color: var(--crimson-600);
}

.tab__count {
    background: var(--ink-100);
    color: var(--ink-500);
    border-radius: 9px;
    padding: 0 6px;
    font-size: 10.5px;
    font-family: var(--font-mono);
    min-width: 18px;
    text-align: center;
}

.tab.active .tab__count { background: var(--crimson-100); color: var(--crimson-700); }

/* ---------- Segmented type selector -------------------------------------- */

.typepick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 860px) { .typepick { grid-template-columns: 1fr; } }

.typepick__opt {
    text-align: left;
    background: var(--paper);
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-lg);
    padding: 16px 16px 15px;
    cursor: pointer;
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
    position: relative;
    overflow: hidden;
}

.typepick__opt:hover {
    border-color: var(--ink-300);
    box-shadow: var(--shadow-md);
}

.typepick__opt.selected {
    border-color: var(--crimson-600);
    box-shadow: 0 0 0 3px var(--crimson-50);
}

.typepick__opt.selected::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--crimson-600);
}

.typepick__name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 5px;
}

.typepick__desc {
    font-size: 12.3px;
    color: var(--ink-500);
    line-height: 1.5;
}

/* ---------- Dropzone ------------------------------------------------------ */

.dropzone {
    border: 1.5px dashed var(--ink-200);
    border-radius: var(--radius-lg);
    background: var(--bone-50);
    padding: 28px 20px;
    text-align: center;
    transition: border-color .14s ease, background .14s ease;
}

.dropzone:hover {
    border-color: var(--crimson-500);
    background: var(--crimson-50);
}

.dropzone svg {
    width: 30px;
    height: 30px;
    color: var(--ink-300);
    margin-bottom: 9px;
}

.dropzone__title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-800);
}

.dropzone__hint {
    font-size: 12px;
    color: var(--ink-400);
    margin-top: 3px;
}

/* ---------- Attachments --------------------------------------------------- */

.attach {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius);
    background: var(--paper);
}

.attach__ext {
    width: 30px;
    height: 30px;
    border-radius: 2px;
    background: var(--ink-800);
    color: #fff;
    font-size: 8.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    font-family: var(--font-mono);
    letter-spacing: -.02em;
}

.attach__ext--pdf { background: var(--crimson-700); }
.attach__ext--xlsx, .attach__ext--xls, .attach__ext--csv { background: var(--moss-700); }
.attach__ext--docx, .attach__ext--doc { background: var(--petrol-700); }
.attach__ext--png, .attach__ext--jpg, .attach__ext--jpeg { background: var(--brass-700); }

.attach__name { font-size: 12.5px; font-weight: 600; color: var(--ink-800); }
.attach__meta { font-size: 11px; color: var(--ink-400); }

/* ---------- Line cards (review screens) ---------------------------------- */

.linecard {
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    background: var(--paper);
    margin-bottom: 11px;
    overflow: hidden;
    transition: border-color .13s ease, box-shadow .13s ease;
}

.linecard.picked {
    border-color: var(--crimson-500);
    box-shadow: 0 0 0 3px var(--crimson-50);
}

.linecard__head {
    display: flex;
    gap: 12px;
    padding: 13px 15px;
    align-items: flex-start;
    background: var(--paper);
}

.linecard__no {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-300);
    padding-top: 2px;
    min-width: 24px;
}

.linecard__title {
    font-size: 13.8px;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.4;
}

.linecard__cat {
    font-size: 9.5px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--crimson-600);
    font-weight: 700;
    margin-bottom: 3px;
}

.linecard__amount {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-900);
    text-align: right;
    white-space: nowrap;
    letter-spacing: -.03em;
}

.linecard__sub {
    font-size: 11px;
    color: var(--ink-400);
    text-align: right;
    font-family: var(--font-mono);
    margin-top: 1px;
}

.linecard__body {
    padding: 0 15px 14px 51px;
}

.metagrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px 20px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--ink-100);
}

.metagrid__k {
    font-size: 9px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--ink-400);
    font-weight: 700;
}

.metagrid__v {
    font-size: 12.5px;
    color: var(--ink-800);
    margin-top: 2px;
    font-weight: 500;
}

/* ---------- Bulk action bar ---------------------------------------------- */

.bulkbar {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    background: var(--ink-900);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 11px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    margin-top: 16px;
    flex-wrap: wrap;
}

.bulkbar__count {
    font-size: 13px;
    font-weight: 600;
}

.bulkbar__value {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #B7ABA0;
}

/* ---------- Auth pages ---------------------------------------------------- */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bone-50);
}

@media (max-width: 980px) { .auth { grid-template-columns: 1fr; } }

.auth__art {
    background: var(--ink-900);
    color: #EFE6DC;
    padding: 54px 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

@media (max-width: 980px) { .auth__art { display: none; } }

.auth__art::before {
    content: "";
    position: absolute;
    right: -180px;
    top: -140px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 40, 31, .30) 0%, transparent 62%);
}

.auth__quote {
    font-family: var(--font-display);
    font-size: 27px;
    line-height: 1.38;
    color: #fff;
    max-width: 17ch;
    position: relative;
}

.auth__quote em {
    font-style: normal;
    color: var(--crimson-500);
}

.auth__note {
    font-size: 12.5px;
    color: #9A8D82;
    line-height: 1.7;
    position: relative;
    max-width: 46ch;
}

.auth__form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth__inner {
    width: 100%;
    max-width: 390px;
}

.demo-users {
    margin-top: 22px;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    background: var(--paper);
    overflow: hidden;
}

.demo-users__head {
    padding: 9px 13px;
    background: var(--bone-100);
    border-bottom: 1px solid var(--ink-150);
    font-size: 9.5px;
    letter-spacing: .15em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ink-500);
}

.demo-user {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 13px;
    border: none;
    border-bottom: 1px solid var(--ink-100);
    background: var(--paper);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-sans);
}

.demo-user:last-child { border-bottom: none; }
.demo-user:hover { background: var(--bone-50); }

/* ---------- Modal --------------------------------------------------------- */

.modal-veil {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 13, .48);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 20px 20px;
    overflow-y: auto;
    animation: veil-in .14s ease;
}

@keyframes veil-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 660px;
    animation: modal-in .18s cubic-bezier(.2, .9, .3, 1);
    overflow: hidden;
}

.modal--wide { max-width: 920px; }
.modal--slim { max-width: 480px; }

@keyframes modal-in {
    from { opacity: 0; transform: translateY(-8px) scale(.99); }
    to { opacity: 1; transform: none; }
}

.modal__head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ink-100);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.modal__title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink-900);
}

.modal__hint {
    font-size: 12.5px;
    color: var(--ink-500);
    margin-top: 3px;
}

.modal__body {
    padding: 20px;
    max-height: 66vh;
    overflow-y: auto;
}

.modal__foot {
    padding: 14px 20px;
    border-top: 1px solid var(--ink-100);
    background: var(--bone-50);
    display: flex;
    gap: 9px;
    align-items: center;
}

/* ---------- Progress rail (workflow explainer) ---------------------------- */

.flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--paper);
}

@media (max-width: 940px) { .flow { grid-template-columns: 1fr; } }

.flow__step {
    padding: 16px 18px;
    border-right: 1px solid var(--ink-100);
    position: relative;
}

.flow__step:last-child { border-right: none; }

.flow__step.done { background: var(--moss-50); }
.flow__step.current { background: var(--crimson-50); }

.flow__n {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ink-150);
    color: var(--ink-600);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.flow__step.done .flow__n { background: var(--moss-600); color: #fff; }
.flow__step.current .flow__n { background: var(--crimson-600); color: #fff; }

.flow__title { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.flow__desc { font-size: 11.8px; color: var(--ink-500); margin-top: 3px; line-height: 1.5; }

/* ---------- Print --------------------------------------------------------- */

@media print {
    .rail, .topbar, .pagehead__actions, .bulkbar, .toasts { display: none !important; }
    .main { margin-left: 0; }
    .content { padding: 0; }
    .card { border-color: #ccc; box-shadow: none; }
}

/* =========================================================================
   Syncfusion overrides — keep the component library inside our palette.
   ========================================================================= */

.e-grid {
    border-color: var(--ink-150) !important;
    font-family: var(--font-sans) !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.e-grid .e-gridheader {
    border-color: var(--ink-150) !important;
    background: var(--bone-100) !important;
}

.e-grid .e-headercell,
.e-grid .e-detailheadercell {
    background: var(--bone-100) !important;
    border-color: var(--ink-150) !important;
    height: 38px;
}

.e-grid .e-headercelldiv {
    font-size: 9.5px !important;
    letter-spacing: .13em !important;
    text-transform: uppercase !important;
    color: var(--ink-500) !important;
    font-weight: 700 !important;
}

.e-grid .e-rowcell {
    font-size: 13px !important;
    color: var(--ink-700) !important;
    border-color: var(--ink-100) !important;
    padding: 9px 14px !important;
}

.e-grid .e-row:hover .e-rowcell {
    background: var(--bone-50) !important;
}

.e-grid .e-altrow .e-rowcell { background: transparent !important; }

.e-grid td.e-active,
.e-grid .e-selectionbackground {
    background: var(--crimson-50) !important;
    color: var(--ink-900) !important;
}

.e-grid .e-gridpager {
    border-color: var(--ink-150) !important;
    background: var(--bone-50) !important;
}

.e-pager .e-currentitem,
.e-pager .e-currentitem:hover {
    background: var(--crimson-600) !important;
    color: #fff !important;
}

.e-chart, .e-accumulationchart { font-family: var(--font-sans) !important; }

.e-btn.e-primary,
.e-css.e-btn.e-primary {
    background: var(--crimson-600) !important;
    border-color: var(--crimson-700) !important;
}

.e-btn.e-primary:hover { background: var(--crimson-700) !important; }

.e-input-group:not(.e-disabled):not(.e-float-icon-left):not(.e-success):not(.e-warning):not(.e-error).e-input-focus::before,
.e-input-group:not(.e-disabled):not(.e-float-icon-left):not(.e-success):not(.e-warning):not(.e-error).e-input-focus::after {
    background: var(--crimson-600) !important;
}

.e-dialog .e-dlg-header { font-family: var(--font-display) !important; color: var(--ink-900) !important; }
.e-tooltip-wrap.e-popup { background: var(--ink-900) !important; border-color: var(--ink-900) !important; }
.e-tooltip-wrap .e-tip-content { color: #F2EBE3 !important; font-family: var(--font-sans) !important; }
.e-tooltip-wrap .e-arrow-tip-inner.e-tip-top { color: var(--ink-900) !important; }

/* =========================================================================
   Identity page compatibility.
   Bootstrap is not loaded (its .card/.row/.grid/.modal/.btn rules fight the
   design system above). These rules cover the small set of Bootstrap class
   names still used by the scaffolded ASP.NET Identity pages.
   ========================================================================= */

.form-control,
.form-floating > .form-control {
    display: block;
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    padding: 9px 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--ink-900);
    transition: border-color .12s ease, box-shadow .12s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--crimson-600);
    box-shadow: 0 0 0 3px var(--crimson-50);
}

.form-label, .control-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-bottom: 5px;
}

.form-floating { margin-bottom: 14px; }
.form-floating > label { order: -1; }
.form-floating { display: flex; flex-direction: column; }

.btn:not([class*="btn--"]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--ink-200);
    background: var(--paper);
    color: var(--ink-700);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--crimson-600) !important;
    border-color: var(--crimson-700) !important;
    color: #fff !important;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--crimson-700) !important;
    color: #fff !important;
    text-decoration: none;
}

.btn-danger {
    background: var(--ink-900) !important;
    border-color: #000 !important;
    color: #fff !important;
}

.btn-link {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--crimson-600) !important;
    height: auto;
}

.btn-lg { height: 40px; font-size: 14px; padding: 0 20px; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.mb-3 { margin-bottom: 14px; }
.font-weight-bold { font-weight: 700; }
.flex-column { flex-direction: column; }

.text-danger { color: var(--crimson-600) !important; }
.text-info { color: var(--petrol-600) !important; }
.text-success { color: var(--moss-700) !important; }

.alert {
    border-radius: var(--radius);
    padding: 12px 15px;
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 3px solid var(--ink-300);
    background: var(--bone-100);
    color: var(--ink-700);
}

.alert-danger { border-color: var(--crimson-600); background: var(--crimson-50); color: var(--crimson-700); }
.alert-warning { border-color: var(--brass-600); background: var(--brass-50); color: var(--brass-700); }
.alert-info { border-color: var(--petrol-600); background: var(--petrol-50); color: var(--petrol-700); }

.nav { display: flex; list-style: none; padding: 0; margin: 0 0 16px; gap: 2px; }
.nav-pills.flex-column { flex-direction: column; gap: 1px; }

.nav-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--ink-600);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
}

.nav-link:hover { background: var(--bone-100); color: var(--ink-900); text-decoration: none; }
.nav-link.active { background: var(--crimson-50); color: var(--crimson-700); font-weight: 600; }

.checkbox { margin-bottom: 14px; }
.checkbox input[type="checkbox"] { accent-color: var(--crimson-600); margin-right: 7px; }

table:not(.dt) { width: 100%; border-collapse: collapse; font-size: 13px; }
table:not(.dt) th, table:not(.dt) td { padding: 9px 12px; border-bottom: 1px solid var(--ink-100); text-align: left; }

.recovery-code { font-family: var(--font-mono); font-size: 13px; }

.validation-message, .invalid-feedback {
    display: block;
    color: var(--crimson-600);
    font-size: 12px;
    margin-top: 4px;
}

.invalid input, input.invalid, .input.invalid, .form-control.invalid {
    border-color: var(--crimson-500) !important;
}

/* Identity pages render inside the app shell — give them breathing room. */
.content > h1:first-child, .content > h2:first-child { margin-bottom: 14px; }
.content h2 { font-size: 18px; margin: 20px 0 10px; }
.content h3 { font-size: 15px; margin: 16px 0 8px; }
.content hr { border: 0; border-top: 1px solid var(--ink-100); margin: 16px 0; }

#blazor-error-ui {
    color-scheme: light;
    background: var(--ink-900);
    color: #F2EBE3;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, .3);
    display: none;
    left: 0;
    padding: 12px 18px 12px 22px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 13px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 14px;
    top: 10px;
    color: var(--crimson-500);
}
