html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ── Shared Finance report print styles (used by report pages + ReportToolbar) ── */
.no-print { }
@media print {
    .mud-appbar, .mud-drawer, .mud-nav-menu, .no-print { display: none !important; }
    .mud-main-content { margin: 0 !important; padding: 0 !important; }
    body { background: #fff !important; }
    .mud-paper { box-shadow: none !important; }
    .mud-table-container { height: auto !important; max-height: none !important; overflow: visible !important; }
    .mud-table-root { overflow: visible !important; }
    table { page-break-inside: auto; width: 100%; }
    tr { page-break-inside: avoid; page-break-after: auto; }
    thead { display: table-header-group; }
    td, th { word-break: break-word; overflow-wrap: break-word; }
    @page { size: A4 landscape; margin: 10mm; }
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.btn-unified {
    height: 36px !important;
    min-height: 36px !important;
    text-transform: none !important;
    font-weight: 500 !important;
    letter-spacing: normal !important;
}
.btn-create {
    background-color: #007bff !important;
    color: #ffffff !important;
}
.btn-create:hover { background-color: #0069d9 !important; }
.btn-save {
    background-color: #28a745 !important;
    color: #ffffff !important;
}
.btn-save:hover { background-color: #218838 !important; }
.btn-update {
    background-color: #90ee90 !important;
    color: #333333 !important;
}
.btn-update:hover { background-color: #7fdc7f !important; }
.btn-cancel {
    background-color: #000000 !important;
    color: #ffffff !important;
}
.btn-cancel:hover { background-color: #1a1a1a !important; }
.icon-btn-unified {
    height: 36px !important;
    width: 36px !important;
    min-height: 36px !important;
    min-width: 36px !important;
    padding: 6px !important;
}
/* Standard search field height alignment + spec light-blue adornment */
.mud-input-control.search-unified,
.search-unified .mud-input-control,
.search-unified .mud-input-slot,
.search-unified input.mud-input-root {
    height: 36px !important;
    min-height: 36px !important;
}
/* Selects on the same 36px baseline as .btn-unified / .search-unified. Without this a
   Margin.Dense MudSelect renders taller than the buttons beside it and the filter row
   ends up visibly ragged. */
.mud-input-control.select-unified,
.select-unified .mud-input-control,
.select-unified .mud-input-slot,
.select-unified .mud-select-input,
.select-unified input.mud-input-root {
    height: 36px !important;
    min-height: 36px !important;
}
.select-unified .mud-input-slot {
    display: flex !important;
    align-items: center !important;
}

/* A filter row: every control on one baseline, the search box taking up the slack and
   the action button never shrinking. */
.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.filter-row > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Page header: the title block and its action buttons share one baseline. */
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.page-header-actions > .mud-button-root { flex-shrink: 0; }

.search-unified .mud-input-adornment .mud-icon-root,
.search-unified .mud-input-adornment-start .mud-icon-root,
.search-unified .mud-input-adornment-end .mud-icon-root {
    color: #add8e6 !important;
}

/* ════════════════════════════════════════════════════════════════════════
   My Day Command Center — global right drawer, /my-day page, and the
   Workflow Performance dashboard. Local CSS only (no Tailwind CDN).
   Inputs capped at 38px (≤40px rule). Scroll regions overflow-y; sticky
   footers so action buttons always fit inside the frame without overlap.
   ════════════════════════════════════════════════════════════════════════ */

/* Tailwind-mimic inputs (incl. the date/time control, dd-MM-yyyy HH:mm) */
.tw-input {
    height: 38px;
    max-height: 38px;
    box-sizing: border-box;
    width: 100%;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tw-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.tw-input::placeholder { color: #9ca3af; }
.tw-datetime, .tw-date { letter-spacing: .3px; }

/* Cap MudBlazor inputs inside My Day surfaces at 40px (≤40px rule) */
.myday-panel .mud-input-control,
.myday-page .mud-input-control,
.myday-panel .mud-input-slot,
.myday-page .mud-input-slot { min-height: 40px !important; }

/* ── Drawer panel shell ── */
.myday-drawer .mud-drawer-content { height: 100%; }
.myday-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.myday-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid #eef0f2;
    flex-shrink: 0;
}
.myday-ring { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.myday-ring .mud-progress-circular { width: 56px !important; height: 56px !important; }
.myday-ring-label {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: #374151;
}
.myday-header-text { flex: 1; min-width: 0; }
.myday-title { font-size: 1.05rem; font-weight: 700; color: #111827; line-height: 1.1; }
.myday-title-lg { font-size: 1.4rem; }
.myday-date { font-size: 0.8rem; color: #6b7280; }
.myday-sub { font-size: 0.75rem; color: #9ca3af; margin-top: 2px; }
.myday-close { flex-shrink: 0; }

/* ── Segmented toggle (Guidelines / Ad-hoc) ── */
.myday-seg {
    display: flex; gap: 6px; padding: 10px 14px; flex-shrink: 0;
}
.myday-seg-wide { flex-wrap: wrap; }
.myday-seg-btn {
    flex: 1; min-width: 72px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 32px; padding: 0 10px;
    font-size: 0.8rem; font-weight: 600; color: #4b5563;
    background: #f3f4f6; border: 1px solid transparent; border-radius: 6px;
    cursor: pointer; transition: all .15s ease;
}
.myday-seg-btn:hover { background: #e5e7eb; }
.myday-seg-btn.active { background: #2563eb; color: #fff; }
.myday-seg-count {
    font-size: 0.7rem; font-weight: 700;
    background: rgba(0,0,0,0.08); border-radius: 10px; padding: 1px 6px;
}
.myday-seg-btn.active .myday-seg-count { background: rgba(255,255,255,0.25); }

/* ── Quick add (drawer) ── */
.myday-quickadd { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; flex-shrink: 0; }

/* ── Scroll regions (vertical scroll on overflow) ── */
.myday-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 10px 10px; }
.myday-empty { padding: 28px 16px; text-align: center; color: #9ca3af; font-size: 0.85rem; }

/* ── Task rows ── */
.myday-task {
    display: flex; align-items: flex-start; gap: 6px;
    padding: 8px 6px; border-bottom: 1px solid #f1f3f5;
}
.myday-task-lg { padding: 12px 8px; }
.myday-task.done .myday-task-title { text-decoration: line-through; color: #9ca3af; }
.myday-task.dismissed { opacity: 0.55; }
.myday-check { margin-top: -4px; }
.myday-task-main { flex: 1; min-width: 0; cursor: pointer; }
.myday-task-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.88rem; font-weight: 600; color: #1f2937;
}
.myday-prio { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.myday-prio-1 { background: #ef4444; }
.myday-prio-2 { background: #f59e0b; }
.myday-prio-3 { background: #9ca3af; }
.myday-task-desc { font-size: 0.78rem; color: #6b7280; margin-top: 2px; line-height: 1.25; }
.myday-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.myday-chip {
    font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
    padding: 1px 6px; border-radius: 4px; letter-spacing: .3px;
}
.myday-chip-SystemDriven { background: #dbeafe; color: #1e40af; }
.myday-chip-Guideline { background: #ede9fe; color: #5b21b6; }
.myday-chip-AdHoc { background: #f3f4f6; color: #374151; }
.myday-chip-module { font-size: 0.66rem; color: #6b7280; background: #f9fafb; border: 1px solid #eef0f2; border-radius: 4px; padding: 1px 6px; }
.myday-status { font-size: 0.66rem; color: #9ca3af; }
.myday-due { font-size: 0.7rem; color: #b45309; }
.myday-task-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

/* ── Sticky footer (always inside frame, no overlap) ── */
.myday-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 14px; border-top: 1px solid #eef0f2; background: #fff;
    position: sticky; bottom: 0; flex-shrink: 0;
}

/* ── /my-day full page ── */
.myday-page {
    display: flex; flex-direction: column;
    min-height: calc(100vh - 150px);
}
.myday-page-head { display: flex; align-items: center; gap: 16px; padding: 4px 0 14px; }
.myday-page-head .myday-ring, .myday-page-head .myday-ring .mud-progress-circular { width: 64px !important; height: 64px !important; }
.myday-head-actions { margin-left: auto; }
.myday-addbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 12px; margin-bottom: 10px;
    background: #f9fafb; border: 1px solid #eef0f2; border-radius: 8px;
}
.myday-add-title { flex: 2 1 200px; }
.myday-add-desc { flex: 3 1 240px; }
.myday-add-prio { flex: 0 0 110px; }
.myday-add-due { flex: 0 0 170px; }
.myday-page-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; }
.myday-footer-page { border-top: 1px solid #eef0f2; }

/* ── Template manager ── */
.myday-tpl-add { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.myday-tpl-add .tw-input { flex: 1 1 160px; }
.myday-tpl-table, .myday-perf-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.myday-tpl-table th, .myday-tpl-table td,
.myday-perf-table th, .myday-perf-table td {
    text-align: left; padding: 8px 10px; border-bottom: 1px solid #f1f3f5;
}
.myday-tpl-table th, .myday-perf-table th { color: #6b7280; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; }

/* ── Workflow Performance dashboard ── */
.myday-filterbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 12px; margin-bottom: 12px;
    background: #f9fafb; border: 1px solid #eef0f2; border-radius: 8px;
    position: sticky; top: 0; z-index: 2;
}
.myday-flabel { font-size: 0.78rem; font-weight: 600; color: #4b5563; }
.myday-f-date { flex: 0 0 150px; }
.myday-f-group { flex: 0 0 150px; }
.myday-chart-title { font-size: 0.9rem; font-weight: 700; color: #374151; margin-bottom: 8px; }
.myday-perf-table td.myday-overdue { color: #dc2626; font-weight: 700; }
.myday-bar { position: relative; height: 16px; background: #f1f3f5; border-radius: 8px; overflow: hidden; min-width: 90px; }
.myday-bar-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2563eb, #3b82f6); }
.myday-bar-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; color: #1f2937; }

/* ── Financial Periods page ── */
.fp-createbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 8px; }
.fp-createbar .tw-input { width: 190px; }
.fp-label { display: block; font-size: 0.75rem; font-weight: 600; color: #4b5563; margin-bottom: 2px; }
.fp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.fp-form-full { grid-column: 1 / -1; }

/* Deferred Revenue summary cards */
.dr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.dr-card { background: #fff; border: 1px solid #eef0f2; border-radius: 8px; padding: 12px 14px; }
.dr-card-warn { border-color: #f59e0b; background: #fffbeb; }
.dr-card-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: #6b7280; letter-spacing: .3px; }
.dr-card-value { font-size: 1.25rem; font-weight: 700; color: #111827; margin-top: 4px; }

/* Year-End Closing wizard */
.yec-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.yec-steps li { font-size: 0.78rem; padding: 4px 10px; border-radius: 14px; background: #f3f4f6; color: #6b7280; }
.yec-steps li.done { background: #dcfce7; color: #166534; }
.yec-steps li.current { background: #2563eb; color: #fff; font-weight: 600; }
.yec-figures { display: flex; gap: 24px; flex-wrap: wrap; }
.yec-figures div { display: flex; flex-direction: column; }
.yec-figures span { font-size: 0.72rem; color: #6b7280; text-transform: uppercase; }
.yec-figures b { font-size: 1.05rem; color: #111827; }
.yec-var-bad { color: #dc2626; font-weight: 700; }

/* ── Standard native date control (TbDateInput) ────────────────────────────
   Mirrors the Cash & Bank voucher .cbv-input look so every date field across
   the app is the native <input type="date"> (typeable + browser calendar that
   auto-positions up/down). See Platform/Truebooks.Shared.UI/Components/TbDateInput.razor */
.tb-date-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.25rem;
}
.tb-date-required { color: #dc2626; margin-left: 2px; }
.tb-date-native {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 0.4rem 0.65rem;
    border-radius: 0.375rem;
    font-size: 0.813rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    color: #1e293b;
    min-height: 32px;
}
.tb-date-native:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.18);
}
.tb-date-native:disabled,
.tb-date-native[readonly] {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}
.tb-date-native.tb-date-error { border-color: #dc2626; }
.tb-date-error-text { font-size: 0.7rem; color: #dc2626; margin-top: 0.2rem; }
.tb-date-helper { font-size: 0.7rem; color: #94a3b8; margin-top: 0.2rem; }

/* ============================================================================
   Registry (AP/AR list) styling — ported from MultiModule (app.css "apl-*"
   block + registry-list.css) so the Debit Note / Credit Note pages render
   identically to their MultiModule counterparts.
   Opt a page in with:
     - "apl-wrap"          page shell
     - "apl-card apl-grid reg-grid"  the data-grid container
     - "action-icons-wrap" each row's action-button container
   ============================================================================ */

/* MultiModule sizes registry grids from its system type scale. Ecommerce has no
   such token, so define the one step these rules need. */
:root { --fs-sm: 0.78rem; }

.apl-wrap { max-width:1480px; margin:12px auto 36px; padding:0 18px; color:#0f172a; }

.apl-pghead { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.apl-eyebrow { font-size:0.7rem; font-weight:600; color:#2563eb; letter-spacing:0.08em; text-transform:uppercase; }
.apl-title { font-size:1.4rem; font-weight:600; letter-spacing:-0.01em; margin-top:2px; color:#0f172a; }
.apl-sub { font-size:0.78rem; color:#64748b; margin-top:2px; }
.apl-headbtns { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.apl-headbtns .mud-button-root { text-transform:none; font-weight:600; border-radius:10px; padding:6px 14px; font-size:0.78rem; }
.apl-headbtns .mud-button-root .mud-icon-root { font-size: 1rem; }
.apl-headbtns .mud-button-root .mud-button-icon-start { margin-right: 6px; }

.apl-card { background:#fff; border:1px solid #e2e8f0; border-radius:16px; box-shadow:0 1px 2px rgba(0,0,0,0.04); }

.apl-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:12px; }
.apl-kpi { position:relative; background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:12px 14px 12px 18px; box-shadow:0 1px 2px rgba(0,0,0,0.04); }
.apl-kpi::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:#94a3b8; }
.apl-kpi .apl-k-l { font-size:0.6rem; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; color:#64748b; }
.apl-kpi .apl-k-v { font-size:1.08rem; font-weight:600; line-height:1.1; margin-top:4px; color:#0f172a; font-variant-numeric:tabular-nums; }
.apl-kpi .apl-k-s { font-size:0.58rem; color:#94a3b8; margin-top:4px; }
.apl-k-blue::before{ background:#6366f1;} .apl-k-blue .apl-k-l{ color:#4f46e5;}
.apl-k-amber::before{ background:#f59e0b;} .apl-k-amber .apl-k-l{ color:#b45309;}
.apl-k-rose::before{ background:#ef4444;} .apl-k-rose .apl-k-l{ color:#be123c;}
.apl-k-green::before{ background:#10b981;} .apl-k-green .apl-k-l{ color:#15803d;}
.apl-k-gray::before{ background:#94a3b8;} .apl-k-gray .apl-k-l{ color:#64748b;}

.apl-filter { margin-bottom:16px; overflow:hidden; }
.apl-fhead { display:flex; align-items:center; gap:11px; padding:10px 16px; }
.apl-fac { width:4px; height:20px; border-radius:2px; background:#2563eb; }
.apl-ftitle { font-size:0.82rem; font-weight:600; color:#0f172a; }
.apl-fbody { padding:10px 16px 12px; border-top:1px solid #f1f5f9; }
.apl-fbody .mud-input-control, .apl-fbody .mud-form-control { margin:0 !important; }
.apl-fbody .mud-input-outlined fieldset { border-color:#e2e8f0 !important; border-radius:10px !important; }
.apl-fbody .mud-input-outlined:focus-within fieldset { border-color:#2563eb !important; }

.apl-tcap { padding:10px 16px; border-bottom:1px solid #f1f5f9; display:flex; align-items:center; gap:9px; }
.apl-dot { width:9px; height:9px; border-radius:50%; background:#2563eb; }
.apl-tcap h2 { font-size:0.78rem; font-weight:600; text-transform:uppercase; letter-spacing:0.03em; margin:0; color:#0f172a; }
.apl-count { margin-left:auto; font-size:0.62rem; font-weight:600; color:#64748b; background:#f1f5f9; border-radius:9999px; padding:2px 10px; }

.apl-grid { overflow:hidden; }
.apl-grid table { border-collapse:separate; border-spacing:0; }
.apl-grid thead th, .apl-grid .mud-table-head th {
    background:#f8fafc !important; color:#64748b !important; font-size:0.6rem !important; font-weight:600 !important;
    text-transform:uppercase; letter-spacing:0.04em; border-bottom:1px solid #e2e8f0 !important;
    border-left:none !important; border-right:none !important; padding:7px 12px !important; }
.apl-grid tbody td, .apl-grid .mud-table-row td {
    border-left:none !important; border-right:none !important; border-bottom:1px solid #f1f5f9 !important;
    padding:7px 12px !important; font-size:0.78rem; color:#0f172a; }
.apl-grid tbody tr:hover td, .apl-grid .mud-table-row:hover td { background:#f8fafc !important; }
.apl-money { text-align:right; font-variant-numeric:tabular-nums; font-weight:600; }
.apl-link { color:#2563eb; font-weight:600; cursor:pointer; text-decoration:none; }
.apl-link:hover { text-decoration:underline; }

.apl-foot { padding:12px 20px; background:#f8fafc; border-top:1px solid #f1f5f9; display:flex;
    justify-content:space-between; gap:10px; font-size:0.72rem; color:#94a3b8; flex-wrap:wrap; }

/* --- Per-row action buttons: left-aligned, exactly 3 icons per row --------- */
.action-icons-wrap {
    display: grid !important;
    grid-template-columns: repeat(3, max-content) !important;
    gap: 2px 4px !important;
    justify-content: start !important;
    justify-items: start !important;
    align-items: center;
}

/* --- Uniform grid typography ---------------------------------------------- */
.reg-grid td,
.reg-grid .mud-table-cell { font-size: var(--fs-sm) !important; font-weight: 400 !important; }
.reg-grid th { font-size: var(--fs-sm) !important; font-weight: 700 !important; }
.reg-grid td span,
.reg-grid td a,
.reg-grid td p,
.reg-grid td div,
.reg-grid td small,
.reg-grid td strong,
.reg-grid td b,
.reg-grid td label { font-size: var(--fs-sm) !important; font-weight: 400 !important; }
.reg-grid th span,
.reg-grid th a,
.reg-grid th .mud-table-sort-label { font-size: var(--fs-sm) !important; font-weight: 700 !important; }
