@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --ink: #151719;
    --ink-soft: #24272a;
    --sidebar: #fffdf9;
    --canvas: #f2efe9;
    --paper: #fffdf9;
    --muted: #6b7280;
    --red: #d92d3a;
    --red-dark: #aa1724;
    --red-soft: #f8e5e7;
    --gold: #c3a56b;
    --line: #ded8ce;
    --green: #258154;
    --amber: #b67b20;
    --shadow-sm: 0 10px 30px rgba(20, 22, 24, .06);
    --shadow: 0 22px 65px rgba(20, 22, 24, .1);
    --display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --bs-body-font-family: var(--body);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; font-family: var(--body); }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; font-family: var(--body); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid rgba(217,45,58,.25); outline-offset: 3px; }
.page-title h1:focus-visible { outline: none; }
.skip-link { position: fixed; z-index: 1000; left: 18px; top: -70px; border-radius: 9px; background: #fff; padding: 10px 16px; font-weight: 750; box-shadow: var(--shadow); transition: top .2s ease; }
.skip-link:focus { top: 16px; }

/* App shell */
.admin-shell { --sidebar-width: 276px; min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); transition: grid-template-columns .28s cubic-bezier(.2,.8,.2,1); }
.admin-shell.sidebar-collapsed { --sidebar-width: 88px; }
.sidebar { position: fixed; z-index: 100; inset: 0 auto 0 0; width: var(--sidebar-width); height: 100vh; height: 100dvh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--sidebar); color: var(--ink); padding: 26px 16px 20px 16px; box-shadow: 8px 0 35px rgba(20,22,24,.035); transition: width .28s cubic-bezier(.2,.8,.2,1), padding .28s cubic-bezier(.2,.8,.2,1); }
.sidebar::before { content: ""; position: absolute; z-index: -1; right: -130px; top: -140px; width: 310px; height: 310px; border: 55px solid rgba(217,45,58,.045); border-radius: 50%; }
.admin-brand { display: flex; align-items: center; justify-content: center; gap: 12px; flex: 0 0 auto; padding: 0 0 24px; color: var(--ink); font-weight: 900; letter-spacing: .11em; line-height: .84; white-space: nowrap; text-align: center; }
.admin-brand > div { overflow: hidden; opacity: 1; transition: width .2s ease, opacity .18s ease; }
.admin-brand-link { display: flex; align-items: center; justify-content: center; width: 100%; text-decoration: none; max-width: 100%; }
.admin-brand-link:hover .admin-brand-full { transform: scale(1.02); }
.admin-brand-full { max-width: 290px; object-fit: contain; display: block; margin: 0 auto; transition: transform .2s ease; }
.admin-brand-collapsed { display: none; max-width: 58px; object-fit: contain; margin: 0 auto; }
.login-brand-logo { max-width: 280px; object-fit: contain; display: block; margin-bottom: 20px; }
.mobile-login-logo { max-width: 220px; object-fit: contain; display: block; margin-bottom: 12px; }
.admin-brand > span { width: 41px; height: 41px; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid currentColor; border-radius: 50%; color: var(--red); font: italic 25px Georgia, serif; letter-spacing: 0; }
.admin-brand small { display: block; margin-top: 7px; color: #8b8e90; font-size: 7px; font-weight: 750; letter-spacing: .26em; }
.side-nav { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; scrollbar-color: rgba(20,22,24,.22) transparent; }
.side-nav::-webkit-scrollbar { width: 5px; display: block; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(20,22,24,.18); border-radius: 999px; transition: background .2s ease; }
.side-nav::-webkit-scrollbar-thumb:hover { background: var(--red); }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; margin: 2px 0; border: 1px solid transparent; border-radius: 12px; color: #676b6e; padding: 10px 12px; font-size: 12px; font-weight: 650; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.side-nav a::after { content: ""; position: absolute; right: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); opacity: 0; transform: scale(0); transition: opacity .2s ease, transform .2s ease; }
.side-nav a:hover { color: var(--red); background: #fcf1f1; transform: translateX(2px); }
.side-nav a.active { border-color: rgba(217,45,58,.12); background: linear-gradient(90deg, rgba(217,45,58,.13), rgba(217,45,58,.035)); color: var(--red-dark); }
.side-nav a.active::after { opacity: 1; transform: scale(1); }
.nav-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #ddd7ce; border-radius: 999px; color: #777b7e; background: #faf7f2; font-size: 14px; font-style: normal; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.nav-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; display: block; }
.side-nav a:hover .nav-icon, .side-nav a.active .nav-icon { border-color: rgba(217,45,58,.25); background: rgba(217,45,58,.09); color: var(--red); }
.nav-group { position: relative; margin: 2px 0; }
.nav-group-toggle { width: 100%; position: relative; display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 12px; color: #676b6e; padding: 10px 12px; font-size: 12px; font-weight: 650; background: transparent; cursor: pointer; text-align: left; font-family: inherit; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.nav-group-toggle:hover { color: var(--red); background: #fcf1f1; transform: translateX(2px); }
.nav-group.active .nav-group-toggle { border-color: rgba(217,45,58,.16); background: linear-gradient(90deg, rgba(217,45,58,.12), rgba(217,45,58,.035)); color: var(--red-dark); }
.nav-group.active .nav-group-toggle .nav-icon { border-color: rgba(217,45,58,.25); background: rgba(217,45,58,.09); color: var(--red); }
.nav-group-title { flex: 1 1 auto; white-space: nowrap; font-weight: 650; }
.nav-group-caret { width: 18px; height: 18px; display: grid; place-items: center; flex: 0 0 auto; color: #8b8e90; transform: rotate(-90deg); transition: transform .22s cubic-bezier(.2,.8,.2,1), color .2s ease; }
.nav-group-caret svg { width: 12px; height: 12px; display: block; }
.nav-group-toggle:hover .nav-group-caret, .nav-group.active .nav-group-caret { color: var(--red); }
.nav-group.expanded .nav-group-caret { transform: rotate(0deg); }
.nav-sub-menu { display: none; position: relative; margin: 4px 0 6px 26px; padding: 2px 0 2px 14px; border-left: 1.5px solid #ece8e1; flex-direction: column; gap: 2px; }
.nav-group.expanded .nav-sub-menu, .nav-sub-menu.expanded { display: flex; animation: fadeInSubmenu .18s ease both; }
@keyframes fadeInSubmenu { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.nav-sub-item { display: flex; align-items: center; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 550; color: #676b6e; text-decoration: none; white-space: nowrap; transition: color .15s ease, background .15s ease; }
.nav-sub-item:hover { color: var(--red); background: #fdf2f2; }
.nav-sub-item.active { background: #fde8e8; color: var(--red); font-weight: 700; }
.side-nav .nav-sub-menu a::after, .side-nav .nav-sub-item::after { display: none !important; }
.nav-sub-divider { display: none; }
.nav-label { margin: 22px 12px 7px; color: #888d90; font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-foot { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: #faf7f2; overflow: hidden; white-space: nowrap; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { color: #4e5255; font-size: 11.5px; }
.sidebar-foot small { margin-top: 2px; color: #888d90; font-size: 10px; }
.live-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #37bd75; box-shadow: 0 0 0 5px rgba(55,189,117,.11); animation: status-pulse 2s ease-out infinite; }
.workspace { min-width: 0; max-width: 100%; grid-column: 2; }
.topbar { position: sticky; z-index: 40; top: 0; height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(20,22,24,.08); background: rgba(255,253,249,.9); padding: 0 34px; backdrop-filter: blur(20px); }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar strong, .topbar small { display: block; }
.topbar strong { font: 650 14px var(--display); letter-spacing: -.01em; }
.topbar small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 12px; }
.top-actions > a { color: var(--red); font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.top-actions > a:hover { color: var(--red-dark); }
.status-chip { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.65); padding: 8px 12px; color: #54585b; font-weight: 650; }
.status-chip .live-dot { width: 6px; height: 6px; box-shadow: none; }
.admin-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font: 700 11px var(--display); letter-spacing: .04em; }
.menu-toggle { width: 42px; height: 42px; display: none; place-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 11px; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); }
.sidebar-collapse { position: absolute; z-index: 2; top: 31px; right: -14px; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #65696c; padding: 0 1px 2px 0; box-shadow: 0 5px 14px rgba(20,22,24,.12); font-size: 20px; line-height: 1; transition: color .2s ease, border-color .2s ease, transform .28s ease; }
.sidebar-collapse:hover { border-color: var(--red); color: var(--red); }
.sidebar-collapsed .sidebar-collapse { transform: rotate(180deg); }
.sidebar-collapsed .sidebar { padding-right: 12px; padding-left: 12px; overflow: visible; }
.sidebar-collapsed .admin-brand { justify-content: center; padding-right: 0; padding-left: 0; }
.sidebar-collapsed .admin-brand-full { display: none !important; }
.sidebar-collapsed .admin-brand-collapsed { display: block !important; }
.sidebar-collapsed .admin-brand > div, .sidebar-collapsed .side-nav a > span:last-child, .sidebar-collapsed .nav-label, .sidebar-collapsed .sidebar-foot > div { width: 0; margin: 0; overflow: hidden; opacity: 0; visibility: hidden; }
.sidebar-collapsed .nav-group-title, .sidebar-collapsed .nav-group-caret { display: none !important; }
.sidebar-collapsed .side-nav { padding-right: 0; overflow: visible; scrollbar-width: none; }
.sidebar-collapsed .side-nav::-webkit-scrollbar { display: none; }
.sidebar-collapsed .side-nav a, .sidebar-collapsed .nav-group-toggle { justify-content: center; gap: 0; padding-right: 8px; padding-left: 8px; }
.sidebar-collapsed .side-nav a::after { right: 3px; }
.sidebar-collapsed .nav-label { height: 10px; }
.sidebar-collapsed .sidebar-foot { justify-content: center; padding-right: 0; padding-left: 0; border-color: transparent; background: transparent; }
.sidebar-collapsed .nav-group { position: relative; }
.sidebar-collapsed .nav-group .nav-sub-menu {
    display: none !important;
    position: absolute;
    left: calc(100% + 8px);
    top: -6px;
    min-width: 195px;
    background: #ffffff;
    border: 1px solid rgba(20,22,24,.1);
    border-radius: 14px;
    padding: 6px 0;
    margin: 0;
    box-shadow: 0 16px 40px rgba(20,22,24,.15), 0 2px 6px rgba(20,22,24,.05);
    z-index: 1000;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}
.sidebar-collapsed .nav-group .nav-sub-menu::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 0;
    width: 16px;
    height: 100%;
}
.sidebar-collapsed .nav-group:hover .nav-sub-menu {
    display: flex !important;
    animation: flyoutFade .18s cubic-bezier(.2,.8,.2,1) both;
}
.sidebar-collapsed .side-nav .nav-sub-menu a,
.sidebar-collapsed .nav-group .nav-sub-menu .nav-sub-item {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
    padding: 9px 20px !important;
    margin: 0 !important;
    width: 100% !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-sizing: border-box !important;
    transform: none !important;
    transition: background .15s ease, color .15s ease !important;
}
.sidebar-collapsed .side-nav .nav-sub-menu a:hover,
.sidebar-collapsed .nav-group .nav-sub-menu .nav-sub-item:hover {
    background: #fbf5f5 !important;
    color: var(--red) !important;
    transform: none !important;
}
.sidebar-collapsed .side-nav .nav-sub-menu a.active,
.sidebar-collapsed .nav-group .nav-sub-menu .nav-sub-item.active {
    background: var(--red-soft) !important;
    color: var(--red-dark) !important;
    font-weight: 700 !important;
    transform: none !important;
}
.sidebar-collapsed .nav-sub-divider {
    display: block !important;
    height: 1px !important;
    background: #eeeae3 !important;
    margin: 4px 0 !important;
    border: none !important;
}
.sidebar-scrim { display: none; }
.admin-content { width: 100%; min-width: 0; max-width: 1580px; margin: 0 auto; padding: 38px; }

/* Page title and actions */
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 31px; animation: page-enter .5s ease both; }
.page-title h1 { margin: 8px 0 0; font-size: clamp(32px, 3vw, 42px); }
.page-title p { margin: 7px 0 0; color: var(--muted); font-size: 13.5px; }
.page-eyebrow { display: flex; align-items: center; gap: 9px; color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.page-eyebrow span { width: 21px; height: 2px; background: var(--red); }
.admin-btn { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid var(--red); border-radius: 999px; background: var(--red); color: #fff; padding: 11px 20px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 10px 24px rgba(217,45,58,.17); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.admin-btn span { transition: transform .2s ease; }
.admin-btn:hover { border-color: var(--red-dark); background: var(--red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(170,23,36,.23); }
.admin-btn:hover span { transform: translate(2px,-2px); }
.admin-btn.secondary { border-color: #d3ccc2; background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(20,22,24,.05); }
.admin-btn.secondary:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); box-shadow: 0 8px 20px rgba(217,45,58,.12); }
.admin-btn .btn-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; color: inherit; }
.admin-btn .btn-icon svg { width: 15px; height: 15px; display: block; stroke: currentColor; }
.page-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Dashboard */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 17px; }
.kpi, .panel, .screen-card { border: 1px solid rgba(20,22,24,.065); background: var(--paper); box-shadow: var(--shadow-sm); }
.kpi { position: relative; overflow: hidden; border-radius: 18px; padding: 21px; animation: card-enter .55s cubic-bezier(.2,.8,.2,1) both; transition: box-shadow .25s ease, border-color .25s ease, background .25s ease; }
.kpi:nth-child(2) { animation-delay: 70ms; }
.kpi:nth-child(3) { animation-delay: 140ms; }
.kpi:nth-child(4) { animation-delay: 210ms; }
.kpi::after { content: ""; position: absolute; width: 100px; height: 100px; right: -48px; bottom: -62px; border: 16px solid rgba(20,22,24,.025); border-radius: 50%; pointer-events: none; transition: transform .3s ease, border-color .3s ease; }
.kpi:hover { border-color: rgba(217,45,58,.24); box-shadow: 0 16px 36px rgba(20,22,24,.095); }
.kpi:hover::after { border-color: rgba(217,45,58,.08); transform: scale(1.15); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kpi-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #f0ece5; color: #696d70; font: 700 11px var(--display); }
.kpi > strong { display: block; margin: 10px 0 7px; font: 760 30px var(--display); letter-spacing: -.045em; }
.trend { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; font-weight: 650; }
.trend i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.kpi-alert .kpi-icon { background: #fff2dd; color: var(--amber); }
.kpi-alert .trend { color: var(--amber); }
.panel { border-radius: 20px; padding: 24px; margin-top: 19px; animation: card-enter .55s .15s cubic-bezier(.2,.8,.2,1) both; }
.panel h3 { margin: 0 0 17px; font-size: 20px; }
.panel p { color: var(--muted); font-size: 12.5px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading > div > span { color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.panel-heading h3 { margin: 5px 0 0; }
.period-chip { border: 1px solid var(--line); border-radius: 999px; background: #f7f4ee; color: var(--muted); padding: 7px 12px; font-size: 11px; font-weight: 650; }
.chart-wrap { display: grid; grid-template-columns: 30px 1fr; gap: 11px; }
.chart-scale { height: 205px; display: flex; flex-direction: column; justify-content: space-between; padding: 23px 0 4px; color: #a0a3a4; font-size: 7px; font-weight: 700; text-transform: uppercase; }
.bar-chart { position: relative; height: 205px; display: flex; align-items: flex-end; gap: 7px; border-bottom: 1px solid var(--line); padding-top: 20px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 60px, rgba(20,22,24,.05) 61px); }
.bar { position: relative; flex: 1; min-width: 3px; min-height: 5px; border-radius: 5px 5px 1px 1px; background: linear-gradient(180deg, #eb6570, var(--red)); transform-origin: bottom; animation: grow-bar .7s cubic-bezier(.2,.8,.2,1) both; }
.bar:nth-child(3n+2) { animation-delay: 70ms; }
.bar:nth-child(3n) { animation-delay: 130ms; }
.bar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255,255,255,.18), transparent); }
.bar:hover { filter: brightness(.88); }
.loading-panel, .notice-panel { display: flex; align-items: center; gap: 17px; min-height: 94px; }
.loading-panel h3, .notice-panel h3 { margin: 0 0 4px; }
.loading-panel p, .notice-panel p { margin: 0; }
.loader { width: 34px; height: 34px; flex: 0 0 auto; border: 3px solid var(--red-soft); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
.skeleton-loader { min-width: 0; }
.skeleton-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.skeleton-shimmer { display: block; flex: 0 0 auto; border-radius: 7px; background: linear-gradient(105deg, #ece8e1 8%, #f8f6f2 36%, #ece8e1 64%); background-size: 240% 100%; animation: skeleton-shimmer 1.65s ease-in-out infinite; }
.skeleton-line { height: 10px; }
.skeleton-line-short { width: 42%; }
.skeleton-line-medium { width: 66%; }
.skeleton-line-long { width: 88%; }
.skeleton-pill { width: 84px; height: 24px; border-radius: 999px; }
.skeleton-icon { width: 32px; height: 32px; border-radius: 10px; }
.skeleton-title { width: 72%; height: 20px; }
.skeleton-metric { width: 54%; height: 27px; margin: 12px 0; }
.skeleton-kpi-card { min-height: 135px; }
.skeleton-kpi-heading, .skeleton-chart-heading, .skeleton-lane-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.skeleton-kpi-heading > .skeleton-line { max-width: 120px; }
.skeleton-chart-panel { padding-bottom: 17px; }
.skeleton-chart-heading > .skeleton-line { max-width: 200px; height: 15px; }
.skeleton-chart-bars { height: 190px; display: flex; align-items: flex-end; gap: 10px; margin-top: 20px; border-bottom: 1px solid var(--line); padding: 0 4px; }
.skeleton-chart-bar { min-width: 9px; flex: 1; border-radius: 6px 6px 0 0; }
.skeleton-table { min-width: 0; padding: 0 22px; }
.skeleton-table-header, .skeleton-table-row { display: grid; grid-template-columns: repeat(var(--skeleton-columns), minmax(84px,1fr)); align-items: center; column-gap: 20px; }
.skeleton-table-header { min-height: 54px; border-bottom: 1px solid var(--line); }
.skeleton-table-row { min-height: 66px; border-bottom: 1px solid #eeeae3; }
.skeleton-table-cell { display: grid; gap: 8px; }
.skeleton-table-cell > .skeleton-line + .skeleton-line { height: 8px; }
.skeleton-table-footer { min-height: 62px; display: flex; align-items: center; justify-content: space-between; }
.skeleton-table-footer > .skeleton-line { max-width: 180px; }
.skeleton-pagination { width: 125px; height: 30px; border-radius: 9px; }
.skeleton-kanban { padding-top: 2px; }
.skeleton-lane { min-height: 385px; }
.skeleton-lane-title { margin-bottom: 17px; }
.skeleton-lane-title > .skeleton-line { max-width: 130px; }
.skeleton-lane-title > .skeleton-pill { width: 34px; height: 20px; }
.skeleton-lead-card { display: grid; gap: 11px; min-height: 132px; }
.skeleton-card-action { width: 78%; height: 31px; margin-top: 5px; border-radius: 9px; }
.skeleton-detail-heading { display: grid; justify-items: start; gap: 13px; }
.skeleton-detail-heading > .skeleton-title { max-width: 270px; height: 25px; }
.skeleton-detail-heading > .skeleton-line { max-width: 360px; }
.skeleton-detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 26px; }
.skeleton-detail-card { min-height: 118px; border: 1px solid var(--line); border-radius: 14px; background: #faf7f2; padding: 16px; }
.skeleton-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.skeleton-inline-card { min-height: 92px; display: flex; gap: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 15px; }
.skeleton-checkbox { width: 17px; height: 17px; border-radius: 5px; }
.skeleton-inline-copy { min-width: 0; flex: 1; display: grid; gap: 9px; }
.skeleton-qr-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; margin-top: 17px; }
.skeleton-qr-card { display: grid; justify-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 15px; padding: 20px; }
.skeleton-qr-card > .skeleton-title { width: 76%; }
.skeleton-qr-image { width: min(190px,100%); aspect-ratio: 1; margin-top: 5px; border-radius: 12px; }
.notice-icon { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--red-soft); color: var(--red); font: 700 14px Georgia, serif; }
.section-label { display: flex; align-items: center; gap: 14px; margin: 35px 0 14px; }
.section-label span { color: var(--ink); font: 700 13px var(--display); text-transform: uppercase; letter-spacing: .06em; }
.section-label small { color: var(--muted); font-size: 11px; }
.section-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }

/* Shared screens */
.screen-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.screen-card { position: relative; overflow: hidden; min-height: 178px; border-radius: 19px; padding: 23px; animation: card-enter .55s cubic-bezier(.2,.8,.2,1) both; transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.screen-card:nth-child(2) { animation-delay: 70ms; }
.screen-card:nth-child(3) { animation-delay: 140ms; }
.screen-card:nth-child(4) { animation-delay: 210ms; }
.screen-card:nth-child(5) { animation-delay: 280ms; }
.screen-card:nth-child(6) { animation-delay: 350ms; }
.screen-card::before { content: ""; position: absolute; left: 0; top: 23px; width: 3px; height: 27px; border-radius: 0 3px 3px 0; background: var(--red); transform: scaleY(0); transition: transform .25s ease; pointer-events: none; }
.screen-card:hover { border-color: rgba(217,45,58,.14); transform: translateY(-5px); box-shadow: var(--shadow); }
.screen-card:hover::before { transform: scaleY(1); }
.screen-card > span, .card-top > span { color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.screen-card h3 { margin: 14px 0 8px; font-size: 20px; }
.screen-card p { max-width: 380px; margin: 0 0 17px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.screen-card > a, .screen-card .card-top ~ a { color: var(--ink); font-size: 12px; font-weight: 700; }
.screen-card > a:hover { color: var(--red); }
.screen-card a i { margin-left: 6px; color: var(--red); font-style: normal; transition: margin-left .2s ease; }
.screen-card a:hover i { margin-left: 10px; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-top b { color: #888d90; font: 650 11px var(--display); letter-spacing: .06em; }
.dashboard-links .screen-card { min-height: 195px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { border-bottom: 1px solid var(--line); color: #4b5258; padding: 12px 14px; text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.admin-table td { border-bottom: 1px solid #eeeae3; padding: 14px 14px; font-size: 13px; }
.admin-table tbody tr { transition: background .2s ease; }
.admin-table tbody tr:hover { background: #faf7f2; }
.badge-soft { display: inline-block; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); padding: 5px 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px,1fr); gap: 15px; overflow-x: auto; padding-bottom: 15px; }
.lane { min-height: 480px; border: 1px solid rgba(20,22,24,.05); border-radius: 18px; background: #e9e4db; padding: 14px; animation: card-enter .5s ease both; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.lane-drop-target { border-color: rgba(217,45,58,.45); background: #f7ecea; box-shadow: inset 0 0 0 2px rgba(217,45,58,.12); }
.lane-title { display: flex; justify-content: space-between; margin-bottom: 13px; font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.lead-card { border: 1px solid rgba(20,22,24,.05); border-radius: 13px; background: #fff; padding: 14px; margin-bottom: 9px; box-shadow: 0 7px 18px rgba(20,22,24,.055); cursor: grab; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.lead-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.lead-card-dragging { border-color: rgba(217,45,58,.28); opacity: .55; cursor: grabbing; }
.lead-card-moving { opacity: .65; pointer-events: none; }
.lead-card strong, .lead-card small { display: block; }
.lead-card small { margin-top: 4px; color: var(--muted); }

/* Operational workspaces */
.toolbar { position: relative; z-index: 50; display: flex; align-items: center; gap: 10px; margin: -7px 0 18px; animation: page-enter .45s ease both; }
.search-box { min-width: min(380px, 42vw); height: 43px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.8); padding: 0 13px; transition: border-color .2s ease, box-shadow .2s ease; }
.search-box:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(217,45,58,.07); }
.search-box span { color: var(--red); font-size: 17px; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.toolbar-select, .compact-select { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 0 11px; outline: none; font-size: 11px; }
.toolbar-select { height: 43px; }
.action-btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d3ccc2; border-radius: 10px; background: #fff; color: #374151; padding: 9px 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease; }
.action-btn:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); transform: translateY(-1px); }
.action-btn:disabled, .admin-btn:disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }
.action-btn.small { min-height: 30px; padding: 6px 10px; font-size: 11px; }
.action-btn.danger { border-color: #efc5c8; color: var(--red-dark); }
.toolbar-count { margin-left: auto; color: var(--muted); font-size: 11.5px; font-weight: 650; }
.sale-toolbar { position: relative; z-index: 50; flex-wrap: wrap; gap: 8px; align-items: center; }
.sale-toolbar .search-box { min-width: min(220px, 100%); flex: 1 1 180px; }
.sale-filter-select {
    height: 43px;
    min-width: 140px;
    max-width: 175px;
    flex: 1 1 140px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background-color: #fff;
    color: var(--ink);
    padding: 0 38px 0 13px !important;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.sale-filter-select:hover {
    border-color: #c7beb2;
}
.sale-filter-select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(217,45,58,.07);
}
.toolbar-searchable-select {
    min-width: 135px;
    max-width: 195px;
    flex: 1 1 135px;
    position: relative;
}
.toolbar-searchable-select.is-open {
    z-index: 1050 !important;
}
.toolbar-searchable-select .searchable-select-trigger {
    height: 43px !important;
    min-height: 43px !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--ink) !important;
    padding: 0 13px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: border-color .2s ease, box-shadow .2s ease !important;
}
.toolbar-searchable-select .searchable-select-trigger:hover {
    border-color: #c7beb2 !important;
}
.toolbar-searchable-select .searchable-select-trigger:focus-within,
.toolbar-searchable-select .searchable-select-trigger:focus,
.toolbar-searchable-select.is-open .searchable-select-trigger {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 4px rgba(217,45,58,.07) !important;
}
.toolbar-searchable-select .searchable-trigger-text {
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: var(--ink) !important;
}
.toolbar-searchable-select .searchable-select-dropdown {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 10px !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.15) !important;
    z-index: 1060 !important;
}
.searchable-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line, #ded8ce);
    background: #fff;
    padding: 0 10px;
    transition: border-bottom-color .2s ease;
}
.searchable-search-wrapper:focus-within {
    border-bottom-color: var(--red, #d92d3a);
}
.toolbar-searchable-select .searchable-select-dropdown input,
.searchable-select-dropdown .searchable-search-input {
    height: 38px !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 11.5px !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.toolbar-searchable-select .searchable-option-item {
    font-size: 11.5px !important;
    padding: 8px 12px !important;
    transition: background-color .15s ease, color .15s ease;
}
.searchable-option-item:hover {
    background-color: #f1f5f9 !important;
    color: var(--ink) !important;
}
.toolbar-searchable-select .searchable-option-item[aria-selected="true"] {
    background-color: #fff7f6 !important;
    color: var(--red) !important;
    font-weight: 600 !important;
}
.catalog-filter-card {
    background: #faf7f2;
    border: 1px solid var(--line, #ded8ce);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
    position: relative;
    z-index: 50;
}
.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    flex: 1 1 200px;
    max-width: 280px;
    height: 43px;
    background: #fff;
    border: 1px solid var(--line, #ded8ce);
    border-radius: 10px;
    padding: 0 11px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.filter-search-box:focus-within {
    border-color: var(--red, #d92d3a);
    box-shadow: 0 0 0 4px rgba(217, 45, 58, 0.07);
}
.filter-search-box svg {
    width: 14px;
    height: 14px;
    stroke: #74787b;
    flex-shrink: 0;
}
.filter-search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 12px;
    color: var(--ink, #151719);
}
.filter-search-box input::placeholder {
    color: #8c9094;
}
.filter-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease, transform .1s ease;
}
.filter-search-clear:hover {
    background: var(--red, #d92d3a);
    color: #fff;
    transform: scale(1.08);
}
.catalog-filter-card .toolbar-searchable-select {
    min-width: 130px;
    max-width: 175px;
    flex: 1 1 130px;
}
.filter-count {
    margin-left: auto;
    color: var(--muted, #74787b);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    flex: 0 0 auto;
}
.filter-count strong {
    color: var(--ink, #151719);
    font-size: 13px;
    font-weight: 800;
}
.filter-btn-group { display: flex; align-items: center; gap: 6px; }
.action-btn,
.btn-reset,
.filter-btn-group .action-btn,
.filter-btn-group .btn-apply,
.filter-btn-group .btn-reset,
.filter-btn-group .btn-export {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    box-sizing: border-box;
}
.action-btn,
.filter-btn-group .action-btn {
    min-height: 43px;
    height: 43px;
    border: 1px solid #ded8ce;
    border-radius: 10px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    color: #374151;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    outline: none;
    transition: all .15s ease;
}
.action-btn:hover,
.filter-btn-group .action-btn:hover {
    background: #f4ede2;
    color: var(--ink, #151719);
    border-color: #d3ccc2;
}
.filter-btn-group .btn-apply { background: var(--ink, #151719); color: #fff; border: 1px solid var(--ink, #151719); height: 43px; border-radius: 10px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.filter-btn-group .btn-apply:hover { background: var(--red, #d92d3a); border-color: var(--red, #d92d3a); color: #fff; }
.btn-reset,
.action-btn.btn-reset,
.filter-btn-group .btn-reset {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    color: #4b5563 !important;
    border: 1px solid #ded8ce !important;
    min-height: 43px !important;
    height: 43px !important;
    border-radius: 10px !important;
    padding: 0 14px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    transition: all .15s ease !important;
}
.btn-reset:hover,
.action-btn.btn-reset:hover,
.filter-btn-group .btn-reset:hover {
    background: #f4ede2 !important;
    color: var(--ink, #151719) !important;
    border-color: #d3ccc2 !important;
}
.filter-btn-group .btn-export { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #374151; border: 1px solid #ded8ce; height: 43px; border-radius: 10px; padding: 0 14px; text-decoration: none; transition: all .15s ease; cursor: pointer; }
.filter-btn-group .btn-export:hover { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }
.filter-btn-group .btn-export svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; flex-shrink: 0; }
.exception-kpis { margin-bottom: 27px; }
.exception-open { color: var(--red-dark); }
.exception-toolbar { flex-wrap: wrap; }
.exception-table { min-width: 1060px; }
.exception-table td strong, .exception-table td small { display: block; }
.exception-table td small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.exception-message { max-width: 320px; }
.exception-message small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exception-detail-modal { width: min(900px, calc(100vw - 40px)); }
.exception-root-cause { margin: 20px 0; border: 1px solid #efc8cb; border-radius: 14px; background: #fff6f6; padding: 17px; }
.exception-root-cause > strong { display: block; margin-top: 8px; overflow-wrap: anywhere; font-size: 13px; }
.exception-root-cause p, .exception-context-block p { margin: 8px 0 0; overflow-wrap: anywhere; line-height: 1.6; }
.exception-context-block { margin: 19px 0; }
.exception-metadata { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; margin: 22px 0; }
.exception-metadata div { min-width: 0; }
.exception-metadata dt { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.exception-metadata dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 11px; }
.exception-trace-id { grid-column: 1 / -1; }
.exception-stack-trace { margin: 20px 0; }
.exception-stack-trace summary { cursor: pointer; color: var(--ink); font-size: 11px; font-weight: 750; }
.exception-stack-trace pre { max-height: 300px; overflow: auto; margin: 12px 0 0; border-radius: 12px; background: #202428; color: #f4f1eb; padding: 16px; font-size: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.exception-notes-label { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.exception-notes-label textarea { width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 11px; font-size: 11px; resize: vertical; }
.exception-resolution-note { margin: 18px 0; border: 1px solid #c7e1d2; border-radius: 12px; background: #eff9f3; padding: 14px; }
.exception-resolution-note strong, .exception-resolution-note span { display: block; }
.exception-resolution-note span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.exception-resolution-note p { margin: 10px 0 0; }
.catalog-controls {
    position: relative;
    z-index: 50;
    overflow: visible;
    margin: -7px 0 18px;
    border: 1px solid rgba(20,22,24,.07);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow-sm);
    animation: page-enter .45s ease both;
}
.catalog-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 8px; scrollbar-width: none; border-radius: 18px; }
.catalog-tabs::-webkit-scrollbar { display: none; }
.catalog-tab { position: relative; min-height: 40px; flex: 0 0 auto; border: 0; border-radius: 11px; background: transparent; color: #676b6e; padding: 10px 15px; font-size: 11px; font-weight: 750; white-space: nowrap; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.catalog-tab::after { content: ""; position: absolute; right: 15px; bottom: 5px; left: 15px; height: 2px; border-radius: 999px; background: var(--red); opacity: 0; transform: scaleX(.35); transition: opacity .2s ease, transform .2s ease; }
.catalog-tab:hover { background: #f7f3ed; color: var(--ink); }
.catalog-tab.active { background: var(--red-soft); color: var(--red-dark); }
.catalog-tab.active::after { opacity: 1; transform: scaleX(1); }
.catalog-controls.has-toolbar .catalog-tabs { border-bottom: 1px solid #ebe6de; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.catalog-toolbar {
    position: relative;
    z-index: 50;
    overflow: visible;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    display: grid;
    grid-template-columns: minmax(260px, 520px) auto minmax(110px, 1fr);
    align-items: center;
    gap: 11px;
    padding: 12px;
    background: #faf7f2;
}
.catalog-search { height: 44px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 0 13px; cursor: text; transition: border-color .2s ease, box-shadow .2s ease; }
.catalog-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(217,45,58,.07); }
.catalog-search svg { width: 17px; height: 17px; flex: 0 0 auto; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; }
.catalog-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.catalog-search input::placeholder { color: #96999b; }
.catalog-toolbar-actions { position: relative; z-index: 50; display: flex; align-items: center; gap: 8px; }
.catalog-toolbar-actions .action-btn { min-height: 40px; }
.catalog-search-action { border-color: var(--ink-soft); background: var(--ink-soft); color: #fff; padding-right: 18px; padding-left: 18px; }
.catalog-search-action:hover { border-color: var(--red); background: var(--red); color: #fff; }
.catalog-export-action { gap: 7px; }
.catalog-export-action svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.catalog-result-count { justify-self: end; display: flex; align-items: baseline; gap: 5px; border-left: 1px solid var(--line); padding: 4px 4px 4px 17px; color: var(--muted); }
.catalog-result-count strong { color: var(--ink); font: 760 16px var(--display); letter-spacing: -.02em; }
.catalog-result-count span { font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.alert-note { display: flex; align-items: center; margin: 0 0 15px; border: 1px solid #cce6d8; border-radius: 11px; background: #eff9f3; color: var(--green); padding: 10px 13px; font-size: 11px; font-weight: 650; animation: page-enter .3s ease both; }
.alert-note.error { border-color: #efc8cb; background: var(--red-soft); color: var(--red-dark); }
.alert-note .action-btn { margin-left: auto; }
.toast-stack { position: fixed; z-index: 1200; top: 96px; right: 28px; width: min(380px, calc(100vw - 40px)); display: grid; gap: 10px; pointer-events: none; }
.app-toast { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr) 28px; align-items: start; gap: 11px; overflow: hidden; border: 1px solid rgba(20,22,24,.1); border-left: 3px solid var(--amber); border-radius: 14px; background: rgba(255,253,249,.98); padding: 13px 12px 13px 13px; box-shadow: 0 18px 55px rgba(20,22,24,.17); pointer-events: auto; backdrop-filter: blur(18px); animation: toast-enter .3s cubic-bezier(.2,.8,.2,1) both; }
.app-toast.toast-success { border-left-color: var(--green); }
.app-toast.toast-error { border-left-color: var(--red); }
.toast-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #fff7e8; color: var(--amber); }
.toast-success .toast-icon { background: #e9f6ef; color: var(--green); }
.toast-error .toast-icon { background: var(--red-soft); color: var(--red); }
.toast-icon svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast-copy { min-width: 0; padding-top: 1px; }
.toast-copy strong { display: block; color: var(--ink); font: 750 12px var(--display); letter-spacing: -.01em; }
.toast-copy p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.toast-close { width: 27px; height: 27px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #8c9092; padding: 0 0 2px; font-size: 19px; line-height: 1; cursor: pointer; }
.toast-close:hover { background: #f1ede6; color: var(--ink); }
.admin-shell:has(.table-panel) { height: 100vh; height: 100dvh; overflow: hidden; }
.workspace:has(.table-panel) { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.workspace:has(.table-panel) > .topbar { flex: 0 0 auto; }
.admin-content:has(.table-panel) { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.admin-content:has(.table-panel) > :not(.table-panel):not(.split-workspace) { flex-shrink: 0; }
.admin-content:has(.table-panel) > .split-workspace { min-height: 0; flex: 1 1 auto; align-items: stretch; overflow: hidden; }
.table-panel { width: 100%; min-width: 0; min-height: 0; max-width: 100%; display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; padding: 0; position: relative; z-index: 1; }
.table-panel > .panel-tools, .table-panel > .grid-pager { flex: 0 0 auto; }
.table-wrap { width: 100%; min-width: 0; min-height: 0; max-width: 100%; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.table-wrap .admin-table thead th { position: sticky; z-index: 1; top: 0; background: var(--paper, #fffdf9); }
.grid-pager { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); background: #fffdf9; padding: 12px 16px; }
.pager-summary { display: flex; align-items: center; gap: 17px; color: var(--muted); font-size: 11.5px; }
.pager-summary strong { color: var(--ink); }
.pager-summary label { display: inline-flex; align-items: center; gap: 7px; color: #5a5e62; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pager-summary select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 32px !important;
    min-height: 32px !important;
    border: 1px solid var(--line, #ded8ce) !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2374787b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px 12px !important;
    color: var(--ink) !important;
    padding: 0 24px 0 9px !important;
    outline: none !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: border-color .2s ease, box-shadow .2s ease !important;
}
.pager-summary select:hover {
    border-color: #c7beb2 !important;
}
.pager-summary select:focus {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 3px rgba(217,45,58,.12) !important;
}
.pager-buttons { display: flex; align-items: center; gap: 6px; }
.pager-buttons button { min-width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #474c50; padding: 0 7px; font-size: 11.5px; font-weight: 700; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.pager-buttons button:hover:not(:disabled) { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.pager-buttons button.active { border-color: var(--red); background: var(--red); color: #fff; }
.pager-buttons button:disabled { cursor: not-allowed; opacity: .38; }
.pager-buttons .pager-arrow { font-size: 18px; font-weight: 500; }
.operational-table { min-width: 820px; }
.operational-table th { background: #faf7f2; padding: 13px 16px; font-size: 12px; }
.operational-table td { padding: 14px 16px; vertical-align: middle; font-size: 13px; }
.operational-table td > strong, .operational-table td > small { display: block; }
.operational-table td > small { max-width: 250px; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.selected-row { background: #fff7f6 !important; }
.low-stock { color: var(--amber); }
.compact-input { width: 92px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 7px 9px; outline: none; font-size: 11px; }
.compact-input:focus, .compact-select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,45,58,.07); }
.price-input { width: 105px; }
.tracking-input { width: 160px; }
.switch-label { display: flex; align-items: center; gap: 7px; font-size: 11px; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { min-width: 34px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d3ccc2; border-radius: 9px; background: #ffffff; color: #374151; padding: 6px 10px; font-size: 13.5px; font-weight: 650; line-height: 1; white-space: nowrap; box-shadow: 0 1px 2px rgba(20,22,24,.05); cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease; }
.icon-btn:hover { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(217,45,58,.14); }
.icon-btn:active { transform: translateY(0); }
.icon-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.icon-btn.save { border-color: #a7dfb8; background: #effaf3; color: #1b6c3e; font-size: 11.5px; font-weight: 700; }
.icon-btn.save:hover { border-color: var(--green); background: #def4e6; color: #11532e; box-shadow: 0 3px 8px rgba(37,129,84,.16); }
.icon-btn.danger { border-color: #f7b2b7; background: #fff3f4; color: #b81926; }
.icon-btn.danger:hover { border-color: var(--red-dark); background: #fde8e9; color: #8c101c; box-shadow: 0 3px 8px rgba(170,23,36,.18); }
.status-pill { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #f5f2ed; color: #51565a; padding: 5px 10px; font-size: 11px; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.status-pill.active, .status-pill.status-paid, .status-pill.status-delivered { border-color: #c7e1d2; background: #eff9f3; color: var(--green); }
.status-pill.neutral { color: #777b7e; }
.status-pill.status-processing, .status-pill.status-shipped, .status-pill.status-paymentpending { border-color: #edd9b8; background: #fff8ec; color: var(--amber); }
.status-pill.status-cancelled, .status-pill.status-refunded { border-color: #efc5c8; background: #fff3f4; color: var(--red-dark); }
.loading-state { min-height: 140px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 12px; }
.empty-panel { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 35px; }
.empty-panel > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: 19px; }
.empty-panel h3 { margin: 15px 0 5px; }
.empty-panel p, .muted-copy { color: var(--muted); font-size: 12px; }
.modal-backdrop { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; overflow-y: auto; background: rgba(63,57,52,.22); padding: 24px; backdrop-filter: blur(5px); animation: modal-fade .2s ease both; }
.admin-modal { width: min(620px, 100%); overflow: visible !important; border: 1px solid rgba(20,22,24,.08); border-radius: 22px; background: var(--paper); box-shadow: 0 30px 90px rgba(20,22,24,.18); padding: 26px; animation: modal-enter .3s cubic-bezier(.2,.8,.2,1) both; position: relative; }
.admin-modal.inventory-modal { overflow: hidden !important; }
.admin-modal.modal-wide { width: min(900px, 100%); }
.confirmation-modal { width: min(500px, 100%); }
.confirmation-copy { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.admin-btn.danger-btn { border-color: #9f1621; background: #9f1621; }
.admin-btn.danger-btn:hover { border-color: #7e1019; background: #7e1019; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.modal-head span { color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.modal-head h2 { margin: 5px 0 0; font-size: 28px; }
.modal-close { position: relative; width: 40px; height: 40px; display: grid; flex: 0 0 40px; place-items: center; border: 1px solid #e7ded6; border-radius: 12px; background: #fff; color: transparent; padding: 0; font-size: 0; line-height: 1; box-shadow: 0 3px 10px rgba(20,22,24,.045); cursor: pointer; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease; }
.modal-close::before, .modal-close::after { content: ""; position: absolute; width: 15px; height: 1.75px; border-radius: 999px; background: #696d70; transition: background .2s ease; }
.modal-close::before { transform: rotate(45deg); }
.modal-close::after { transform: rotate(-45deg); }
.modal-close:hover { border-color: var(--red); background: var(--red); box-shadow: 0 8px 18px rgba(217,45,58,.18); transform: translateY(-1px); }
.modal-close:hover::before, .modal-close:hover::after { background: #fff; }
.modal-close:active { transform: translateY(0) scale(.96); }
.modal-close:focus-visible { outline: 3px solid rgba(217,45,58,.2); outline-offset: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid.three { grid-template-columns: repeat(3,1fr); }
.form-grid label, .cms-editor label { display: block; color: #45494c; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.form-grid input:not([type="checkbox"]):not([type="radio"]), .form-grid select, .form-grid textarea, .cms-editor input:not([type="checkbox"]):not([type="radio"]), .cms-editor textarea { width: 100%; min-height: 44px; display: block; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; font-size: 12px; text-transform: none; transition: border-color .2s ease, box-shadow .2s ease; }
.form-grid textarea, .cms-editor textarea { resize: vertical; }
.form-grid input:not([type="checkbox"]):not([type="radio"]):focus, .form-grid select:focus, .form-grid textarea:focus, .cms-editor input:not([type="checkbox"]):not([type="radio"]):focus, .cms-editor textarea:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(217,45,58,.07); }
.form-grid input:not([type="checkbox"]):not([type="radio"]).invalid, .form-grid select.invalid, .form-grid textarea.invalid, .modern-input.invalid, .modern-select.invalid { border-color: var(--red); background-color: #fff9f9; }
select, select.admin-input, .form-grid select, .cms-editor select, .panel select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2374787b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
    padding-right: 36px !important;
    border: 1px solid var(--line, #ded8ce) !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--ink, #151719) !important;
    min-height: 44px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease;
}
select:hover, select.admin-input:hover, .form-grid select:hover {
    border-color: #c7beb2 !important;
}
select:focus, select.admin-input:focus, .form-grid select:focus {
    border-color: var(--red, #d92d3a) !important;
    box-shadow: 0 0 0 3px rgba(217, 45, 58, 0.12) !important;
    outline: none !important;
}
select:disabled, select.admin-input:disabled, .form-grid select:disabled {
    background-color: #f8fafc !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    border-color: #e2e8f0 !important;
    opacity: 0.8 !important;
    box-shadow: none !important;
}
.form-grid .searchable-select,
.sale-line-grid .searchable-select,
.panel .searchable-select {
    margin-top: 6px;
    width: 100%;
}
.searchable-select-trigger {
    min-height: 44px;
    height: 44px;
    border: 1px solid var(--line, #ded8ce) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--ink, #151719) !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: border-color .2s ease, box-shadow .2s ease !important;
    box-sizing: border-box !important;
}
.searchable-select-trigger:hover:not(:disabled) {
    border-color: #c7beb2 !important;
}
.searchable-select-trigger:focus-within,
.searchable-select-trigger:focus,
.searchable-select.is-open .searchable-select-trigger {
    border-color: var(--red, #d92d3a) !important;
    box-shadow: 0 0 0 3px rgba(217, 45, 58, 0.12) !important;
    outline: none !important;
}
.searchable-select.disabled .searchable-select-trigger,
.searchable-select-trigger:disabled {
    background-color: #f8fafc !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    border-color: #e2e8f0 !important;
    opacity: 0.8 !important;
    box-shadow: none !important;
}
.searchable-trigger-text {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--ink, #151719) !important;
}
.searchable-select-dropdown {
    border-radius: 10px !important;
    border: 1px solid var(--line, #ded8ce) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.15) !important;
}
.searchable-option-item {
    font-size: 12px !important;
    padding: 9px 12px !important;
    color: #334155;
    transition: background-color .15s ease, color .15s ease;
}
.searchable-option-item:hover {
    background-color: #f1f5f9 !important;
    color: var(--ink, #151719) !important;
}
.searchable-option-item[aria-selected="true"] {
    background-color: #fff7f6 !important;
    color: var(--red, #d92d3a) !important;
    font-weight: 600 !important;
}
.form-grid .validation-message, .modern-label .validation-message, .sale-uniform-price .validation-message { display: block; margin-top: 5px; color: var(--red-dark); font-size: 11px; font-weight: 600; letter-spacing: 0; line-height: 1.4; text-transform: none; }
.span-two { grid-column: span 2; }
.span-three { grid-column: 1 / -1; }
.check-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 17px; }
.check-row label { display: flex; align-items: center; gap: 8px; color: #45494c; font-size: 12px; font-weight: 600; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-actions > .action-btn:not(.danger), .sale-wizard-actions > div > .action-btn, .inventory-form-actions .modern-btn-cancel { min-width: 105px; min-height: 43px; border: 1px solid #e0d8cf !important; border-radius: 999px !important; background: #f7f4ef !important; color: #45494c !important; padding: 10px 18px !important; font-size: 11.5px !important; font-weight: 700 !important; letter-spacing: .06em !important; text-transform: uppercase; box-shadow: none; transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease !important; }
.modal-actions > .action-btn:not(.danger):hover:not(:disabled), .sale-wizard-actions > div > .action-btn:hover:not(:disabled), .inventory-form-actions .modern-btn-cancel:hover:not(:disabled) { border-color: rgba(217,45,58,.38) !important; background: var(--red-soft) !important; color: var(--red-dark) !important; box-shadow: 0 6px 16px rgba(217,45,58,.08); transform: translateY(-1px); }
.modal-actions > .action-btn:not(.danger):focus-visible, .sale-wizard-actions > div > .action-btn:focus-visible, .inventory-form-actions .modern-btn-cancel:focus-visible { outline: 3px solid rgba(217,45,58,.18); outline-offset: 3px; }
.inventory-modal { width: min(1040px, calc(100vw - 36px)) !important; height: min(860px, calc(100vh - 36px)); max-height: none; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.inventory-modal-head { flex: 0 0 auto; align-items: center; margin: 0; border-bottom: 1px solid #ebe6de; padding: 22px 27px 20px; background: var(--paper); }
.inventory-modal-head h2 { font-size: 30px; }
.inventory-modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.inventory-form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; }
.inventory-form > .validation-errors { flex: 0 0 auto; margin: 14px 22px 0; }
.inventory-modal .modern-form-container { min-height: 0; max-height: none; display: grid; flex: 1 1 auto; grid-template-columns: repeat(2, minmax(0,1fr)); align-content: start; gap: 14px; overflow-y: auto; border: 0; border-radius: 0; background: #f4f0e9; padding: 18px 22px 140px; scrollbar-gutter: stable; }
.inventory-modal .modern-form-container::-webkit-scrollbar { width: 9px; }
.inventory-modal .modern-form-container::-webkit-scrollbar-track { background: #ebe6de; }
.inventory-modal .modern-form-container::-webkit-scrollbar-thumb { border: 2px solid #ebe6de; border-radius: 999px; background: #bbb4a9; }
.inventory-modal .modern-form-card { min-width: 0; border-color: rgba(20,22,24,.08); border-radius: 15px; background: #fffdf9; padding: 17px; box-shadow: 0 8px 24px rgba(20,22,24,.035); }
.inventory-modal .modern-form-card:first-child, .inventory-modal .modern-form-card:nth-child(4) { grid-column: 1 / -1; }
.inventory-modal .modern-form-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; border-bottom: 0; color: var(--ink); padding-bottom: 0; font: 760 12px var(--display); letter-spacing: -.01em; }
.inventory-modal .modern-form-title::before { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: var(--red-soft); color: var(--red); font: 800 8px var(--body); letter-spacing: .04em; }
.inventory-modal .modern-form-card:nth-child(1) .modern-form-title::before { content: "01"; }
.inventory-modal .modern-form-card:nth-child(2) .modern-form-title::before { content: "02"; }
.inventory-modal .modern-form-card:nth-child(3) .modern-form-title::before { content: "03"; }
.inventory-modal .modern-form-card:nth-child(4) .modern-form-title::before { content: "04"; }
.inventory-modal .modern-form-card:nth-child(5) .modern-form-title::before { content: "05"; }
.inventory-modal .modern-label { gap: 6px; color: #4f5356; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; }
.inventory-modal .modern-input, .inventory-modal .modern-select { min-height: 44px; border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.inventory-modal .modern-select { padding-right: 36px; background-position: right 12px center; background-size: 16px; }
.inventory-modal .modern-form-card { position: relative; z-index: 1; }
.inventory-modal .modern-form-card:has(.is-open) { z-index: 100 !important; }
.inventory-modal .searchable-select { width: 100%; position: relative; }
.inventory-modal .searchable-select.is-open { z-index: 1050 !important; }
.inventory-modal .searchable-select .searchable-select-trigger {
    min-height: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    border: 1px solid var(--line, #ded8ce) !important;
    background: #fff !important;
    color: var(--ink, #151719) !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
    transition: border-color .2s ease, box-shadow .2s ease !important;
}
.inventory-modal .searchable-select .searchable-select-trigger:hover {
    border-color: #c7beb2 !important;
}
.inventory-modal .searchable-select .searchable-select-trigger:focus,
.inventory-modal .searchable-select .searchable-select-trigger:focus-within,
.inventory-modal .searchable-select.is-open .searchable-select-trigger {
    border-color: var(--red, #d92d3a) !important;
    box-shadow: 0 0 0 3px rgba(217, 45, 58, 0.12) !important;
}
.inventory-modal .searchable-select .searchable-trigger-text {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--ink, #151719) !important;
}
.inventory-modal .searchable-select-dropdown {
    border-radius: 10px !important;
    border: 1px solid var(--line, #ded8ce) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    z-index: 1060 !important;
}
.inventory-modal .searchable-option-item {
    font-size: 12px !important;
    padding: 8px 12px !important;
}
.inventory-modal .searchable-select.is-open:not(.open-upwards) .searchable-trigger-chevron {
    transform: rotate(180deg);
}
.searchable-select-options::-webkit-scrollbar {
    width: 6px;
}
.searchable-select-options::-webkit-scrollbar-track {
    background: #f8fafc;
}
.searchable-select-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.searchable-select-options::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.inventory-modal .searchable-select-dropdown {
    max-height: 240px !important;
}
.inventory-modal .searchable-select-options {
    max-height: 235px !important;
}
.inventory-modal .modern-form-card:first-child .form-row-2 { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.inventory-modal .modern-form-card:first-child .span-2 { grid-column: span 2; }
.inventory-modal .modern-form-card:nth-child(2) .form-row-2, .inventory-modal .modern-form-card:nth-child(3) .form-row-2 { gap: 12px; }
.inventory-modal .modern-form-card:nth-child(4) > div { display: grid !important; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px !important; }
.inventory-modal .modern-form-card:nth-child(4) .form-row-2 { display: contents; }
.inventory-modal .modern-file-upload { min-height: 112px; flex-direction: row; border-width: 1px; border-color: #cfc8bd; border-radius: 11px; background: #faf7f2; padding: 18px; }
.inventory-modal .modern-file-upload svg { width: 32px !important; height: 32px !important; flex: 0 0 auto; }
.inventory-availability { min-width: 0; display: flex; flex-direction: column; gap: 9px; border: 1px solid rgba(20,22,24,.08); border-radius: 15px; background: #fffdf9; padding: 17px; box-shadow: 0 8px 24px rgba(20,22,24,.035); }
.inventory-availability::before { content: "Availability"; display: block; margin-bottom: 5px; color: var(--ink); font: 760 13px var(--display); letter-spacing: -.01em; }
.inventory-option { min-height: 48px; display: flex; align-items: center; gap: 11px; border: 1px solid #e7e1d8; border-radius: 11px; background: #faf7f2; color: #4f5356; padding: 10px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.inventory-option:hover { border-color: rgba(217,45,58,.25); background: #fcf1f1; }
.inventory-option input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--red); }
.inventory-form-actions { min-height: 76px; flex: 0 0 auto; align-items: center; margin: 0 !important; border-top-color: #e5dfd5 !important; background: var(--paper); padding: 15px 27px !important; box-shadow: 0 -10px 30px rgba(20,22,24,.035); }
.inventory-form-actions::before { content: "Complete the required fields before adding this tyre."; margin-right: auto; color: var(--muted); font-size: 11px; }
.inventory-form-actions .modern-btn-cancel, .inventory-form-actions .modern-btn-add { min-width: 124px; min-height: 43px; padding: 10px 20px !important; font-size: 11.5px !important; font-weight: 700 !important; letter-spacing: .06em !important; text-transform: uppercase !important; border-radius: 999px !important; }
.inventory-form-actions .modern-btn-add { border: 1px solid var(--red) !important; background: var(--red) !important; color: #fff !important; box-shadow: 0 10px 24px rgba(217,45,58,.17) !important; transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease !important; }
.inventory-form-actions .modern-btn-add:hover:not(:disabled) { border-color: var(--red-dark) !important; background: var(--red-dark) !important; color: #fff !important; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(170,23,36,.23) !important; }
.split-workspace { display: grid; grid-template-columns: minmax(0,1fr) 370px; gap: 18px; align-items: start; }
.split-workspace > .panel { margin-top: 0; }
.detail-drawer { position: sticky; top: 96px; max-height: calc(100vh - 118px); overflow-y: auto; border: 1px solid rgba(20,22,24,.065); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); padding: 22px; animation: drawer-enter .35s ease both; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.drawer-head span { color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.drawer-head h2 { margin: 5px 0 0; font-size: 25px; }
.detail-drawer > h3 { margin: 22px 0 10px; font-size: 16px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; }
.detail-list div { border-radius: 10px; background: #f7f3ed; padding: 10px; }
.detail-list dt { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.detail-list dd { margin: 4px 0 0; font-size: 11.5px; word-break: break-word; }
.mini-record { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eee9e1; padding: 10px 2px; font-size: 11.5px; }
.mini-record strong, .mini-record small { display: block; }
.mini-record small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.review-record { margin-top: 9px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.review-record > div:first-child { display: inline-block; }
.review-record > .status-pill { float: right; }
.review-record strong, .review-record small { display: block; }
.review-record small, .review-record p { margin-top: 4px; color: var(--muted); font-size: 10.5px; }

/* Customer directory */
.customer-page-title { margin-bottom: 24px; }
.customer-header-action { gap: 10px; }
.customer-header-action svg, .customer-search svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.customer-insights { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 17px; }
.customer-insight { position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(20,22,24,.065); border-radius: 15px; background: var(--paper); padding: 15px 17px; box-shadow: 0 7px 22px rgba(20,22,24,.04); }
.customer-insight::before { content: ""; position: absolute; top: 15px; bottom: 15px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: #e3ded6; }
.customer-insight-primary::before { background: var(--red); }
.customer-insight-value::before { background: var(--green); }
.customer-insight-label { display: block; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.customer-insight > strong { display: block; overflow: hidden; margin-top: 8px; color: var(--ink); font: 750 25px var(--display); letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.customer-insight-note { display: block; overflow: hidden; margin-top: 4px; color: #878a8c; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.customer-toolbar { display: grid; grid-template-columns: minmax(260px,580px) auto minmax(110px,1fr); align-items: center; gap: 10px; margin-bottom: 16px; border: 1px solid rgba(20,22,24,.07); border-radius: 15px; background: rgba(255,253,249,.86); padding: 10px; box-shadow: 0 7px 22px rgba(20,22,24,.035); }
.customer-search { min-width: 0; height: 44px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 0 13px; transition: border-color .2s ease, box-shadow .2s ease; }
.customer-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(217,45,58,.07); }
.customer-search > svg { flex: 0 0 auto; color: var(--red); }
.customer-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.customer-search input::placeholder { color: #929597; }
.customer-search-clear { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 7px; background: #f3efe9; color: #717578; padding: 0 0 2px; font-size: 17px; cursor: pointer; }
.customer-search-clear:hover { background: var(--red-soft); color: var(--red); }
.customer-search-submit { min-height: 42px; border-color: var(--ink-soft); background: var(--ink-soft); color: #fff; padding-right: 16px; padding-left: 16px; }
.customer-search-submit:hover { border-color: var(--red); background: var(--red); color: #fff; }
.customer-result-count { justify-self: end; display: flex; align-items: baseline; gap: 6px; border-left: 1px solid var(--line); padding: 4px 5px 4px 16px; color: var(--muted); }
.customer-result-count strong { color: var(--ink); font: 750 17px var(--display); }
.customer-result-count span { font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.customer-workspace { grid-template-columns: minmax(0,1fr); }
.customer-workspace.has-detail { grid-template-columns: minmax(0,1fr) 380px; }
.customer-directory-panel { border-radius: 18px; }
.customer-panel-heading { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex: 0 0 auto; padding: 14px 19px; }
.customer-panel-heading > div > span { color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.customer-panel-heading h2 { margin: 5px 0 0; font-size: 20px; font-weight: 750; }
.customer-panel-hint { color: var(--muted); font-size: 11.5px; }
.customer-directory-table { min-width: 1010px; }
.customer-directory-table th { padding-top: 13px; padding-bottom: 13px; font-size: 12px; }
.customer-directory-table td { height: 75px; }
.customer-directory-table th:last-child, .customer-directory-table td:last-child { text-align: right; }
.customer-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.customer-identity { min-width: 210px; display: flex; align-items: center; gap: 11px; }
.customer-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(217,45,58,.1); border-radius: 12px; background: #fae9e8; color: var(--red-dark); font: 750 11px var(--display); letter-spacing: .02em; }
.customer-avatar-tone-1 { border-color: rgba(37,129,84,.12); background: #ebf5ee; color: var(--green); }
.customer-avatar-tone-2 { border-color: rgba(182,123,32,.12); background: #faf2e4; color: var(--amber); }
.customer-avatar-tone-3 { border-color: rgba(73,88,123,.12); background: #edf0f7; color: #4b608d; }
.customer-identity strong, .customer-identity small { display: block; }
.customer-identity strong { font-size: 13px; font-weight: 650; }
.customer-identity small { max-width: 220px; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-contact, .customer-joined { color: #525659; font-size: 12.5px; white-space: nowrap; }
.customer-stage { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e6e0d8; border-radius: 999px; background: #f7f4ef; color: #55595c; padding: 6px 10px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.customer-stage::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #aaa39a; }
.customer-stage.is-returning { border-color: #c9e3d3; background: #eff8f2; color: var(--green); }
.customer-stage.is-returning::before { background: var(--green); }
.customer-stage.is-first-purchase { border-color: #edd9b8; background: #fff8ec; color: var(--amber); }
.customer-stage.is-first-purchase::before { background: var(--amber); }
.customer-order-count { min-width: 33px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px; background: #f1eee8; color: var(--ink); font: 750 11px var(--display); }
.customer-order-count.is-empty { background: #f7f5f1; color: #909395; }
.customer-spend strong, .customer-spend small { display: block; white-space: nowrap; }
.customer-spend strong { color: var(--ink); font: 700 12px var(--display); }
.customer-spend small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.customer-view-button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d3ccc2; border-radius: 10px; background: #fff; color: #374151; padding: 7px 11px; font-size: 11.5px; font-weight: 700; box-shadow: 0 1px 2px rgba(20,22,24,.05); transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease; }
.customer-view-button:hover, .selected-row .customer-view-button { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); transform: translateX(1px); }
.customer-view-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.customer-empty-panel { flex: 1; }
.customer-empty-panel .action-btn { margin-top: 12px; }
.customer-profile-drawer { position: relative; top: auto; min-height: 0; max-height: none; }
.customer-drawer-head { padding-bottom: 18px; }
.customer-drawer-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.customer-profile-avatar { width: 43px; height: 43px; border-radius: 14px; }
.customer-drawer-identity > div { min-width: 0; }
.customer-drawer-identity h2 { overflow-wrap: anywhere; font-size: 22px; }
.customer-profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 17px; }
.customer-profile-stats > div { min-width: 0; border: 1px solid #ebe6de; border-radius: 12px; background: #faf7f2; padding: 12px; }
.customer-profile-stats > div > span { display: block; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.customer-profile-stats > div > strong { display: block; overflow: hidden; margin-top: 7px; color: var(--ink); font: 750 19px var(--display); text-overflow: ellipsis; white-space: nowrap; }
.customer-contact-details { margin-top: 13px; }
.customer-contact-details > .customer-gstin { grid-column: 1 / -1; }
.customer-drawer-section { margin-top: 22px; }
.customer-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.customer-section-title h3 { margin: 0; font-size: 16px; font-weight: 700; }
.customer-section-title > span { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: #f1eee8; color: #55595c; font-size: 11px; font-weight: 750; }
.customer-address-record { align-items: flex-start; line-height: 1.6; }
.customer-order-record > b { color: var(--ink); font: 700 11px var(--display); white-space: nowrap; }
.customer-review-record { background: #fffdf9; }
.compact-kpis { margin-bottom: 18px; }
.compact-kpis .kpi { padding: 18px; }
.compact-kpis .kpi > strong { font-size: 26px; }
.panel-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.panel-tools h3 { margin: 0; font-size: 19px; font-weight: 750; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: -5px 0 15px; padding-bottom: 2px; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.65); color: var(--muted); padding: 9px 14px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tabs button span { min-width: 18px; border-radius: 999px; background: #eee9e1; padding: 2px 5px; font-size: 7px; }
.tabs button.active { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.scrap-kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.scrap-latest-value { font-size: 23px !important; }
.scrap-history-panel { margin-top: 18px; }
.panel-kicker { display: block; margin-bottom: 5px; color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.scrap-panel-tools { padding: 20px 22px; }
.scrap-table { table-layout: fixed; }
.scrap-table th:nth-child(1) { width: 17%; }
.scrap-table th:nth-child(2) { width: 11%; }
.scrap-table th:nth-child(3) { width: 13%; }
.scrap-table th:nth-child(4) { width: 17%; }
.scrap-table th:last-child { width: 92px; }
.clickable-row { cursor: pointer; }
.clickable-row:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(217,45,58,.2); outline-offset: -3px; }
.scrap-amount { color: var(--green); }
.scrap-note-preview { display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.scrap-row-actions { justify-content: flex-end; }
.scrap-empty-icon { font: 800 15px var(--display); }
.scrap-detail-modal { width: min(680px, 100%); }
.scrap-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 0; }
.scrap-detail-grid > div { border: 1px solid #ebe6de; border-radius: 12px; background: #faf7f2; padding: 14px; }
.scrap-detail-grid dt { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.scrap-detail-grid dd { margin: 6px 0 0; color: var(--ink); font-size: 12.5px; font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.scrap-detail-grid .scrap-detail-notes { grid-column: 1 / -1; min-height: 90px; }
.scrap-stock-note { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #ead8b9; border-radius: 11px; background: #fff8ec; color: var(--amber); padding: 11px 12px; }
.scrap-stock-note strong { flex: 0 0 auto; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.scrap-stock-note span { color: #7d6949; font-size: 11.5px; line-height: 1.45; }

/* Tyre sales register and transaction wizard */
.sale-toolbar .search-box { width: min(520px, 52vw); }
.sale-register-panel { animation: card-enter .5s ease both; }
.sale-register-table { min-width: 1160px; }
.sale-register-table th:last-child, .sale-register-table td:last-child { text-align: right; }
.sale-invoice-link { min-height: 30px; padding: 6px 10px; text-decoration: none; }
.sale-reference { color: var(--red-dark); font-family: var(--display); letter-spacing: .03em; }
.sale-amount { color: var(--ink); font: 760 13px var(--display); white-space: nowrap; }
.sale-empty-icon { font: 800 15px var(--display); }
.sale-wizard-modal { width: min(1180px, calc(100vw - 36px)); height: min(880px, calc(100vh - 36px)); max-height: none; overflow: hidden; padding: 0; }
.sale-wizard-form { min-height: 0; display: flex; height: 100%; flex-direction: column; }
.sale-wizard-head { min-height: 98px; flex: 0 0 auto; align-items: center; margin: 0; border-bottom: 1px solid #ebe6de; padding: 20px 27px; }
.sale-wizard-head h2 { font-size: 29px; }
.sale-wizard-head p { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; }
.sale-stepper { display: grid; flex: 0 0 auto; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; border-bottom: 1px solid var(--line); background: #f6f2ec; padding: 14px 27px; }
.sale-stepper::before { display: none; }
.sale-step { min-width: 0; min-height: 58px; display: flex; align-items: center; justify-content: flex-start; gap: 11px; border: 1px solid #ded8ce; border-radius: 13px; background: rgba(255,253,249,.82); color: #85898b; padding: 10px 12px; text-align: left; cursor: default; box-shadow: 0 4px 12px rgba(20,22,24,.025); transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease; }
.sale-step > span:first-child { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #d6cfc5; border-radius: 10px; background: #f4f0e9; color: #85898b; font-size: 11px; font-weight: 850; }
.sale-step-copy { min-width: 0; display: block; }
.sale-step-copy strong, .sale-step-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale-step-copy strong { color: inherit; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.sale-step-copy small { margin-top: 4px; color: #9a9d9f; font-size: 10px; font-weight: 550; }
.sale-step.complete { border-color: #c8dfd1; background: #f4fbf7; color: var(--green); cursor: pointer; }
.sale-step.complete:hover { border-color: var(--green); transform: translateY(-1px); box-shadow: 0 7px 16px rgba(37,129,84,.08); }
.sale-step.complete > span:first-child { border-color: #baddc9; background: var(--green); color: #fff; }
.sale-step.active { border-color: rgba(217,45,58,.42); background: #fff7f7; color: var(--red-dark); box-shadow: 0 7px 20px rgba(217,45,58,.09); }
.sale-step.active > span:first-child { border-color: var(--red); background: var(--red); color: #fff; box-shadow: 0 0 0 4px rgba(217,45,58,.08); }
.sale-step.active .sale-step-copy small { color: #9b6468; }
.sale-step:disabled { opacity: 1; }
.sale-wizard-content { min-height: 0; flex: 1 1 auto; overflow-y: auto; background: #f4f0e9; padding: 22px 27px 28px; scrollbar-gutter: stable; }
.sale-wizard-content::-webkit-scrollbar { width: 9px; }
.sale-wizard-content::-webkit-scrollbar-track { background: #ebe6de; }
.sale-wizard-content::-webkit-scrollbar-thumb { border: 2px solid #ebe6de; border-radius: 999px; background: #bbb4a9; }
.wizard-step { animation: page-enter .25s ease both; }
.wizard-section-head { margin-bottom: 18px; }
.wizard-section-head > div { display: flex; align-items: center; gap: 12px; }
.wizard-section-head > div > span { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: var(--red-soft); color: var(--red); font: 800 11px var(--display); letter-spacing: .04em; }
.wizard-section-head h3 { margin: 0; font-size: 21px; }
.wizard-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.sale-customer-grid { border: 1px solid rgba(20,22,24,.07); border-radius: 16px; background: var(--paper); padding: 21px; box-shadow: 0 8px 24px rgba(20,22,24,.035); }
.sale-customer-grid > .form-grid { margin-top: 16px; }
.sale-customer-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.sale-customer-mode-card { min-height: 68px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 13px; background: #faf7f2; padding: 12px 14px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.sale-customer-mode-card:hover { border-color: rgba(217,45,58,.3); }
.sale-customer-mode-card.selected { border-color: rgba(217,45,58,.35); background: var(--red-soft); }
.sale-customer-mode-card:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.sale-customer-mode-card input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--red); }
.sale-customer-mode-card strong, .sale-customer-mode-card small { display: block; }
.sale-customer-mode-card strong { color: var(--ink); font-size: 12px; }
.sale-customer-mode-card small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.sale-customer-grid .form-grid input[readonly] { background: #f3efe8; color: #64686b; }
.sale-customer-grid .form-grid input.invalid, .sale-customer-grid .form-grid select.invalid { border-color: var(--red); background: #fff9f9; }
.sale-wizard-form .validation-message { display: block; margin-top: 5px; color: var(--red-dark); font-size: 11px; font-weight: 600; letter-spacing: 0; line-height: 1.4; text-transform: none; }
.sale-wizard-form .sale-section-validation { margin: -4px 0 11px; }
.sale-wizard-form .sale-section-validation:empty { display: none; }
.sale-wizard-form .sale-line-heading + .sale-section-validation { margin: 0; padding: 10px 16px 0; }
.sale-field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; line-height: 1.4; text-transform: none; }
.sale-type-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 11px; }
.sale-type-card { min-height: 68px; display: flex; align-items: center; gap: 11px; border: 1px solid #ded8ce; border-radius: 13px; background: var(--paper); padding: 12px 14px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.sale-type-card:hover { border-color: rgba(217,45,58,.3); }
.sale-type-card.selected { border-color: rgba(217,45,58,.38); background: var(--red-soft); }
.sale-type-card input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--red); }
.sale-type-card strong, .sale-type-card small { display: block; }
.sale-type-card strong { color: var(--ink); font-size: 12px; }
.sale-type-card small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.sale-pricing-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-bottom: 18px; }
.sale-pricing-options.has-uniform { grid-template-columns: repeat(2,minmax(0,1fr)) 220px; }
@media (max-width: 900px) {
    .sale-pricing-options, .sale-pricing-options.has-uniform { grid-template-columns: 1fr; }
}
.sale-switch-card { min-height: 68px; display: flex; align-items: center; gap: 11px; border: 1px solid #ded8ce; border-radius: 13px; background: var(--paper); padding: 12px 14px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.sale-switch-card:hover { border-color: rgba(217,45,58,.3); }
.sale-switch-card.selected { border-color: rgba(217,45,58,.38); background: var(--red-soft); }
.sale-switch-card input, .sale-service-choice input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--red); cursor: pointer; }
.sale-switch-card strong, .sale-switch-card small, .sale-service-choice strong, .sale-service-choice small { display: block; }
.sale-switch-card strong, .sale-service-choice strong { color: var(--ink); font-size: 12px; }
.sale-switch-card small, .sale-service-choice small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.sale-uniform-price, .sale-line-grid label, .sale-service-price, .sale-notes, .sale-billing-card > label { display: block; color: #4b5054; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sale-uniform-price { min-height: 68px; height: auto; border: 1px solid #ded8ce; border-radius: 13px; background: var(--paper); padding: 10px 12px; }
.sale-uniform-price input, .sale-line-grid input, .sale-line-grid select, .sale-service-price input, .sale-notes textarea, .sale-billing-card > label input { width: 100%; min-height: 40px; display: block; margin-top: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); padding: 8px 10px; outline: none; font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.sale-line-grid input:focus, .sale-line-grid select:focus, .sale-uniform-price input:focus, .sale-service-price input:focus, .sale-notes textarea:focus, .sale-billing-card > label input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,45,58,.07); }
.sale-line-grid input.invalid, .sale-line-grid select.invalid, .sale-uniform-price input.invalid { border-color: var(--red); background: #fff9f9; }
.sale-line-grid select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2374787b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 13px 13px;
    padding-right: 30px !important;
    cursor: pointer;
}
.sale-line-section { overflow: visible; margin-top: 14px; border: 1px solid rgba(20,22,24,.07); border-radius: 15px; background: var(--paper); position: relative; }
.sale-line-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #ebe6de; background: #faf7f2; padding: 14px 16px; border-top-left-radius: 14px; border-top-right-radius: 14px; }
.sale-line-heading h4 { margin: 0; font-size: 15.5px; font-weight: 700; }
.sale-line-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.sale-inline-empty { color: var(--muted); padding: 24px 16px; text-align: center; font-size: 11px; }
.sale-line-card { position: relative; display: grid; grid-template-columns: 30px minmax(0,1fr) 34px; align-items: end; gap: 10px 11px; border-bottom: 1px solid #eee9e1; padding: 14px 16px; }
.sale-line-card:last-child { border-bottom: 0; }
.sale-wizard-content .panel,
.sale-wizard-content .sale-sourcing-panel,
.sale-wizard-content .sale-line-section,
.sale-wizard-content .sale-line-card,
.sale-wizard-content .form-grid {
    overflow: visible !important;
    animation: none !important;
    transform: none !important;
}

.sale-sourcing-panel {
    z-index: 30 !important;
    position: relative !important;
    overflow: visible !important;
}
.standard-items-section {
    z-index: 20 !important;
    position: relative !important;
    overflow: visible !important;
}
.replacement-section {
    z-index: 10 !important;
    position: relative !important;
    overflow: visible !important;
}

.sale-wizard-content .panel:has(.is-open),
.sale-wizard-content .sale-sourcing-panel:has(.is-open) {
    z-index: 1000 !important;
    position: relative !important;
}
.sale-wizard-content .standard-items-section:has(.is-open),
.sale-wizard-content .sale-line-section:has(.is-open) {
    z-index: 990 !important;
    position: relative !important;
}
.sale-wizard-content .sale-line-card:has(.is-open) { z-index: 1050 !important; position: relative !important; }
.sale-wizard-content .sale-line-grid:has(.is-open), .sale-wizard-content .form-grid:has(.is-open) { z-index: 1100 !important; position: relative !important; }
.sale-wizard-content .sale-line-grid label:has(.is-open), .sale-wizard-content .form-grid label:has(.is-open) { z-index: 1150 !important; position: relative !important; }
.sale-wizard-content .searchable-select.is-open { z-index: 2000 !important; position: relative !important; }

.sale-line-grid label.sale-select-label {
    position: relative;
    z-index: 5;
}
.sale-line-grid label.sale-select-label .searchable-select,
.sale-line-grid label.sale-select-label .searchable-select *,
.searchable-select,
.searchable-select *,
.searchable-trigger-text,
.searchable-select-dropdown,
.searchable-option-item,
.searchable-option-item span {
    text-transform: none !important;
    letter-spacing: normal !important;
}

.sale-line-grid .searchable-select .searchable-select-dropdown,
.replacement-item-grid .searchable-select .searchable-select-dropdown {
    min-width: max(100%, 420px) !important;
    max-width: min(650px, calc(100vw - 40px)) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22) !important;
    z-index: 2000 !important;
}
.sale-line-grid .searchable-select .searchable-option-item,
.replacement-item-grid .searchable-select .searchable-option-item {
    padding: 10px 14px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
}
.sale-line-grid .searchable-select .searchable-option-item span,
.replacement-item-grid .searchable-select .searchable-option-item span {
    white-space: normal !important;
    word-break: break-word !important;
    font-weight: 400 !important;
}
.sale-line-number { width: 27px; height: 27px; display: grid; grid-column: 1; grid-row: 1 / span 2; place-items: center; align-self: center; border-radius: 8px; background: #f0ece5; color: #686c6f; font: 800 10px var(--display); }
.sale-line-grid { min-width: 0; display: grid; gap: 11px; }
.sale-line-card > .sale-line-grid { grid-column: 2; }
.sale-item-grid { grid-template-columns: minmax(260px,2fr) 90px 125px 135px; }
.replacement-item-grid { grid-template-columns: minmax(130px,.8fr) minmax(250px,1.7fr) minmax(135px,1fr) 120px 130px; }
.sale-line-meta-grid { grid-template-columns: minmax(300px,2fr) minmax(130px,.7fr) minmax(130px,.7fr); }
.replacement-meta-grid { grid-template-columns: minmax(130px,1fr) minmax(130px,1fr); max-width: 440px; }
.sale-serial-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 8px; }
.sale-line-total { min-height: 40px; align-self: end; border: 1px solid #e5dfd5; border-radius: 9px; background: #faf7f2; padding: 8px 10px; }
.sale-line-total span, .sale-line-total strong { display: block; }
.sale-line-total span { color: #777b7e; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.sale-line-total strong { margin-top: 4px; color: var(--ink); font: 750 12.5px var(--display); }
.sale-line-remove { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-size: 17px; font-weight: 800; min-width: 34px; min-height: 34px; }
.replacement-section .sale-line-number { background: #f1edfb; color: #6955a5; }
.eligible-tyre-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; border-bottom: 1px solid #eee9e1; padding: 14px 16px; }
.eligible-tyre-card { min-width: 0; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #ded8ce; border-radius: 11px; background: #faf7f2; padding: 12px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.eligible-tyre-card:hover { border-color: rgba(37,129,84,.35); }
.eligible-tyre-card.selected { border-color: #baddc9; background: #f4fbf7; }
.eligible-tyre-card input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--green); }
.eligible-tyre-card span { min-width: 0; }
.eligible-tyre-card strong, .eligible-tyre-card small { display: block; }
.eligible-tyre-card strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.eligible-tyre-card small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.sale-scrap-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; border: 1px solid #ead8b9; border-radius: 13px; background: #fff8ec; color: var(--amber); padding: 13px 15px; }
.sale-scrap-note strong { flex: 0 0 auto; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.sale-scrap-note span { color: #7d6949; font-size: 11.5px; line-height: 1.45; }
.sale-service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.sale-service-card { min-height: 96px; display: grid; grid-template-columns: minmax(0,1fr) 135px; align-items: center; gap: 16px; border: 1px solid rgba(20,22,24,.08); border-radius: 15px; background: var(--paper); padding: 16px; box-shadow: 0 8px 24px rgba(20,22,24,.025); transition: border-color .2s ease, background .2s ease; }
.sale-service-card.selected { border-color: rgba(37,129,84,.3); background: #f8fcf9; }
.sale-service-choice { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.sale-service-price input { min-height: 38px; }
.sale-review-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(300px,.8fr); gap: 17px; align-items: start; }
.sale-review-details { display: grid; gap: 13px; }
.sale-review-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border: 1px solid rgba(20,22,24,.07); border-radius: 15px; background: var(--paper); padding: 17px; }
.sale-review-card > div { min-width: 0; border-radius: 11px; background: #faf7f2; padding: 13px; }
.sale-review-card span, .sale-review-card strong, .sale-review-card small { display: block; }
.sale-review-card span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.sale-review-card strong { margin-top: 6px; overflow: hidden; font: 750 14px var(--display); text-overflow: ellipsis; white-space: nowrap; }
.sale-review-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.sale-notes { border: 1px solid rgba(20,22,24,.07); border-radius: 15px; background: var(--paper); padding: 17px; }
.sale-notes textarea { min-height: 110px; resize: vertical; }
.sale-billing-card { border: 1px solid rgba(20,22,24,.08); border-radius: 17px; background: var(--paper); padding: 20px; box-shadow: var(--shadow-sm); }
.sale-billing-card h3 { margin: 5px 0 18px; font-size: 20px; }
.sale-billing-card dl { margin: 0; }
.sale-billing-card dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 7px 0; color: #666a6d; font-size: 11.5px; }
.sale-billing-card dt, .sale-billing-card dd { margin: 0; }
.sale-billing-card dd { color: var(--ink); font-weight: 750; }
.sale-billing-card dl > .sale-subtotal { margin-top: 5px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--ink); font-weight: 750; }
.sale-billing-card dl > .sale-tax { color: var(--amber); font-size: 11.5px; }
.sale-billing-card > label { margin-top: 13px; }
.sale-grand-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 15px; }
.sale-grand-total span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.sale-grand-total strong { color: var(--red-dark); font: 780 23px var(--display); }
.sale-billing-card > p { margin: 15px 0 0; border-radius: 9px; background: #fff8ec; color: #806b49; padding: 10px; font-size: 11.5px; line-height: 1.5; }
.sale-wizard-actions { min-height: 77px; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #e5dfd5; background: var(--paper); padding: 14px 27px; box-shadow: 0 -10px 30px rgba(20,22,24,.035); }
.sale-wizard-actions > div { display: flex; align-items: center; gap: 9px; }
.sale-wizard-actions .admin-btn { min-width: 150px; }
.list-record { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; border-bottom: 1px solid #eee9e1; }
.list-record strong, .list-record small { display: block; }
.list-record small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.cms-editor { padding: 17px 22px; border-bottom: 1px solid #eee9e1; }
.cms-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.cms-head strong, .cms-head small { display: block; }
.cms-head small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.cms-editor > label { margin-top: 13px; }
.lead-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.lead-head-title { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.lead-source-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; line-height: 1.35; }
.lead-source-website { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.lead-source-facebook { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.lead-source-instagram { background: #fdf2f8; color: #db2777; border: 1px solid #fbcfe8; }
.lead-source-whatsapp { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.lead-source-phone { background: #fefce8; color: #ca8a04; border: 1px solid #fef08a; }
.lead-source-other { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.lead-head-value { flex-shrink: 0; }
.lead-value-badge { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid #e7ded6; border-radius: 8px; background: #faf7f2; color: var(--red); font: 750 11.5px var(--display); letter-spacing: -.01em; cursor: pointer; transition: all .2s ease; }
.lead-value-badge:hover { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); transform: translateY(-1px); }
.lead-value-badge.lead-value-empty { border-style: dashed; border-color: #d1c8bd; background: transparent; color: #888d90; font-size: 10.5px; font-weight: 650; }
.lead-value-badge.lead-value-empty:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.lead-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee9e1; position: relative; }
.lead-card:has(.searchable-select.is-open),
.lead-card:has(.lead-actions:hover),
.lead-card:focus-within {
    transform: none !important;
    z-index: 1005 !important;
    position: relative !important;
    box-shadow: 0 10px 24px rgba(20,22,24,.1) !important;
}
.kanban:has(.is-open) .lead-card {
    transform: none !important;
}
.lead-stage-select { flex: 1 1 auto; min-width: 0; position: relative; }
.lead-stage-trigger {
    min-height: 32px !important;
    height: 32px !important;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    background: #faf7f2 !important;
    color: #55595c !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease !important;
}
.lead-stage-trigger:hover {
    border-color: #c4bcb2 !important;
    background: #fff !important;
}
.lead-stage-select.is-open .lead-stage-trigger {
    border-color: var(--red) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(217,45,58,.08) !important;
}
.lead-stage-select .searchable-trigger-text {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: var(--ink) !important;
}
.lead-stage-select .searchable-select-dropdown {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 10px !important;
    border: 1px solid #ded8ce !important;
    box-shadow: 0 12px 32px rgba(20,22,24,.14) !important;
    overflow: hidden !important;
    z-index: 1050 !important;
}
.lead-stage-select .searchable-option-item {
    font-size: 11.5px !important;
    padding: 7px 12px !important;
}
.lead-stage-select .searchable-option-item:hover {
    background: #f7f4ee !important;
}
.form-grid label { position: static; }
.form-grid label:has(.is-open),
.form-grid label:has(.searchable-select.is-open) { position: relative !important; z-index: 1200 !important; }
.form-grid .searchable-select { margin-top: 6px; width: 100%; position: relative; }
.form-grid .searchable-select.is-open { z-index: 1250 !important; position: relative !important; }
.form-grid .searchable-select .searchable-select-trigger {
    min-height: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    border: 1px solid var(--line) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--ink) !important;
    padding: 0 12px !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: border-color .2s ease, box-shadow .2s ease !important;
}
.form-grid .searchable-select .searchable-select-trigger:hover {
    border-color: #c7beb2 !important;
}
.form-grid .searchable-select .searchable-select-trigger:focus,
.form-grid .searchable-select .searchable-select-trigger:focus-within,
.form-grid .searchable-select.is-open .searchable-select-trigger {
    border-color: var(--red, #d92d3a) !important;
    box-shadow: 0 0 0 3px rgba(217, 45, 58, 0.12) !important;
}
.form-grid .searchable-select.disabled .searchable-select-trigger,
.form-grid .searchable-select .searchable-select-trigger:disabled {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    border-color: #e2e8f0 !important;
    opacity: 0.8 !important;
    box-shadow: none !important;
}
.form-grid .searchable-select .searchable-trigger-text {
    font-size: 12px !important;
    font-weight: 500 !important;
}
.form-grid .searchable-select-dropdown {
    border-radius: 10px !important;
    border: 1px solid var(--line, #ded8ce) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    z-index: 1300 !important;
}
.form-grid .searchable-select.is-open:not(.open-upwards) .searchable-trigger-chevron {
    transform: rotate(180deg);
}
.other-tyre-size-wrapper { margin-top: 4px; animation: modal-enter .25s ease both; }
.other-tyre-size-wrapper input { background-color: #fffdfa !important; border-color: #e5d8cb !important; }
.report-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.report-card { position: relative; min-height: 255px; border: 1px solid rgba(20,22,24,.065); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow-sm); padding: 24px; animation: card-enter .55s ease both; z-index: 1; }
.report-card:not(.has-filters) { overflow: hidden; }
.report-card::after { content: ""; position: absolute; right: -44px; top: -44px; width: 120px; height: 120px; border: 18px solid rgba(217,45,58,.035); border-radius: 50%; pointer-events: none; }
.report-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--red-soft); color: var(--red); font: 700 16px var(--display); }
.report-card > span { display: block; margin-top: 25px; color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.report-card h3 { margin: 8px 0; font-size: 20px; }
.report-card p { min-height: 57px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.report-note, .access-note { margin-top: 18px; }
.report-card.has-filters { overflow: visible; display: flex; flex-direction: column; justify-content: space-between; z-index: 10; }
.report-grid > :nth-child(1),
.report-grid > :nth-child(2),
.report-grid > :nth-child(3) {
    z-index: 20;
}
.report-grid > :nth-child(4),
.report-grid > :nth-child(5),
.report-grid > :nth-child(6) {
    z-index: 10;
}
.report-card:hover,
.report-card:focus-within,
.report-card:has(.is-open) {
    z-index: 1000 !important;
}
.searchable-select.is-open {
    z-index: 1005 !important;
}
.report-card.has-filters p { min-height: unset; margin-bottom: 12px; }
.report-card-filters { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; position: relative; }
.report-card-filters .filter-row { display: flex; gap: 8px; }
.report-card-filters .filter-row > * { flex: 1; min-width: 0; }
.report-select-trigger { font-size: 11.5px !important; padding: 6px 10px !important; min-height: 34px !important; border-radius: 8px !important; background: #faf7f2 !important; border: 1px solid var(--line) !important; }
.report-card-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.report-card-actions .action-btn { margin-top: 0; }
.report-active-badge { display: inline-block; background: rgba(217,45,58,.12); color: var(--red); font-size: 10.5px; font-weight: 750; padding: 2px 7px; border-radius: 6px; margin-left: 6px; }
.permission-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.permission-grid > div { border: 1px solid var(--line); border-radius: 11px; background: #faf7f2; padding: 12px; }
.permission-grid strong, .permission-grid span { display: block; }
.permission-grid strong { font-size: 12.5px; }
.permission-grid span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }

@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-enter { from { opacity: 0; transform: translateY(20px) scale(.98); } }
@keyframes drawer-enter { from { opacity: 0; transform: translateX(18px); } }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes login-wheel-spin { to { transform: rotate(360deg); } }

/* Login */
.login-page { min-height: 100vh; overflow: hidden; background: var(--canvas); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-story {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #ebe5dc;
    background: radial-gradient(circle at 84% 18%, rgba(225, 45, 57, 0.14), rgba(225, 45, 57, 0.04) 36%, transparent 68%), #faf7f2;
    color: var(--ink);
    padding: clamp(36px, 5vw, 68px);
    isolation: isolate;
}
.login-story::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 650px;
    height: 650px;
    right: -200px;
    top: -240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.16), rgba(220, 38, 38, 0.04) 45%, transparent 70%);
    pointer-events: none;
}
.login-story::after {
    content: "NAV";
    position: absolute;
    z-index: -1;
    left: -20px;
    bottom: -32px;
    color: rgba(20, 22, 24, 0.035);
    font: 900 230px/.80 var(--display);
    letter-spacing: -.08em;
    pointer-events: none;
    user-select: none;
}
.login-brand { display: flex; align-items: center; gap: 12px; letter-spacing: .11em; line-height: .84; }
.login-brand > span, .mobile-login-brand > span { display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; color: var(--red); font: italic 25px Georgia, serif; }
.login-brand small { display: block; margin-top: 7px; color: #6d7275; font-size: 10px; letter-spacing: .2em; }
.login-copy { position: relative; z-index: 2; max-width: 640px; margin: auto 0; animation: login-enter .7s ease both; }
.login-kicker { display: flex; align-items: center; gap: 10px; color: #70757b; font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.login-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #d92d3a; box-shadow: 0 0 0 5px rgba(217, 45, 58, 0.18); }
.login-copy h1 { margin: 24px 0 20px; color: #14171a; font-size: clamp(40px, 4.6vw, 66px); font-weight: 850; line-height: .98; text-transform: uppercase; letter-spacing: -.025em; }
.login-copy h1 em { color: #d92d3a; font-style: normal; display: block; white-space: nowrap; }
.login-copy p { max-width: 490px; color: #696e73; font-size: 15px; line-height: 1.68; margin-top: 20px; }
.login-footnote { position: relative; z-index: 2; color: #7f8589; font-size: 11px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; }
.login-orbit {
    position: absolute;
    z-index: 1;
    right: -70px;
    bottom: -65px;
    width: clamp(320px, 28vw, 430px);
    height: clamp(320px, 28vw, 430px);
    display: grid;
    place-items: center;
    border: none;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    pointer-events: none;
}
.login-orbit::before { display: none; }
.login-orbit div { display: none; }
.login-real-tyre {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(-14px -14px 32px rgba(0, 0, 0, 0.08)) drop-shadow(0 20px 40px rgba(0, 0, 0, 0.20));
    animation: login-wheel-spin 55s linear infinite;
    transform-origin: 50% 50%;
    will-change: transform;
}
.login-form-wrap { display: grid; place-items: center; background: #fff; padding: 55px 30px; }
.login-form { width: min(440px, 100%); animation: login-enter .7s .1s ease both; }
.mobile-login-brand { display: none; align-items: center; gap: 10px; margin-bottom: 42px; }
.mobile-login-brand > span { width: 36px; height: 36px; font-size: 20px; }
.mobile-login-brand strong { font: 800 11px var(--display); letter-spacing: .1em; }
.form-kicker { color: var(--red); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.login-form h2 { margin: 10px 0 9px; font-size: clamp(32px,4vw,45px); }
.login-form > p { margin: 0 0 32px; color: var(--muted); font-size: 14px; }
.login-form label { display: block; margin-bottom: 17px; color: #4d5154; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.login-form input { width: 100%; height: 51px; display: block; margin-top: 7px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.65); color: var(--ink); padding: 12px 15px; outline: none; text-transform: none; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; font-size: 14px; }
.login-form input:focus { border-color: var(--red); background: #fff; box-shadow: 0 0 0 4px rgba(217,45,58,.08); }
.login-form .password-label { margin-bottom: 0; }
.password-input-wrap { position: relative; margin-bottom: 17px; }
.login-form .password-input-wrap input { padding-right: 51px; }
.login-form .password-input-wrap input::-ms-reveal,
.login-form .password-input-wrap input::-ms-clear { display: none; }
.password-visibility-toggle { position: absolute; top: calc(50% + 3.5px); right: 9px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 0; transform: translateY(-50%); transition: background .2s ease, color .2s ease; cursor: pointer; }
.password-visibility-toggle:hover { background: var(--red-soft); color: var(--red-dark); }
.password-visibility-toggle:focus-visible { outline-offset: 1px; }
.password-visibility-toggle svg { grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-visibility-toggle svg[hidden] { display: none !important; }
.login-button { width: 100%; margin-top: 5px; }
.login-help-link { display: block; width: fit-content; margin: -9px 0 18px auto; color: var(--red-dark); font-size: 12px; font-weight: 750; }
.login-help-link:hover, .login-back-link:hover { color: var(--red); }
.login-back-link { display: block; margin-top: 20px; color: var(--muted); text-align: center; font-size: 12px; font-weight: 700; }
.auth-success { margin-bottom: 18px; border: 1px solid rgba(37,129,84,.2); border-left: 3px solid var(--green); border-radius: 11px; background: #eff9f3; color: #246a49; padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; color: #979a9c; font-size: 12px; }
.secure-note i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #e4f3ea; color: var(--green); font-size: 10px; font-style: normal; }
.access-denied-context { display: grid; gap: 5px; margin: -8px 0 24px; border-left: 3px solid var(--red); border-radius: 0 10px 10px 0; background: var(--red-soft); padding: 12px 14px; }
.access-denied-context strong { color: var(--red-dark); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.access-denied-context span { overflow-wrap: anywhere; color: #5f6366; font-size: 12px; }
.access-denied-actions { display: grid; gap: 15px; }
.access-denied-secondary { color: var(--muted); text-align: center; font-size: 12px; font-weight: 700; }
.access-denied-secondary:hover { color: var(--red-dark); }
.validation-errors { margin-bottom: 18px; border-radius: 11px; background: var(--red-soft); color: var(--red-dark); padding: 11px 14px; font-size: 13px; }
.validation-errors:empty, .validation-summary-valid { display: none !important; }

/* Consistent dropdown styling across every admin form and toolbar */
select:not([multiple]) {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #fff !important;
    color: var(--ink) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2374787b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 13px center !important;
    background-size: 16px 16px !important;
    padding-left: 13px !important;
    padding-right: 40px !important;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
select:not([multiple]):hover:not(:disabled) { border-color: #c7beb2 !important; }
select:not([multiple]):focus { border-color: var(--red) !important; outline: none !important; box-shadow: 0 0 0 4px rgba(217,45,58,.07) !important; }
select:not([multiple]):disabled { cursor: not-allowed; opacity: .65; }
select::-ms-expand { display: none; }

/* Toolbar selects */
.toolbar select:not([multiple]),
.toolbar-select,
.sale-filter-select,
.filter-select {
    height: 43px !important;
    min-height: 43px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
}

/* Form & modal selects */
.form-grid select:not([multiple]),
.modern-select,
select.modern-select {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
}

#blazor-error-ui { position: fixed; z-index: 1000; right: 20px; bottom: 20px; display: none; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 11px; background: var(--paper); color: var(--ink); padding: 14px 18px; box-shadow: var(--shadow); font-size: 12px; }
#blazor-error-ui a { color: var(--red); }
#blazor-error-ui .dismiss { margin-left: 12px; cursor: pointer; }

/* Motion */
@keyframes page-enter { from { opacity: 0; transform: translateY(12px); } }
@keyframes card-enter { from { opacity: 0; transform: translateY(18px); } }
@keyframes grow-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes skeleton-shimmer { 0% { background-position: 110% 0; } 100% { background-position: -110% 0; } }
@keyframes status-pulse { 0% { box-shadow: 0 0 0 0 rgba(55,189,117,.35); } 70% { box-shadow: 0 0 0 8px rgba(55,189,117,0); } 100% { box-shadow: 0 0 0 0 rgba(55,189,117,0); } }
@keyframes toast-enter { from { opacity: 0; transform: translateX(24px) scale(.98); } }
@keyframes login-enter { from { opacity: 0; transform: translateY(22px); } }
@keyframes login-wheel { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-15px) rotate(2deg); } }

/* Responsive */
@media (max-width: 1180px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .customer-insight { padding-right: 13px; padding-left: 13px; }
    .customer-insight > strong { font-size: 22px; }
    .customer-workspace.has-detail { grid-template-columns: minmax(0,1fr) 350px; }
    .form-grid.three { grid-template-columns: 1fr 1fr; }
    .report-grid { grid-template-columns: 1fr 1fr; }
    .sale-pricing-options { grid-template-columns: 1fr 1fr; }
    .sale-uniform-price { grid-column: 1 / -1; }
    .sale-item-grid, .replacement-item-grid, .sale-line-meta-grid { grid-template-columns: 1fr 1fr; }
    .sale-item-grid > :first-child, .replacement-item-grid > :nth-child(2), .sale-serial-field { grid-column: 1 / -1; }
}
@media (max-width: 1024px) {
    .admin-shell { grid-template-columns: 1fr; }
    .workspace { grid-column: 1; }
    .admin-shell.sidebar-collapsed { --sidebar-width: 0px; }
    .sidebar { width: min(290px, 86vw); transform: translateX(-105%); box-shadow: 20px 0 60px rgba(0,0,0,.28); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
    .nav-open .sidebar { transform: translateX(0); }
    .sidebar-collapse { display: none; }
    .sidebar-collapsed .sidebar { padding: 26px 16px 20px 16px; }
    .sidebar-collapsed .admin-brand { justify-content: center; padding: 0 0 24px; }
    .sidebar-collapsed .admin-brand > div, .sidebar-collapsed .side-nav a > span:last-child, .sidebar-collapsed .nav-label, .sidebar-collapsed .sidebar-foot > div { width: auto; opacity: 1; visibility: visible; }
    .sidebar-collapsed .side-nav { padding-right: 4px; scrollbar-width: none; }
    .sidebar-collapsed .side-nav::-webkit-scrollbar { display: none; }
    .sidebar-collapsed .side-nav a { justify-content: flex-start; gap: 12px; padding: 10px 12px; }
    .sidebar-collapsed .side-nav a::after { right: 12px; }
    .sidebar-collapsed .nav-label { height: auto; margin: 22px 12px 7px; }
    .sidebar-collapsed .sidebar-foot { justify-content: flex-start; padding: 13px; border-color: var(--line); background: #faf7f2; }
    .sidebar-scrim { position: fixed; z-index: 90; inset: 0; display: block; border: 0; background: rgba(10,11,12,.52); opacity: 0; pointer-events: none; backdrop-filter: blur(2px); transition: opacity .3s ease; }
    .nav-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
    .menu-toggle { display: grid; }
    .screen-grid { grid-template-columns: 1fr 1fr; }
    .split-workspace { grid-template-columns: 1fr; }
    .detail-drawer { position: relative; top: auto; max-height: none; }
    .customer-workspace.has-detail { grid-template-columns: minmax(0,1fr); }
    .customer-profile-drawer { position: fixed; z-index: 110; top: 88px; right: 18px; bottom: 18px; width: min(410px,calc(100vw - 36px)); max-height: none; overflow-y: auto; box-shadow: 0 24px 75px rgba(20,22,24,.2); }
    .inventory-modal .modern-form-card:first-child .form-row-2 { grid-template-columns: 1fr 1fr; }
    .inventory-modal .modern-form-card:first-child .span-2 { grid-column: span 2; }
    .inventory-modal .modern-form-card:nth-child(4) > div { grid-template-columns: 1fr 1fr; }
    .sale-review-layout { grid-template-columns: 1fr; }
    .sale-billing-card { position: static; }
}
@media (max-width: 760px) {
    .admin-content { padding: 27px 20px; }
    .topbar { height: 70px; padding: 0 20px; }
    .topbar-left > div { display: none; }
    .status-chip { display: none; }
    .page-title { display: block; }
    .page-title .admin-btn { margin-top: 17px; }
    .page-title .page-actions { display: flex; gap: 10px; margin-top: 17px; }
    .page-title .page-actions .admin-btn { margin-top: 0; }
    .screen-grid { grid-template-columns: 1fr; }
    .panel { overflow-x: auto; padding: 19px; }
    .table-panel { overflow: hidden; padding: 0; }
    .section-label small { display: none; }
    .toolbar { align-items: stretch; flex-wrap: wrap; }
    .search-box { min-width: 100%; }
    .toolbar-count { width: 100%; margin: 2px 0 0; }
    .customer-page-title { margin-bottom: 18px; }
    .customer-insights { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
    .customer-insight { padding: 11px 13px; }
    .customer-insight::before { top: 11px; bottom: 11px; }
    .customer-insight > strong { margin-top: 5px; font-size: 20px; }
    .customer-insight-note { margin-top: 2px; font-size: 10px; }
    .customer-toolbar { grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-bottom: 12px; padding: 8px; }
    .customer-search { grid-column: 1 / -1; height: 41px; }
    .customer-search-submit { min-height: 37px; }
    .customer-result-count { grid-column: 2; grid-row: 2; }
    .customer-panel-heading { min-height: 60px; padding: 11px 14px; }
    .customer-panel-heading h2 { font-size: 18px; }
    .customer-panel-hint { display: none; }
    .customer-profile-drawer { top: 78px; right: 10px; bottom: 10px; width: min(410px,calc(100vw - 20px)); padding: 18px; }
    .toast-stack { top: 82px; right: 16px; left: 16px; width: auto; }
    .catalog-controls { border-radius: 15px; }
    .catalog-tabs { padding: 7px; }
    .catalog-tab { min-height: 38px; padding: 9px 12px; font-size: 11.5px; }
    .catalog-toolbar { grid-template-columns: minmax(0, 1fr) auto; padding: 10px; }
    .catalog-search { grid-column: 1 / -1; }
    .catalog-toolbar-actions { grid-column: 1; grid-row: 2; }
    .catalog-result-count { grid-column: 2; grid-row: 2; }
    .grid-pager { align-items: stretch; flex-direction: column; }
    .pager-summary, .pager-buttons { justify-content: space-between; }
    .form-grid, .form-grid.three { grid-template-columns: 1fr; }
    .skeleton-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .skeleton-card-grid, .skeleton-qr-grid { grid-template-columns: 1fr; }
    .skeleton-table { overflow: hidden; padding: 0 15px; }
    .skeleton-table-header, .skeleton-table-row { column-gap: 13px; }
    .exception-metadata { grid-template-columns: 1fr; }
    .exception-trace-id { grid-column: auto; }
    .span-two { grid-column: auto; }
    .report-grid, .permission-grid { grid-template-columns: 1fr; }
    .scrap-kpi-grid { grid-template-columns: 1fr; }
    .scrap-detail-grid { grid-template-columns: 1fr; }
    .scrap-detail-grid .scrap-detail-notes { grid-column: auto; }
    .modal-backdrop { place-items: end center; padding: 10px; }
    .admin-modal { max-height: calc(100vh - 20px); border-radius: 20px 20px 14px 14px; padding: 21px; }
    .inventory-modal { width: 100% !important; height: calc(100vh - 20px); padding: 0; }
    .inventory-modal-head { padding: 19px 20px 17px; }
    .inventory-modal-head h2 { font-size: 26px; }
    .inventory-modal .modern-form-container { grid-template-columns: 1fr; padding: 14px; }
    .inventory-modal .modern-form-card:first-child, .inventory-modal .modern-form-card:nth-child(4) { grid-column: auto; }
    .inventory-modal .modern-form-card:first-child .form-row-2, .inventory-modal .modern-form-card:nth-child(4) > div { grid-template-columns: 1fr; }
    .inventory-modal .modern-form-card:first-child .span-2 { grid-column: auto; }
    .inventory-form-actions { min-height: 70px; padding: 12px 16px !important; }
    .inventory-form-actions::before { display: none; }
    .inventory-form-actions .modern-btn-cancel, .inventory-form-actions .modern-btn-add { min-width: 0; flex: 1; }
    .sale-toolbar .search-box { width: 100%; }
    .sale-wizard-modal { width: 100%; height: calc(100vh - 20px); padding: 0; }
    .sale-wizard-head { min-height: 88px; padding: 17px 19px; }
    .sale-wizard-head h2 { font-size: 25px; }
    .sale-stepper { gap: 6px; padding: 10px; }
    .sale-step { min-height: 54px; gap: 7px; padding: 8px; }
    .sale-step > span:first-child { width: 28px; height: 28px; }
    .sale-step-copy strong { font-size: 10px; }
    .sale-step-copy small { display: none; }
    .sale-wizard-content { padding: 18px 14px 22px; }
    .sale-customer-mode, .sale-type-options { grid-template-columns: 1fr; }
    .sale-pricing-options, .sale-service-grid { grid-template-columns: 1fr; }
    .sale-uniform-price { grid-column: auto; }
    .sale-line-heading { align-items: flex-start; }
    .sale-line-card { grid-template-columns: minmax(0,1fr) 34px; padding: 13px; }
    .sale-line-number { display: none; }
    .sale-line-card > .sale-line-grid { grid-column: 1; }
    .sale-line-remove { grid-column: 2; grid-row: 1 / span 2; }
    .sale-item-grid, .replacement-item-grid, .sale-line-meta-grid, .replacement-meta-grid { grid-template-columns: 1fr; max-width: none; }
    .sale-item-grid > :first-child, .replacement-item-grid > :nth-child(2), .sale-serial-field { grid-column: auto; }
    .eligible-tyre-grid { grid-template-columns: 1fr; }
    .sale-service-card { grid-template-columns: 1fr 115px; }
    .sale-review-card { grid-template-columns: 1fr; }
    .sale-wizard-actions { min-height: 70px; padding: 11px 14px; }
    .sale-wizard-actions .admin-btn { min-width: 0; }
    .login-shell { grid-template-columns: 1fr; }
    .login-story { display: none; }
    .mobile-login-brand { display: flex; }
    .login-form-wrap { min-height: 100vh; padding: 38px 24px; }
}
@media (max-width: 570px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .top-actions { gap: 9px; }
    .admin-avatar { display: none; }
    .chart-wrap { grid-template-columns: 24px 1fr; }
    .bar-chart { gap: 4px; }
    .admin-table { min-width: 600px; }
    .scrap-table { min-width: 760px; }
    .skeleton-detail-grid { grid-template-columns: 1fr; }
    .pager-summary { align-items: flex-start; flex-direction: column; gap: 9px; }
    .pager-buttons { justify-content: flex-start; overflow-x: auto; }
    .catalog-toolbar { grid-template-columns: 1fr; }
    .catalog-toolbar-actions { grid-column: 1; grid-row: 2; }
    .catalog-toolbar-actions .action-btn { flex: 1; }
    .catalog-result-count { grid-column: 1; grid-row: 3; justify-self: stretch; border-top: 1px solid var(--line); border-left: 0; padding: 10px 2px 1px; }
    .customer-insight-label { font-size: 10px; }
    .customer-insight-note { display: none; }
    .customer-header-action { min-height: 39px; }
    .customer-toolbar { grid-template-columns: minmax(0,1fr) auto; }
    .customer-search input { font-size: 12px; }
    .customer-search-submit { padding-right: 12px; padding-left: 12px; font-size: 11px; }
    .customer-result-count { gap: 4px; padding-left: 10px; }
    .customer-result-count strong { font-size: 15px; }
    .customer-result-count span { font-size: 10px; }
    .sale-step { justify-content: center; padding: 7px; }
    .sale-step-copy { display: none; }
    .sale-line-heading { display: grid; }
    .sale-line-heading .action-btn { width: 100%; }
    .sale-service-card { grid-template-columns: 1fr; }
    .sale-wizard-actions { align-items: stretch; }
    .sale-wizard-actions > div { flex: 1; justify-content: flex-end; }
    .sale-wizard-actions > div .action-btn { min-width: 0; display: inline-flex; padding-right: 12px !important; padding-left: 12px !important; }
    .sale-wizard-actions .admin-btn { flex: 1; padding-right: 13px; padding-left: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .skeleton-shimmer { animation: none !important; }
}
