@font-face {
    font-family: 'IRANSansWeb';
    src: url('assets/fonts/IRANSansWeb.eot');
    src: url('assets/fonts/IRANSansWeb.eot?#iefix') format('embedded-opentype'),
         url('assets/fonts/IRANSansWeb.woff2') format('woff2'),
         url('assets/fonts/IRANSansWeb.woff') format('woff'),
         url('assets/fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansWeb';
    src: url('assets/fonts/IRANSansWeb_Bold.eot');
    src: url('assets/fonts/IRANSansWeb_Bold.eot?#iefix') format('embedded-opentype'),
         url('assets/fonts/IRANSansWeb_Bold.woff2') format('woff2'),
         url('assets/fonts/IRANSansWeb_Bold.woff') format('woff'),
         url('assets/fonts/IRANSansWeb_Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansWeb';
    src: url('assets/fonts/IRANSansWeb_UltraLight.eot');
    src: url('assets/fonts/IRANSansWeb_UltraLight.eot?#iefix') format('embedded-opentype'),
         url('assets/fonts/IRANSansWeb_UltraLight.woff2') format('woff2'),
         url('assets/fonts/IRANSansWeb_UltraLight.woff') format('woff'),
         url('assets/fonts/IRANSansWeb_UltraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
    font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif;
}

body {
    margin: 0;
    background: #f6f9fc;
    color: #172033;
}

a {
    color: #0f766e;
    text-decoration: none;
    font-weight: 700;
}

a:hover {
    text-decoration: underline;
}

.app {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 12px;
}

.topbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.back-to-top {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 120;
    width: 44px;
    height: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(15, 118, 110, .24);
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
    font-size: 1.05rem;
    font-weight: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity .18s ease, transform .18s ease;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.brand {
    color: #17324d;
    font-size: 1.05rem;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.quick-search {
    display: flex;
    gap: 8px;
    width: min(420px, 100%);
}

.customer-head-actions {
    display: grid;
    gap: 8px;
    min-width: min(360px, 100%);
}

.customer-only-search {
    width: 100%;
}

input,
button,
select {
    min-height: 42px;
    border-radius: 8px;
    font-size: 0.95rem;
}

input,
select {
    width: 100%;
    border: 1px solid #cbd5e1;
    padding: 0 12px;
    background: #fff;
}

button,
.ghost-btn {
    border: 0;
    background: #0f766e;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    background: #334155;
    color: #fff;
}

.hero,
.panel,
.customer-head {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
}

.landing-hero {
    min-height: 420px;
    display: flex;
    align-items: center;
    padding: 48px;
    margin: 18px 0;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(37, 99, 235, 0.72)),
        url('assets/icons/trend.svg');
    background-size: cover, 180px;
    background-position: center, left 40px bottom 32px;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
}

.landing-hero > div {
    width: min(720px, 100%);
}

.landing-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.landing-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 4rem);
    color: #fff;
    line-height: 1.35;
}

.landing-hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    line-height: 2;
}

.landing-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.landing-login {
    background: #fff;
    color: #0f766e;
}

.landing-secondary {
    background: rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.landing-feature-grid div {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.landing-feature-grid strong {
    display: block;
    color: #17324d;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.landing-feature-grid span {
    color: #64748b;
    line-height: 1.8;
}

.hero h1,
.customer-head h1,
.panel h1,
.panel h2 {
    margin: 0 0 12px;
    color: #17324d;
    font-size: 1.25rem;
}

.customer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.customer-head p {
    margin: 0;
    color: #526173;
    line-height: 1.9;
}

.search-panel {
    display: flex;
    gap: 8px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.metric {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    min-height: 82px;
}

.metric span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.metric strong {
    display: block;
    color: #111827;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.metric em {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.76rem;
    font-style: normal;
    line-height: 1.6;
}

a.metric {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.report-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.compact-filters {
    grid-template-columns: 1fr 1fr auto auto;
}

.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px;
    margin: 4px 0 14px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.report-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    color: #17324d;
    font-size: 0.86rem;
}

.filter-drawer {
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 8px;
    margin: 0 0 14px;
    border: 1px solid #dbe6f0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.98));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.filter-drawer.is-open {
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    border-color: #cbdff0;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
}

.filter-toggle {
    position: relative;
    width: 100%;
    min-height: 46px;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #f8fbff, #eef7ff);
    color: #17324d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    z-index: 2;
    cursor: pointer;
}

.filter-toggle .filter-arrow {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 26px;
    border-radius: 50%;
    background: #dff7f2;
    color: #0f766e;
    font-size: 1.15rem;
    font-weight: 900;
    transition: transform 0.18s ease;
}

.filter-toggle b {
    letter-spacing: 0;
    font-size: 0.92rem;
    font-weight: 900;
    white-space: nowrap;
}

.filter-summary {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    color: #526173;
    font-size: 0.78rem;
    font-weight: 700;
}

.filter-summary span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 9px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.filter-drawer.is-open .filter-toggle {
    background: linear-gradient(135deg, #eef7ff, #ecfdf5);
    border-color: #b9d8ef;
}

.filter-drawer.is-open .filter-toggle .filter-arrow {
    transform: rotate(180deg);
}

.filter-drawer-content {
    opacity: 0;
    pointer-events: none;
    padding: 0 4px;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.18s ease, max-height 0.22s ease, padding-top 0.22s ease;
}

.filter-drawer.is-open .filter-drawer-content {
    opacity: 1;
    pointer-events: auto;
    max-height: none;
    overflow: visible;
    padding-top: 12px;
}

.filter-drawer .report-filters,
.filter-drawer .bot-filters,
.filter-drawer .compact-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.filter-drawer .checklist {
    max-height: 180px;
    overflow: auto;
}

.filter-drawer .checkline,
.filter-drawer .checklist {
    grid-column: span 2;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.filter-drawer .dropdown-checklist {
    position: relative;
    grid-column: span 1;
    max-height: 56px;
    min-height: 56px;
    padding: 7px;
    overflow: visible;
}

.filter-drawer .dropdown-checklist.is-open {
    z-index: 20;
    max-height: none;
    min-height: 0;
}

.checklist-toggle {
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    color: #17324d;
    text-align: right;
    cursor: pointer;
}

.checklist-toggle span {
    font-weight: 900;
    font-size: 0.82rem;
    white-space: nowrap;
}

.checklist-toggle small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
}

.checklist-toggle b {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0f766e;
    transition: transform 0.18s ease;
}

.dropdown-checklist.is-open .checklist-toggle b {
    transform: rotate(180deg);
}

.filter-drawer .dropdown-checklist > label {
    display: none;
}

.filter-drawer .dropdown-checklist.is-open > label {
    display: flex !important;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 9px;
    border-bottom: 1px solid #edf2f7;
    background: rgba(255, 255, 255, 0.96);
}

.filter-drawer .dropdown-checklist.is-open > label:nth-of-type(1) {
    margin-top: 8px;
    border-radius: 8px 8px 0 0;
}

.filter-drawer .dropdown-checklist.is-open > label:last-child {
    border-bottom: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.filter-drawer .date-picker,
.filter-drawer .bot-date-picker {
    min-width: 0;
}

.filter-drawer .bot-date-picker.has-open-calendar {
    grid-column: 1 / -1;
    z-index: 25;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(300px, 420px);
    align-items: start;
    gap: 8px 12px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.filter-drawer .bot-date-picker.has-open-calendar .bot-calendar {
    position: static;
    width: 100%;
    max-width: 420px;
    grid-column: 2;
    grid-row: 1 / span 3;
    margin: 0;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10);
}

.filter-drawer .bot-date-picker.has-open-calendar > span,
.filter-drawer .bot-date-picker.has-open-calendar > .date-button {
    grid-column: 1;
}

.filter-drawer .date-picker:nth-of-type(1),
.filter-drawer .bot-date-picker:nth-of-type(1) {
    grid-column: 1 / span 1;
}

.filter-drawer .date-picker:nth-of-type(2),
.filter-drawer .bot-date-picker:nth-of-type(2) {
    grid-column: 2 / span 1;
}

.filter-drawer .bot-date-picker.has-open-calendar {
    grid-column: 1 / -1 !important;
}

.filter-drawer h2 {
    margin: 0 0 10px;
    color: #17324d;
    font-size: 0.92rem;
}

.filter-drawer .report-filters label,
.filter-drawer .bot-date-picker,
.filter-drawer .date-picker,
.filter-drawer .checklist {
    padding: 9px;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
}

.filter-drawer .report-filters label:nth-child(2n),
.filter-drawer .bot-date-picker:nth-child(2n),
.filter-drawer .date-picker:nth-child(2n),
.filter-drawer .checklist:nth-child(2n) {
    border-color: #d1fae5;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.filter-drawer .report-filters label:nth-child(3n),
.filter-drawer .bot-date-picker:nth-child(3n),
.filter-drawer .date-picker:nth-child(3n),
.filter-drawer .checklist:nth-child(3n) {
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.filter-drawer input,
.filter-drawer select,
.filter-drawer .date-button {
    min-height: 36px;
    border-color: #dbe4ee;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.84rem;
}

.filter-drawer button:not(.filter-toggle) {
    min-height: 36px;
    font-size: 0.84rem;
}

.report-tabs a:nth-child(2n) {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.report-tabs a:nth-child(3n) {
    background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.report-tabs a.active {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    border-color: #0f766e;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

.report-filters label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 0.84rem;
}

.checkline {
    display: flex !important;
    align-items: center;
    grid-template-columns: none !important;
    min-height: 42px;
}

.checkline input {
    width: auto;
    min-height: auto;
}

.date-picker {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 0.84rem;
}

.date-row {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 6px;
}

.date-tools {
    display: flex;
    gap: 6px;
}

.date-tools button {
    min-height: 32px;
    padding: 6px 10px;
    background: #e2e8f0;
    color: #334155;
}

.checklist {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    min-height: 104px;
    max-height: 148px;
    overflow: auto;
}

.checklist legend {
    color: #475569;
    padding: 0 6px;
}

.checklist label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}

.checklist input {
    width: auto;
    min-height: auto;
}

.access-checklist {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px 10px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.access-checklist legend {
    font-weight: 900;
}

.access-checklist .muted {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    font-size: .78rem;
}

.role-builder-form {
    align-items: end;
}

.role-list {
    margin-top: 16px;
}

.role-list h3 {
    margin: 0 0 10px;
    color: #17324d;
    font-size: 1rem;
}

.role-list code {
    direction: ltr;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    color: #0f766e;
    background: #ccfbf1;
}

.chart-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
    overflow: hidden;
}

.chart-box h3 {
    margin: 0 0 10px;
    color: #17324d;
    font-size: 1rem;
}

.chart-box svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.chart-bar {
    fill: #0f766e;
}

.chart-line {
    fill: none;
    stroke: #0f766e;
    stroke-width: 4;
}

.chart-dot {
    fill: #17324d;
}

.chart-label {
    fill: #475569;
    font-size: 12px;
}

.chart-value {
    fill: #111827;
    font-size: 12px;
    font-weight: 700;
}

.segment-value {
    fill: #fff;
    font-size: 10px;
    font-weight: 700;
    pointer-events: none;
}

.chart-segment-link rect {
    cursor: pointer;
    transition: opacity 0.15s ease, filter 0.15s ease;
}

.chart-segment-link:hover rect {
    opacity: 0.86;
    filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.18));
}

.chart-grid {
    stroke: #dbe4ee;
    stroke-width: 1;
}

.bot-chart {
    min-height: 430px;
}

.chart-toolbar {
    display: grid;
    grid-template-columns: minmax(150px, 190px) 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.chart-toolbar h3 {
    text-align: center;
    margin: 0;
}

.chart-mode-form label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: 0.78rem;
}

.chart-mode-form select {
    min-height: 36px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
    align-items: stretch;
}

.route-day-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(560px, 1fr);
    gap: 14px;
    align-items: stretch;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-side table {
    min-width: 0;
}

.bot-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.bot-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
    box-shadow: 0 14px 38px rgba(15, 118, 110, 0.08);
}

.bot-filter-panel {
    position: relative;
    z-index: 4;
}

.bot-filters {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.bot-date-picker {
    position: relative;
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 0.84rem;
}

.date-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #172033;
    padding: 8px 10px;
}

.date-button img {
    width: 24px;
    height: 24px;
}

.bot-calendar {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 310px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    padding: 12px;
    z-index: 20;
}

.cal-head,
.cal-week,
.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    align-items: center;
}

.cal-head {
    grid-template-columns: 36px 1fr 1fr 36px;
    margin-bottom: 10px;
}

.cal-head button,
.cal-head select,
.cal-days button,
.bot-calendar .today {
    min-height: 34px;
    border-radius: 8px;
}

.cal-head button {
    background: #f1f5f9;
    color: #334155;
    padding: 0;
}

.cal-week {
    color: #334155;
    text-align: center;
    margin-bottom: 6px;
    font-weight: 700;
}

.cal-days button {
    background: #fff;
    color: #111827;
    padding: 0;
}

.cal-empty {
    min-height: 34px;
}

.cal-days button:disabled {
    color: #ef4444;
    background: #fff;
    cursor: not-allowed;
    opacity: 0.46;
}

.cal-days button.active,
.cal-days button:not(:disabled):hover {
    background: #2563eb;
    color: #fff;
}

.bot-calendar .today {
    margin-top: 10px;
    background: #f8fafc;
    color: #172033;
    border: 1px solid #dbe4ee;
}

.bot-card {
    position: relative;
    min-height: 128px;
    padding: 14px 14px 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.bot-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.metric-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: right;
    margin-left: 10px;
}

.metric-icon img {
    width: 48px;
    height: 48px;
    display: block;
}

.metric-label {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
}

.bot-card strong {
    clear: both;
    padding-top: 6px;
    font-size: 1.45rem;
    color: #0f172a;
}

.compact-money strong {
    font-size: 0.86rem;
    line-height: 1.45;
}

.tone-blue {
    border-color: #bfdbfe;
    background: #ffffff linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.tone-purple,
.tone-violet {
    border-color: #ddd6fe;
    background: #ffffff linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
}

.tone-green {
    border-color: #bbf7d0;
    background: #ffffff linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

.tone-orange {
    border-color: #fed7aa;
    background: #ffffff linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.tone-red {
    border-color: #fecaca;
    background: #ffffff linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.tone-cyan {
    border-color: #a5f3fc;
    background: #ffffff linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
}

.tone-slate {
    border-color: #cbd5e1;
    background: #ffffff linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.detail-panel {
    border-color: #99f6e4;
    box-shadow: 0 12px 32px rgba(15, 118, 110, 0.08);
}

.bot-summary {
    background: #fff;
}

.mini-kpis {
    display: grid;
    gap: 0;
    border-top: 1px solid #e2e8f0;
}

.mini-kpis a,
.mini-kpis div,
.spark-kpi {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 10px 0;
    background: #fff;
    color: #172033;
}

.mini-kpis a:hover {
    text-decoration: none;
    background: #f8fafc;
}

.mini-kpis span,
.spark-kpi span,
.spark-kpi small {
    color: #64748b;
    font-size: 0.76rem;
}

.mini-kpis small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 0.68rem;
}

.mini-kpis strong,
.spark-kpi strong {
    color: #0f172a;
    font-size: 1.05rem;
    white-space: nowrap;
}

.mini-kpis img {
    width: 30px;
    height: 30px;
    justify-self: center;
}

.spark-kpi {
    margin-top: 10px;
    background: linear-gradient(135deg, #ffffff, #faf5ff);
}

.wide-spark {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
}

.wide-spark .mini-line,
.wide-spark small {
    grid-column: 1 / -1;
}

.mini-line {
    width: 100%;
    height: 58px;
}

.mini-line polyline {
    fill: none;
    stroke: #8b5cf6;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-line circle {
    fill: #fff;
    stroke: #8b5cf6;
    stroke-width: 3;
}

.kpi-summary-card {
    background: #fff;
    container-type: inline-size;
}

.kpi-tile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.kpi-tile {
    min-height: 178px;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    justify-items: center;
    align-items: center;
    gap: 7px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 10px;
    color: #172033;
    background: #fff;
    text-align: center;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-tile:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.kpi-tile span {
    min-height: 34px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.45;
}

.kpi-tile strong {
    color: #0f172a;
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1;
}

.kpi-tile img {
    width: 36px;
    height: 36px;
}

.kpi-tile .mini-line {
    height: 36px;
}

.kpi-tile .mini-line polyline {
    stroke-width: 5;
}

.kpi-tile .mini-line circle {
    r: 5px;
}

.kpi-blue {
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    border-color: #bfdbfe;
}

.kpi-green {
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
    border-color: #bbf7d0;
}

.kpi-red {
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
    border-color: #fecaca;
}

.kpi-wide-tile {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
    padding: 14px 16px;
    overflow: hidden;
}

.kpi-wide-tile span {
    color: #334155;
    font-weight: 800;
}

.kpi-wide-tile strong {
    display: block;
    margin: 8px 0;
    color: #0f172a;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.kpi-wide-tile .mini-line {
    height: 74px;
}

.kpi-change {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.6;
    white-space: normal;
}

.mini-line.line-blue polyline {
    stroke: #2563eb;
}

.mini-line.line-blue circle {
    stroke: #2563eb;
}

.mini-line.line-green polyline {
    stroke: #16a34a;
}

.mini-line.line-green circle {
    stroke: #16a34a;
}

.mini-line.line-red polyline {
    stroke: #ef4444;
}

.mini-line.line-red circle {
    stroke: #ef4444;
}

.mini-line.line-purple polyline {
    stroke: #8b5cf6;
}

.mini-line.line-purple circle {
    stroke: #8b5cf6;
}

.route-pill {
    display: inline-flex;
    min-width: 74px;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
}

.route-pill:hover {
    text-decoration: none;
    background: #dbeafe;
}

.route-pill-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.route-pill-green {
    background: #dcfce7;
    color: #15803d;
}

.route-pill-purple {
    background: #ede9fe;
    color: #6d28d9;
}

.route-pill-orange {
    background: #ffedd5;
    color: #ea580c;
}

.route-pill-cyan {
    background: #cffafe;
    color: #0e7490;
}

.route-pill-red {
    background: #fee2e2;
    color: #dc2626;
}

.route-table-panel {
    overflow: hidden;
}

.route-table-panel h2 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.route-performance-table .table-wrap {
    border: 0;
    border-radius: 8px;
    overflow-x: auto;
}

.route-performance-table table {
    min-width: 820px;
    border-collapse: separate;
    border-spacing: 0;
}

.route-performance-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 800;
    position: static;
}

.route-performance-table th button {
    text-align: center;
    justify-content: center;
    font-weight: 800;
}

.route-performance-table td {
    text-align: center;
    color: #172033;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 8px 9px;
    vertical-align: middle;
}

.route-performance-table td:first-child,
.route-performance-table th:first-child button {
    text-align: right;
}

.route-performance-table tbody tr:last-child td {
    background: #f8fbff;
    border-bottom: 0;
    font-size: 0.9rem;
}

.route-performance-table .route-pill {
    min-width: 86px;
    padding: 4px 8px;
    font-weight: 900;
}

.trend-up {
    color: #16a34a;
    font-weight: 700;
}

.trend-down {
    color: #ef4444;
    font-weight: 700;
}

.customer-tabs-panel {
    scroll-margin-top: 12px;
}

.customer-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.customer-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    color: #17324d;
}

.customer-tabs a:hover,
.customer-tabs a:focus {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    text-decoration: none;
}

.tab-section {
    padding: 8px 0 16px;
    scroll-margin-top: 18px;
}

.tab-section + .tab-section {
    border-top: 1px solid #edf2f7;
    margin-top: 8px;
    padding-top: 18px;
}

.tab-section h3 {
    margin: 0 0 12px;
    color: #17324d;
    font-size: 1.05rem;
}

.muted-cell {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.7;
}

.donut-box {
    display: grid;
    align-content: start;
    justify-items: center;
}

.donut-box svg {
    max-width: 280px;
}

.donut-caption {
    font-size: 10px;
}

.donut-bg {
    fill: none;
    stroke: #d8dee8;
    stroke-width: 22;
}

.donut-fg {
    fill: none;
    stroke: #16a34a;
    stroke-width: 22;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 110px 110px;
}

.donut-number {
    fill: #17324d;
    font-size: 28px;
    font-weight: 700;
}

.donut-legend {
    display: grid;
    gap: 10px;
    width: min(260px, 100%);
    margin-top: 8px;
}

.donut-legend div {
    display: grid;
    grid-template-columns: 16px auto 1fr;
    align-items: center;
    gap: 8px;
    color: #17324d;
    font-size: 0.86rem;
}

.donut-legend strong {
    justify-self: end;
    font-weight: 800;
}

.donut-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.donut-legend-dot-green {
    background: #16a34a;
}

.donut-legend-dot-gray {
    background: #aab4c3;
}

.overview-hero {
    background: linear-gradient(135deg, #ffffff 0%, #eef8ff 55%, #f7fff9 100%);
}

.overview-filter-panel {
    z-index: 14;
}

.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.overview-source-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0;
}

.overview-source-panel {
    position: relative;
    overflow: hidden;
}

.overview-source-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #10b981);
}

.overview-sales-panel::before {
    background: linear-gradient(90deg, #0f766e, #f59e0b);
}

.overview-bot-panel::before {
    background: linear-gradient(90deg, #2563eb, #8b5cf6);
}

.overview-didar-panel::before {
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
}

.overview-source-panel h2 {
    margin: 4px 0 12px;
    text-align: center;
    font-size: 1.05rem;
}

.overview-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.overview-mini-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.overview-mini-kpi {
    min-height: 92px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 6px 9px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #172033;
}

.overview-mini-kpi:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.overview-mini-icon {
    grid-row: 1 / 3;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
}

.overview-mini-icon img {
    width: 24px;
    height: 24px;
}

.overview-mini-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.5;
}

.overview-mini-kpi strong {
    color: #0f172a;
    font-size: 1.18rem;
    font-weight: 950;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.overview-mini-money strong {
    font-size: 0.78rem;
    line-height: 1.35;
}

.overview-mini-money {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    text-align: center;
}

.overview-mini-money .overview-mini-icon {
    grid-row: auto;
    width: 36px;
    height: 36px;
}

.overview-mini-money .overview-mini-label {
    font-size: 0.78rem;
}

.overview-mini-blue {
    background: linear-gradient(180deg, #fff, #eff6ff);
    border-color: #bfdbfe;
}

.overview-mini-green {
    background: linear-gradient(180deg, #fff, #ecfdf5);
    border-color: #bbf7d0;
}

.overview-mini-orange {
    background: linear-gradient(180deg, #fff, #fff7ed);
    border-color: #fed7aa;
}

.overview-mini-purple {
    background: linear-gradient(180deg, #fff, #f5f3ff);
    border-color: #ddd6fe;
}

.overview-mini-cyan {
    background: linear-gradient(180deg, #fff, #ecfeff);
    border-color: #a5f3fc;
}

.overview-mini-red {
    background: linear-gradient(180deg, #fff, #fef2f2);
    border-color: #fecaca;
}

.overview-mini-slate {
    background: linear-gradient(180deg, #fff, #f8fafc);
    border-color: #cbd5e1;
}

.overview-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.6fr);
    gap: 14px;
    margin-bottom: 14px;
    align-items: stretch;
}

.overview-main-grid > .overview-wide {
    display: grid;
}

.overview-main-grid .chart-box {
    height: 100%;
    box-sizing: border-box;
}

.overview-main-grid .overview-wide .overview-chart {
    min-height: 420px;
}

.overview-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.overview-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.overview-chart {
    min-height: 310px;
}

.overview-chart svg {
    width: 100%;
    height: auto;
    display: block;
}

.overview-ring {
    display: grid;
    justify-items: center;
    align-content: start;
}

.overview-ring svg {
    width: min(260px, 100%);
}

.overview-ring-stats {
    width: min(250px, 100%);
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.overview-ring-stats div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.overview-ring-stats span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 850;
}

.overview-ring-stats strong {
    font-size: 0.95rem;
}

.overview-column-chart svg {
    min-height: 230px;
}

.rank-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.rank-legend div {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.rank-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.rank-legend span {
    color: #334155;
    font-size: 0.8rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-legend strong {
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 900;
}

.bubble-wrap {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px;
}

.route-lanes {
    min-height: 280px;
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 10px;
}

.route-lane {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 54px;
    gap: 10px;
    align-items: center;
    color: #172033;
}

.route-lane:hover {
    text-decoration: none;
}

.route-lane span {
    min-width: 0;
    justify-self: end;
    padding: 6px 10px;
    border-radius: 8px;
    background: #eff6ff;
    background: color-mix(in srgb, var(--lane-color) 14%, #fff);
    color: var(--lane-color);
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

.route-lane div {
    height: 16px;
    border-radius: 99px;
    background: #eef2f7;
    overflow: hidden;
}

.route-lane b {
    display: block;
    width: var(--lane-width);
    height: 100%;
    border-radius: inherit;
    background: var(--lane-color);
    background: linear-gradient(90deg, color-mix(in srgb, var(--lane-color) 58%, #fff), var(--lane-color));
}

.route-lane strong {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 950;
}

.bubble-item {
    width: var(--bubble-size);
    height: var(--bubble-size);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    border-radius: 50%;
    background: var(--bubble-color);
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85), color-mix(in srgb, var(--bubble-color) 28%, #fff) 42%, var(--bubble-color) 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--bubble-color) 25%, transparent);
    text-align: center;
}

.bubble-item:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.bubble-item strong {
    font-size: 1.25rem;
    font-weight: 950;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}

.bubble-item span {
    max-width: 80%;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.35;
}

.treemap-wrap {
    min-height: 290px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: stretch;
}

.treemap-cell {
    flex: 1 1 var(--basis);
    min-width: 150px;
    min-height: 86px;
    display: grid;
    align-content: end;
    gap: 8px;
    padding: 14px;
    border-radius: 8px;
    color: #fff;
    background: var(--cell-color);
    background: linear-gradient(145deg, color-mix(in srgb, var(--cell-color) 82%, #fff), var(--cell-color));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.treemap-cell span {
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.45;
}

.treemap-cell strong {
    font-size: 1.25rem;
    font-weight: 950;
}

.treemap-cell small {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.72rem;
    font-weight: 850;
}

.sales-rank-chart,
.sales-treemap-chart {
    min-height: 360px;
}

.donut-breakdown-body {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(190px, 1fr);
    align-items: center;
    gap: 10px;
}

.donut-breakdown-body svg {
    width: 100%;
    max-width: 250px;
}

.donut-breakdown-legend {
    display: grid;
    gap: 9px;
}

.donut-breakdown-legend div {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.donut-breakdown-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.donut-breakdown-legend span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 850;
}

.donut-breakdown-legend strong {
    color: #0f172a;
    font-weight: 900;
}

.overview-list {
    display: grid;
    gap: 0;
}

.overview-list h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1rem;
}

.overview-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.overview-list div:last-child {
    border-bottom: 0;
}

.overview-list span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.overview-list strong {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 900;
}

.actions {
    display: flex;
    justify-content: center;
    padding-top: 12px;
}

.inline-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.danger-form {
    padding: 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff7f7;
}

.danger-form button {
    background: #dc2626;
}

.upload-progress {
    display: none;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.upload-progress.is-active {
    display: block;
}

.upload-progress-bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.upload-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #2563eb);
    transition: width 0.16s ease;
}

.upload-progress-text {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 800;
}

.excel-import-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8fffd 100%);
}

.excel-upload-form {
    display: grid;
    gap: 12px;
}

.excel-upload-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.excel-upload-card {
    display: grid;
    gap: 8px;
    min-height: 116px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    color: #17324d;
}

.excel-upload-card span {
    font-weight: 800;
}

.excel-upload-card small {
    color: #64748b;
    direction: ltr;
    text-align: right;
}

.excel-date-range {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    color: #0f766e;
    background: #f0fdfa;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.excel-upload-card input {
    width: 100%;
    max-width: 100%;
    font-size: 0.78rem;
}

.inline-actions {
    display: flex;
    justify-content: flex-start;
}

.excel-link-box {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.settings-card {
    display: grid;
    gap: 8px;
    color: #17324d;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.settings-card strong {
    font-size: 1rem;
}

.settings-card span {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.8;
}

.settings-wide-card {
    margin-bottom: 16px;
}

.settings-inline-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.settings-inline-form .checkline {
    margin: 0;
}

.customer-settings-form {
    display: grid;
    gap: 16px;
}

.segmented-setting {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    width: fit-content;
}

.segmented-setting label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #17324d;
    background: #fff;
    font-weight: 900;
}

.grade-range-grid {
    display: grid;
    grid-template-columns: 90px repeat(2, minmax(120px, 180px));
    gap: 8px;
    align-items: center;
}

.grade-range-head {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 900;
}

.grade-range-grid strong {
    color: #0f766e;
    font-size: 1rem;
}

.grade-range-grid input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 10px;
    font: inherit;
}

.order-settings-card label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-weight: 800;
}

.order-settings-card input,
.order-settings-card select,
.order-settings-card textarea {
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 10px 12px;
    font: inherit;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.inline-form {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.inline-form button,
.report-export-tools button {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #17324d;
    padding: 7px 10px;
    font: inherit;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
}

.report-export-tools {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 0 0 10px;
}

.section-head .report-export-tools {
    margin: 0;
}

.mini-form {
    display: inline-flex;
    margin: 0;
}

.mini-form button {
    padding: 7px 12px;
    font-size: 0.82rem;
}

.preorder-search-form,
.preorder-add-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.preorder-search-form label,
.preorder-add-grid label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 0.86rem;
    font-weight: 800;
}

.preorder-customer-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.5;
}

.preorder-customer-mini span {
    position: relative;
    padding-inline-start: 8px;
}

.preorder-customer-mini span::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #94a3b8;
    transform: translateY(-50%);
}

.preorder-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.preorder-results a {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.preorder-results span,
.suggestion-card span,
.suggestion-card small,
.preorder-table small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.preorder-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.recent-invoice-strip {
    display: grid;
    grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.recent-invoice-strip h2 {
    margin-bottom: 4px;
}

.recent-invoice-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.recent-invoice-link {
    display: grid;
    gap: 4px;
    min-height: 76px;
    padding: 10px;
    text-align: right;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #17324d;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.recent-invoice-link:hover {
    border-color: #14b8a6;
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.12);
}

.recent-invoice-link span,
.recent-invoice-link small {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.55;
}

.recent-invoice-link strong {
    font-size: 0.95rem;
    color: #0f766e;
    line-height: 1.45;
}

.invoice-overview-trigger {
    border-color: #c4b5fd;
    background: linear-gradient(135deg, #f5f3ff, #ffffff);
}

.invoice-overview-trigger strong {
    color: #6d28d9;
}

.preorder-customer-metrics {
    margin-top: 12px;
}

.preorder-customer-metrics .metric {
    position: relative;
    min-height: 104px;
    padding: 16px 16px 14px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.preorder-customer-metrics .metric::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset-inline-end: -34px;
    bottom: -38px;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .28);
    pointer-events: none;
}

.preorder-customer-metrics .metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.09);
}

.preorder-customer-metrics .metric-icon {
    float: none;
    position: absolute;
    inset-inline-start: 14px;
    top: 14px;
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .76);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
    z-index: 1;
}

.preorder-customer-metrics .metric-icon img {
    width: 25px;
    height: 25px;
}

.preorder-customer-metrics .metric-label {
    position: relative;
    z-index: 1;
    display: block;
    padding-inline-start: 54px;
    min-height: 36px;
    margin-bottom: 10px;
    color: #475569;
    font-size: .82rem;
    line-height: 1.45;
}

.preorder-customer-metrics .metric strong {
    position: relative;
    z-index: 1;
    clear: none;
    padding-top: 0;
    color: #071426;
    font-size: clamp(.96rem, 1.4vw, 1.3rem);
    line-height: 1.45;
    letter-spacing: 0;
}

.preorder-customer-metrics a.metric {
    text-decoration: none;
}

.preorder-external-summary,
.invoice-overview-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.preorder-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 0.8fr)) minmax(260px, 1.4fr);
    gap: 12px;
}

.preorder-status-card {
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #ffffff;
}

.route-filter-panel,
.route-settings-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.route-filters {
    align-items: end;
}

.route-column-panel {
    margin-top: -4px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 52%, #f0fdfa 100%);
}

.route-column-panel .section-head.compact {
    margin-bottom: 10px;
}

.route-column-panel .section-head.compact h2,
.route-column-panel .section-head.compact h3 {
    font-size: 1rem;
}

.route-column-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.route-column-panel-title,
.route-column-panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.route-column-panel-title > div {
    display: grid;
    gap: 2px;
}

.route-column-panel-title .muted {
    margin: 0;
    font-size: .73rem;
}

.route-column-collapse-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform .18s ease, background .18s ease;
}

.route-column-collapse-button:hover {
    color: #fff;
    background: #2563eb;
}

.route-column-panel.is-collapsed .route-column-collapse-button {
    transform: rotate(90deg);
}

.route-column-panel.is-collapsed .section-head.compact {
    margin-bottom: 0;
}

.route-active-column-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #a7f3d0;
    border-radius: 7px;
    color: #166534;
    background: #ecfdf5;
    font-size: .7rem;
    font-weight: 900;
    white-space: nowrap;
}

.route-active-column-count strong {
    color: #047857;
    font-size: .85rem;
}

.route-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.route-column-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    color: #334155;
    background: rgba(255,255,255,.76);
    font-size: .74rem;
    font-weight: 900;
}

.route-column-option input {
    width: 13px;
    height: 13px;
    accent-color: #0f766e;
}

.route-column-option:has(input:checked) {
    border-color: #99f6e4;
    color: #0f766e;
    background: #f0fdfa;
}

.route-column-option.is-locked {
    border-style: dashed;
    color: #475569;
    background: #f8fafc;
}

.route-column-option small {
    margin-inline-start: auto;
    color: #94a3b8;
    font-size: .58rem;
}

.route-column-help {
    margin: 10px 0 0;
    color: #64748b;
    font-size: .68rem;
    font-weight: 800;
}

.route-print-settings-card {
    display: grid;
    gap: 14px;
}

.route-print-column-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.route-print-column-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 9px;
}

.route-print-column-option {
    display: grid;
    grid-template-columns: 22px 16px minmax(0, 1fr) 92px;
    cursor: grab;
    background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
}

.route-print-column-option:active {
    cursor: grabbing;
}

.route-print-column-option.is-dragging {
    opacity: .55;
}

.route-print-column-option.is-drag-over {
    border-color: #0f766e;
    box-shadow: inset 0 0 0 2px rgba(15, 118, 110, .18);
}

.route-column-drag-handle {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: #0f766e;
    background: #ccfbf1;
    font-weight: 1000;
}

.route-print-width-field {
    display: inline-grid;
    grid-template-columns: auto minmax(48px, 1fr);
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: .66rem;
    white-space: nowrap;
}

.route-print-width-field input {
    width: 100%;
    min-height: 28px;
    padding: 2px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    text-align: center;
}

.route-output-note-label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: .84rem;
    font-weight: 900;
}

.route-output-note-label textarea {
    width: 100%;
    min-height: 104px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    line-height: 1.8;
}

.route-assignment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.route-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 4px 9px;
    margin: 0 0 4px 5px;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 900;
    line-height: 1.4;
}

.route-chip.fixed,
.route-chip.role-seller {
    color: #0f766e;
    background: #ccfbf1;
}

.route-chip.floating,
.route-chip.role-merchandiser {
    color: #6d28d9;
    background: #ede9fe;
}

.route-month-pill {
    display: inline-flex;
    min-width: 54px;
    justify-content: center;
    padding: 4px 7px;
    margin: 2px;
    border-radius: 8px;
    color: #64748b;
    background: #f1f5f9;
    font-weight: 900;
}

.route-month-pill.has-buy {
    color: #047857;
    background: #d1fae5;
}

.route-activity {
    display: block;
    max-width: 260px;
    color: #475569;
    font-size: .75rem;
    line-height: 1.65;
}

.route-settings-card label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: .84rem;
    font-weight: 800;
}

.route-bulk-panel {
    margin-bottom: 14px;
}

.route-assignment-grid.wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-bulk-filter {
    display: grid;
    gap: 12px;
}

.route-customer-filter {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.route-customer-filter .section-head {
    margin-bottom: 0;
}

.route-filter-empty {
    padding: 34px 16px !important;
    color: #475569;
    text-align: center;
    background: #f8fafc;
}

.route-bulk-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.route-manual-codes-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.route-manual-codes-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0fdfa, #ffffff);
}

.route-manual-codes-form.fixed {
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.route-manual-codes-form > div,
.route-manual-codes-form label:has(textarea),
.route-manual-codes-form button {
    grid-column: 1 / -1;
}

.route-manual-codes-form h3 {
    margin: 0 0 4px;
    color: #134e4a;
    font-size: .98rem;
}

.route-manual-codes-form label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: .8rem;
    font-weight: 900;
}

.route-manual-codes-form textarea {
    min-height: 92px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    font: inherit;
    direction: ltr;
}

.route-manual-codes-form > div {
    align-self: center;
}

.route-manual-codes-form button {
    width: 100%;
    min-height: 44px;
    white-space: normal;
    line-height: 1.6;
}

.route-bulk-list .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.route-bulk-list .actions input:not([type="checkbox"]) {
    min-width: min(320px, 100%);
}

.route-bulk-list .actions label:not(.checkline) {
    display: grid;
    gap: 4px;
    min-width: min(210px, 100%);
    color: #475569;
    font-size: .78rem;
    font-weight: 900;
}

.route-bulk-list .actions select,
.route-bulk-list .actions input {
    min-height: 38px;
}

.route-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.route-list-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 4px 8px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #475569;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    font-size: .72rem;
    font-weight: 900;
}

.route-list-filter input {
    width: min(260px, 40vw);
    min-height: 28px;
    padding: 0 10px;
    border-color: #bfdbfe;
    border-radius: 999px;
    font-size: .74rem;
    background: #fff;
}

.route-filter-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: .7rem;
    font-weight: 1000;
}

.route-target-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 6px 0 8px;
}

.route-left-actions {
    margin-inline-start: auto;
}

.route-print-actions .compact-check {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: #475569;
    font-size: .78rem;
}

.route-table-panel {
    padding: 14px;
}

.route-table-panel .section-head {
    margin-bottom: 6px;
}

.route-list-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.route-visit-section,
.route-no-need-section {
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.route-no-need-section {
    border-color: #ccfbf1;
    background: linear-gradient(135deg, #ffffff, #f0fdfa);
}

.route-list-section .section-head.compact {
    margin-bottom: 8px;
}

.route-list-section .section-head.compact h3 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #17324d;
    font-size: 1.02rem;
}

.route-collapse-toggle {
    width: 22px;
    height: 22px;
    min-width: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #0f766e;
    background: #ffffff;
    font-size: .86rem;
    font-weight: 1000;
    line-height: 1;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, color .16s ease;
}

.route-collapse-toggle:hover {
    color: #ffffff;
    border-color: #0f766e;
    background: #0f766e;
}

.route-list-section.is-collapsed > :not(.section-head) {
    display: none;
}

.route-list-section.is-collapsed .route-collapse-toggle {
    transform: rotate(90deg);
}

.route-list-section .section-head.compact strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: .82rem;
    font-weight: 1000;
}

.route-fullscreen-toggle {
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid #bfdbfe;
    color: #0f766e;
    background: #eff6ff;
    font-size: .72rem;
    font-weight: 1000;
}

.route-fullscreen-toggle:hover,
.route-fullscreen-toggle[aria-pressed="true"] {
    color: #fff;
    border-color: #0f766e;
    background: #0f766e;
}

body.route-fullscreen-active {
    overflow: hidden;
}

.route-section-fullscreen {
    position: fixed;
    inset: 14px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 16px;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
    overflow: auto;
}

.route-section-fullscreen .section-head.compact {
    position: sticky;
    top: 0;
    z-index: 6;
    padding-bottom: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.route-section-fullscreen .route-sheet-wrap {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
}

.route-section-fullscreen .route-target-preview {
    max-height: none;
}

.route-section-fullscreen .route-target-sheet-wrap {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
}

.route-drop-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px dashed #94a3b8;
    border-radius: 999px;
    color: #64748b;
    background: rgba(255, 255, 255, .78);
    font-size: .74rem;
    font-weight: 950;
}

.route-visit-section .section-head.compact strong {
    color: #991b1b;
    background: #fee2e2;
}

.route-drop-target {
    border-radius: 8px;
    transition: background .16s ease, box-shadow .16s ease, outline-color .16s ease;
}

.route-drop-target.is-drag-over {
    outline: 2px dashed #0f766e;
    outline-offset: 4px;
    background: linear-gradient(135deg, rgba(204, 251, 241, .58), rgba(255, 255, 255, .88));
    box-shadow: 0 12px 28px rgba(15, 118, 110, .12);
}

.route-drop-target.is-drag-over .route-drop-hint {
    color: #ffffff;
    border-color: #0f766e;
    background: #0f766e;
}

.route-drag-zones {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
}

.route-drag-zone {
    position: fixed;
    top: 50%;
    display: grid;
    align-content: center;
    justify-items: center;
    width: min(220px, 28vw);
    min-height: 156px;
    padding: 18px;
    border: 2px dashed rgba(15, 23, 42, .18);
    border-radius: 14px;
    color: #ffffff;
    text-align: center;
    transform: translateY(-50%) scale(.96);
    opacity: .88;
    box-shadow: 0 20px 44px rgba(15, 23, 42, .14);
    transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.route-drag-zone strong {
    font-size: 1.05rem;
    font-weight: 950;
}

.route-drag-zone span {
    margin-top: 8px;
    font-size: .78rem;
    font-weight: 800;
    opacity: .92;
}

.route-drag-zone.is-visit {
    right: 18px;
    background: linear-gradient(145deg, rgba(13, 148, 136, .95), rgba(22, 163, 74, .94));
}

.route-drag-zone.is-no-need {
    left: 18px;
    background: linear-gradient(145deg, rgba(244, 63, 94, .94), rgba(185, 28, 28, .94));
}

.route-drag-zone.is-hot {
    transform: translateY(-50%) scale(1.04);
    opacity: 1;
    border-color: rgba(255, 255, 255, .82);
    box-shadow: 0 24px 54px rgba(15, 23, 42, .24);
}

.route-drag-ghost {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 132px;
    padding: 9px 13px;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    color: #0f766e;
    background: rgba(240, 253, 250, .96);
    box-shadow: 0 14px 32px rgba(15, 118, 110, .16);
    font-size: .82rem;
    font-weight: 950;
    text-align: center;
    will-change: transform;
}

body.route-pointer-dragging {
    cursor: grabbing;
    user-select: none;
}

.route-target-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 2px;
}

.route-target-sheet-wrap {
    max-height: 54vh;
    margin-top: 8px;
}

.route-target-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.route-target-table th,
.route-target-table td {
    white-space: nowrap;
    width: auto;
    min-width: max-content;
}

.route-target-table [data-route-col="address"],
.route-target-table [data-route-col="payment_detail"],
.route-target-table [data-route-col="didar_activity"],
.route-target-table [data-route-col="bot_activity_type"],
.route-target-table [data-route-col="note"] {
    white-space: normal;
    min-width: 180px;
    max-width: 360px;
}

.route-target-table [data-route-col="didar_date"] {
    min-width: 150px;
    white-space: normal;
}

.route-target-table [data-route-col="visit_reason"],
.route-target-table [data-route-col="visit_note"] {
    min-width: 170px;
    white-space: normal;
}

.route-target-bulk-form {
    margin: 0;
}

.route-target-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 6px;
}

.route-target-bulk-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    color: #dc2626;
    background: #fff1f2;
    font-size: .74rem;
    font-weight: 1000;
}

.route-target-bulk-remove:hover {
    color: #ffffff;
    background: #ef4444;
}

.route-target-save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    font-size: .76rem;
    font-weight: 1000;
    box-shadow: 0 8px 18px rgba(15, 118, 110, .18);
}

.route-target-save-button:disabled {
    cursor: wait;
    opacity: .7;
}

.route-target-save-state {
    color: #0f766e;
    font-size: .74rem;
    font-weight: 1000;
}

.route-history-section {
    margin-top: 16px;
}

.route-history-filters {
    margin: 10px 0 12px;
}

.route-history-table {
    width: max-content;
    min-width: 100%;
}

.route-history-table th,
.route-history-table td {
    white-space: nowrap;
}

.route-history-table .route-note-cell {
    min-width: 190px;
    max-width: 360px;
    white-space: normal;
}

/* Route operations module */
.route-module-tabs,
.route-settings-tabs {
    margin-bottom: 14px;
}

.route-batch-selector,
.route-batch-editor,
.route-batch-members,
.route-create-filter-panel,
.route-batch-history-card,
.route-result-card,
.route-report-filter-card,
.route-report-table-card,
.route-module-settings-form {
    margin-top: 12px;
}

.route-batch-select-form {
    align-items: end;
}

.route-batch-select-form label {
    min-width: min(100%, 430px);
}

.route-ajax-notice {
    position: sticky;
    top: 8px;
    z-index: 70;
    margin: 10px auto;
    width: fit-content;
    max-width: min(92vw, 720px);
    padding: 9px 16px;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    color: #0f766e;
    background: #f0fdfa;
    box-shadow: 0 10px 26px rgba(15, 118, 110, .12);
    font-size: .82rem;
    font-weight: 900;
}

.route-ajax-notice.is-error {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fff1f2;
}

.route-batch-kpis,
.route-report-dashboard {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.route-batch-kpi {
    min-width: 0;
    min-height: 96px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: center;
    gap: 4px 9px;
    padding: 12px;
    border: 1px solid #dbe7f2;
    border-radius: 8px;
    background: #ffffff;
}

.route-batch-kpi:nth-child(5n+1) { background: #eff6ff; border-color: #bfdbfe; }
.route-batch-kpi:nth-child(5n+2) { background: #ecfdf5; border-color: #bbf7d0; }
.route-batch-kpi:nth-child(5n+3) { background: #fff7ed; border-color: #fed7aa; }
.route-batch-kpi:nth-child(5n+4) { background: #f5f3ff; border-color: #ddd6fe; }
.route-batch-kpi:nth-child(5n+5) { background: #ecfeff; border-color: #a5f3fc; }

.route-batch-kpi img {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    padding: 7px;
    border-radius: 8px;
    background: rgba(255,255,255,.78);
}

.route-batch-kpi span {
    min-width: 0;
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.55;
}

.route-batch-kpi strong {
    color: #102a43;
    font-size: 1.25rem;
    line-height: 1;
}

.route-batch-header-fields,
.route-settings-field-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.route-batch-header-fields label,
.route-settings-field-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: #52677f;
    font-size: .78rem;
    font-weight: 900;
}

.route-batch-header-fields .wide-field,
.route-settings-field-grid .wide-field {
    grid-column: span 2;
}

.route-batch-member-table small,
.route-create-customer-table small {
    display: block;
    margin-top: 3px;
    color: #7890a8;
    font-size: .68rem;
}

.route-create-customer-table tr {
    cursor: pointer;
}

.route-create-customer-table tr:has(input:checked) {
    background: #ecfeff;
}

.route-create-customer-table tr.is-route-member {
    color: #94a3b8;
    background: #f8fafc;
}

.route-step-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: .72rem;
    font-weight: 950;
}

.route-create-workspace {
    margin-top: 12px;
    background: #fff;
}

.route-create-workspace > .section-head {
    margin-bottom: 8px;
}

.route-create-list-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-create-list-summary span,
.route-create-list-summary strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: .72rem;
    white-space: nowrap;
}

.route-create-list-summary span {
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    background: #eff6ff;
}

.route-create-list-summary strong {
    border: 1px solid #a7f3d0;
    color: #047857;
    background: #ecfdf5;
}

.route-create-list-toolbar {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto auto auto;
    align-items: end;
    gap: 9px;
    margin: 12px 0 10px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.route-create-local-search {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #52677f;
    font-size: .74rem;
    font-weight: 900;
}

.route-create-local-search input {
    width: 100%;
    min-height: 38px;
}

.route-create-check-all {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #dbe7f2;
    border-radius: 7px;
    background: #fff;
    white-space: nowrap;
}

.route-create-visible-count {
    align-self: center;
    color: #64748b;
    font-size: .74rem;
    font-weight: 900;
    white-space: nowrap;
}

.route-create-visible-count strong {
    color: #0f766e;
    font-size: .88rem;
}

.route-create-table-wrap {
    max-height: min(62vh, 680px);
    border: 1px solid #dbe7f2;
    border-radius: 8px;
    background: #fff;
}

.route-create-customer-table {
    width: max-content;
    min-width: 100%;
}

.route-create-customer-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    white-space: nowrap;
    background: #eef4fa;
}

.route-create-customer-table th,
.route-create-customer-table td {
    padding: 7px 8px;
    vertical-align: middle;
}

.route-create-customer-table tr.is-selected,
.route-create-customer-table tr:has(input:checked) {
    color: #0f5132;
    background: #ecfdf5;
    box-shadow: inset -4px 0 0 #10b981;
}

.route-create-check-column {
    width: 64px;
    min-width: 64px;
    text-align: center;
}

.route-create-check-column input {
    width: 15px;
    height: 15px;
    accent-color: #0f766e;
}

.route-create-customer-cell {
    min-width: 220px;
    white-space: normal !important;
}

.route-create-customer-cell strong,
.route-create-area-cell strong {
    display: block;
    color: #17324d;
    line-height: 1.55;
}

.route-create-customer-name {
    display: grid;
    gap: 2px;
}

.route-create-customer-name a {
    color: #0f766e;
    font-weight: 950;
    line-height: 1.55;
    text-decoration: none;
}

.route-create-customer-name a:hover {
    color: #0d9488;
    text-decoration: underline;
}

.route-ltr-cell {
    direction: ltr;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.route-create-customer-cell small,
.route-create-area-cell small {
    display: block;
    margin-top: 2px;
    color: #7890a8;
    font-size: .68rem;
    line-height: 1.5;
}

.route-create-area-cell {
    min-width: 240px;
    max-width: 360px;
    white-space: normal !important;
}

.route-date-cell {
    direction: ltr;
    min-width: 104px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.route-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 5px 8px;
    border-radius: 7px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: .7rem;
    font-weight: 950;
}

.route-type-badge.is-floating {
    color: #7c3aed;
    background: #ede9fe;
}

.route-create-empty-row td {
    padding: 32px 16px;
    color: #64748b;
    text-align: center;
}

.route-create-selection-bar {
    position: sticky;
    bottom: 8px;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    padding: 11px 12px;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: rgba(240, 253, 250, .97);
    box-shadow: 0 10px 28px rgba(15, 118, 110, .16);
    backdrop-filter: blur(8px);
}

.route-create-selection-bar > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.route-create-selection-bar strong {
    color: #134e4a;
    font-size: .86rem;
}

.route-create-selection-bar strong b {
    color: #0f766e;
    font-size: 1.05rem;
}

.route-create-selection-bar small {
    color: #64748b;
    font-size: .7rem;
}

.route-create-primary-action {
    min-width: 150px;
    white-space: nowrap;
}

.route-create-primary-action:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.compact-btn {
    min-height: 30px;
    padding: 5px 9px;
    font-size: .72rem;
}

.route-table-actions,
.route-report-export-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.route-report-export-actions span {
    margin-inline-start: auto;
    color: #52677f;
    font-size: .78rem;
    font-weight: 900;
}

.route-pending-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.route-pending-alert a {
    padding: 4px 8px;
    border: 1px solid rgba(190, 24, 93, .2);
    border-radius: 6px;
    color: inherit;
    background: rgba(255,255,255,.65);
    font-size: .75rem;
}

.route-result-list {
    display: grid;
    gap: 8px;
}

.route-result-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.25fr) minmax(360px, 2fr) minmax(220px, 1.2fr) 90px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: var(--route-result-pending, #fff7ed);
    transition: background .2s ease, border-color .2s ease;
}

.route-result-row.is-registered {
    border-color: #bbf7d0;
    background: var(--route-result-saved, #ecfdf5);
}

.route-result-customer {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.route-result-customer a {
    overflow-wrap: anywhere;
    color: #0f766e;
    font-weight: 1000;
}

.route-result-customer small,
.route-result-customer span,
.route-result-customer time {
    color: #64748b;
    font-size: .68rem;
}

.route-result-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.route-result-options label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px;
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 6px;
    background: rgba(255,255,255,.68);
    color: #334155;
    font-size: .7rem;
    font-weight: 900;
    line-height: 1.45;
}

.route-result-options input {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    accent-color: #0f766e;
}

.route-result-note {
    min-width: 0;
    display: grid;
    gap: 4px;
    color: #52677f;
    font-size: .7rem;
    font-weight: 900;
}

.route-result-note textarea {
    min-height: 54px;
    resize: vertical;
}

.route-result-save-state {
    color: #64748b;
    font-size: .68rem;
    font-weight: 900;
    text-align: center;
}

.route-result-save-state.is-error {
    color: #dc2626;
}

.route-report-result-filters {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #dbe7f2;
    border-radius: 8px;
    background: #f8fbfe;
}

.route-report-result-filters legend {
    padding: 0 5px;
    color: #52677f;
    font-size: .72rem;
    font-weight: 900;
}

.route-report-table {
    width: max-content;
    min-width: 100%;
}

.route-report-table th,
.route-report-table td {
    max-width: 260px;
    white-space: normal;
    vertical-align: middle;
}

.route-customer-timeline-button {
    padding: 0;
    border: 0;
    color: #0f766e;
    background: transparent;
    font-size: .78rem;
    font-weight: 1000;
}

.route-report-status {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: .66rem;
    font-weight: 900;
    white-space: nowrap;
}

.route-report-status.is-saved {
    color: #047857;
    background: #d1fae5;
}

.route-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 12px;
}

.route-pagination a {
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid #dbe7f2;
    border-radius: 6px;
    color: #334155;
    background: #fff;
    font-size: .75rem;
    font-weight: 900;
}

.route-pagination a.active {
    color: #fff;
    border-color: #0f766e;
    background: #0f766e;
}

.route-timeline-dialog {
    width: min(680px, 92vw);
    max-height: 82vh;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #17324d;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15,23,42,.24);
}

.route-timeline-dialog::backdrop {
    background: rgba(15,23,42,.4);
}

.route-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.route-dialog-head h2 { margin: 0 0 3px; font-size: 1rem; }
.route-dialog-head small { color: #64748b; }
.route-dialog-head button { width: 32px; height: 32px; padding: 0; border-radius: 50%; }

.route-timeline {
    max-height: 66vh;
    overflow: auto;
    padding: 16px;
}

.route-timeline article {
    position: relative;
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 16px;
}

.route-timeline article::after {
    content: '';
    position: absolute;
    inset-inline-start: 109px;
    top: 7px;
    bottom: -2px;
    width: 2px;
    background: #ccfbf1;
}

.route-timeline article time { color: #64748b; font-size: .72rem; }
.route-timeline article div { position: relative; z-index: 1; padding: 9px 12px; border: 1px solid #dbe7f2; border-radius: 8px; background: #f8fbfe; }
.route-timeline article span,
.route-timeline article small { display: block; margin-top: 4px; color: #64748b; font-size: .7rem; }
.route-timeline article p { margin: 6px 0; font-size: .76rem; }

@media (max-width: 1100px) {
    .route-batch-kpis,
    .route-report-dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .route-result-row { grid-template-columns: minmax(180px, 1fr) minmax(300px, 2fr); }
    .route-result-note,
    .route-result-save-state { grid-column: auto; }
    .route-create-list-toolbar { grid-template-columns: minmax(220px, 1fr) auto auto; }
    .route-create-visible-count { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .route-batch-kpis,
    .route-report-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .route-batch-header-fields,
    .route-settings-field-grid { grid-template-columns: 1fr; }
    .route-batch-header-fields .wide-field,
    .route-settings-field-grid .wide-field { grid-column: auto; }
    .route-result-row { grid-template-columns: 1fr; }
    .route-result-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .route-result-save-state { text-align: start; }
    .route-timeline article { grid-template-columns: 1fr; gap: 5px; }
    .route-timeline article::after { display: none; }
    .route-column-panel-head { align-items: stretch; flex-direction: column; }
    .route-column-panel-actions { justify-content: space-between; flex-wrap: wrap; }
    .route-column-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .route-column-option { min-width: 0; font-size: .68rem; }
    .route-column-help { line-height: 1.8; }
    .route-create-workspace > .section-head { align-items: stretch; }
    .route-create-list-summary { justify-content: space-between; }
    .route-create-list-toolbar { grid-template-columns: 1fr 1fr; align-items: stretch; }
    .route-create-local-search { grid-column: 1 / -1; }
    .route-create-check-all { white-space: normal; }
    .route-create-visible-count { grid-column: auto; align-self: center; }
    .route-create-selection-bar { align-items: stretch; flex-direction: column; bottom: 6px; }
    .route-create-primary-action { width: 100%; }
    .route-create-table-wrap { max-height: 58vh; }
}

@media print {
    .route-module-tabs,
    .route-report-filter-card,
    .route-report-export-actions,
    .route-pagination,
    .route-pending-alert,
    .route-timeline-dialog,
    .customer-head .actions { display: none !important; }
    .route-report-table-card { border: 0; box-shadow: none; padding: 0; }
    .route-report-table { width: 100%; font-size: 8pt; }
}

.route-target-preview span,
.route-target-preview em,
.route-target-empty {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    min-width: 150px;
    max-width: 245px;
    padding: 7px 34px 7px 28px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    color: #17324d;
    font-style: normal;
    font-size: .76rem;
    font-weight: 950;
}

.route-target-preview span.is-selected {
    border-color: #14b8a6;
    background: #ecfeff;
    box-shadow: inset 4px 0 0 #0f766e;
}

.route-target-preview span[draggable="true"] {
    cursor: grab;
}

.route-target-preview span[draggable="true"]:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.route-target-preview .route-target-dragging {
    opacity: .55;
    background: #ccfbf1;
}

.route-target-check {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.route-target-check input {
    width: 13px;
    height: 13px;
    accent-color: #0f766e;
}

.route-target-remove-button {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #fecaca;
    border-radius: 999px;
    color: #dc2626;
    background: #fff1f2;
    font-size: .78rem;
    font-weight: 1000;
    line-height: 1;
}

.route-target-control-cell {
    min-width: 64px !important;
    white-space: nowrap !important;
}

.route-target-control-cell .route-target-check,
.route-target-control-cell .route-target-remove-button {
    margin-inline: 2px;
}

.route-target-meta-input {
    min-width: 132px;
    max-width: 520px;
    min-height: 32px;
    resize: none;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    padding: 6px 8px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    color: #0f172a;
    font: inherit;
    font-size: .7rem;
    font-weight: 850;
    line-height: 1.55;
}

.route-target-meta-input:focus {
    outline: 2px solid rgba(20, 184, 166, .22);
    border-color: #14b8a6;
    background: #fff;
}

.route-save-state {
    display: block;
    min-height: 14px;
    margin-top: 2px;
    color: #0f766e;
    font-size: .6rem;
    font-weight: 900;
}

.route-target-remove-button:hover {
    color: #ffffff;
    background: #ef4444;
}

.route-target-preview small,
.route-target-empty {
    color: #64748b;
    font-size: .66rem;
    font-weight: 850;
    line-height: 1.65;
}

.route-target-preview em {
    justify-content: center;
    align-items: center;
    color: #0f766e;
    background: #ccfbf1;
}

.route-alert-grid {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.route-alert-section {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.route-stale-section {
    border-color: #fed7aa;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.route-claim-section {
    border-color: #fecaca;
    background: linear-gradient(135deg, #ffffff, #fff1f2);
}

.route-grade-watch-section {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.route-stale-section .section-head.compact strong {
    color: #9a3412;
    background: #ffedd5;
}

.route-claim-section .section-head.compact strong {
    color: #991b1b;
    background: #fee2e2;
}

.route-grade-watch-section .section-head.compact strong {
    color: #1d4ed8;
    background: #dbeafe;
}

.route-selection-section {
    margin-top: 22px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 12px 28px rgba(154, 52, 18, .06);
}

.route-selection-section .section-head.compact strong {
    color: #9a3412;
    background: #ffedd5;
}

.route-move-form {
    display: grid;
    gap: 10px;
}

.route-move-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.route-move-primary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.route-move-help {
    flex: 1 1 280px;
    color: #64748b;
    font-size: .74rem;
    font-weight: 850;
    line-height: 1.8;
}

.route-move-wrap {
    max-height: 52vh;
}

.route-move-table {
    min-width: 1250px;
}

.route-move-table tbody tr {
    cursor: pointer;
}

.route-move-table tbody tr:hover {
    background: #fff7ed;
}

.route-move-table tbody tr.is-selected {
    background: #ecfeff;
    box-shadow: inset 4px 0 0 #0f766e;
}

.route-move-table tbody tr.route-row-dragging {
    opacity: .55;
    background: #ccfbf1;
}

.route-main-table[data-route-row-pick-table="1"] tbody tr {
    cursor: grab;
}

.route-main-table[data-route-row-pick-table="1"] tbody tr:hover {
    background: #fff7ed;
}

.route-main-table[data-route-row-pick-table="1"] tbody tr.is-selected {
    background: #ecfeff;
    box-shadow: inset 4px 0 0 #0f766e;
}

.route-main-table[data-route-row-pick-table="1"] tbody tr.route-row-dragging {
    opacity: .55;
    background: #ccfbf1;
}

.route-move-check {
    width: 13px;
    height: 13px;
    accent-color: #0f766e;
}

.route-bucket-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 4px 8px;
    margin-bottom: 3px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 1000;
}

.route-bucket-pill.visit {
    color: #991b1b;
    background: #fee2e2;
}

.route-bucket-pill.no_need {
    color: #0f766e;
    background: #ccfbf1;
}

.route-move-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: .6rem;
    line-height: 1.5;
}

.route-guide-strip {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    color: #475569;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    font-size: .74rem;
    font-weight: 800;
    line-height: 1.8;
}

.route-sheet-wrap {
    max-height: 74vh;
    overflow: auto;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.route-sheet-table {
    min-width: 2350px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .68rem;
    table-layout: fixed;
}

.route-sheet-table th,
.route-sheet-table td {
    border-inline-start: 1px solid #d7dde6;
    border-bottom: 1px solid #d7dde6;
    padding: 4px 6px;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.45;
}

.route-sheet-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    color: #1f2937;
    background: linear-gradient(180deg, #e5e7eb, #d1d5db);
    font-size: .66rem;
    font-weight: 900;
    text-align: center;
    box-shadow: inset 0 -1px 0 #b8c0cc;
    cursor: grab;
    user-select: none;
    resize: horizontal;
    overflow: hidden;
}

.route-sheet-table th,
.route-sheet-table td {
    min-width: 82px;
}

.route-sheet-table [data-route-col="print"] {
    width: 48px;
    min-width: 48px;
    white-space: nowrap;
}

.route-sheet-table [data-route-col="customer"] {
    width: 210px;
    min-width: 210px;
}

.route-sheet-table [data-route-col="address"],
.route-sheet-table [data-route-col="didar_activity"],
.route-sheet-table [data-route-col="bot_activity_type"],
.route-sheet-table [data-route-col="note"],
.route-sheet-table [data-route-col="payment_detail"] {
    width: 260px;
    min-width: 180px;
}

.route-sheet-table [data-route-col="didar_date"] {
    width: 150px;
    min-width: 140px;
}

.route-sheet-table [data-route-col="mobile"] {
    width: 112px;
    min-width: 96px;
    white-space: nowrap;
}

.route-sheet-table [data-route-col="last_buy"],
.route-sheet-table [data-route-col="bot_visit_date"],
.route-sheet-table [data-route-col="oldest_open_invoice"],
.route-sheet-table [data-route-col="freezer_delivery"],
.route-sheet-table [data-route-col="first_non_cash_invoice"] {
    width: 96px;
    min-width: 88px;
    white-space: nowrap;
}

.route-sheet-table [data-route-col^="month_"],
.route-sheet-table [data-route-col="month_total"],
.route-sheet-table [data-route-col="avg_recent_cartons"],
.route-sheet-table [data-route-col="open_invoices"],
.route-sheet-table [data-route-col="open_invoice_delay"],
.route-sheet-table [data-route-col="purchase_delay_days"],
.route-sheet-table [data-route-col="check_count"],
.route-sheet-table [data-route-col="freezer_count"],
.route-sheet-table [data-route-col="grade_value"] {
    width: 74px;
    min-width: 64px;
    white-space: nowrap;
}

.route-sheet-table [data-route-col="debt"],
.route-sheet-table [data-route-col="last_invoice_amount"],
.route-sheet-table [data-route-col="receipt_credit_remaining"],
.route-sheet-table [data-route-col="receipt_credit_limit"],
.route-sheet-table [data-route-col="check_credit_remaining"],
.route-sheet-table [data-route-col="check_credit_limit"] {
    width: 148px;
    min-width: 128px;
}

.route-target-table.route-sheet-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.route-target-table.route-sheet-table th,
.route-target-table.route-sheet-table td {
    width: auto;
    min-width: max-content;
    white-space: nowrap;
}

.route-target-table.route-sheet-table [data-route-col="address"],
.route-target-table.route-sheet-table [data-route-col="payment_detail"],
.route-target-table.route-sheet-table [data-route-col="didar_activity"],
.route-target-table.route-sheet-table [data-route-col="bot_activity_type"],
.route-target-table.route-sheet-table [data-route-col="note"] {
    width: auto;
    min-width: 180px;
    max-width: 360px;
    white-space: normal;
}

.route-target-table.route-sheet-table [data-route-col="didar_date"] {
    width: auto;
    min-width: 150px;
    max-width: 220px;
    white-space: normal;
}

.route-target-table.route-sheet-table [data-route-col="visit_reason"],
.route-target-table.route-sheet-table [data-route-col="visit_note"] {
    width: auto;
    min-width: 170px;
    white-space: normal;
}

.route-column-resizer {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 8px;
    cursor: col-resize;
    z-index: 5;
    touch-action: none;
}

.route-column-resizer::after {
    content: "";
    position: absolute;
    inset-block: 8px;
    inset-inline-start: 3px;
    width: 2px;
    border-radius: 999px;
    background: transparent;
}

.route-sheet-table th:hover .route-column-resizer::after,
.route-sheet-table.route-column-resizing .route-column-resizer::after {
    background: #14b8a6;
}

.route-sheet-table.route-column-resizing th {
    cursor: col-resize;
}

.route-sheet-table th::after {
    content: " ↕";
    color: #64748b;
    font-size: .62rem;
}

.route-sheet-table th[data-sort-dir="asc"]::after {
    content: " ↑";
    color: #0f766e;
}

.route-sheet-table th[data-sort-dir="desc"]::after {
    content: " ↓";
    color: #0f766e;
}

.route-sheet-table th.route-drag-source {
    opacity: .55;
}

.route-sheet-table th.route-drag-target {
    outline: 2px solid #14b8a6;
    outline-offset: -2px;
    background: #ccfbf1;
}

.route-sheet-table tbody tr:nth-child(even) {
    background: #fbfcfe;
}

.route-sheet-table tbody tr:hover {
    background: #f0fdfa;
}

.route-print-cell {
    text-align: center;
}

.route-print-check {
    width: 12px;
    height: 12px;
    accent-color: #0f766e;
}

.route-name-cell {
    min-width: 170px;
    font-weight: 900;
}

.route-name-cell small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: .6rem;
    font-weight: 800;
}

.route-name-cell a {
    color: #0f766e;
    text-decoration: none;
}

.route-customer-cell {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.route-no-need-form {
    margin: 0;
    flex: 0 0 auto;
}

.route-no-need-form button {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 0 0 3px #fee2e2;
    cursor: pointer;
}

.route-no-need-form button::before {
    content: "×";
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 1000;
    line-height: 18px;
    text-align: center;
}

.route-no-need-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px #fecaca, 0 6px 14px rgba(185, 28, 28, .22);
}

.route-date-cell {
    text-align: center;
    color: #334155;
    font-weight: 900;
    min-width: 92px;
    white-space: nowrap;
}

.route-wide-text {
    min-width: 220px;
    white-space: normal;
    line-height: 1.5;
}

.route-note-cell {
    min-width: 220px;
    max-width: 360px;
    white-space: normal;
    color: #334155;
    line-height: 1.5;
}

.route-selection-section .route-sheet-table th,
.route-selection-section .route-sheet-table td,
.route-selection-section .route-wide-text,
.route-selection-section .route-note-cell {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}

.route-selection-section .route-note-cell {
    max-width: none;
}

.route-number-cell,
.route-money-cell {
    text-align: center;
    font-weight: 900;
    white-space: nowrap;
}

.route-number-cell.has-buy {
    color: #047857;
    background: #ecfdf5;
}

.route-bulk-table-wrap {
    max-height: 560px;
    overflow: auto;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fff;
}

.route-bulk-table {
    min-width: 860px;
    font-size: .72rem;
}

.route-bulk-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fbff;
    font-size: .72rem;
    padding: 7px 8px;
}

.route-bulk-table td {
    padding: 7px 8px;
    font-size: .72rem;
    line-height: 1.55;
}

.route-bulk-table td strong {
    font-size: .78rem;
}

.route-bulk-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: .74rem;
}

.route-bulk-table .route-inline-meta {
    display: inline;
    margin: 0 6px 0 0;
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.route-bulk-table tr[data-route-selectable] {
    cursor: pointer;
}

.route-bulk-table tr[data-route-selectable]:hover {
    background: #f0fdfa;
}

.route-bulk-table input[type="checkbox"],
.route-bulk-table .route-mini-check,
.route-current-card input[type="checkbox"] {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px;
    min-height: 12px;
    accent-color: #0f766e;
    transform: scale(.82);
    transform-origin: center;
}

.route-delete-person-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff7f7, #ffffff);
}

.route-delete-person-form div {
    display: grid;
    gap: 4px;
}

.route-delete-person-form strong {
    color: #7f1d1d;
}

.route-delete-person-form span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.route-after-bulk-panel,
.route-latest-panel {
    margin-top: 14px;
}

.route-person-view-card {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.route-view-filter {
    display: grid;
    grid-template-columns: minmax(240px, .9fr) minmax(300px, 1.4fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.route-view-filter > label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: .8rem;
    font-weight: 900;
}

.route-day-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
}

.route-day-checks legend {
    padding: 0 6px;
    color: #1e3a8a;
    font-size: .78rem;
    font-weight: 900;
}

.route-day-checks label {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
}

.route-view-result {
    display: grid;
    gap: 8px;
}

.route-view-result h4 {
    margin: 0;
    color: #17324d;
    font-size: .95rem;
}

.route-latest-panel .table-wrap,
.route-latest-panel table {
    font-size: .78rem;
}

.route-latest-panel th,
.route-latest-panel td {
    padding: 8px 9px;
    line-height: 1.55;
}

.route-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.route-row-actions .inline-form {
    margin: 0;
}

.route-inline-edit {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.route-inline-edit select,
.route-inline-edit input {
    width: auto;
    min-width: 84px;
    min-height: 34px;
    padding: 5px 7px;
    font-size: .72rem;
}

.route-inline-edit input {
    min-width: 130px;
}

.route-already-row {
    background: #f8fafc;
    color: #64748b;
}

.danger-btn {
    background: #ef4444;
    color: #fff;
}

.route-current-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.route-current-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.route-current-card strong,
.route-current-card span {
    grid-column: 2;
}

.route-current-card input {
    grid-row: 1 / span 2;
}

.route-current-card span {
    color: #64748b;
    font-size: .76rem;
    font-weight: 800;
}

.preorder-status-card h3 {
    margin: 0 0 10px;
    color: #17324d;
    font-size: 0.98rem;
}

.preorder-status-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.preorder-status-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid #eef2f7;
}

.preorder-status-card dt,
.preorder-status-card dd {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 850;
}

.preorder-status-card dt {
    color: #64748b;
}

.preorder-status-card dd {
    color: #0f172a;
    text-align: left;
}

.preorder-didar-details {
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.preorder-didar-list {
    display: grid;
    gap: 8px;
}

.preorder-didar-list article {
    display: grid;
    gap: 4px;
    padding: 9px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.preorder-didar-list strong {
    color: #17324d;
    font-size: 0.82rem;
}

.preorder-didar-list span,
.preorder-didar-list small,
.preorder-didar-list p {
    margin: 0;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.7;
}

.invoice-overview-table {
    min-width: 620px;
}

.invoice-overview-table th:not(:first-child),
.invoice-overview-table td:not(:first-child) {
    text-align: center;
}

.compare-pill {
    display: inline-flex;
    justify-content: center;
    min-width: 54px;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.76rem;
    font-weight: 900;
}

.compare-pill.has-buy {
    border-color: #99f6e4;
    color: #0f766e;
    background: #f0fdfa;
}

.preorder-table-wrap {
    overflow: auto;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.preorder-table-wrap.drag-over {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.preorder-package-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 2fr;
    gap: 12px;
    align-items: center;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #eff6ff, #f0fdfa);
    border-radius: 12px;
    padding: 12px;
    margin: 12px 0;
}

.preorder-package-panel h3 {
    margin: 0 0 4px;
    color: #17324d;
}

.preorder-package-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preorder-package-btn {
    border: 1px solid #99f6e4;
    background: #fff;
    color: #0f766e;
    border-radius: 10px;
    padding: 9px 12px;
    cursor: pointer;
    display: grid;
    gap: 3px;
    min-width: 150px;
    text-align: right;
    font: inherit;
}

.preorder-package-btn strong {
    color: #17324d;
}

.preorder-package-btn span {
    color: #64748b;
    font-size: .82rem;
}

.preorder-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.preorder-table th,
.preorder-table td {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.preorder-table th {
    background: #f1f5f9;
    color: #17324d;
    font-size: 0.82rem;
}

.preorder-table th small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.preorder-table td:first-child {
    min-width: 210px;
    max-width: 270px;
}

.preorder-table td:first-child strong,
.preorder-table td:first-child small {
    display: block;
}

.preorder-table td:first-child strong {
    line-height: 1.5;
}

.preorder-table input[type="number"] {
    width: 92px;
    min-width: 0;
    min-height: 34px;
    font-size: 0.84rem;
}

.preorder-table .freezer-inline {
    justify-content: flex-start;
    margin-top: 7px;
    padding: 4px 6px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.7rem;
}

.preorder-table .checkline {
    justify-content: center;
    white-space: nowrap;
}

.preorder-table .line-total,
.preorder-table tfoot th {
    font-weight: 900;
    color: #0f766e;
}

.hidden-price {
    display: none !important;
}

.preorder-table .remove-line {
    display: block;
    margin-top: 7px;
    min-height: 32px;
    padding: 6px 10px;
    background: #fee2e2;
    color: #b91c1c;
}

.invoice-chip-list {
    display: grid;
    gap: 5px;
    min-width: 170px;
}

.invoice-chip-list span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.7rem;
    font-weight: 900;
}

.invoice-chip-list span.has-buy {
    border-color: #99f6e4;
    color: #0f766e;
    background: #f0fdfa;
}

.invoice-chip-list b {
    color: inherit;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preorder-table tr.in-freezer {
    opacity: 0.58;
    background: #f8fafc;
}

.preorder-table tr.line-highlight {
    outline: 3px solid rgba(20, 184, 166, 0.28);
}

.month-list {
    display: grid;
    gap: 5px;
    max-width: 150px;
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.8;
}

.month-list b {
    display: block;
    max-width: 100%;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.69rem;
    font-weight: 900;
}

.month-list b.has-buy {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
}

.price-display {
    display: block;
    min-width: 110px;
    padding: 8px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #17324d;
    background: #f8fafc;
    font-size: 0.78rem;
    font-weight: 900;
    direction: ltr;
    text-align: center;
}

.manual-product {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.manual-product h3 {
    margin: 0 0 10px;
    color: #17324d;
    font-size: 1rem;
}

.preorder-suggestions {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.preorder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
}

.preorder-actions button:first-child {
    background: #2563eb;
}

.preorder-actions .register-quote-btn {
    background: linear-gradient(135deg, #0f766e, #16a34a);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, .18);
}

.preorder-actions .register-quote-btn:disabled {
    opacity: .68;
    cursor: wait;
}

.preorder-actions .receipt-print-btn {
    background: #7c3aed;
}

.preorder-actions .image-quote-btn {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .18);
}

.preorder-count-control {
    display: grid;
    gap: 4px;
    min-width: 118px;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 900;
}

.preorder-count-control input {
    width: 100%;
    min-height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 9px;
    font-size: 0.9rem;
}

.preorder-target-badge {
    align-self: end;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    color: #0f766e;
    background: #f0fdfa;
    font-size: 0.8rem;
    font-weight: 900;
}

.preorder-table tr.quote-hidden {
    display: none;
}

.pick-reason {
    display: block;
    margin-top: 4px;
    color: #94a3b8 !important;
    font-size: 0.66rem !important;
    font-weight: 600 !important;
    line-height: 1.55 !important;
}

.suggestion-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.compact-suggestion-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.suggestion-card,
.older-suggestion-card {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    background: linear-gradient(135deg, #ecfdf5, #ffffff);
    cursor: grab;
}

.suggestion-card strong,
.older-suggestion-card strong {
    color: #17324d;
    font-size: 0.88rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.suggestion-card:active,
.older-suggestion-card:active {
    cursor: grabbing;
}

.suggestion-card.is-hidden,
.older-suggestion-card.is-hidden {
    display: none;
}

.suggestion-card button,
.older-suggestion-card button {
    min-height: 34px;
    padding: 6px 10px;
    justify-self: start;
    background: #2563eb;
}

.preorder-old-suggestions {
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    border-color: #fed7aa;
}

.older-suggestion-card {
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fffaf5, #ffffff);
    gap: 5px;
    padding: 9px;
}

.older-suggestion-card strong {
    font-size: 0.78rem;
}

.older-suggestion-card span,
.older-suggestion-card small {
    color: #64748b;
    font-size: 0.7rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.older-suggestion-card button {
    min-height: 29px;
    padding: 5px 8px;
    font-size: 0.72rem;
}

.preorder-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    padding: 20px;
}

.preorder-modal.is-open {
    display: grid;
}

.preorder-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
}

.preorder-modal-card {
    position: relative;
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.preorder-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}

.preorder-modal-head h2 {
    margin: 0 0 4px;
    color: #17324d;
}

.preorder-modal-close {
    min-height: 34px;
    padding: 7px 14px;
}

.invoice-modal-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.invoice-modal-kpis div {
    display: grid;
    gap: 5px;
    padding: 10px;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.invoice-modal-kpis span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.invoice-modal-kpis strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.invoice-modal-table .preorder-table {
    min-width: 760px;
}

.catalog-hero {
    min-height: 112px;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 18px 22px;
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
}

.catalog-hero span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 900;
}

.catalog-hero h1 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.55rem;
}

.catalog-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 900;
}

.catalog-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.catalog-small-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.catalog-product-card {
    overflow: hidden;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fff;
}

.catalog-order-form {
    padding-bottom: 82px;
}

.catalog-featured-card {
    box-shadow: 0 12px 32px rgba(15, 118, 110, 0.08);
}

.catalog-image-button {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #f8fafc;
    position: relative;
    cursor: zoom-in;
}

.catalog-image-button img {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
}

.catalog-image-button img.fit-cover,
.catalog-admin-card img.fit-cover {
    object-fit: cover;
}

.catalog-image-button img.fit-contain,
.catalog-admin-card img.fit-contain {
    object-fit: contain;
    padding: 8px;
}

.catalog-image-count {
    position: absolute;
    left: 8px;
    bottom: 8px;
    border-radius: 999px;
    background: rgba(15, 50, 77, .82);
    color: #fff;
    padding: 4px 8px;
    font-size: .72rem;
    font-weight: 900;
}

.catalog-card-tags {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: calc(100% - 16px);
    justify-content: flex-start;
}

.catalog-card-tags i {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    color: #fff;
    background: var(--tag-color, #0f766e);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
    font-size: .68rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1.2;
}

.catalog-card-body {
    display: grid;
    gap: 7px;
    padding: 12px;
}

.catalog-card-body strong {
    color: #17324d;
    line-height: 1.6;
}

.catalog-card-body span,
.catalog-card-body small,
.catalog-card-body em {
    color: #64748b;
    font-size: 0.78rem;
    font-style: normal;
    line-height: 1.7;
}

.catalog-card-body .catalog-product-description {
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 8px;
}

.catalog-card-body b {
    color: #0f766e;
    font-size: 1rem;
}

.catalog-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
    align-items: center;
}

.catalog-select-row input[type="number"] {
    min-height: 34px;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.catalog-small-card .catalog-card-body {
    padding: 10px;
}

.catalog-small-card .catalog-card-body strong {
    font-size: 0.88rem;
}

.catalog-selected-counter,
.catalog-sticky-submit {
    color: #0f766e;
    font-weight: 900;
}

.catalog-sticky-submit {
    position: sticky;
    bottom: 10px;
    display: flex;
    justify-content: flex-start;
    padding-top: 12px;
}

.catalog-floating-submit {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 70;
    width: min(680px, calc(100vw - 28px));
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.catalog-floating-submit div {
    display: grid;
    gap: 3px;
}

.catalog-floating-submit span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
}

.catalog-floating-submit strong {
    color: #0f766e;
    font-size: 1rem;
}

.catalog-floating-submit button {
    min-height: 42px;
    padding: 8px 18px;
}

.catalog-image-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    place-items: center;
    padding: 20px;
}

.catalog-image-modal.is-open {
    display: grid;
}

.catalog-image-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.catalog-image-card {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    padding: 14px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.catalog-image-card h2 {
    margin: 8px 0 12px;
    color: #17324d;
}

.catalog-image-card img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    background: #f8fafc;
}

.catalog-image-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.catalog-image-thumbs button {
    border: 2px solid transparent;
    border-radius: 9px;
    padding: 3px;
    background: #f8fafc;
    cursor: pointer;
}

.catalog-image-thumbs button.active {
    border-color: #0f766e;
}

.catalog-image-thumbs img {
    width: 64px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
}

.catalog-print-sheet {
    display: none;
}

.catalog-admin-tools {
    display: grid;
    gap: 12px;
}

.catalog-settings-form,
.catalog-category-form,
.catalog-tag-form,
.catalog-filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.catalog-settings-form {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.catalog-filter-form {
    grid-template-columns: 1.4fr repeat(7, minmax(120px, 1fr)) auto auto;
}

.catalog-filter-panel {
    background: linear-gradient(135deg, #f8fafc, #ffffff 45%, #ecfeff);
}

.catalog-filter-panel .catalog-filter-form {
    grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(220px, 1.1fr) auto auto;
    align-items: center;
}

.catalog-filter-panel .catalog-stale-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: rgba(255,255,255,.78);
    color: #17324d;
}

.catalog-filter-panel .catalog-stale-filter input {
    width: 16px;
    height: 16px;
    accent-color: #0f766e;
}

.catalog-bulk-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 14px;
    align-items: end;
    background: linear-gradient(135deg, #f0fdfa, #ffffff);
    border-color: #99f6e4;
}

.catalog-bulk-panel h2 {
    margin: 0 0 6px;
    color: #134e4a;
}

.catalog-bulk-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.catalog-bulk-pick {
    padding: 8px 10px;
    border: 1px dashed #99f6e4;
    border-radius: 8px;
    background: #f0fdfa;
    color: #0f766e !important;
}

.catalog-result-summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    color: #17324d;
    font-weight: 900;
}

.catalog-result-summary span {
    color: #64748b;
    font-size: .82rem;
}

.catalog-result-summary strong {
    min-width: 44px;
    padding: 5px 10px;
    border-radius: 8px;
    background: #0f766e;
    color: #fff;
    text-align: center;
}

body.catalog-public-body {
    background: radial-gradient(circle at top, #ffffff 0, #f4f8fb 42%, #eef4f8 100%);
}

body.catalog-public-body .app {
    width: min(480px, 100%);
    min-height: 100vh;
    padding: 0;
}

body.catalog-public-body .topbar {
    display: none;
}

.catalog-mobile-shell {
    width: min(480px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px 14px 96px;
    background: #fbfdff;
    color: #10233d;
}

.catalog-mobile-form {
    display: grid;
    gap: 12px;
}

.catalog-app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    padding: 10px 0 8px;
    background: linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(251, 253, 255, 0.86));
    backdrop-filter: blur(14px);
}

.catalog-brand {
    display: grid;
    place-items: center;
    color: #007f67;
    line-height: 1.1;
}

.catalog-brand strong {
    font-size: 1.26rem;
    font-weight: 1000;
}

.catalog-brand small {
    color: #0f766e;
    font-size: .68rem;
    font-weight: 900;
}

.catalog-brand img {
    max-width: 120px;
    max-height: 44px;
    object-fit: contain;
}

.catalog-icon-button,
.catalog-cart-button {
    width: 42px;
    height: 42px;
    min-height: 42px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #132844;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    position: relative;
}

.catalog-icon-button {
    font-weight: 1000;
}

.catalog-cart-button svg,
.catalog-icon-button svg,
.mobile-add-btn svg,
.catalog-detail-specs svg,
.catalog-detail-actions svg,
.catalog-cart-qty svg,
.catalog-cart-item > button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.catalog-icon-button svg {
    width: 19px;
    height: 19px;
}

.catalog-cart-button b {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #007f67;
    color: #fff;
    font-size: .68rem;
    font-weight: 1000;
}

.catalog-mobile-hero {
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 18px;
    padding: 18px;
    background:
        linear-gradient(90deg, rgba(0, 119, 94, .98), rgba(0, 128, 103, .74) 46%, rgba(0, 128, 103, .18)),
        var(--hero-image) center / cover no-repeat,
        linear-gradient(135deg, #0f766e, #14b8a6);
    box-shadow: 0 18px 34px rgba(15, 118, 110, .16);
}

.catalog-mobile-hero h1 {
    max-width: 220px;
    margin: 0 0 12px;
    color: #fff;
    font-size: 1.12rem;
    line-height: 1.9;
    font-weight: 1000;
}

.catalog-mobile-hero button {
    min-height: 36px;
    padding: 6px 12px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    color: #087565;
    font-size: .78rem;
    font-weight: 1000;
}

.catalog-customer-strip {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #dceafe;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.catalog-customer-strip strong,
.catalog-customer-strip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 1000;
}

.catalog-customer-strip span {
    color: #0f766e;
}

.catalog-mobile-search {
    min-height: 46px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    padding: 0 12px;
    border: 1px solid #dbe6f4;
    border-radius: 14px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.catalog-mobile-search svg {
    width: 18px;
    height: 18px;
    color: #64748b;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.catalog-mobile-search input {
    min-height: 42px;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    font-size: .82rem;
}

.catalog-category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
}

.catalog-category-tabs::-webkit-scrollbar {
    display: none;
}

.catalog-category-tabs button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #e3edf7;
    border-radius: 999px;
    background: #fff;
    color: #42526b;
    font-size: .76rem;
    font-weight: 1000;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.catalog-category-tabs button.active {
    border-color: #b7f4e7;
    background: linear-gradient(135deg, #e8fff9, #ffffff);
    color: #007f67;
}

.catalog-mobile-section {
    display: grid;
    gap: 10px;
}

.catalog-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.catalog-section-title h2 {
    margin: 0;
    color: #10233d;
    font-size: .98rem;
    font-weight: 1000;
}

.catalog-section-title span {
    color: #f59e0b;
}

.catalog-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.mobile-product-card {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(72px, auto) 32px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e0e8f4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.mobile-product-card[hidden] {
    display: none;
}

.mobile-product-card.is-selected {
    border-color: #99f6e4;
    box-shadow: 0 14px 30px rgba(15, 118, 110, .12);
}

.mobile-product-image {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.mobile-product-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    padding: 8px;
}

.mobile-product-image img.fit-cover {
    object-fit: cover;
    padding: 0;
}

.mobile-product-image img.fit-contain {
    object-fit: contain;
}

.mobile-card-tags {
    position: absolute;
    top: 7px;
    right: 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: calc(100% - 14px);
}

.mobile-card-tags i {
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--tag-color, #0f766e);
    color: #fff;
    font-size: .58rem;
    font-style: normal;
    font-weight: 1000;
    line-height: 1.35;
}

.mobile-product-info {
    display: grid;
    gap: 3px;
    padding: 8px 9px 0;
}

.mobile-product-info button {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #10233d;
    text-align: right;
    font-size: .78rem;
    font-weight: 1000;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.mobile-product-info span {
    color: #64748b;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.mobile-product-info strong {
    color: #007f67;
    font-size: .76rem;
    font-weight: 1000;
}

.mobile-add-btn {
    justify-self: end;
    align-self: end;
    width: 30px;
    height: 30px;
    min-height: 30px;
    margin: 0 8px 8px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: #007f67;
    color: #fff;
    box-shadow: 0 8px 16px rgba(0, 127, 103, .2);
}

.mobile-product-card.is-selected .mobile-add-btn {
    background: #0f172a;
}

.catalog-bottom-nav {
    position: fixed;
    right: 50%;
    bottom: 0;
    z-index: 35;
    width: min(480px, 100%);
    transform: translateX(50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 8px 10px 10px;
    border-top: 1px solid #e3edf7;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, .08);
    backdrop-filter: blur(14px);
}

.catalog-bottom-nav span {
    display: grid;
    place-items: center;
    min-height: 34px;
    color: #64748b;
    font-size: .66rem;
    font-weight: 900;
}

.catalog-bottom-nav span.active {
    color: #007f67;
}

.catalog-cart-bar {
    position: fixed;
    right: 50%;
    bottom: 64px;
    z-index: 45;
    width: min(448px, calc(100% - 28px));
    transform: translateX(50%) translateY(110%);
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 8px;
    padding: 8px;
    border: 1px solid #b7f4e7;
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
}

.catalog-cart-bar.has-selection {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(50%) translateY(0);
}

.catalog-cart-bar button {
    min-height: 44px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #00866d, #02a37f);
    color: #fff;
    font-size: .8rem;
    font-weight: 1000;
}

.catalog-cart-bar button:first-child {
    display: grid;
    gap: 2px;
    background: #f3fffc;
    color: #007f67;
}

.catalog-cart-bar strong {
    font-size: .72rem;
}

.catalog-product-sheet,
.catalog-cart-sheet {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
}

.catalog-product-sheet.is-open,
.catalog-cart-sheet.is-open {
    display: block;
}

.catalog-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .28);
}

.catalog-product-detail,
.catalog-cart-panel {
    position: absolute;
    right: 50%;
    bottom: 0;
    width: min(480px, 100%);
    max-height: 94vh;
    transform: translateX(50%);
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -20px 60px rgba(15, 23, 42, .22);
}

.catalog-product-detail header,
.catalog-cart-panel header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
}

.catalog-product-detail header h2,
.catalog-cart-panel header h2 {
    margin: 0;
    text-align: center;
    color: #10233d;
    font-size: .95rem;
    font-weight: 1000;
}

.catalog-product-detail header button,
.catalog-cart-panel header button {
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 1000;
}

.catalog-detail-media {
    position: relative;
    margin: 0 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.catalog-detail-media img {
    width: 100%;
    max-height: 330px;
    object-fit: contain;
    display: block;
    padding: 18px;
}

.catalog-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: #ef4444;
}

.catalog-detail-body {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.catalog-detail-body h1 {
    margin: 0;
    color: #10233d;
    font-size: 1.2rem;
    font-weight: 1000;
}

.catalog-detail-body p,
.catalog-detail-body small {
    margin: 0;
    color: #64748b;
    line-height: 1.8;
}

.catalog-detail-body > strong {
    color: #007f67;
    font-size: 1.04rem;
    font-weight: 1000;
}

.catalog-detail-specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border: 1px solid #edf2f8;
    border-radius: 15px;
    background: #fbfdff;
}

.catalog-detail-specs span {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
    color: #64748b;
    font-size: .62rem;
    font-weight: 900;
}

.catalog-detail-specs svg {
    color: #64748b;
}

.catalog-detail-specs b,
.catalog-detail-specs em {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}

.catalog-detail-actions {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.catalog-qty-control,
.catalog-cart-qty {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: #f4faf9;
}

.catalog-qty-control button,
.catalog-cart-qty button {
    width: 32px;
    height: 32px;
    min-height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #007f67;
}

.catalog-qty-control b,
.catalog-cart-qty b {
    text-align: center;
    color: #10233d;
    font-weight: 1000;
}

.catalog-detail-actions > button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #00866d, #02a37f);
    color: #fff;
    font-size: .86rem;
    font-weight: 1000;
}

.catalog-cart-panel {
    padding-bottom: 12px;
}

.catalog-cart-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 12px 12px;
    padding: 10px;
    border: 1px solid #edf2f8;
    border-radius: 14px;
    background: #fbfdff;
}

.catalog-cart-summary span {
    display: grid;
    gap: 3px;
    color: #64748b;
    font-size: .68rem;
    font-weight: 900;
}

.catalog-cart-summary b {
    color: #007f67;
    font-size: .82rem;
}

.catalog-cart-items {
    display: grid;
    gap: 10px;
    padding: 0 12px;
}

.catalog-cart-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 104px 32px;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #edf2f8;
    border-radius: 14px;
    background: #fff;
}

.catalog-cart-item img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8fafc;
}

.catalog-cart-item div:not(.catalog-cart-qty) {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.catalog-cart-item strong,
.catalog-cart-item span,
.catalog-cart-item small,
.catalog-cart-item b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-cart-item strong {
    color: #10233d;
    font-size: .82rem;
}

.catalog-cart-item span,
.catalog-cart-item small {
    color: #64748b;
    font-size: .68rem;
}

.catalog-cart-item b {
    color: #007f67;
    font-size: .72rem;
}

.catalog-cart-item > button {
    width: 32px;
    height: 32px;
    min-height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: #fff5f5;
    color: #ef4444;
}

.catalog-cart-actions {
    display: grid;
    grid-template-columns: .9fr 1.2fr;
    gap: 10px;
    padding: 12px;
}

.catalog-cart-actions button {
    min-height: 46px;
    border-radius: 13px;
    font-size: .84rem;
    font-weight: 1000;
}

.catalog-cart-actions button:first-child {
    border: 1px solid #dbeafe;
    background: #fff;
    color: #007f67;
}

.catalog-cart-actions button:last-child {
    border: 0;
    background: linear-gradient(135deg, #00866d, #02a37f);
    color: #fff;
}

.catalog-empty-cart,
.catalog-mobile-empty,
.catalog-mobile-alert {
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    color: #64748b;
    text-align: center;
    font-weight: 900;
}

.catalog-mobile-alert {
    border: 1px solid #fecaca;
    background: #fff7f7;
    color: #b91c1c;
}

.catalog-success-screen {
    min-height: calc(100vh - 28px);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 26px;
    border-radius: 24px;
    background: #fff;
    text-align: center;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
    position: relative;
    overflow: hidden;
}

.catalog-success-screen img {
    width: min(260px, 80%);
    max-height: 230px;
    object-fit: contain;
}

.catalog-success-screen > span {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
}

.catalog-success-screen svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

.catalog-success-screen h1 {
    margin: 0;
    color: #007f67;
    font-size: 1.12rem;
}

.catalog-success-screen p,
.catalog-success-screen small {
    margin: 0;
    color: #64748b;
    font-weight: 900;
}

.catalog-success-screen strong {
    min-width: 180px;
    padding: 10px 22px;
    border: 1px solid #cdeee6;
    border-radius: 999px;
    background: #f2fffb;
    color: #007f67;
    font-size: 1.4rem;
    letter-spacing: 2px;
}

.catalog-success-screen a {
    min-width: 220px;
    padding: 12px 20px;
    border-radius: 13px;
    background: linear-gradient(135deg, #00866d, #02a37f);
    color: #fff;
    text-decoration: none;
}

.catalog-asset-settings {
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(160px, 1fr)) auto;
}

.catalog-admin-attrs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 520px) {
    body.catalog-public-body .app,
    .catalog-mobile-shell,
    .catalog-bottom-nav,
    .catalog-product-detail,
    .catalog-cart-panel {
        width: 100%;
    }

    .catalog-mobile-shell {
        padding-inline: 10px;
    }

    .catalog-mobile-grid {
        gap: 8px;
    }

    .mobile-product-info {
        padding-inline: 8px;
    }

    .catalog-cart-item {
        grid-template-columns: 58px minmax(0, 1fr) 88px 28px;
        gap: 6px;
        padding: 7px;
    }

    .catalog-cart-item img {
        width: 58px;
        height: 58px;
    }

    .catalog-cart-qty {
        grid-template-columns: 28px 1fr 28px;
        gap: 3px;
    }

    .catalog-cart-qty button {
        width: 28px;
        height: 28px;
        min-height: 28px;
    }

    .catalog-detail-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-asset-settings,
    .catalog-admin-attrs {
        grid-template-columns: 1fr;
    }
}

.sales-compare-head {
    align-items: end;
}

.sales-compare-filter {
    align-items: end;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.sales-compare-filter label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: .84rem;
    font-weight: 900;
}

.sales-compare-panel {
    padding: 0;
    overflow: hidden;
    border-color: #bfdbfe;
    background: #fff;
}

.sales-compare-title {
    padding: 16px;
    border-bottom: 2px solid #17324d;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #071426;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 1000;
}

.sales-compare-scroll {
    width: 100%;
    overflow-x: auto;
    background: #fff;
}

.sales-compare-table {
    width: max(1600px, 100%);
    border-collapse: collapse;
    direction: rtl;
    color: #071426;
    font-size: .78rem;
}

.sales-compare-table th,
.sales-compare-table td {
    min-width: 58px;
    padding: 10px 7px;
    border: 1px solid #0f172a;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    line-height: 1.55;
}

.sales-compare-table thead tr:first-child th {
    background: #f8fafc;
    color: #071426;
    font-size: .78rem;
    font-weight: 1000;
}

.sales-compare-table thead tr:nth-child(2) th {
    background: #ffffff;
    color: #17324d;
    font-size: .72rem;
    font-weight: 900;
}

.sales-compare-table tbody tr.base td,
.sales-compare-table tbody tr.current td {
    height: 58px;
    background: #ffffff;
    font-weight: 800;
}

.sales-compare-table tbody tr.current td {
    background: #fbfdff;
}

.sales-compare-table tbody tr.growth td {
    background: #f8fafc;
    font-weight: 1000;
}

.sales-compare-table tbody tr.growth td:first-child {
    width: 86px;
    color: #17324d;
}

.sales-compare-table .up {
    color: #059669;
}

.sales-compare-table .down {
    color: #dc2626;
}

.sales-compare-table .flat {
    color: #64748b;
}

.catalog-tag-form {
    grid-template-columns: 2fr 92px 110px auto;
}

.catalog-category-form label,
.catalog-tag-form label,
.catalog-filter-form label,
.catalog-admin-card label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 900;
}

.catalog-tag-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
    padding: 9px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
}

.catalog-tag-picker legend {
    padding: 0 6px;
    color: #475569;
    font-size: .78rem;
    font-weight: 900;
}

.catalog-tag-picker label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--tag-color, #0f766e) 12%, #fff);
    color: #17324d;
}

.catalog-tag-picker span {
    font-size: .72rem;
    font-weight: 900;
}

.catalog-admin-card textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    font: inherit;
    font-size: 0.84rem;
}

.catalog-admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.catalog-admin-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.catalog-admin-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: #f8fafc;
}

.catalog-admin-thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.catalog-admin-thumbs label {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px;
    background: #f8fafc;
    display: grid;
    gap: 4px;
    font-size: .72rem;
}

.catalog-admin-thumbs img {
    width: 100%;
    height: 54px;
    aspect-ratio: auto;
    object-fit: cover;
    border-radius: 6px;
}

.catalog-admin-info {
    display: grid;
    gap: 5px;
}

.catalog-admin-info strong {
    color: #17324d;
}

.catalog-admin-info span,
.catalog-admin-info small {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.7;
}

.catalog-print-btn {
    margin-right: 10px;
    background: #2563eb;
}

.catalog-bale-status {
    display: block;
    margin-top: 8px;
    color: #475569;
    font-weight: 800;
}

.report-source-help {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 2px 5px;
}

.report-info-trigger {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #f59e0b;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    box-shadow: 0 4px 10px rgba(146, 64, 14, .10);
    font-size: .78rem;
    font-weight: 1000;
    line-height: 1;
    cursor: pointer;
}

.report-info-trigger:hover {
    color: #ffffff;
    background: #f59e0b;
    box-shadow: 0 8px 18px rgba(245, 158, 11, .24);
}

.report-info-modal[hidden] {
    display: none;
}

.report-info-modal {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: grid;
    place-items: center;
    padding: 18px;
}

.report-info-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(3px);
}

.report-info-card {
    position: relative;
    width: min(680px, 94vw);
    max-height: min(78vh, 720px);
    overflow: auto;
    padding: 20px 22px;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff, #fffbeb);
    color: #17324d;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.report-info-card h2 {
    margin: 0 0 12px;
    padding-inline-end: 36px;
    color: #92400e;
    font-size: 1.05rem;
}

.report-info-body {
    white-space: pre-line;
    color: #334155;
    font-size: .88rem;
    font-weight: 850;
    line-height: 2.05;
}

.report-info-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 999px;
    color: #7f1d1d;
    background: #fee2e2;
}

body.report-info-open {
    overflow: hidden;
}

.report-usage {
    margin-top: 8px;
}

.report-usage summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid #facc15;
    border-radius: 999px;
    background: #fffbeb;
    color: #854d0e;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 1000;
}

.report-usage p {
    margin: 8px 0 0;
    padding: 10px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffdf3;
    color: #713f12;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.9;
}

.season-check-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.season-check-grid strong {
    grid-column: 1 / -1;
    color: #17324d;
}

.season-check-grid.wide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.package-builder {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 140px auto;
    gap: 10px;
    align-items: end;
}

.package-builder textarea,
.package-picked-list {
    grid-column: 1 / -1;
}

.package-picked-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 42px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fafc;
}

.package-picked-list button {
    min-height: 0;
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    text-align: right;
}

.package-picked-list span {
    color: #64748b;
    font-size: 0.75rem;
}

@media print {
    body * {
        visibility: hidden !important;
    }
    #catalogOrderPrint,
    #catalogOrderPrint * {
        visibility: visible !important;
    }
    #catalogOrderPrint {
        display: block;
        position: absolute;
        inset: 0;
        padding: 24px;
        color: #111827;
        background: #fff;
    }
    #catalogOrderPrint table {
        width: 100%;
        border-collapse: collapse;
    }
    #catalogOrderPrint th,
    #catalogOrderPrint td {
        border: 1px solid #cbd5e1;
        padding: 8px;
        text-align: right;
    }
}

.target-filter-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.target-summary-grid {
    align-items: stretch;
}

.target-supervisor-list {
    display: grid;
    gap: 10px;
}

.target-supervisor-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.2fr) repeat(3, minmax(90px, 0.7fr));
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.target-supervisor-row span {
    color: #0f172a;
    font-weight: 900;
}

.target-supervisor-row strong,
.target-supervisor-row b,
.target-supervisor-row em {
    font-style: normal;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 850;
}

.target-supervisor-row em {
    color: #059669;
}

.target-total-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.target-total-box div {
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.target-total-box span {
    display: block;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 8px;
}

.target-total-box strong {
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 950;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.target-edit-wrap {
    max-height: 62vh;
}

.target-edit-table {
    min-width: 1040px;
}

.target-edit-table input {
    width: 100%;
    min-width: 110px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 8px 9px;
    font: inherit;
    background: #fff;
}

.target-edit-table input:focus {
    outline: 2px solid #bfdbfe;
    border-color: #3b82f6;
}

.target-edit-table .target-input {
    font-weight: 900;
    color: #0f766e;
}

.target-edit-table td strong {
    color: #0f172a;
}

.target-actions {
    justify-content: flex-start;
}

.followup-table .table-wrap {
    overflow-x: visible;
}

.followup-table table {
    min-width: 0;
    table-layout: fixed;
}

.followup-table th,
.followup-table td {
    padding: 6px 5px;
    font-size: 0.7rem;
    line-height: 1.45;
}

.followup-table th:nth-child(1),
.followup-table td:nth-child(1) {
    width: 15%;
}

.followup-table th:nth-child(2),
.followup-table td:nth-child(2) {
    width: 5%;
    text-align: center;
}

.followup-table th:nth-child(3),
.followup-table td:nth-child(3),
.followup-table th:nth-child(4),
.followup-table td:nth-child(4),
.followup-table th:nth-child(5),
.followup-table td:nth-child(5),
.followup-table th:nth-child(6),
.followup-table td:nth-child(6) {
    width: 9%;
}

.followup-table th:nth-child(n+7),
.followup-table td:nth-child(n+7) {
    width: 5.6%;
    text-align: center;
}

.followup-table th:nth-child(12),
.followup-table td:nth-child(12) {
    width: 7%;
}

.followup-table td a,
.followup-table td small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.followup-table td small {
    color: #94a3b8;
    font-size: 0.62rem;
}

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    line-height: 1.8;
}

.notice-ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    background: #fff;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
    vertical-align: top;
    font-size: 0.9rem;
}

th {
    background: #eef2f7;
    color: #334155;
    position: sticky;
    top: 0;
}

th .sortable-header {
    width: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    text-align: right;
    font: inherit;
    cursor: pointer;
}

th .sortable-header::after {
    content: "↕";
    margin-right: 6px;
    color: #94a3b8;
    font-size: 0.75rem;
}

th .sortable-header[data-sort-dir="asc"]::after {
    content: "↑";
    color: #0f766e;
}

th .sortable-header[data-sort-dir="desc"]::after {
    content: "↓";
    color: #0f766e;
}

.link-button {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #0f766e;
    font: inherit;
    font-weight: 900;
    text-align: right;
    cursor: pointer;
}

.link-button:hover {
    color: #0d9488;
    text-decoration: underline;
}

tr:hover td {
    background: #f8fafc;
}

.empty,
.muted {
    color: #64748b;
    line-height: 1.9;
}

.footer {
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    padding: 18px 0 8px;
}

@media (max-width: 860px) {
    .route-assignment-grid {
        grid-template-columns: 1fr;
    }

    .route-assignment-grid.wide,
    .route-manual-codes-wrap,
    .route-manual-codes-form,
    .route-view-filter,
    .route-current-grid {
        grid-template-columns: 1fr;
    }

    .route-day-checks {
        align-items: center;
    }

    .report-tabs {
        position: static;
        width: auto;
        display: flex;
        flex-wrap: wrap;
        margin: 4px 0 14px;
    }

    .filter-drawer,
    .filter-drawer.is-open {
        position: static;
        width: auto;
        max-height: none;
        padding: 8px;
        margin-bottom: 14px;
    }

    .filter-drawer-content {
        opacity: 1;
        pointer-events: auto;
        padding-top: 12px;
        max-height: none;
    }

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

    .two-col {
        grid-template-columns: 1fr;
    }

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

    .compact-filters,
    .dashboard-grid,
    .route-day-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-drawer .report-filters,
    .filter-drawer .bot-filters,
    .filter-drawer .compact-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-drawer .date-picker:nth-of-type(1),
    .filter-drawer .bot-date-picker:nth-of-type(1) {
        grid-column: 1 / span 1;
    }

    .filter-drawer .date-picker:nth-of-type(2),
    .filter-drawer .bot-date-picker:nth-of-type(2) {
        grid-column: 2 / span 1;
    }

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

    .overview-kpi-grid,
    .overview-source-panels,
    .overview-chart-grid,
    .overview-status-grid,
    .overview-main-grid,
    .catalog-featured-grid,
    .catalog-admin-grid,
    .catalog-settings-form,
    .catalog-category-form,
    .catalog-filter-form,
    .catalog-bulk-panel,
    .catalog-bulk-form,
    .package-builder,
    .settings-grid,
    .excel-upload-grid {
        grid-template-columns: 1fr;
    }

    .season-check-grid,
    .season-check-grid.wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grade-range-grid {
        grid-template-columns: 1fr;
    }

    .grade-range-head {
        display: none;
    }

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

    .preorder-layout,
    .preorder-results,
    .preorder-search-form,
    .preorder-add-grid,
    .preorder-package-panel,
    .preorder-status-grid,
    .suggestion-list,
    .recent-invoice-strip,
    .recent-invoice-links,
    .invoice-modal-kpis {
        grid-template-columns: 1fr;
    }

    .landing-feature-grid {
        grid-template-columns: 1fr;
    }

    .catalog-hero {
        min-height: 160px;
        padding: 18px;
        margin-bottom: 10px;
    }

    .catalog-hero h1 {
        font-size: 1.35rem;
        line-height: 1.6;
    }

    .catalog-hero p {
        font-size: 0.86rem;
        line-height: 1.8;
    }

    .catalog-featured-grid,
    .catalog-small-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .catalog-product-card {
        border-radius: 8px;
    }

    .catalog-featured-card .catalog-image-button img,
    .catalog-small-card .catalog-image-button img {
        aspect-ratio: 1 / 1;
    }

    .catalog-card-body {
        gap: 5px;
        padding: 10px;
    }

    .catalog-card-body strong {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .catalog-card-body span,
    .catalog-card-body small,
    .catalog-card-body em {
        font-size: 0.72rem;
        line-height: 1.55;
    }

    .catalog-card-body b {
        font-size: 0.86rem;
    }

    .catalog-select-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .catalog-select-row .checkline {
        justify-content: center;
        padding: 8px;
        border-radius: 8px;
        background: #f0fdfa;
    }

    .catalog-select-row input[type="number"] {
        width: 100%;
        text-align: center;
    }

    .catalog-sticky-submit {
        display: none;
    }

    .catalog-floating-submit {
        bottom: 8px;
        width: calc(100vw - 16px);
        padding: 8px;
        border: 1px solid #ccfbf1;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    }

    .catalog-floating-submit button,
    #catalogSubmitTop {
        min-height: 44px;
    }

    .catalog-floating-submit button {
        width: 44%;
        padding-inline: 10px;
    }

    .catalog-floating-submit strong {
        font-size: 0.88rem;
    }

    .catalog-image-card {
        width: calc(100vw - 18px);
        padding: 10px;
    }

    .donut-breakdown-body {
        grid-template-columns: 1fr;
        justify-items: center;
    }

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

    .kpi-wide-tile {
        grid-template-columns: 1fr;
    }
}

@container (max-width: 520px) {
    .kpi-tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-tile {
        min-height: 160px;
    }

    .kpi-tile strong {
        font-size: 1.65rem;
    }

    .kpi-wide-tile {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .app {
        padding: 8px;
    }

    .topbar,
    .customer-head,
    .section-head,
    .search-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-search {
        width: 100%;
    }

    .landing-hero {
        min-height: 360px;
        padding: 28px 18px;
    }

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

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

    .filter-drawer .report-filters,
    .filter-drawer .bot-filters,
    .filter-drawer .compact-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-drawer .checkline,
    .filter-drawer .checklist {
        grid-column: 1 / -1;
    }

    .bot-filters {
        grid-template-columns: 1fr;
    }

    .bot-metrics {
        grid-template-columns: 1fr;
    }

    .overview-kpi-grid {
        grid-template-columns: 1fr;
    }

    .overview-mini-grid {
        grid-template-columns: 1fr;
    }

    .bot-calendar {
        width: min(310px, calc(100vw - 32px));
        right: auto;
        left: 0;
    }

    .mini-kpis {
        grid-template-columns: 1fr;
    }

    .kpi-tile-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .panel,
    .customer-head {
        padding: 12px;
    }

    table {
        min-width: 620px;
    }
}
