/* .fi-sidebar .fi-sidebar-item {
    animation: item 0.25s linear;
} */



/* .fi-header-heading {
    animation: textani 0.35s ease-in;

} */

.fi-section-header-heading {
    color: #000 !important;
}

.fi-page {
    animation: textani 0.35s ease-in;

}

/* Ensure user name shows next to avatar in topbar */
.fi-user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.fi-user-menu-name {
    display: inline-block;
    white-space: nowrap;
    color: #ffffff;
}

.fi-breadcrumbs {
    display: none !important;
}

.fi-resource-p-o-s-pages .fi-header-heading {
    display: none !important;
}

@keyframes item {

    0% {
        visibility: hidden;
        opacity: 10%;
        transform: translateX(0.2rem);

    }

    100% {


        visibility: visible;
        opacity: 100%;
        transform: translateX(0rem);


    }
}

@keyframes textani {

    0% {
        visibility: hidden;
        opacity: 10%;
        transform: translateY(1rem);

    }

    100% {


        visibility: visible;
        opacity: 100%;
        transform: translateY(0rem);


    }
}

/* ═══════════════════════════════════════════════════════════════
   Gold ATM — machine visual, slots, cassettes (scoped: .atm-*)
   ═══════════════════════════════════════════════════════════════ */

.atm-machine-visual {
    max-width: 100%;
}

.atm-machine-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 26px;
    color: #1f2937;
    background: linear-gradient(180deg, #ffffff 0%, #fdfdfe 60%, #f9fafb 100%);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 32px -16px rgba(15, 23, 42, 0.18);
    border: 1px solid #e8ecf1;
}

.atm-machine-frame::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #cc3333 18%, #960000 50%, #cc3333 82%, transparent);
    opacity: 0.85;
}

.atm-machine-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f4f7;
}

.atm-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 9999px;
    padding: 8px 16px;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.18em;
    font-size: 12.5px;
    background: linear-gradient(135deg, #b31212, #960000);
    box-shadow: 0 8px 18px -8px rgba(150, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.atm-brand-ico {
    width: 26px;
    height: 26px;
    color: #ffffff;
    filter: none;
}

.atm-screen {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 9999px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e8ecf1;
    font-size: 13px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.04em;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), inset 0 1px 0 #ffffff;
}

.atm-screen-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #10b981;
    animation: atm-pulse 1.8s ease-in-out infinite;
}

.atm-screen-sep {
    color: #6b7280;
}

@keyframes atm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.atm-slot-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc, #f4f6f8);
    border: 1px solid #eef1f5;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.04);
}

@media (max-width: 640px) {
    .atm-slot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.atm-slot {
    border-radius: 14px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e8ecf1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.atm-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -14px rgba(15, 23, 42, 0.22);
    border-color: #d7dde5;
}

.atm-slot-success {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(180deg, #f4fdfa, #ffffff 55%);
}

.atm-slot-danger {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(180deg, #fef5f5, #ffffff 55%);
}

.atm-slot-warning {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(180deg, #fffbeb, #ffffff 55%);
}

.atm-slot-big {
    border-width: 2px;
    border-color: #cc3333;
    box-shadow: 0 0 0 3px rgba(204, 51, 51, 0.12);
}

.atm-slot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.atm-slot-idx {
    font-size: 13px;
    font-weight: 900;
    color: #cc3333;
}

.atm-slot-size {
    border-radius: 9999px;
    padding: 2px 9px;
    font-size: 10px;
    font-weight: 800;
    color: #7c2d12;
    background: linear-gradient(150deg, #fde68a, #fbbf24);
    box-shadow: 0 1px 3px rgba(146, 64, 14, 0.2);
}

.atm-slot-body {
    margin-top: 9px;
}

.atm-slot-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
}

.atm-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
}

.atm-dot-success { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.atm-dot-danger  { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }
.atm-dot-warning { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.atm-dot-empty   { background: #cbd5e1; }

.atm-slot-cassette {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #e5e7eb;
}

.atm-cs {
    font-size: 11px;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #1d4ed8;
}

.atm-cs-none { color: #9ca3af; }
.atm-qty { font-size: 11px; color: #9ca3af; }
.atm-reject { font-size: 11px; font-weight: 700; color: #64748b; }

/* ── Stock bar (glow per cassette) ── */
.atm-stockbar {
    height: 7px;
    border-radius: 9999px;
    background: #eef1f5;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-top: 10px;
}

.atm-stockbar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.atm-stockbar-ok      { background: linear-gradient(90deg, #10b981, #34d399); }
.atm-stockbar-low     { background: linear-gradient(90deg, #f59e0b, #facc15); }
.atm-stockbar-out     { background: linear-gradient(90deg, #ef4444, #f87171); }

.atm-stockbar-legend {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 6px;
}

.atm-qty-big {
    font-size: 18px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    line-height: 1;
}

.atm-qty-sub {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
}

/* ── Summary bar (ເບິ່ງແລ້ວຮູ້ລວມ) ── */
.atm-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 16px;
}

/* ຍອດຄຳທັງໝົດ — pill ແບບດຽວກັບ badge ຫົວຕູ້ (ບໍ່ມີ icon) */
.atm-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 9999px;
    padding: 9px 18px;
    background: #ffffff;
    border: 1px solid #e8ecf1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), inset 0 1px 0 #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #374151;
}

.atm-summary-lbl {
    color: #960000;
    font-weight: 800;
}

.atm-summary-sep {
    color: #6b7280;
}

.atm-summary-num {
    font-size: 16px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #960000;
}

.atm-summary-unit {
    color: #6b7280;
}

.atm-summary-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.atm-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 9999px;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 800;
    background: #ffffff;
    border: 1px solid #e8ecf1;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, background 0.15s ease;
}

.atm-chip:hover {
    transform: translateY(-1px);
    background: #f8fafc;
}

.atm-chip-branch {
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.25);
    background: rgba(59, 130, 246, 0.08);
}

.atm-chip-green .atm-chip-dot { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.9); }
.atm-chip-red   .atm-chip-dot { background: #f87171; box-shadow: 0 0 8px rgba(248, 113, 113, 0.9); }
.atm-chip-gray  .atm-chip-dot { background: #9ca3af; }

.atm-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    flex: none;
}

/* The no-slots message; slot cards with no cassette also carry .atm-slot-empty. */
.atm-slot-empty:not(.atm-slot) {
    grid-column: 1 / -1;
    text-align: center;
    padding: 44px 20px;
    color: #9ca3af;
}

.atm-empty-ico {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    padding: 12px;
    border-radius: 18px;
    background: #fdf2f2;
    color: #cc3333;
    box-shadow: 0 6px 14px -8px rgba(150, 0, 0, 0.35);
}

.atm-empty-title {
    font-size: 16px;
    font-weight: 800;
    color: #374151;
}

.atm-empty-sub {
    margin-top: 4px;
    font-size: 12.5px;
    max-width: 420px;
    margin-inline: auto;
}

.atm-machine-foot {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.atm-stat {
    border-radius: 16px;
    padding: 12px 12px;
    background: #ffffff;
    border: 1px solid #e8ecf1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.atm-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -12px rgba(15, 23, 42, 0.18);
}

.atm-stat-num {
    display: block;
    font-size: 20px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #960000;
}

.atm-stat-green .atm-stat-num { color: #059669; }
.atm-stat-gray .atm-stat-num { color: #6b7280; }

.atm-stat-lbl {
    display: block;
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.atm-stat-fill { display: flex; flex-direction: column; justify-content: center; }

.atm-minibar {
    height: 7px;
    border-radius: 9999px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 6px;
}

.atm-minibar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #b31212, #cc3333);
}

/* ── cassette cards (cassette-resource) ── */

.atm-cassette-card {
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

html.dark .atm-cassette-card {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.1);
}

.atm-cassette-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -14px rgba(15, 23, 42, 0.25);
}

.atm-cassette-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #960000, #7a0000);
    border-bottom: 1px solid #7a0000;
}

html.dark .atm-cassette-head {
    background: linear-gradient(135deg, #7a0000, #5c0000);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.atm-cassette-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: #7a0000;
    background: #fff;
    box-shadow: 0 3px 8px -2px rgba(122, 0, 0, 0.35);
}

.atm-cassette-ico svg { width: 18px; height: 18px; }

.atm-cassette-code {
    font-size: 14.5px;
    font-weight: 900;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.04em;
    color: #ffffff;
    flex: 1;
}

html.dark .atm-cassette-code { color: #f3f4f6; }

.atm-cassette-status {
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
}

.atm-cs-badge-success { color: #960000; background: #f8d7d7; }
.atm-cs-badge-gray    { color: #475569; background: #f1f5f9; }
.atm-cs-badge-warning { color: #7a0000; background: #fbe3e3; }

html.dark .atm-cs-badge-success { color: #34d399; background: rgba(16, 185, 129, 0.15); }
html.dark .atm-cs-badge-gray    { color: #9ca3af; background: rgba(255, 255, 255, 0.08); }
html.dark .atm-cs-badge-warning { color: #cc3333; background: rgba(179, 18, 18, 0.15); }

.atm-cassette-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #f3f4f6;
}

html.dark .atm-cassette-body { background: rgba(255, 255, 255, 0.07); }

.atm-cassette-cell {
    padding: 13px 15px;
    background: #fff;
}

html.dark .atm-cassette-cell { background: #111827; }

.atm-cassette-lbl {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #9ca3af;
}

.atm-cassette-val {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    font-weight: 900;
    color: #111827;
}

html.dark .atm-cassette-val { color: #f9fafb; }

.atm-cassette-val small { font-size: 11px; font-weight: 700; color: #9ca3af; }
.atm-cassette-dim { color: #cbd5e1; font-weight: 700; }
.atm-cassette-bag { color: #0f766e; }

/* ── release history timeline (view cassette) ── */

.atm-rel-wrap { margin-top: 2px; }

.atm-rel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 34px 20px;
    border: 1.5px dashed #e5e7eb;
    border-radius: 14px;
    text-align: center;
}

html.dark .atm-rel-empty { border-color: rgba(255, 255, 255, 0.12); }

.atm-rel-empty-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border-radius: 14px;
    color: #b91c1c;
    background: #fef2f2;
}

html.dark .atm-rel-empty-ico { color: #f87171; background: rgba(185, 28, 28, 0.12); }

.atm-rel-empty-ico svg { width: 22px; height: 22px; }

.atm-rel-empty-title { font-size: 13.5px; font-weight: 800; color: #374151; }
html.dark .atm-rel-empty-title { color: #e5e7eb; }

.atm-rel-empty-hint { max-width: 420px; font-size: 12px; font-weight: 500; color: #9ca3af; }

.atm-rel-tl {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 30px;
}

.atm-rel-tl::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, #fecaca, #f1f5f9 30%, #f1f5f9);
}

html.dark .atm-rel-tl::before {
    background: linear-gradient(180deg, rgba(185, 28, 28, 0.45), rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.08));
}

.atm-rel-event { position: relative; }

.atm-rel-dot {
    position: absolute;
    left: -30px;
    top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    color: #fff;
    background: linear-gradient(135deg, #b31212, #7a0000);
    box-shadow: 0 0 0 3px #fef2f2, 0 3px 8px -2px rgba(122, 0, 0, 0.45);
}

html.dark .atm-rel-dot { box-shadow: 0 0 0 3px #111827, 0 3px 8px -2px rgba(0, 0, 0, 0.5); }

.atm-rel-dot svg { width: 11px; height: 11px; }

.atm-rel-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

html.dark .atm-rel-card { background: #111827; border-color: rgba(255, 255, 255, 0.1); }

.atm-rel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #fef2f2, #fff8f8);
    border-bottom: 1px solid #fde5e5;
}

html.dark .atm-rel-head { background: rgba(185, 28, 28, 0.08); border-bottom-color: rgba(255, 255, 255, 0.08); }

.atm-rel-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    color: #960000;
    background: #fff;
    border: 1px solid #f5c6c6;
}

html.dark .atm-rel-count { color: #f87171; background: rgba(255, 255, 255, 0.06); border-color: rgba(185, 28, 28, 0.4); }

.atm-rel-count svg { width: 11px; height: 11px; }
.atm-rel-count b { font-weight: 900; }

.atm-rel-count--empty { color: #64748b; border-color: #e2e8f0; }
html.dark .atm-rel-count--empty { color: #9ca3af; border-color: rgba(255, 255, 255, 0.12); }

.atm-rel-when {
    font-size: 12px;
    font-weight: 800;
    color: #7a0000;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.02em;
}

html.dark .atm-rel-when { color: #fca5a5; }

.atm-rel-machine {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}

html.dark .atm-rel-machine { color: #9ca3af; }
.atm-rel-machine svg { width: 12px; height: 12px; }

.atm-rel-serials { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }

.atm-rel-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border: 1px solid #f0d5d5;
    border-radius: 10px;
    background: #fdf7f7;
}

html.dark .atm-rel-chip { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }

.atm-rel-chip-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: #7a0000;
    background: #fbe3e3;
}

html.dark .atm-rel-chip-ico { color: #cc3333; background: rgba(179, 18, 18, 0.18); }
.atm-rel-chip-ico svg { width: 14px; height: 14px; }

.atm-rel-chip-info { display: flex; flex-direction: column; line-height: 1.25; }

.atm-rel-name { font-size: 12px; font-weight: 800; color: #111827; }
html.dark .atm-rel-name { color: #f3f4f6; }

.atm-rel-code {
    font-size: 10.5px;
    font-weight: 600;
    color: #b91c1c;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.03em;
}

html.dark .atm-rel-code { color: #f87171; }

.atm-rel-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 9px 14px 11px;
    font-size: 11.5px;
    font-weight: 600;
    color: #6b7280;
}

html.dark .atm-rel-note { color: #9ca3af; }

.atm-rel-note svg { flex: none; width: 13px; height: 13px; margin-top: 1px; }

.atm-rel-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
}

html.dark .atm-rel-legend { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.25); color: #fbbf24; }

.atm-rel-legend-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* ── slot entry preview (wizard summary cards) ── */

.atm-entry-preview {
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

html.dark .atm-entry-preview {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.atm-entry-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 9999px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 800;
    color: #7a0000;
    background: #fdf4f4;
    border: 1px solid #f2c4c4;
}

html.dark .atm-entry-badge {
    color: #cc3333;
    background: rgba(179, 18, 18, 0.12);
    border-color: rgba(179, 18, 18, 0.25);
}

.atm-entry-badge-big {
    color: #fff;
    background: linear-gradient(135deg, #b31212, #960000);
    border-color: transparent;
}

.atm-entry-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.atm-entry-unit {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

html.dark .atm-entry-unit { color: #d1d5db; }

.atm-entry-unit b { font-weight: 800; }
.atm-entry-cs b { color: #0f766e; }
.atm-entry-rj b { color: #b91c1c; }

html.dark .atm-entry-cs b { color: #34d399; }
html.dark .atm-entry-rj b { color: #f87171; }

.atm-entry-arrow {
    color: #9ca3af;
    font-weight: 800;
}

/* ATM create page — 2-column layout: override Filament's max-w-7xl on <main> */
main:has(.fi-resource-atm-machines.fi-resource-create-record-page) {
    max-width: 100% !important;
}

.fi-resource-atm-machines .atm-machine-frame {
    max-width: 100%;
}

/* ATM view page — full-bleed + compact so every slot fits without scrolling */
main:has(.fi-resource-atm-machines.fi-resource-view-record-page) {
    max-width: 100% !important;
}

.fi-resource-atm-machines.fi-resource-view-record-page .atm-machine-frame {
    padding: 18px 22px;
}

.fi-resource-atm-machines.fi-resource-view-record-page .atm-machine-top {
    margin-bottom: 14px;
}

.fi-resource-atm-machines.fi-resource-view-record-page .atm-slot-grid {
    gap: 10px;
    padding: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fi-resource-atm-machines.fi-resource-view-record-page .atm-slot {
    padding: 9px 11px;
}

.fi-resource-atm-machines.fi-resource-view-record-page .atm-machine-foot {
    margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   ATM settings page — premium card layout (hero → cards → grid)
   ═══════════════════════════════════════════════════════════════ */

main:has(.fi-atm-settings-page) {
    max-width: 100% !important;
}

.fi-atm-settings-page .atmcs {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-family: 'Noto Sans Lao', sans-serif;
}

/* ── Cards (shared shell) ── */
.fi-atm-settings-page .atmcs-card {
    background: #ffffff;
    border: 1px solid #f0d5d5;
    border-radius: 16px;
    box-shadow: 0 18px 40px -28px rgba(120, 20, 20, 0.35);
    overflow: hidden;
}

html.dark .fi-atm-settings-page .atmcs-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.fi-atm-settings-page .atmcs-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(150, 0, 0, 0.06), rgba(150, 0, 0, 0.02));
    border-bottom: 1px solid #f0d5d5;
}

html.dark .fi-atm-settings-page .atmcs-card-head {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.fi-atm-settings-page .atmcs-card-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 9px;
    color: #960000;
    background: rgba(150, 0, 0, 0.1);
}

html.dark .fi-atm-settings-page .atmcs-card-ico {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}

.fi-atm-settings-page .atmcs-card-ico svg {
    width: 16px;
    height: 16px;
}

.fi-atm-settings-page .atmcs-card-title {
    flex: 1;
    font-size: 15px;
    font-weight: 800;
    color: #960000;
}

html.dark .fi-atm-settings-page .atmcs-card-title {
    color: #fbbf24;
}

.fi-atm-settings-page .atmcs-card-count {
    font-size: 12px;
    font-weight: 800;
    color: #960000;
    background: rgba(150, 0, 0, 0.08);
    border: 1px solid rgba(150, 0, 0, 0.2);
    padding: 3px 11px;
    border-radius: 9999px;
    white-space: nowrap;
}

html.dark .fi-atm-settings-page .atmcs-card-count {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

.fi-atm-settings-page .atmcs-card-body {
    padding: 20px;
}

/* ── Hero header — gradient red banner with gold top edge ── */
.fi-atm-settings-page .atmcs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7a0000 0%, #960000 45%, #b31212 100%);
    border: 1px solid #6b0d0d;
    color: #ffffff;
    box-shadow: 0 18px 34px -18px rgba(150, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.fi-atm-settings-page .atmcs-header::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fbbf24 18%, #f59e0b 50%, #fbbf24 82%, transparent);
    opacity: 0.9;
}

.fi-atm-settings-page .atmcs-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fi-atm-settings-page .atmcs-header-code {
    font-weight: 800;
    letter-spacing: 0.06em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px;
    padding: 5px 13px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.fi-atm-settings-page .atmcs-header-name {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.fi-atm-settings-page .atmcs-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fi-atm-settings-page .atmcs-header-chip {
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 9999px;
    color: #fde68a;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(253, 230, 138, 0.35);
}

/* ── ເນື້ອໃນບັດຕັ້ງຄ່າ: Serial + ຈຳນວນຊ່ອງ ເລຽງກັນ ── */
.fi-atm-settings-page .atmcs-settings-body {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

/* ── Serial label (ໃຊ້ຮູບແບບດຽວກັບ ຈຳນວນຊ່ອງ) ── */
.fi-atm-settings-page .atmcs-serial-lbl {
    white-space: nowrap;
}

/* ── ປຸ່ມບັນທຶກ — ແຖວທຳມະດາ ຊອງຂວາ (ບໍ່ມີ card) ── */
.fi-atm-settings-page .atmcs-save-row {
    display: flex;
    justify-content: flex-end;
    padding: 2px 4px;
}

.fi-atm-settings-page .atmcs-save-row .fi-btn {
    min-height: 46px;
    min-width: 200px;
    font-size: 15px;
}

/* ── Cassette grid — 4 ຖັນ × 3 ແຖວ ── */
.fi-atm-settings-page .atmcs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* ໜ້າຈໍແຄບ ລົງເປັນ 2 ຖັນ (8 + 4) */
@media (max-width: 900px) {
    .fi-atm-settings-page .atmcs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fi-atm-settings-page .atmcs-cassette {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(160deg, #7a0000 0%, #960000 60%, #a30f0f 100%);
    border: 1px solid #6b0d0d;
    color: #ffffff;
    box-shadow: 0 10px 22px -16px rgba(150, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fi-atm-settings-page .atmcs-cassette:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -14px rgba(150, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.fi-atm-settings-page .atmcs-cassette-slot {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.fi-atm-settings-page .atmcs-cassette-size {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.fi-atm-settings-page .atmcs-size-input {
    width: 58px;
    height: 28px;
    padding: 0 4px;
    border: 1px solid #d97706;
    border-radius: 7px;
    background: #ffffff;
    color: #111827;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fi-atm-settings-page .atmcs-size-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.fi-atm-settings-page .atmcs-size-input::-webkit-inner-spin-button,
.fi-atm-settings-page .atmcs-size-input::-webkit-outer-spin-button {
    opacity: 0.5;
}

.fi-atm-settings-page .atmcs-size-unit {
    font-size: 13px;
    font-weight: 800;
    color: #fde68a;
    letter-spacing: 0.03em;
}

/* ຊ່ອງ 1, 5, 9 = 10mm — ເສັ້ນດ້ານຊ້າຍທອງ */
.fi-atm-settings-page .atmcs-cassette-big {
    border-left: 3px solid #f59e0b;
}

.fi-atm-settings-page .atmcs-cassette-big .atmcs-cassette-slot {
    color: #fbbf24;
}

/* ── ບັດຕັ້ງຄ່າ: Serial + ຈຳນວນຊ່ອງ ເລຽງກັນ ── */
.fi-atm-settings-page .atmcs-settings-body {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    flex-wrap: wrap;
}

.fi-atm-settings-page .atmcs-form-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fi-atm-settings-page .atmcs-form-lbl {
    font-size: 14px;
    font-weight: 800;
    color: #960000;
}

html.dark .fi-atm-settings-page .atmcs-form-lbl {
    color: #fbbf24;
}

.fi-atm-settings-page .atmcs-form-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: linear-gradient(160deg, #7a0000 0%, #960000 60%, #a30f0f 100%);
    border: 1px solid #6b0d0d;
    color: #ffffff;
    box-shadow: 0 10px 22px -16px rgba(150, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fi-atm-settings-page .atmcs-form-field:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.fi-atm-settings-page .atmcs-form-input {
    width: 76px;
    height: 28px;
    border: 1px solid #d97706;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    text-align: center;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fi-atm-settings-page .atmcs-form-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

/* ຊ່ອນ spin button ຂອງ browser ອອກ ເພາະໃຊ້ປຸ່ມ − / + ແທນ */
.fi-atm-settings-page .atmcs-form-input::-webkit-inner-spin-button,
.fi-atm-settings-page .atmcs-form-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fi-atm-settings-page .atmcs-form-input[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ປຸ່ມ − / + ຂອງຈຳນວນຊ່ອງ (Lot) */
.fi-atm-settings-page .atmcs-step-btn {
    appearance: none;
    width: 26px;
    height: 26px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(253, 230, 138, 0.4);
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.22);
    color: #fde68a;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.fi-atm-settings-page .atmcs-step-btn:hover {
    background: rgba(0, 0, 0, 0.34);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px -3px rgba(0, 0, 0, 0.4);
}

.fi-atm-settings-page .atmcs-step-btn:active {
    transform: translateY(0) scale(0.94);
}

.fi-atm-settings-page .atmcs-step-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.fi-atm-settings-page .atmcs-form-unit {
    font-size: 14px;
    font-weight: 700;
    color: #fde68a;
    white-space: nowrap;
}

.fi-atm-settings-page .atmcs-form-actions .fi-btn {
    min-height: 44px;
}

/* ປຸ່ມບັນທຶກ — gradient ແດງ ກົງກັບກະດານ */
.fi-atm-settings-page .atmcs-form-actions .fi-btn.fi-color-primary {
    background-image: linear-gradient(135deg, #b31212, #960000) !important;
    border: none !important;
    box-shadow: 0 14px 28px -10px rgba(150, 0, 0, 0.6) !important;
    font-weight: 800 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.fi-atm-settings-page .atmcs-form-actions .fi-btn.fi-color-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px -12px rgba(150, 0, 0, 0.7) !important;
}

/* ── Dark mode ── */
html.dark .fi-atm-settings-page .atmcs-header,
html.dark .fi-atm-settings-page .atmcs-cassette,
html.dark .fi-atm-settings-page .atmcs-form-field {
    background: linear-gradient(160deg, #5c0000 0%, #7a0000 60%, #8f0d0d 100%);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

html.dark .fi-atm-settings-page .atmcs-header-code {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .fi-atm-settings-page .atmcs-header {
        padding: 14px 15px;
    }

    .fi-atm-settings-page .atmcs-header-name {
        font-size: 15px;
    }

    .fi-atm-settings-page .atmcs-header-code {
        font-size: 11px;
        padding: 3px 9px;
    }

    .fi-atm-settings-page .atmcs-settings-body {
        gap: 14px;
    }

    .fi-atm-settings-page .atmcs-save-row .fi-btn {
        min-width: 100%;
    }

    .fi-atm-settings-page .atmcs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .fi-atm-settings-page .atmcs-cassette {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
    }

    .fi-atm-settings-page .atmcs-size-input {
        width: 52px;
        height: 24px;
        font-size: 15px;
    }

    .fi-atm-settings-page .atmcs-card-body {
        padding: 14px;
    }

    .fi-atm-settings-page .atmcs-card-head {
        padding: 10px 14px;
    }

    .fi-atm-settings-page .atmcs-form {
        margin-top: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ATM registration wizard — premium UI (scoped: .agb-*)
   ═══════════════════════════════════════════════════════════════ */

/* gold wizard step bar */

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header , .fi-atm-settings-page .fi-fo-wizard-header {
    background: linear-gradient(135deg, #7a0000 0%, #960000 45%, #b31212 100%);
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step-label , .fi-atm-settings-page .fi-fo-wizard-header-step-label {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 700;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step-icon-ctn , .fi-atm-settings-page .fi-fo-wizard-header-step-icon-ctn {
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon-ctn , .fi-atm-settings-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon-ctn {
    background: #fff !important;
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 8px 18px -6px rgba(120, 53, 15, 0.55);
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-indicator, .fi-atm-settings-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-indicator,
.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon , .fi-atm-settings-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon {
    color: #7a0000 !important;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-label , .fi-atm-settings-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-label {
    color: #fff !important;
    font-weight: 900;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon-ctn , .fi-atm-settings-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon-ctn {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #fff;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon , .fi-atm-settings-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon {
    color: #960000 !important;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-label , .fi-atm-settings-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-label {
    color: #fff !important;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard-header-step-separator svg , .fi-atm-settings-page .fi-fo-wizard-header-step-separator svg {
    color: rgba(255, 255, 255, 0.4);
}

/* wizard body card */

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-wizard , .fi-atm-settings-page .fi-fo-wizard {
    border-radius: 18px;
    box-shadow: 0 20px 50px -20px rgba(120, 53, 15, 0.35);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* 2-column slot repeater grid — add button acts as the next card */

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater , .fi-atm-settings-page .fi-fo-repeater {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    align-items: start;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater > ul , .fi-atm-settings-page .fi-fo-repeater > ul {
    display: contents;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater > ul > div , .fi-atm-settings-page .fi-fo-repeater > ul > div {
    display: contents;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater .fi-fo-repeater-item , .fi-atm-settings-page .fi-fo-repeater .fi-fo-repeater-item {
    min-width: 0;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater > div.flex , .fi-atm-settings-page .fi-fo-repeater > div.flex {
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    min-height: 130px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #fafaf9;
    transition: all 0.2s ease;
}

html.dark .fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater > div.flex , html.dark .fi-atm-settings-page .fi-fo-repeater > div.flex {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater > div.flex:hover , .fi-atm-settings-page .fi-fo-repeater > div.flex:hover {
    border-color: #cc3333;
    background: #fdf4f4;
}

/* blinking warning text (ATM wizard summary) */

.agb-blink {
    animation: agb-blink 1.2s ease-in-out infinite;
}

.agb-blink-red {
    color: #dc2626;
    font-weight: 700;
    animation: agb-blink-red 1s ease-in-out infinite;
}

@keyframes agb-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@keyframes agb-blink-red {
    0%, 100% { color: #dc2626; opacity: 1; }
    50% { color: #b91c1c; opacity: 0.4; }
}

/* summary step */

.agb-card-summary {
    padding: 0;
}

.agb-summary-count {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.agb-summary-sub {
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
}

.agb-summary-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    padding: 18px 20px;
}

.agb-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.agb-summary-cell {
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

html.dark .agb-summary-cell {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.agb-summary-cell.is-ok { border-color: #f0bcbc; background: #f0fdf4; }
.agb-summary-cell.is-warn { border-color: #f2c4c4; background: #fdf4f4; }

html.dark .agb-summary-cell.is-ok { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.08); }
html.dark .agb-summary-cell.is-warn { border-color: rgba(179, 18, 18, 0.4); background: rgba(179, 18, 18, 0.08); }

.agb-summary-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.agb-summary-cell-idx {
    font-size: 13px;
    font-weight: 800;
    color: #374151;
}

html.dark .agb-summary-cell-idx { color: #f3f4f6; }

.agb-summary-cell-dim {
    font-size: 11px;
    font-weight: 700;
    color: #960000;
    background: rgba(179, 18, 18, 0.15);
    padding: 1px 6px;
    border-radius: 999px;
}

.agb-summary-cell-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.agb-summary-cell-cs {
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agb-summary-cell-seal {
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .agb-summary-cell-cs { color: #34d399; }
html.dark .agb-summary-cell-seal { color: #f87171; }

.agb-summary-slot {
    border-radius: 14px;
    padding: 13px 15px;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all 0.15s ease;
}

html.dark .agb-summary-slot {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.agb-summary-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.2);
}

.agb-summary-slot.is-ok { border-color: #f0bcbc; }
.agb-summary-slot.is-warn { border-color: #f2c4c4; background: #fdf4f4; }

html.dark .agb-summary-slot.is-ok { border-color: rgba(16, 185, 129, 0.4); }
html.dark .agb-summary-slot.is-warn { border-color: rgba(179, 18, 18, 0.4); background: rgba(179, 18, 18, 0.08); }

.agb-summary-slot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.agb-summary-slot-idx {
    font-size: 13px;
    font-weight: 900;
    color: #1f2937;
}

html.dark .agb-summary-slot-idx { color: #f3f4f6; }

.agb-summary-slot-big,
.agb-summary-slot-dim {
    border-radius: 9999px;
    padding: 2px 9px;
    font-size: 10px;
    font-weight: 800;
}

.agb-summary-slot-big { color: #fff; background: linear-gradient(135deg, #b31212, #960000); }
.agb-summary-slot-dim { color: #6b7280; background: #f3f4f6; }

.agb-summary-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #f3f4f6;
}

html.dark .agb-summary-pair { border-top-color: rgba(255, 255, 255, 0.08); }

.agb-summary-unit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
}

html.dark .agb-summary-unit { color: #d1d5db; }

.agb-summary-unit b { font-weight: 900; }
.agb-summary-cs b { color: #0f766e; }
.agb-summary-rj b { color: #b91c1c; }

html.dark .agb-summary-cs b { color: #34d399; }
html.dark .agb-summary-rj b { color: #f87171; }

.agb-summary-unit small { font-size: 10.5px; color: #9ca3af; }
.agb-summary-arrow { color: #d1d5db; font-weight: 800; }
.agb-summary-ico { font-size: 12px; }

/* footer actions (3 buttons at Next position) */

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

.agb-btn-confirm {
    background-image: linear-gradient(135deg, #b31212, #960000) !important;
    border: none !important;
    box-shadow: 0 14px 28px -10px rgba(150, 0, 0, 0.6) !important;
    font-weight: 800 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.agb-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px -12px rgba(150, 0, 0, 0.7) !important;
}

/* ═══════════════════════════════════════════════════════════════
   Slot card = tab header (ລອງໃໝ່ / Cassette / Reject / ລຶບ)
   mockup-style: slim colored header row, one panel at a time
   ═══════════════════════════════════════════════════════════════ */

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater-item-content , .fi-atm-settings-page .fi-fo-repeater-item-content {
    padding: 0;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tabs , .fi-atm-settings-page .agb-slot-tabs {
    background: #fff;
}

html.dark .fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tabs , html.dark .fi-atm-settings-page .agb-slot-tabs {
    background: #111827;
}

/* header row = the mockup bar */

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tabs-header , .fi-atm-settings-page .agb-slot-tabs-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #fefdfa 0%, #f6f4ef 100%);
    white-space: nowrap;
}

html.dark .fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tabs-header , html.dark .fi-atm-settings-page .agb-slot-tabs-header {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* each item = a colored pill tab */

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab , .fi-atm-settings-page .agb-slot-tab {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    padding: 5px 11px;
    border-radius: 9999px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab .agb-slot-tab-status , .fi-atm-settings-page .agb-slot-tab .agb-slot-tab-status {
    flex-shrink: 0;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab:hover , .fi-atm-settings-page .agb-slot-tab:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* per-tab colors: slot = blue, cassette = green, reject = rose */

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-1 , .fi-atm-settings-page .agb-slot-tab-1 {
    color: #960000;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-2 , .fi-atm-settings-page .agb-slot-tab-2 {
    color: #b00000;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-3 , .fi-atm-settings-page .agb-slot-tab-3 {
    color: #e11d48;
}

/* active tab = filled gradient pill in its own color */

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-1.is-active , .fi-atm-settings-page .agb-slot-tab-1.is-active {
    color: #fff;
    background: linear-gradient(135deg, #b31212 0%, #960000 100%);
    box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.55);
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-2.is-active , .fi-atm-settings-page .agb-slot-tab-2.is-active {
    color: #fff;
    background: linear-gradient(135deg, #10b981 0%, #b00000 100%);
    box-shadow: 0 6px 14px -6px rgba(176, 0, 0, 0.55);
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-3.is-active , .fi-atm-settings-page .agb-slot-tab-3.is-active {
    color: #fff;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 6px 14px -6px rgba(225, 29, 72, 0.55);
}

/* spacer pushes delete to the right end */

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-spacer , .fi-atm-settings-page .agb-slot-tab-spacer {
    flex: 1;
}

/* delete = red trash icon button */

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-delete , .fi-atm-settings-page .agb-slot-tab-delete {
    color: #dc2626 !important;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-delete:hover , .fi-atm-settings-page .agb-slot-tab-delete:hover {
    background: #fee2e2;
    color: #b91c1c !important;
    transform: none;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-delete svg , .fi-atm-settings-page .agb-slot-tab-delete svg {
    width: 16px;
    height: 16px;
}

/* panel = one form at a time, tinted to match its tab */

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-panel , .fi-atm-settings-page .agb-slot-tab-panel {
    padding: 10px 12px 12px;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-panel-1 , .fi-atm-settings-page .agb-slot-panel-1 {
    background: linear-gradient(180deg, #f0f6ff 0%, #ffffff 42%);
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-panel-2 , .fi-atm-settings-page .agb-slot-panel-2 {
    background: linear-gradient(180deg, #ecfdf4 0%, #ffffff 42%);
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-panel-3 , .fi-atm-settings-page .agb-slot-panel-3 {
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 42%);
}

html.dark .fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-panel-1, html.dark .fi-atm-settings-page .agb-slot-panel-1,
html.dark .fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-panel-2, html.dark .fi-atm-settings-page .agb-slot-panel-2,
html.dark .fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-panel-3 , html.dark .fi-atm-settings-page .agb-slot-panel-3 {
    background: transparent;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-panel .fi-fo-field-wrp , .fi-atm-settings-page .agb-slot-tab-panel .fi-fo-field-wrp {
    gap: 4px;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-panel .fi-input-wrp , .fi-atm-settings-page .agb-slot-tab-panel .fi-input-wrp {
    min-height: 32px;
    height: 32px;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-panel .fi-input , .fi-atm-settings-page .agb-slot-tab-panel .fi-input {
    font-size: 12.5px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-panel .fi-fo-field-wrp-label , .fi-atm-settings-page .agb-slot-tab-panel .fi-fo-field-wrp-label {
    font-size: 10.5px;
    font-weight: 700;
    margin-bottom: 2px;
}

.fi-resource-atm-machines.fi-resource-create-record-page .agb-slot-tab-panel .fi-fo-field-wrp-helper-text , .fi-atm-settings-page .agb-slot-tab-panel .fi-fo-field-wrp-helper-text {
    font-size: 9.5px;
    margin-top: 2px;
}

/* round card for each slot + trim repeater chrome */

.fi-resource-atm-machines.fi-resource-create-record-page .fi-fo-repeater .fi-fo-repeater-item , .fi-atm-settings-page .fi-fo-repeater .fi-fo-repeater-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 12px 28px -18px rgba(15, 23, 42, 0.35);
}

/* ── Serial card items (RegisterGoldProduct) ────────────────────── */

/* wrapper card around each serial repeater item */

.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 12px 28px -18px rgba(15, 23, 42, 0.35);
    border: 1px solid #e5e7eb;
    background: #fff;
}

html.dark .fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: #111827;
}

/* header bar inside each serial card */

.agb-serial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #fefdfa 0%, #f6f4ef 100%);
}

html.dark .agb-serial-header {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* left side: icon + label */

.agb-serial-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.agb-serial-status {
    flex-shrink: 0;
}

.is-ok .agb-serial-status {
    color: #b00000;
}

.is-empty .agb-serial-status {
    color: #960000;
}

.agb-serial-label {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .agb-serial-label {
    color: #e5e7eb;
}

.agb-serial-empty {
    color: #9ca3af;
    font-weight: 500;
}

/* delete button */

.agb-serial-delete {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #dc2626;
    padding: 4px 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.agb-serial-delete:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.agb-serial-delete svg {
    width: 16px;
    height: 16px;
}

/* body: compact input inside the card */

.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item .fi-fo-field-wrp {
    gap: 4px;
}

.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item .fi-input-wrp {
    min-height: 32px;
    height: 32px;
}

.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item .fi-input {
    font-size: 12.5px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item .fi-fo-field-wrp-label {
    font-size: 10.5px;
    font-weight: 700;
    margin-bottom: 2px;
}

/* hide Filament's default repeater chrome (item border, drag handle) */

.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item .fi-fo-repeater-item-actions-btn-ltr {
    display: none;
}

.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item-header {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   Gold Products wizard — premium gold-gradient UI
   ═══════════════════════════════════════════════════════════════ */

/* wizard step bar */

.fi-resource-gold-products .fi-fo-wizard-header {
    background: linear-gradient(135deg, #7a0000 0%, #960000 45%, #b31212 100%);
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.fi-resource-gold-products .fi-fo-wizard-header-step-label {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 700;
}

.fi-resource-gold-products .fi-fo-wizard-header-step-icon-ctn {
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.fi-resource-gold-products .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon-ctn {
    background: #fff !important;
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 8px 18px -6px rgba(120, 53, 15, 0.55);
}

.fi-resource-gold-products .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-indicator,
.fi-resource-gold-products .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon {
    color: #7a0000 !important;
}

.fi-resource-gold-products .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-label {
    color: #fff !important;
    font-weight: 900;
}

.fi-resource-gold-products .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon-ctn {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #fff;
}

.fi-resource-gold-products .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon {
    color: #960000 !important;
}

.fi-resource-gold-products .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-label {
    color: #fff !important;
}

.fi-resource-gold-products .fi-fo-wizard-header-step-separator svg {
    color: rgba(255, 255, 255, 0.4);
}

/* wizard body card */

.fi-resource-gold-products .fi-fo-wizard {
    border-radius: 18px;
    box-shadow: 0 20px 50px -20px rgba(120, 53, 15, 0.35);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

html.dark .fi-resource-gold-products .fi-fo-wizard {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

html.dark .fi-resource-gold-products .fi-fo-wizard-header {
    background: linear-gradient(135deg, #5c0000 0%, #7a0000 45%, #960000 100%);
}
/* ── PreparationBag create — 12 slot rows (vibrant pro UI) ───────── */

/* slot card wrapper — colorful gradient + left accent bar */
.fi-resource-preparation-bags .fi-fo-repeater .fi-fo-repeater-item {
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 18px 40px -22px rgba(15, 23, 42, 0.5);
    position: relative;
}

/* the lines repeater items must not clip the cassette dropdown */
.fi-resource-preparation-bags .fi-fo-repeater .fi-fo-repeater-item:has(.fi-fo-select) {
    overflow: visible;
}


html.dark .fi-resource-preparation-bags .fi-fo-repeater .fi-fo-repeater-item {
    border-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
}


/* gold header (static) */
.fi-resource-preparation-bags .fi-fo-repeater .fi-fo-repeater-item-header {
    background: linear-gradient(120deg, #b31212 0%, #960000 55%, #cc3333 100%);
    color: #fff;
    padding: 8px 16px;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.04em;
    border-radius: 0;
    text-shadow: 0 1px 2px rgba(120, 53, 15, 0.4);
}

html.dark .fi-resource-preparation-bags .fi-fo-repeater .fi-fo-repeater-item-header {
    background: linear-gradient(120deg, #960000 0%, #7a0000 55%, #960000 100%);
}

.fi-resource-preparation-bags .fi-fo-repeater .fi-fo-repeater-item-header .fi-fo-repeater-item-label {
    color: #fff;
    font-weight: 900;
}

/* field labels — bold */
.fi-resource-preparation-bags .fi-fo-field-wrp-label {
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* repeater inner grid spacing */
.fi-resource-preparation-bags .fi-fo-repeater .fi-fo-repeater-item > .grid,
.fi-resource-preparation-bags .fi-fo-repeater .fi-fo-repeater-item > div {
    padding: 16px 18px;
}

/* 12-row repeater — 2 column grid */
.fi-resource-preparation-bags .fi-fo-repeater > ul > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px;
    grid-auto-rows: minmax(0, auto);
}

@media (max-width: 768px) {
    .fi-resource-preparation-bags .fi-fo-repeater > ul > .grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

/* section + wizard accent for the step */
.fi-resource-preparation-bags .fi-fo-wizard {
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.45);
}

/* allow select dropdowns to expand past the wizard bounds (active step only: a hidden step must stay clipped to 0 height) */
.fi-resource-preparation-bags .fi-fo-wizard,
.fi-resource-preparation-bags .fi-fo-wizard-step.fi-active,
.fi-resource-preparation-bags .fi-fo-wizard-step-content,
.fi-resource-preparation-bags .fi-fo-wizard-step-content > .fi-wi,
.fi-resource-preparation-bags .fi-fo-wizard-step-content .fi-fo-field-wrp {
    overflow: visible;
}

/* show every option in the cassette dropdown (no internal scroll) */
.fi-resource-preparation-bags .choices .choices__list--dropdown .choices__list {
    max-height: none !important;
}

.fi-resource-preparation-bags .choices .choices__list--dropdown {
    max-height: none !important;
    overflow: visible !important;
}

/* dark variants */
.fi-resource-preparation-bags .fi-fo-wizard {
    overflow: visible;
}

html.dark .fi-resource-preparation-bags .fi-fo-wizard {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
}

.fi-resource-preparation-bags .fi-fo-wizard-header {
    background: linear-gradient(135deg, #7a0000 0%, #960000 45%, #b31212 100%);
    border-bottom: none;
}

/* ── RegisterGoldProduct — full gold theme for sections & inputs ── */

/* section cards inside wizard steps */
.fi-resource-gold-products .fi-fo-wizard .fi-section {
    border-radius: 16px;
    border: 1px solid #f2c4c4;
    box-shadow: 0 10px 28px -18px rgba(120, 53, 15, 0.35);
    overflow: hidden;
    background: #fff;
}

.fi-resource-gold-products .fi-fo-wizard .fi-section-header {
    background: linear-gradient(135deg, #fdf4f4 0%, #fbe3e3 60%, #f2c4c4 100%);
    border-bottom: 1px solid #f2c4c4;
    padding-top: 12px;
    padding-bottom: 12px;
}

.fi-resource-gold-products .fi-fo-wizard .fi-section-header .fi-section-header-title {
    color: #5c0000;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.fi-resource-gold-products .fi-fo-wizard .fi-section-header .fi-section-header-description {
    color: #7a0000;
    opacity: 0.85;
}

/* section header icons gold */
.fi-resource-gold-products .fi-fo-wizard .fi-section-header-icon {
    color: #960000 !important;
    background: rgba(179, 18, 18, 0.15);
    border-radius: 10px;
}

html.dark .fi-resource-gold-products .fi-fo-wizard .fi-section {
    border-color: rgba(150, 0, 0, 0.3);
    background: #1f2937;
}

html.dark .fi-resource-gold-products .fi-fo-wizard .fi-section-header {
    background: linear-gradient(135deg, #3b2b12 0%, #453218 60%, #57401c 100%);
    border-bottom-color: rgba(150, 0, 0, 0.3);
}

/* step content padding */
.fi-resource-gold-products .fi-fo-wizard-step-content {
    padding: 18px;
}

/* labels — warm dark brown, semibold */
.fi-resource-gold-products .fi-fo-wizard .fi-fo-field-wrp-label {
    color: #78350f;
    font-weight: 800;
    font-size: 12.5px;
}

html.dark .fi-resource-gold-products .fi-fo-wizard .fi-fo-field-wrp-label {
    color: #e8a8a8;
}

/* inputs — cream background, amber focus */
.fi-resource-gold-products .fi-fo-wizard .fi-input {
    background: #fffbfb;
    border-color: #e8a8a8;
    border-radius: 10px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.fi-resource-gold-products .fi-fo-wizard .fi-input:focus {
    border-color: #b31212;
    box-shadow: 0 0 0 3px rgba(179, 18, 18, 0.2);
}

.fi-resource-gold-products .fi-fo-wizard .fi-select-input {
    background: #fffbfb;
}

/* selects */
.fi-resource-gold-products .fi-fo-wizard .fi-input-wrp {
    border-radius: 10px;
    border-color: #e8a8a8;
    background: #fffbfb;
}

.fi-resource-gold-products .fi-fo-wizard .fi-input-wrp:focus-within {
    border-color: #b31212;
    box-shadow: 0 0 0 3px rgba(179, 18, 18, 0.2);
}

html.dark .fi-resource-gold-products .fi-fo-wizard .fi-input,
html.dark .fi-resource-gold-products .fi-fo-wizard .fi-input-wrp {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(150, 0, 0, 0.4);
}

/* helper text amber */
.fi-resource-gold-products .fi-fo-wizard .fi-fo-field-wrp-helper-text {
    color: #7a0000;
    opacity: 0.9;
    font-size: 12px;
}

/* required asterisk gold */
.fi-resource-gold-products .fi-fo-wizard .fi-fo-field-wrp-label .fi-fo-field-wrp-label-required,
.fi-resource-gold-products .fi-fo-wizard .fi-fo-field-wrp-label > span[style] {
    color: #960000;
}

/* wizard content area — warm tint */
.fi-resource-gold-products .fi-fo-wizard-step-content {
    background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
}

html.dark .fi-resource-gold-products .fi-fo-wizard-step-content {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

/* serial card headers — gold accent when filled */
.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item {
    border: 1px solid #f2c4c4;
    background: #fffbfb;
}

.fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item .agb-serial-header {
    background: linear-gradient(135deg, #fdf4f4 0%, #fbe3e3 100%);
    border-bottom-color: #f2c4c4;
}

html.dark .fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item {
    border-color: rgba(150, 0, 0, 0.3);
    background: #1f2937;
}

html.dark .fi-resource-gold-products .fi-fo-repeater .fi-fo-repeater-item .agb-serial-header {
    background: linear-gradient(135deg, #3b2b12 0%, #453218 100%);
    border-bottom-color: rgba(150, 0, 0, 0.3);
}

/* ── Add Serial to Slot — dark mode overrides ── */

html.dark .atm-cassette-card .atm-cassette-cell {
    background: #111827;
}

html.dark .atm-cassette-card .atm-cassette-val {
    color: #f9fafb;
}

html.dark .atm-cassette-card .atm-cassette-code {
    color: #f3f4f6;
}

html.dark .atm-cassette-card select,
html.dark .atm-cassette-card input[type="text"] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(150, 0, 0, 0.4);
    color: #f3f4f6;
}

html.dark .atm-cassette-card select:focus,
html.dark .atm-cassette-card input[type="text"]:focus {
    border-color: #b31212;
    box-shadow: 0 0 0 3px rgba(179, 18, 18, 0.2);
}

html.dark .atm-cassette-card select option {
    background: #1f2937;
    color: #f3f4f6;
}


/* ═══ Preparation Bags wizard — red step bar, white text/icons (create + edit) ═══ */

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header {
    background: linear-gradient(135deg, #7a0000 0%, #960000 45%, #b31212 100%);
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step-label ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step-label {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 700;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step-icon-ctn ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step-icon-ctn {
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon-ctn ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon-ctn {
    background: #fff !important;
    border-color: #fff;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-indicator ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-indicator ,
.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon {
    color: #7a0000 !important;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-label ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-label {
    color: #fff !important;
    font-weight: 900;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon-ctn ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon-ctn {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #fff;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon {
    color: #960000 !important;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-label ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-label {
    color: #fff !important;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard-header-step-separator svg ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard-header-step-separator svg {
    color: rgba(255, 255, 255, 0.4);
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-wizard ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-wizard {
    border-radius: 18px;
    overflow: hidden;
}

/* ═══ Preparation Bags wizard step 2 — slot item headers "ຊ່ອງທີ່ N" red bar + white ═══ */

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-repeater-item ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-repeater-item {
    border-radius: 14px;
    overflow: hidden;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-repeater-item-header ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-repeater-item-header {
    background: linear-gradient(135deg, #960000, #7a0000);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-repeater-item-header h4 ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-repeater-item-header h4 {
    color: #ffffff !important;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.fi-resource-preparation-bags.fi-resource-create-record-page .fi-fo-repeater-item-header svg ,
.fi-resource-preparation-bags.fi-resource-edit-record-page .fi-fo-repeater-item-header svg {
    color: rgba(255, 255, 255, 0.9);
}

/* ═══════════════════════════════════════════════════════════════════ */
/*  Cassette Create page — ໜ້າລົງທະບຽນ Cassette (ແບບ atmcs ແດງ/ທອງ)      */
/*  ໃຊ້ກັບ resources/views/filament/app/resources/cassette-resource/... */
/* ═══════════════════════════════════════════════════════════════════ */

/* ເຕັມຈໍ — override Filament's max-w-7xl ໃນ <main> */
main:has(.fi-cassette-create-page) {
    max-width: 100% !important;
}

.fi-cassette-create-page .atmcs-form {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-family: 'Noto Sans Lao', sans-serif;
}

/* ໃຊ້ card shell ດຽວກັບໜ້າຕັ້ງຄ່າຕູ້ ATM */
.fi-cassette-create-page .atmcs-card {
    background: #ffffff;
    border: 1px solid #f0d5d5;
    border-radius: 16px;
    box-shadow: 0 18px 40px -28px rgba(120, 20, 20, 0.35);
    overflow: hidden;
}

html.dark .fi-cassette-create-page .atmcs-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.fi-cassette-create-page .atmcs-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(150, 0, 0, 0.06), rgba(150, 0, 0, 0.02));
    border-bottom: 1px solid #f0d5d5;
}

html.dark .fi-cassette-create-page .atmcs-card-head {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.fi-cassette-create-page .atmcs-card-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 9px;
    color: #960000;
    background: rgba(150, 0, 0, 0.1);
}

html.dark .fi-cassette-create-page .atmcs-card-ico {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}

.fi-cassette-create-page .atmcs-card-ico svg {
    width: 16px;
    height: 16px;
}

.fi-cassette-create-page .atmcs-card-title {
    flex: 1;
    font-size: 15px;
    font-weight: 800;
    color: #960000;
}

html.dark .fi-cassette-create-page .atmcs-card-title {
    color: #fbbf24;
}

.fi-cassette-create-page .atmcs-card-body {
    padding: 20px;
}

/* Hero header — gradient ແດງ ຂອບທອງ */
.fi-cassette-create-page .atmcs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7a0000 0%, #960000 45%, #b31212 100%);
    border: 1px solid #6b0d0d;
    color: #ffffff;
    box-shadow: 0 18px 34px -18px rgba(150, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.fi-cassette-create-page .atmcs-header::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fbbf24 18%, #f59e0b 50%, #fbbf24 82%, transparent);
    opacity: 0.9;
}

.fi-cassette-create-page .atmcs-header-name {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.fi-cassette-create-page .atmcs-header-chip {
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 9999px;
    color: #fde68a;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(253, 230, 138, 0.35);
}








/* ຟອມຂ້າງໃນ card — ລົບແຖວທີ່ຊ້ຳກັບ card shell */
.fi-cassette-create-page .atmcs-card-body .fi-form,
.fi-cassette-create-page .atmcs-card-body .fi-form > div {
    gap: 0 !important;
}

.fi-cassette-create-page .atmcs-card-body .fi-section {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

html.dark .fi-cassette-create-page .atmcs-card-body .fi-section {
    background: transparent !important;
}

.fi-cassette-create-page .atmcs-card-body .fi-section-header {
    padding: 0 0 14px !important;
}

.fi-cassette-create-page .atmcs-card-body .fi-section-header-heading {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #960000 !important;
}

html.dark .fi-cassette-create-page .atmcs-card-body .fi-section-header-heading {
    color: #fbbf24 !important;
}

.fi-cassette-create-page .atmcs-card-body .fi-section-header-icon {
    color: #960000 !important;
}

html.dark .fi-cassette-create-page .atmcs-card-body .fi-section-header-icon {
    color: #fbbf24 !important;
}

.fi-cassette-create-page .atmcs-card-body .fi-section-header-description {
    color: #6b7280 !important;
}

html.dark .fi-cassette-create-page .atmcs-card-body .fi-section-header-description {
    color: #9ca3af !important;
}

.fi-cassette-create-page .atmcs-card-body .fi-section-content-ctn {
    padding: 0 !important;
}

.fi-cassette-create-page .atmcs-card-head-txt {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.fi-cassette-create-page .atmcs-card-sub {
    font-size: 12.5px;
    font-weight: 500;
    color: #8a6a6a;
    line-height: 1.45;
}

html.dark .fi-cassette-create-page .atmcs-card-sub {
    color: rgba(255, 255, 255, 0.55);
}

.fi-cassette-create-page .atmcs-card-body .fi-section-header {
    display: none !important;
}

/* ປຸ່ມບັນທຶກ — ຊອງຂວາ ບໍ່ມີ card */
.fi-cassette-create-page .atmcs-save-row {
    display: flex;
    justify-content: flex-end;
    padding: 2px 4px;
}

.fi-cassette-create-page .atmcs-save-row .fi-btn {
    min-height: 46px;
    min-width: 200px;
    font-size: 15px;
}

/* Height chip — ບອກວ່າ cassette ໃຊ້ກັບຊ່ອງຂະໜາດໃດ (ຕິດກັບ label ຂອງ field Height) */
.fi-cassette-create-page .fi-fo-field-wrp[data-field~="height"] .fi-fo-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fi-cassette-create-page .atmcs-height-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 9999px;
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.4);
    white-space: nowrap;
}

.fi-cassette-create-page .atmcs-height-chip.is-match {
    color: #065f46;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
}

html.dark .fi-cassette-create-page .atmcs-height-chip {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

html.dark .fi-cassette-create-page .atmcs-height-chip.is-match {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
}
