html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Login Page ── */
.login-bg {
    min-height: 100vh;
    background: #1A1A2E;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.login-card {
    background: #16213E;
    border-radius: 12px;
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    color: white;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-error {
    background: #5C1A1A;
    color: #FF9999;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.login-hint {
    color: #6677AA;
    font-size: 0.75rem;
    margin-top: 20px;
    line-height: 1.6;
}

.login-card .form-group {
    margin-bottom: 16px;
}

.login-card label {
    display: block;
    color: #AAAACC;
    font-size: 0.82rem;
    margin-bottom: 5px;
}

.login-card .form-control {
    width: 100%;
    background: #0F3460;
    border: 1px solid #2A2A4A;
    color: white;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.login-card .form-control:focus {
    outline: none;
    border-color: #6677FF;
}

.login-card select.form-control option {
    background: #0F3460;
    color: white;
}

.login-btn {
    width: 100%;
    background: #6677FF;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}

.login-btn:hover { background: #5566EE; }

/* ── Manager Dashboard ── */
.mgr-welcome {
    margin-bottom: 32px;
}

.mgr-welcome-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    letter-spacing: -0.4px;
}

.mgr-welcome-sub {
    color: #6677AA;
    font-size: 0.95rem;
    margin: 0;
}

.mgr-dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mgr-dash-card {
    background: white;
    border-radius: 4px;
    padding: 24px 20px;
    border: 1px solid #E4E7F0;
    border-top: 3px solid transparent;
    text-decoration: none;
    display: block;
    transition: box-shadow 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.mgr-dash-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.12); }

.mgr-dash-blue   { border-top-color: #1565C0; }
.mgr-dash-green  { border-top-color: #059669; }
.mgr-dash-purple { border-top-color: #7950F2; }
.mgr-dash-red    { border-top-color: #DC2626; }

.mgr-dash-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.mgr-dash-blue   .mgr-dash-card-title { color: #1565C0; }
.mgr-dash-green  .mgr-dash-card-title { color: #059669; }
.mgr-dash-purple .mgr-dash-card-title { color: #7950F2; }
.mgr-dash-red    .mgr-dash-card-title { color: #DC2626; }

.mgr-dash-card-desc {
    font-size: 0.875rem;
    color: #6677AA;
    line-height: 1.55;
}

/* ── Manager Portal shared ── */
.page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.page-header h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1A1B26;
    letter-spacing: -0.3px;
}

.record-count {
    background: #EEF0FF;
    color: #4455CC;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 9px 14px;
    border: 1px solid #D8DBEA;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    color: #1A1B26;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
    outline: none;
    border-color: #6677FF;
    box-shadow: 0 0 0 3px rgba(102,119,255,0.12);
}

.search-input::placeholder { color: #AABBCC; }

.filter-select {
    padding: 9px 12px;
    border: 1px solid #D8DBEA;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    color: #1A1B26;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #6677FF;
}

.data-table-wrap {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(25,30,60,0.08), 0 1px 3px rgba(0,0,0,0.04);
    overflow: auto;
    border: 1px solid #E4E7F0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background: #F8F9FD;
    color: #5566AA;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid #E4E7F0;
    white-space: nowrap;
}

.data-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #F0F2F8;
    color: #2A2B3D;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #F5F6FF; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .mono { font-family: 'Menlo', 'Monaco', 'Consolas', monospace; font-size: 0.8rem; color: #4455AA; }

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.status-submitted { background: #EEF2FF; color: #4455CC; }
.status-processed { background: #ECFDF5; color: #059669; }
.status-cancelled { background: #FEF2F2; color: #DC2626; }
.status-active { background: #ECFDF5; color: #059669; }

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #0EA5E9;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(14,165,233,0.08);
    transition: background 0.15s;
}

.map-link:hover {
    background: rgba(14,165,233,0.16);
    text-decoration: none;
}

.loading-msg {
    padding: 52px;
    text-align: center;
    color: #8899AA;
    font-size: 0.9rem;
}

.error-msg {
    padding: 14px 18px;
    background: #FEF2F2;
    color: #DC2626;
    border-radius: 10px;
    font-size: 0.875rem;
    border: 1px solid #FECACA;
}

.empty-msg {
    padding: 52px;
    text-align: center;
    color: #8899AA;
    font-size: 0.9rem;
}

.truncation-note {
    padding: 10px 16px;
    color: #8899AA;
    font-size: 0.78rem;
    text-align: center;
    border-top: 1px solid #F0F2F8;
    background: #FAFBFF;
}

/* Stats row (Orders page) */
.mgr-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.mgr-stat-card {
    background: #F8F9FD;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: inset 0 0 0 1px #E4E7F0;
    border: 1px solid #E4E7F0;
}

.mgr-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1A1B26;
    letter-spacing: -0.5px;
    line-height: 1;
}

.mgr-stat-label {
    font-size: 0.7rem;
    color: #8899AA;
    margin-top: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mgr-stat-accent { color: #6677FF; }
.mgr-stat-green { color: #059669; }
.mgr-stat-orange { color: #D97706; }

/* Routes */
.route-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(25,30,60,0.08);
    border: 1px solid #E4E7F0;
    margin-bottom: 16px;
    overflow: hidden;
}

.route-card-header {
    background: #F8F9FD;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1A1B26;
    border-bottom: 1px solid #E4E7F0;
}

.route-week {
    color: #6677AA;
    font-size: 0.8rem;
    font-weight: 400;
}

.route-days {
    display: flex;
    gap: 0;
}

.route-day {
    flex: 1;
    border-right: 1px solid #EEF0FF;
    padding: 12px 14px;
    min-height: 80px;
}

.route-day:last-child { border-right: none; }

.route-day-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #6677FF;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.route-customer-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #EEF2FF;
    color: #4455BB;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.82rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.route-customer-chip span[title] {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.route-customer-chip.chip-done {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.route-customer-chip.chip-link {
    cursor: pointer;
}

.route-customer-chip.chip-link:hover {
    background: #A7F3D0;
    border-left-color: #059669;
}

.route-empty-day { color: #CCCCDD; font-size: 0.78rem; }

/* Order expanded detail */
.order-meta-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #E4E7F0;
}

.order-meta-item {}

.order-meta-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8899AA;
    font-weight: 700;
    margin-bottom: 3px;
}

.order-meta-value {
    font-size: 0.875rem;
    color: #2A2B3D;
}

.order-lines-wrap {
    background: white;
    border-radius: 10px;
    border: 1px solid #E4E7F0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(25,30,60,0.06);
}

.order-lines-total td {
    font-weight: 700;
    color: #1A1B26;
    background: #F8F9FD;
    border-top: 1px solid #E4E7F0;
}

/* ── Manager buttons ── */
.mgr-btn-primary {
    background: #1565C0;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.mgr-btn-primary:hover { background: #1255A8; }
.mgr-btn-primary:disabled { opacity: 0.6; cursor: default; }

.mgr-btn-sm {
    background: white;
    color: #4455AA;
    border: 1px solid #D0D4EA;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.mgr-btn-sm:hover { background: #F0F2FF; border-color: #9AAAFF; }

.mgr-btn-warn {
    color: #B45309;
    border-color: #FCD34D;
    background: #FFFBEB;
}
.mgr-btn-warn:hover { background: #FEF3C7; border-color: #F59E0B; }

.mgr-btn-ok {
    color: #059669;
    border-color: #6EE7B7;
    background: #ECFDF5;
}
.mgr-btn-ok:hover { background: #D1FAE5; border-color: #34D399; }

.mgr-btn-cancel {
    background: white;
    color: #6677AA;
    border: 1px solid #D0D4EA;
    border-radius: 5px;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s;
}
.mgr-btn-cancel:hover { background: #F4F6FA; }

/* ── Manager forms ── */
.mgr-form-card {
    background: white;
    border: 1px solid #E4E7F0;
    border-radius: 8px;
    padding: 22px 24px;
    box-shadow: 0 1px 4px rgba(25,30,60,0.05);
}

.mgr-form-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1A1B26;
    margin-bottom: 4px;
}

.mgr-form-sub {
    font-size: 0.82rem;
    color: #8899AA;
    margin-bottom: 16px;
}

.mgr-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
    margin-top: 16px;
}

.mgr-form-group { display: flex; flex-direction: column; gap: 5px; }

.mgr-form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5566AA;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.mgr-form-input {
    padding: 8px 12px;
    border: 1px solid #D8DBEA;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1A1B26;
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.mgr-form-input:focus {
    outline: none;
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21,101,192,0.1);
}
.mgr-form-input::placeholder { color: #AABBCC; }

.mgr-success-msg {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 16px;
}

/* ── Syspro code chips ── */
.mgr-code-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    min-height: 32px;
}

.mgr-code-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EEF2FF;
    color: #3344BB;
    border: 1px solid #C7D2FE;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
}

.mgr-chip-remove {
    background: none;
    border: none;
    color: #7788CC;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0 0 2px;
    transition: color 0.1s;
}
.mgr-chip-remove:hover { color: #DC2626; }

.mgr-syspro-add-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Sync page ── */
.sync-action-card {
    background: white;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(25,30,60,0.08);
    border: 1px solid #E4E7F0;
    margin-bottom: 8px;
}

.sync-action-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1A1B26;
    margin-bottom: 6px;
}

.sync-action-sub {
    font-size: 0.875rem;
    color: #6677AA;
    margin-bottom: 20px;
    line-height: 1.5;
}

.sync-btn {
    background: #6677FF;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(102,119,255,0.3);
}

.sync-btn:hover { background: #5566EE; box-shadow: 0 4px 12px rgba(102,119,255,0.4); }
.sync-btn:disabled { opacity: 0.6; cursor: default; box-shadow: none; }

.sync-progress-bar {
    height: 4px;
    background: #EEF0FF;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 14px;
}

.sync-progress-inner {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #6677FF, #12B886);
    border-radius: 2px;
    animation: sync-slide 1.4s ease-in-out infinite;
}

@keyframes sync-slide {
    0%   { transform: translateX(-150%); }
    100% { transform: translateX(350%); }
}

.sync-status-msg {
    margin-top: 14px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
}

.sync-status-running { background: rgba(102,119,255,0.08); color: #5566CC; }
.sync-status-ok      { background: #ECFDF5; color: #059669; }
.sync-status-fail    { background: #FEF2F2; color: #DC2626; }

.sync-error-cell {
    color: #DC2626;
    font-size: 0.8rem;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Android Tester ── */
.and-page {
    padding: 12px;
    padding-bottom: 80px;
}

.and-loading {
    text-align: center;
    padding: 60px 20px;
    color: #AAAACC;
}

.and-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #333;
    border-top-color: #6677FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.and-error-msg {
    background: #2A1515;
    color: #FF9999;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 12px;
}

.and-success-msg {
    background: #152A15;
    color: #66FF99;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 16px;
}

.and-search-bar {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: #1A1A2E;
    position: sticky;
    top: 0;
    z-index: 10;
}

.and-search-input {
    flex: 1;
    background: #2A2A3A;
    border: 1px solid #3A3A5A;
    color: white;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.85rem;
}

.and-search-input::placeholder { color: #666; }
.and-search-input:focus { outline: none; border-color: #6677FF; }

.and-cat-select {
    background: #2A2A3A;
    border: 1px solid #3A3A5A;
    color: white;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.78rem;
}

.and-customer-list { padding: 4px 0; }

.and-customer-card {
    background: #252535;
    margin: 6px 12px;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #2A2A4A;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: border-color 0.15s, background 0.15s;
}

.and-customer-card:hover { border-color: #6677FF; background: #2E2E40; }

.and-customer-name { color: white; font-size: 0.95rem; font-weight: 500; }
.and-customer-sub { color: #8888AA; font-size: 0.78rem; margin-top: 3px; }

.and-hold-badge {
    display: inline-block;
    background: #5C1A1A;
    color: #FF6666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    margin-top: 4px;
}

.and-empty {
    text-align: center;
    color: #8888AA;
    padding: 40px 20px;
}

/* Stock page */
.and-stock-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #1A1A2E;
    flex-wrap: wrap;
}

.and-customer-chip {
    background: #2A2A3A;
    color: #CCCCEE;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    flex: 1;
}

.and-company-chip {
    background: #3A3A5A;
    color: #AAAACC;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    margin-left: 8px;
}

.and-change-btn {
    background: transparent;
    border: 1px solid #3A3A5A;
    color: #AAAACC;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
    cursor: pointer;
}

.and-stock-list { padding: 4px 0; }

.and-stock-card {
    background: #252535;
    margin: 6px 12px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #2A2A4A;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.and-stock-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
    background: #252535;
    flex-shrink: 0;
}

.and-stock-info { flex: 1; min-width: 0; }
.and-stock-desc { color: white; font-size: 0.88rem; font-weight: 500; }
.and-stock-code { color: #8888AA; font-size: 0.75rem; margin-top: 2px; }
.and-stock-price { color: #CCCCEE; font-size: 0.95rem; font-weight: 700; margin-top: 4px; }
.and-stock-price-deal { color: #66BB6A; font-size: 0.95rem; font-weight: 700; margin-top: 2px; }
.and-stock-price-was { color: #666688; font-size: 0.75rem; text-decoration: line-through; margin-top: 4px; }
.and-pack-size { color: #6677AA; font-size: 0.72rem; }

.and-qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.and-add-btn {
    background: #6677FF;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    cursor: pointer;
}

.and-qty-btn {
    background: #2A2A3A;
    color: white;
    border: 1px solid #3A3A5A;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.and-qty-display {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.and-cart-fab {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 432px;
    z-index: 100;
}

.and-cart-fab-btn {
    display: block;
    background: #6677FF;
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 14px;
    border-radius: 28px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(102,119,255,0.4);
}

/* Cart page */
.and-cart-title {
    color: white;
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.and-cart-customer {
    background: #252535;
    border-radius: 8px;
    padding: 10px 14px;
    color: #CCCCEE;
    font-size: 0.85rem;
    margin-bottom: 12px;
    border: 1px solid #2A2A4A;
}

.and-cart-items { margin-bottom: 12px; }

.and-cart-item {
    background: #252535;
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid #2A2A4A;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.and-cart-item-info { flex: 1; min-width: 0; }
.and-cart-item-name { color: white; font-size: 0.88rem; font-weight: 500; }
.and-cart-item-code { color: #8888AA; font-size: 0.75rem; margin-top: 2px; }

.and-cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.and-cart-qty-row { display: flex; align-items: center; gap: 6px; }
.and-cart-line-total { color: #66BB6A; font-size: 0.9rem; font-weight: 600; }

.and-remove-btn {
    background: transparent;
    border: none;
    color: #FF6666;
    cursor: pointer;
    font-size: 0.85rem;
}

.and-cart-total {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    background: #252535;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 16px;
    border: 1px solid #2A2A4A;
}

.and-order-fields { margin-bottom: 16px; }

.and-field-label {
    display: block;
    color: #AAAACC;
    font-size: 0.8rem;
    margin-bottom: 4px;
    margin-top: 10px;
}

.and-field-input {
    width: 100%;
    background: #2A2A3A;
    border: 1px solid #3A3A5A;
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.88rem;
    box-sizing: border-box;
    resize: vertical;
}

.and-field-input:focus { outline: none; border-color: #6677FF; }

.and-btn-primary {
    background: #6677FF;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.and-btn-primary:disabled { opacity: 0.6; cursor: default; }
.and-submit-btn { margin-top: 8px; }

.and-link { color: #6677FF; text-decoration: none; }
.and-link:hover { text-decoration: underline; }
.and-muted { color: #8888AA; }
.and-today-accent { color: #12B886; font-weight: 700; }
.and-section-label { color: #8888AA; font-size: 0.82rem; padding: 14px 12px 6px; }

.and-chip {
    background: #2A2A3A;
    color: #AAAACC;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
    display: inline-block;
}

.and-stock-img-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: #1A1A2A;
    flex-shrink: 0;
}

.and-field-error {
    border-color: #FF5252 !important;
}

/* Sync banner */
.and-sync-banner {
    padding: 10px 16px;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: center;
}
.and-sync-ok { background: rgba(18,184,134,0.15); color: #12B886; }
.and-sync-fail { background: rgba(250,82,82,0.15); color: #FA5252; }
.and-sync-warn { background: rgba(250,82,82,0.1); color: #FA5252; }
.and-sync-status { color: #555577; font-size: 0.75rem; text-align: center; padding: 16px; }

/* Start Menu cards */
.and-menu-body { padding: 16px 12px; display: flex; flex-direction: column; gap: 16px; }
.and-menu-card {
    background: #2B2B3B;
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: background 0.15s;
}
.and-menu-card:hover { background: #333345; }
.and-menu-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.and-menu-text { flex: 1; }
.and-menu-title { color: white; font-size: 1.05rem; font-weight: 600; }
.and-menu-sub { color: #8888AA; font-size: 0.8rem; margin-top: 3px; }
.and-menu-arrow { font-size: 1.4rem; font-weight: 300; flex-shrink: 0; }

/* Week cards */
.and-week-card {
    background: #2B2B3B;
    border-radius: 14px;
    margin: 6px 12px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.and-week-card:hover { background: #333345; }
.and-week-current { background: rgba(18,184,134,0.12); }
.and-week-icon { font-size: 1.4rem; flex-shrink: 0; }
.and-week-text { flex: 1; }
.and-week-label { color: white; font-size: 0.92rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.and-week-sub { color: #8888AA; font-size: 0.75rem; margin-top: 3px; }
.and-current-badge { background: #12B886; color: white; padding: 1px 8px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; }

/* Day tiles */
.and-day-tile {
    background: #2B2B3B;
    border-radius: 12px;
    margin: 5px 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.and-day-tile:hover { background: #333345; }
.and-day-today { background: #2B3B3B; }
.and-day-label-col { width: 44px; text-align: center; flex-shrink: 0; }
.and-day-name { color: #CCCCEE; font-size: 0.8rem; font-weight: 700; }
.and-day-date { color: #666688; font-size: 0.7rem; }
.and-day-info { flex: 1; color: #CCCCEE; font-size: 0.88rem; }
.and-day-icons { display: flex; gap: 4px; color: #8888AA; font-size: 0.9rem; }

/* Route customer row */
.and-route-cust-row {
    background: #252535;
    margin: 5px 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #2A2A4A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    transition: border-color 0.15s;
}
.and-route-cust-row:hover { border-color: #3A3A5A; }
.and-route-selected { border-color: #12B886 !important; background: rgba(18,184,134,0.08); }
.and-check { color: #12B886; font-weight: 700; font-size: 1.1rem; width: 22px; text-align: center; }
.and-route-day-header { background: #2B2B3B; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: white; }

/* Start Route */
.and-route-day-section { margin: 0 12px 12px; }
.and-route-today-section { border: 1px solid rgba(18,184,134,0.3); border-radius: 12px; overflow: hidden; }
.and-route-section-header { background: #252535; padding: 10px 14px; display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.and-route-empty-day { padding: 10px 14px; color: #555577; font-size: 0.82rem; }
.and-route-day-section .and-route-cust-row { margin: 4px 0; border-radius: 8px; }

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ═══════════════════════════════════════════════════════
   AGENT PORTAL LAYOUT
   ═══════════════════════════════════════════════════════ */

.agent-wrap {
    min-height: 100vh;
    background: #F3F4F6;
    display: flex;
    flex-direction: column;
}

.agent-header {
    background: linear-gradient(180deg, #252540 0%, #1a1a30 100%);
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 64px;
    gap: 20px;
    flex-shrink: 0;
    border-bottom: 2px solid #111128;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.agent-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.agent-header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    padding: 3px;
}

.agent-brand-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
}

.agent-brand-rep {
    font-size: 0.7rem;
    color: #9CA3AF;
    white-space: nowrap;
}

.agent-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    padding-left: 24px;
}

/* ── 3D Nav Buttons ──────────────────────────────────────────────────────── */
.agent-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    border-radius: 7px;
    color: #CBD5E1 !important;
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(180deg, #3a3f62 0%, #2c3057 100%);
    border: 1px solid #4a5080;
    border-bottom: 3px solid #161830;
    box-shadow: 0 2px 5px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.07);
    transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}

.agent-nav-btn:hover {
    background: linear-gradient(180deg, #464b70 0%, #383c65 100%) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    text-decoration: none !important;
}

.agent-nav-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 3px rgba(0,0,0,0.2);
    border-bottom-width: 1px;
}

.agent-nav-btn.active {
    background: linear-gradient(180deg, #5c7aff 0%, #3d5fe8 100%) !important;
    border-color: #2d4fd4;
    border-bottom-color: #1a30a0;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(60,80,220,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(1px);
}

.agent-nav-cart-btn {
    color: #6EE7B7 !important;
    background: linear-gradient(180deg, #1e4038 0%, #163328 100%);
    border-color: #2a5a48;
    border-bottom-color: #0d2018;
}

.agent-nav-cart-btn:hover {
    background: linear-gradient(180deg, #275248 0%, #1e4038 100%) !important;
    color: #34D399 !important;
}

.agent-nav-cart-btn.active {
    background: linear-gradient(180deg, #059669 0%, #047857 100%) !important;
    border-color: #065f46;
    border-bottom-color: #033d2c;
    color: #fff !important;
}

.agent-cart-badge {
    background: #EF4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    line-height: 1.4;
}

.agent-header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.agent-signout-btn {
    background: linear-gradient(180deg, #3a2a2a 0%, #2a1e1e 100%);
    color: #FCA5A5;
    border: 1px solid #5a3a3a;
    border-bottom: 3px solid #1a0f0f;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.1s, background 0.1s;
}

.agent-signout-btn:hover {
    background: linear-gradient(180deg, #4a3030 0%, #3a2020 100%);
    color: #fff;
    transform: translateY(-1px);
}

.agent-signout-btn:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
}

/* ── Customer bar ─────────────────────────────────────────────────────────── */
.agent-customer-bar {
    background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 100%);
    padding: 9px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: #DBEAFE;
    flex-shrink: 0;
    border-bottom: 1px solid #1e40af;
}

.agent-cust-code-bar {
    color: #93C5FD;
    font-family: monospace;
    font-size: 0.78rem;
    margin-left: 4px;
}

.agent-change-cust {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 4px 14px;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
}

.agent-change-cust:hover { background: rgba(255,255,255,0.22); }

/* ── Page content ─────────────────────────────────────────────────────────── */
.agent-content {
    flex: 1;
    padding: 28px 32px;
    max-width: 1400px;
    width: 100%;
}

/* ── Manager sidebar nav buttons (global override — scoped CSS can't beat browser a defaults) ── */
.mgr-nav-link {
    display: block !important;
    color: #b0b8c8 !important;
    text-decoration: none !important;
    padding: 9px 12px 9px 14px !important;
    margin: 2px 8px !important;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    border-left: 3px solid transparent !important;
    background: linear-gradient(to bottom, rgba(255,255,255,0.04), rgba(255,255,255,0.01)) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04) !important;
    transition: background 0.12s, color 0.12s, box-shadow 0.12s !important;
}

.mgr-nav-link:hover {
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0.06)) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.mgr-nav-link.active {
    background: linear-gradient(to bottom, #1e7ee4, #1565C0) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-left-color: #42A5F5 !important;
    box-shadow: 0 2px 8px rgba(21,101,192,0.5), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}