﻿/* ==========================================================================
   RUSSIAN COMPANY REGISTRATION PORTAL STYLE SHEET - SIDEBAR RESTRUCTURE
   Highly matching User's Decision Cockpit (WMS system dark cyan aesthetic)
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    --font-primary: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --font-heading: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    
    /* Default Dark Theme Settings (Dashboard Cyan-Dark matching screenshot) */
    --bg-app: #080a10;
    --bg-sidebar: #0b0e14;
    --bg-card: rgba(16, 20, 30, 0.7);
    --bg-card-hover: rgba(22, 28, 42, 0.85);
    --bg-nested: rgba(10, 13, 20, 0.6);
    --border-color: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --text-main: #f3f4f6;
    --text-muted: #6b7c93;
    --text-inverse: #080a10;
    
    --color-primary: #00f2fe;
    --color-primary-rgb: 0, 242, 254;
    --color-secondary: #4facfe;
    --color-accent: #00f2fe;
    --color-accent-rgb: 0, 242, 254;
    --color-warning: #f59e0b;
    --color-purple: #a78bfa;
    --color-danger: #ef4444;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 15px rgba(0, 242, 254, 0.35);
    
    --sidebar-width: 250px;
    --glass-blur: 16px;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
}

/* Light Theme Overrides */
body.light-theme {
    --bg-app: #f5f6f8;
    --bg-sidebar: #ffffff;
    --bg-card: #f8f9fb;
    --bg-card-hover: #f3f4f6;
    --bg-nested: #f8f9fb;
    --border-color: rgba(100, 116, 139, 0.22);
    --border-hover: rgba(37, 99, 235, 0.24);
    
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-inverse: #ffffff;
    
    --color-primary: #3b82f6;
    --color-primary-rgb: 59, 130, 246;
    --color-secondary: #2563eb;
    
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-primary);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
}

/* Ambient glow graphics in background */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.12;
    transition: opacity 0.5s ease;
}

body.light-theme .glow-sphere {
    opacity: 0.04;
}

.sphere-1 {
    top: -10%;
    right: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
}

.sphere-2 {
    bottom: -10%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
}

/* App Flexbox Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Fixed Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    z-index: 99;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transition: background-color 0.4s, border-color 0.4s;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 0.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.logo-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Centred logo styling when system name is empty */
.sidebar-brand.no-text,
.branding-preview-sidebar-head.no-text {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 1.5rem 0.5rem !important;
}

.sidebar-brand.no-text .logo-icon,
.branding-preview-sidebar-head.no-text .logo-icon {
    width: 80px !important;
    height: 80px !important;
}

.brand-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.brand-accent {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

.menu-item {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted);
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.menu-item > span[data-i18n] {
    flex: 1;
    min-width: 0;
}

.menu-pending-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--bg-sidebar), 0 8px 18px rgba(239, 68, 68, 0.32);
}

.menu-item.active .menu-pending-badge {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.92), 0 8px 18px rgba(239, 68, 68, 0.4);
}

.menu-item:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.02);
}

.menu-item.active {
    color: var(--text-inverse);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: var(--shadow-glow);
}

.menu-icon {
    width: 18px;
    height: 18px;
}

/* Sidebar Settings Section (Bottom) */
.sidebar-settings {
    border-top: 1px solid var(--border-color);
    padding-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.settings-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Theme Toggle Switch style */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-nested);
    border: 1px solid var(--border-color);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
}

.switch input:checked + .slider {
    background-color: rgba(var(--color-primary-rgb), 0.1);
    border-color: var(--color-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
    background-color: var(--color-primary);
}

.slider.round {
    border-radius: 22px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Language Selector styling */
.lang-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--bg-nested);
    padding: 3px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.lang-btn {
    border: none;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px 0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn.active {
    background-color: var(--bg-sidebar);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

body.light-theme .lang-btn.active {
    background-color: var(--bg-app);
}

/* User profile card in sidebar */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: var(--border-radius-md);
    background: var(--bg-nested);
    border: 1px solid var(--border-color);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary);
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.username {
    font-weight: 700;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email {
    font-size: 0.7rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-arrow {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

/* Right Side Layout Content Wrapper */
.content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-app);
    transition: margin-left 0.3s;
}

.content-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.content-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Panels switching mechanism */
.panel-container {
    flex: 1;
}

.panel-view {
    display: none;
}

.panel-view.active {
    display: block;
    animation: panelFadeIn 0.4s ease;
}

/* Sidebar Sub-menu */
.menu-group {
    display: flex;
    flex-direction: column;
}
.sub-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 32px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}
.sub-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    text-align: left;
    white-space: nowrap;
    position: relative;
}
.sub-menu-item > span[data-i18n] {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sub-menu-item .menu-pending-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.66rem;
    flex: 0 0 auto;
}
.sub-menu-item.active .menu-pending-badge {
    box-shadow: 0 0 0 2px var(--bg-sidebar), 0 8px 18px rgba(239, 68, 68, 0.34);
}
.sub-menu-item:hover {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.06);
}
.sub-menu-item.active {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.1);
}
.inquiry-sub-content {
    animation: panelFadeIn 0.3s ease;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass card styling */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-nested {
    background: var(--bg-nested);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Decision Cockpit KPI elements styling */
.dashboard-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.kpi-card {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.kpi-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

.kpi-blue { background: rgba(0, 242, 254, 0.1); color: var(--color-primary); }
.kpi-yellow { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.kpi-purple { background: rgba(167, 139, 250, 0.1); color: var(--color-purple); }
.kpi-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }

.kpi-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kpi-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.kpi-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    width: 100%;
    margin-top: 6px;
}

.kpi-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.bg-gradient-blue { background: linear-gradient(90deg, #00f2fe, #4facfe); }
.bg-gradient-yellow { background: var(--color-warning); }
.bg-gradient-purple { background: var(--color-purple); }
.bg-gradient-green { background: #10b981; }

/* Grid Dashboard Cards (Cockpit) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 1.5rem;
}

.kpi-grid-card {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
}

.panel-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.3px;
}

.col-full {
    grid-column: span 2;
}

/* Timeline Vertical Track layout */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    padding-left: 20px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    background: var(--text-muted);
}

.timeline-dot.active {
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
}

.timeline-dot.success {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.timeline-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.timeline-text {
    font-size: 0.82rem;
    font-weight: 600;
}

.timeline-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem 0;
}

/* Charts Wrapper & Styles */
.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
}

.chart-wrapper {
    width: 100%;
    position: relative;
}

#trend-chart-svg {
    border-radius: var(--border-radius-sm);
}

.chart-axis-lbl {
    font-size: 10px;
    fill: var(--text-muted);
    font-family: var(--font-primary);
}

.chart-node-circle {
    transition: r 0.2s, stroke-width 0.2s;
}

.chart-node-circle:hover {
    r: 6;
    stroke-width: 3;
    cursor: pointer;
}

/* Shortcut Actions Row */
.quick-actions-row {
    display: flex;
    gap: 15px;
}

.quick-actions-row .btn {
    padding: 0.7rem 1.8rem;
    font-size: 0.88rem;
}

/* Wizard Inquiry Form Layout details */
.grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.85fr);
    gap: 1.5rem;
    align-items: start;
}

.qq-wizard-layout {
    gap: 1rem;
}

.qq-first-leg-rules {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.2);
    border-radius: 7px;
    background: rgba(var(--color-primary-rgb), 0.035);
}

.qq-first-leg-rules-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.qq-first-leg-rules-head strong {
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 750;
}

.qq-first-leg-rules-head span,
.qq-first-leg-rules-loading {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.35;
}

.qq-first-leg-rules-loading {
    display: block;
    padding: 3px 0;
}

.qq-first-leg-rules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.qq-first-leg-rule-card {
    display: grid;
    grid-template-columns: minmax(42px, auto) minmax(0, 1fr);
    gap: 6px 10px;
    align-items: center;
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
}

.qq-first-leg-rule-card > strong {
    grid-row: span 2;
    color: var(--color-primary);
    font-size: 0.78rem;
}

.qq-first-leg-rule-card > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.qq-first-leg-rule-card span {
    color: var(--text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
}

.qq-first-leg-rule-card b {
    min-width: 0;
    color: var(--text-main);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    text-align: right;
}

@media (max-width: 560px) {
    .qq-first-leg-inputs {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .qq-first-leg-rules-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .qq-first-leg-rules-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.qq-wizard-layout .form-card,
.qq-wizard-layout .quote-summary-card {
    padding: 1.25rem;
}

.qq-wizard-layout .quote-summary-card {
    padding: 1rem;
}

.form-card {
    padding: 2rem;
}

.quote-summary-card {
    padding: 1rem 1.05rem;
    position: sticky;
    top: 1.35rem;
    justify-self: end;
    width: 100%;
}

.qq-wizard-product-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: visible !important;
}

.qq-wizard-product-card .qq-wizard-product-summary {
    display: inline-block;
    max-width: 100%;
}

.qq-wizard-product-card .qq-wizard-product-body {
    margin-top: 8px;
}

.qq-wizard-product-card.collapsed .qq-wizard-product-body {
    display: none;
}

.qq-wizard-product-card.collapsed {
    box-shadow: none;
}

.qq-wizard-product-card .form-label-small {
    margin-bottom: 4px;
}

.qq-wizard-product-card .form-control {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.product-item-card .product-item-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
    align-items: start;
}

.product-item-card .product-item-field-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-item-card .product-item-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    box-sizing: border-box;
}

.product-item-card .product-item-field--full {
    grid-column: 1 / -1;
}

.product-item-card .product-item-field .form-label-small {
    margin-bottom: 0;
}

.product-item-card .product-item-field .form-control,
.product-item-card .product-item-field select.form-control {
    width: 100%;
    min-width: 0;
    max-width: none !important;
    box-sizing: border-box;
}

.pi-product-picker {
    position: relative;
    z-index: 20;
}

.pi-product-picker .pi-product-filter {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.pi-product-picker .pi-product-select,
.pi-product-picker select.product-library-select {
    display: none !important;
}

.pi-product-picker .pi-product-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow: auto;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #172033;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.34);
}

.pi-product-picker .pi-product-results.hidden {
    display: none !important;
}

.pi-product-picker .pi-product-result {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    min-height: 38px;
    padding: 9px 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #e5edf8;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-primary);
}

.pi-product-picker .pi-product-result:hover,
.pi-product-picker .pi-product-result:focus,
.pi-product-picker .pi-product-result.is-selected {
    background: rgba(var(--color-primary-rgb), 0.18);
    outline: none;
}

.pi-product-picker .pi-product-result-main {
    flex: 0 0 auto;
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #38bdf8;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
}

.pi-product-picker .pi-product-result-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.75rem;
    line-height: 1.25;
}

.pi-product-picker .pi-product-results-empty {
    padding: 10px 12px;
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.78rem;
    line-height: 1.35;
}

.product-item-card .product-item-suggestion,
.product-item-card .pi-declared-suggestion {
    width: 100% !important;
    min-height: 42px;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-nested);
    font-size: 0.82rem;
    line-height: 1.2;
}

.product-item-card .product-item-upload-control {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-nested);
}

.product-item-card .product-item-upload-control .product-item-upload-button {
    min-height: 28px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    background: var(--bg-main) !important;
    border: 1px dashed var(--border-color) !important;
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
}

.product-item-card .product-item-upload-control .pi-image-name,
.product-item-card .product-item-upload-control .pi-eac-name {
    min-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-item-card .product-item-file-row {
    margin-bottom: 10px;
}

#subtab-logistics .logistics-route-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

#subtab-logistics .logistics-route-field {
    min-width: 0;
    min-height: 68px;
}

#subtab-logistics .logistics-route-field .form-control {
    width: 100%;
    min-width: 0;
    max-width: none !important;
    box-sizing: border-box;
}

#subtab-logistics .logistics-route-field .form-label-small {
    margin-bottom: 0;
}

#subtab-logistics #logistics-remarks {
    height: 42px;
    min-height: 42px;
}

@media (max-width: 1100px) {
    .product-item-card .product-item-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .product-item-card .product-item-field-grid,
    .product-item-card .product-item-field-grid--2,
    #subtab-logistics .logistics-route-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Steps Indicators (Wizard) */
.wizard-header {
    margin-bottom: 2.5rem;
}

.steps-progress {
    height: 4px;
    background: var(--bg-nested);
    border-radius: 2px;
    position: relative;
    margin-bottom: 1.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.steps-indicators {
    display: flex;
    justify-content: space-between;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-nested);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}

.step-indicator.active .step-number {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-color: transparent;
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow);
}

.step-indicator.active .step-label {
    color: var(--text-main);
}

.step-indicator.completed .step-number {
    background: #10b981;
    border-color: transparent;
    color: var(--text-inverse);
}

.step-indicator.completed .step-label {
    color: #10b981;
}

/* Step content blocks */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: formSlideIn 0.3s ease;
}

@keyframes formSlideIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.step-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 2rem;
}

.subtab-page-header {
    margin-bottom: 14px;
}

.subtab-page-header .step-title {
    margin-bottom: 4px;
}

.subtab-page-header .step-subtitle {
    margin-bottom: 0;
}

/* Services pricing configuration list */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
}

.service-item {
    background: var(--bg-nested);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.25rem 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.service-item.selected {
    border-color: var(--color-primary);
    background-color: rgba(0, 242, 254, 0.02);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.05);
}

.service-meta {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.service-checkbox-wrapper {
    position: relative;
    margin-top: 4px;
}

.service-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.service-checkbox-wrapper label {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--bg-app);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.service-checkbox-wrapper input:checked + label {
    background: var(--color-primary);
    border-color: transparent;
}

.service-checkbox-wrapper input:checked + label::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid var(--text-inverse);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.service-checkbox-wrapper input:disabled + label {
    opacity: 0.6;
    background: var(--color-primary);
    border-color: transparent;
    cursor: not-allowed;
}

.service-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: 4px;
}

.action-tag {
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--border-color);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
}

.service-info p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.service-price {
    position: absolute;
    right: 1.1rem;
    top: 1rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.price-currency {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Service Address radios */
.service-pricing-options {
    margin-top: 1.2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    display: none;
    animation: blockSlideDown 0.3s ease;
}

@keyframes blockSlideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.radio-card {
    cursor: pointer;
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card-content {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s;
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.04);
}

.radio-title {
    font-weight: 700;
    font-size: 0.92rem;
}

.radio-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.radio-price {
    margin-top: 4px;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.8rem;
}

.radio-price-note {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
}

.address-month-selector {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.address-month-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 700;
}

.address-month-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.address-month-option {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 0.46rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.address-month-option.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.08);
}

/* Form switch controls step 2 */
.status-tab-group {
    display: flex;
    background: var(--bg-nested);
    border-radius: var(--border-radius-md);
    padding: 4px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.status-tab-btn {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
    padding: 10px 0;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.status-tab-btn input {
    position: absolute;
    opacity: 0;
}

.status-tab-btn.active {
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

body.light-theme .status-tab-btn.active {
    background: var(--bg-app);
}

.shareholder-location-tabs {
    gap: 8px;
    background: transparent;
    border: 0;
    padding: 0;
}

.shareholder-location-tabs .status-tab-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-nested);
}

.shareholder-tab-out {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.35) !important;
}

.shareholder-tab-in {
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.35) !important;
}

.shareholder-tab-out.active {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #2563eb !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.shareholder-tab-in.active {
    color: #15803d;
    background: #dcfce7;
    border-color: #16a34a !important;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.22);
}

body.light-theme .shareholder-tab-out.active {
    color: #1d4ed8;
    background: #dbeafe;
}

body.light-theme .shareholder-tab-in.active {
    color: #15803d;
    background: #dcfce7;
}

.inquiry-form-layout {
    display: flex;
    flex-direction: column;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sec-num {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--text-inverse);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
}

.badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-info {
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
}

.form-row {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.col-3 { flex: 1 1 0; min-width: 0; }
.col-4 { flex: 1 1 0; min-width: 0; }
.col-6 { flex: 1; min-width: 0; }
.col-12 { width: 100%; }

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-label-small {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
}

.req {
    color: var(--color-danger);
}

.form-control {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    font-family: var(--font-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

textarea.form-control {
    resize: vertical;
}

.city-tag-settings-layout {
    display: grid;
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
    max-width: none;
    width: 100%;
}

.city-tag-options-card,
.city-tag-map-card,
.city-tag-pricing-card {
    padding: 1.15rem;
    border-radius: 12px;
    overflow: hidden;
}

.city-tag-settings-layout .panel-card-title {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 0.45rem;
}

.city-tag-options-card textarea.form-control {
    min-height: 104px;
    line-height: 1.55;
}

.city-tag-options-card .form-group {
    margin-bottom: 0.85rem;
}

.ct-group-detail-grid,
.products-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 18px;
    margin-bottom: 12px;
    min-width: 0;
}

.ct-group-detail-grid .form-group,
.products-detail-grid .form-group {
    min-width: 0;
    margin: 0;
}

.ct-group-detail-grid .form-control,
.products-detail-grid .form-control {
    width: 100%;
    min-width: 0;
}

.city-tag-settings-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.95rem;
    min-width: 0;
}

.city-tag-map-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(210px, 1fr));
    gap: 0.85rem;
    align-items: stretch;
}

.city-tag-map-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.city-tag-map-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 0.85rem;
    line-height: 1.5;
}

.city-tag-map-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;
}

.city-tag-map-actions .btn {
    flex: 1 1 82px;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
}

.city-tag-map-status {
    display: block;
    margin-top: 10px;
    font-size: 0.76rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.city-tag-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 0.8rem;
    min-width: 0;
}

.city-tag-card-head > div {
    min-width: 0;
}

.city-tag-card-head .btn {
    flex: 0 0 auto;
    padding: 0.5rem 0.8rem;
    white-space: nowrap;
}

.city-tag-pricing-tier-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.city-tag-pricing-tier-row {
    display: grid;
    grid-template-columns: minmax(76px, 96px) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--bg-nested);
}

.city-tag-pricing-tier-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.city-tag-pricing-tier-head strong {
    font-size: 0.82rem;
    color: var(--text-main);
}

.city-tag-pricing-remove-tier {
    border: 0;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.76rem;
    padding: 0;
}

.city-tag-pricing-tier-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 8px;
    min-width: 0;
}

.city-tag-pricing-tier-fields > div {
    min-width: 0;
}

.city-tag-pricing-tier-fields .form-control {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0.54rem 0.65rem;
}

.city-tag-pricing-card > .btn {
    height: 38px;
    border-radius: 8px;
}

.city-tag-billing-card {
    padding: 1.15rem;
    border-radius: 12px;
}

.city-tag-billing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 0.9rem;
}

.city-tag-billing-grid .form-group {
    min-width: 0;
    margin: 0;
}

.city-tag-billing-note-field {
    grid-column: 1 / -1;
}

.city-tag-billing-note-field textarea.form-control {
    min-height: 72px;
}

@media (max-width: 1280px) {
    .city-tag-settings-layout {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .city-tag-options-card {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem 1rem;
    }

    .city-tag-options-card > .panel-card-title,
    .city-tag-options-card > p,
    .city-tag-options-card > button {
        grid-column: 1 / -1;
    }

    .city-tag-options-card .form-group {
        margin: 0;
    }

    .city-tag-map-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .city-tag-map-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .city-tag-map-grid,
    .city-tag-billing-grid,
    .city-tag-pricing-tier-fields,
    .ct-group-detail-grid,
    .products-detail-grid {
        grid-template-columns: 1fr;
    }

    .city-tag-options-card {
        grid-template-columns: 1fr;
    }

    .city-tag-pricing-tier-row {
        grid-template-columns: 1fr;
    }

    .city-tag-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .city-tag-card-head .btn {
        width: 100%;
    }
}

/* Logistics product editors keep identical control geometry after the global form-control overrides. */
.logi-product-editors .logi-inline-editor {
    grid-template-columns: minmax(0, 1fr) 106px;
}

.logi-product-editors .logi-inline-editor input[type="text"],
.logi-product-editors .logi-inline-editor input[type="number"] {
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
    padding: 7px 10px !important;
    border-radius: 6px !important;
    font-size: 0.76rem !important;
    line-height: 1.2 !important;
}

.logi-product-editors .logi-inline-editor .btn {
    width: 106px !important;
    height: 36px !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
    padding: 7px 12px !important;
    border-radius: 6px !important;
    line-height: 20px !important;
}

/* 2026-08-14: reusable address template management and fill controls. */
.address-management-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 16px;
    align-items: start;
}

.address-template-form-panel {
    min-width: 0;
}

.address-template-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    min-width: 0;
}

.address-template-form-grid .form-group {
    min-width: 0;
    margin: 0;
}

.address-template-form-wide {
    grid-column: 1 / -1;
}

.address-template-form-wide textarea.form-control {
    min-height: 84px;
    resize: vertical;
}

.address-template-default-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--text-main);
    font-size: 0.8rem;
    cursor: pointer;
}

.address-template-default-control input {
    width: 16px;
    height: 16px;
    min-height: 16px !important;
    padding: 0 !important;
}

.address-template-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.address-template-list-panel {
    min-width: 0;
}

.address-template-list {
    display: grid;
    gap: 10px;
}

.address-template-empty {
    margin: 0;
    padding: 22px 12px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.82rem;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
}

.address-template-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-nested);
}

.address-template-card-head,
.address-template-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.address-template-card-head strong {
    min-width: 0;
    color: var(--text-main);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.address-template-default-badge {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.12);
    font-size: 0.7rem;
    font-weight: 700;
}

.address-template-card-address,
.address-template-card-contact {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.address-template-card-actions {
    justify-content: flex-start;
    margin-top: 10px;
}

.address-template-card-actions button {
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.address-template-card-actions .btn-address-template-delete {
    color: #ef4444;
}

.address-template-card-actions button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.address-template-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin: 6px 0 8px;
}

.address-template-picker .form-label-small {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.address-template-picker .form-control {
    min-height: 34px;
    height: 34px !important;
    padding: 7px 10px !important;
    font-size: 0.76rem;
}

.workflow-address-template-picker {
    margin-top: 0;
}

.workflow-address-template-picker .workflow-control {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.76rem;
}

.workflow-address-template-picker .workflow-control:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.75;
}

.settings-project-address-section {
    box-sizing: border-box;
    width: 100%;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.settings-project-address-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border-color);
}

.settings-project-address-header h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.4;
}

.settings-project-address-header p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.settings-address-management-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    margin-top: 16px;
}

.settings-address-pane {
    min-width: 0;
    padding: 2px 4px;
}

.settings-address-pane + .settings-address-pane {
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

@media (max-width: 900px) {
    .address-management-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-address-pane + .settings-address-pane {
        padding-top: 18px;
        padding-left: 4px;
        border-top: 1px solid var(--border-color);
        border-left: 0;
    }
}

@media (max-width: 600px) {
    .address-template-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .address-template-form-wide {
        grid-column: auto;
    }

    .address-template-form-actions {
        justify-content: stretch;
    }

    .address-template-form-actions .btn {
        flex: 1;
    }
}

/* Individual rental: keep the flow marker visually aligned with the company
   registration wizard header style. */
.rental-flow-stepper {
    margin: 14px 0 22px;
}

.rental-flow-stepper .steps-progress {
    height: 4px;
    background: var(--bg-nested);
    border-radius: 2px;
    position: relative;
    margin-bottom: 1.35rem;
}

.rental-flow-stepper-indicators {
    display: flex;
    justify-content: space-between;
    gap: 0;
}

.rental-flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    text-align: center;
    position: relative;
    cursor: default;
}

.rental-flow-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-nested);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.rental-flow-step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}

.rental-flow-step.active .rental-flow-step-number {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-color: transparent;
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow);
}

.rental-flow-step.active .rental-flow-step-label {
    color: var(--text-main);
}

.rental-flow-step.completed .rental-flow-step-number {
    background: #10b981;
    border-color: transparent;
    color: var(--text-inverse);
}

.rental-flow-step.completed .rental-flow-step-label {
    color: #10b981;
}

.rental-order-list {
    display: grid;
    gap: 12px;
}

.rental-history-workspace {
    min-width: 0;
    padding: 16px;
}

.rental-order-card {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.rental-status-track {
    display: grid;
    grid-template-columns: repeat(8, minmax(68px, 1fr));
    margin: 14px 0;
    overflow-x: auto;
}

.rental-status-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 5px;
    min-width: 72px;
    color: var(--text-muted);
    text-align: center;
}

.rental-status-step::before {
    content: '';
    position: absolute;
    top: 11px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.rental-status-step:first-child::before { left: 50%; }
.rental-status-step:last-child::before { right: 50%; }

.rental-status-step > span {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-card);
    font-size: 0.68rem;
}

.rental-status-step.is-done > span,
.rental-status-step.is-current > span {
    border-color: var(--color-primary);
    color: #fff;
    background: var(--color-primary);
}

.rental-status-step.is-current small { color: var(--color-primary); font-weight: 700; }
.rental-status-step small { font-size: 0.64rem; line-height: 1.25; }

.rental-table-wrap { overflow-x: auto; }
.rental-quote-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.72rem; }
.rental-quote-table th, .rental-quote-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; }
.rental-quote-table th { color: var(--text-muted); background: var(--bg-nested); font-weight: 600; }

.rental-action-box,
.rental-waiting {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.24);
    background: rgba(var(--color-primary-rgb), 0.055);
    color: var(--text-main);
    font-size: 0.77rem;
}

.rental-action-box p { margin: 0 0 10px; color: var(--text-muted); line-height: 1.55; }
.rental-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rental-file-label { position: relative; overflow: hidden; cursor: pointer; }
.rental-file-label input, .rental-section-upload input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.rental-waiting.is-success { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.07); color: #047857; }
.rental-muted { color: var(--text-muted); }

.rental-handoff-panel { margin-top: 12px; padding: 12px; border: 1px solid rgba(16, 185, 129, 0.28); background: rgba(16, 185, 129, 0.06); }
.rental-panel-heading { display: block; margin-bottom: 10px; color: #047857; font-size: 0.78rem; }
.rental-handoff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; }
.rental-handoff-grid > div { display: flex; justify-content: space-between; gap: 10px; font-size: 0.72rem; }
.rental-handoff-grid span { color: var(--text-muted); }
.rental-handoff-grid strong { min-width: 0; color: var(--text-main); overflow-wrap: anywhere; }
.rental-handoff-panel p { margin: 9px 0 0; color: var(--text-muted); font-size: 0.72rem; }

.rental-archive-workspace { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-color); }
.rental-archive-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rental-archive-heading strong { font-size: 0.82rem; }
.rental-archive-heading span { color: var(--text-muted); font-size: 0.68rem; }
.rental-archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rental-archive-section { min-width: 0; padding: 10px; border: 1px solid var(--border-color); background: var(--bg-nested); }
.rental-archive-section:last-child { grid-column: 1 / -1; }
.rental-archive-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rental-archive-section > header > div:first-child { display: grid; gap: 2px; }
.rental-archive-section header strong { font-size: 0.74rem; }
.rental-archive-section header small { color: var(--text-muted); font-size: 0.64rem; line-height: 1.3; }
.rental-section-upload-group { display: flex; align-items: center; gap: 5px; }
.rental-archive-month-input { width: 118px; min-height: 28px; padding: 4px 6px; font-size: 0.66rem; }
.rental-section-upload, .rental-section-owner { position: relative; flex: 0 0 auto; padding: 5px 7px; border: 1px solid var(--border-color); color: var(--color-primary); background: var(--bg-card); font-size: 0.65rem; cursor: pointer; }
.rental-section-owner { color: var(--text-muted); cursor: default; }
.rental-archive-month { display: grid; gap: 5px; margin-top: 7px; }
.rental-archive-month > strong { color: var(--text-muted); font-size: 0.65rem; }
.rental-archive-file { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 7px; border: 1px solid var(--border-color); color: var(--text-main); background: var(--bg-card); text-align: left; cursor: pointer; }
.rental-archive-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.68rem; }
.rental-archive-file small { flex: 0 0 auto; color: var(--text-muted); font-size: 0.6rem; }
.rental-empty-files { margin: 0; color: var(--text-muted); font-size: 0.66rem; }
.rental-pricing-notice { margin-top: 10px; padding: 8px 10px; border: 1px solid rgba(217, 119, 6, 0.28); background: rgba(245, 158, 11, 0.08); color: #b45309; font-size: 0.72rem; line-height: 1.45; }

.rental-admin-order { margin-bottom: 12px; }
.rental-admin-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px; border: 1px solid rgba(var(--color-primary-rgb), 0.22); background: rgba(var(--color-primary-rgb), 0.05); }
.rental-admin-action > div:first-child { display: grid; gap: 3px; }
.rental-admin-action > div:first-child strong { font-size: 0.75rem; }
.rental-admin-action > div:first-child span { color: var(--text-muted); font-size: 0.67rem; }
.rental-admin-action > div:last-child { display: flex; gap: 6px; flex-wrap: wrap; }
.rental-admin-handoff { margin-top: 12px; padding: 11px; border: 1px solid var(--border-color); background: var(--bg-nested); }
.rental-admin-handoff > strong { display: block; margin-bottom: 9px; font-size: 0.76rem; }
.rental-admin-handoff-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.rental-admin-handoff-grid .form-control { min-width: 0; font-size: 0.7rem; }
.rental-admin-handoff-note { grid-column: 1 / -1; }
.rental-admin-handoff > .btn { margin-top: 8px; }
.rental-admin-archives { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-color); }
.rental-admin-archives > strong { display: block; margin-bottom: 8px; font-size: 0.76rem; }
.rental-admin-archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rental-admin-archive-section { min-width: 0; padding: 9px; border: 1px solid var(--border-color); background: var(--bg-nested); }
.rental-admin-archive-section > header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.rental-admin-archive-section > header > strong { font-size: 0.68rem; }
.rental-admin-archive-section > header > div { display: flex; gap: 4px; align-items: center; }
.rental-admin-archive-month { width: 110px; min-height: 28px; padding: 4px 5px; font-size: 0.63rem; }
.rental-admin-archive-section .rental-section-upload { padding: 5px 6px; }

body.dark-theme .rental-waiting.is-success, body.dark-theme .rental-panel-heading { color: #6ee7b7; }

@media (max-width: 980px) {
    .rental-flow-stepper-indicators {
        flex-wrap: wrap;
        gap: 12px 0;
    }
    .rental-flow-step {
        flex: 1 1 33.333%;
    }
    .rental-archive-grid { grid-template-columns: minmax(0, 1fr); }
    .rental-archive-section:last-child { grid-column: auto; }
    .rental-admin-handoff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rental-admin-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .rental-flow-stepper-indicators {
        flex-wrap: wrap;
        gap: 12px 0;
    }
    .rental-flow-step {
        flex: 1 1 50%;
    }
    .rental-order-card { padding: 10px; }
    .rental-order-head, .rental-archive-heading, .rental-archive-section > header { align-items: stretch; flex-direction: column; }
    .rental-handoff-grid { grid-template-columns: minmax(0, 1fr); }
    .rental-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .rental-actions .btn, .rental-file-label { width: 100%; }
    .rental-section-upload-group { width: 100%; }
    .rental-archive-month-input { flex: 1; width: auto; }
    .rental-admin-action, .rental-admin-archive-section > header { align-items: stretch; flex-direction: column; }
    .rental-admin-handoff-grid, .rental-admin-archive-grid { grid-template-columns: minmax(0, 1fr); }
    .rental-admin-archive-section > header > div { width: 100%; }
    .rental-admin-archive-month { flex: 1; width: auto; }
    .individual-rental-category-row { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 700px) {
    #city-tag-orders-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .city-tag-admin-table {
        min-width: 1040px;
        table-layout: fixed;
    }

    .city-tag-admin-table th:nth-child(1),
    .city-tag-admin-table td:nth-child(1) { width: 48px; }
    .city-tag-admin-table th:nth-child(2),
    .city-tag-admin-table td:nth-child(2) { width: 170px; }
    .city-tag-admin-table th:nth-child(3),
    .city-tag-admin-table td:nth-child(3) { width: 300px; }
    .city-tag-admin-table th:nth-child(4),
    .city-tag-admin-table td:nth-child(4) { width: 285px; }
    .city-tag-admin-table th:nth-child(5),
    .city-tag-admin-table td:nth-child(5) { width: 150px; }
    .city-tag-admin-table th:nth-child(6),
    .city-tag-admin-table td:nth-child(6) { width: 120px; }
}

.admin-logistics-workflow {
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--border-color);
}

.admin-logistics-workflow-head {
    margin-bottom: 10px;
}

.admin-logistics-workflow-head span {
    display: block;
    margin-bottom: 2px;
    color: var(--color-primary);
    font-size: 0.68rem;
    font-weight: 700;
}

.admin-logistics-workflow-head h4 {
    margin: 0;
    color: var(--text-main);
    font-size: 0.9rem;
}

.admin-logistics-workflow-body {
    min-width: 0;
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Upload drop zones */
.documents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.doc-card {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
}

/* Ensure col-6 items inside form-row stretch equally */
.doc-body .form-row {
    align-items: stretch;
}

.doc-body .form-row .col-6 {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.doc-body .form-row .col-6 .form-label-row {
    min-height: 2.2em;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.doc-body .form-row .col-6 .drop-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

.doc-header h4 {
    font-weight: 700;
    font-size: 0.92rem;
}

.doc-required-tag {
    font-size: 0.68rem;
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    background: var(--bg-nested);
    transition: all 0.3s;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.04);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.upload-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.drop-zone-prompt span {
    font-size: 0.78rem;
    font-weight: 600;
}

.file-rules {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* File uploaded lists preview - Redesigned for absolute beauty */
.drop-zone.has-file {
    border-style: solid;
    border-color: var(--color-primary);
    background: rgba(0, 242, 254, 0.04);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.08);
}

.drop-zone.has-file .file-preview-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 10px;
    z-index: 2;
}

/* File Icon inside card */
.drop-zone.has-file .file-preview-panel::before {
    content: "";
    display: block;
    font-size: 1.4rem;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 2px;
}

.drop-zone.has-file .file-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0 5px;
}

.file-size-preview {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.drop-zone.has-file .btn-remove-file {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s;
    z-index: 10;
}

.drop-zone.has-file .btn-remove-file:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.hidden {
    display: none !important;
}

.eac-image-preview {
    min-height: 48px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-nested);
}

.eac-image-preview img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.eac-image-preview span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.eac-image-remove {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.eac-image-remove:hover {
    background: #ef4444;
    color: #fff;
}

#subtab-eac .form-card {
    padding: 1.8rem;
}

#subtab-eac .inquiry-form-layout {
    gap: 12px;
}

#subtab-eac .card-nested {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    #subtab-eac .eac-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 700px) {
    #subtab-eac .form-card {
        padding: 1.4rem;
    }

    #subtab-eac .inquiry-form-layout {
        gap: 10px;
    }
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label-small {
    font-size: 0.76rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.margin-top-sm { margin-top: 1rem; }
.margin-top-xs { margin-top: 0.5rem; }
.margin-top-md { margin-top: 1.5rem; }

/* Buttons & Wizard Navigation details */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.btn {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.75rem 1.6rem;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-nested);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.btn-success {
    background: var(--color-primary);
    color: var(--text-inverse);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(3px);
}

.btn-arrow-back {
    transform: rotate(0);
}

.btn-secondary:hover .btn-arrow-back {
    transform: translateX(-3px);
}

/* Invoice sheet styling step 3 */
.quote-sheet-wrapper {
    background: var(--bg-nested);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.quote-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
}

.quote-num {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

.company-names-preview {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 4px;
}

.quote-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quote-table {
    width: 100%;
    border-collapse: collapse;
}

.quote-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.quote-table td {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.88rem;
}

.text-right {
    text-align: right !important;
}

.total-row td {
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: none;
    padding-top: 1.5rem;
}

.main-total {
    font-size: 1.4rem !important;
    color: var(--color-primary);
}

.payment-upload-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.payment-instructions h4, .receipt-upload-card h4 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.payment-instructions p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.bank-details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bank-item {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
}

.bank-item strong {
    color: var(--text-main);
    margin-bottom: 2px;
}

.bank-item span {
    color: var(--text-muted);
}

.drop-zone-receipt {
    min-height: 110px;
}

/* Sidebar calculator widget details (Right) */
.quote-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 0.85rem;
}

.quote-summary-header h3 {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 700;
}

.currency-switcher {
    display: flex;
    background: var(--bg-nested);
    border-radius: 18px;
    padding: 1px;
    border: 1px solid var(--border-color);
}

.curr-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.curr-btn.active {
    background: var(--color-primary);
    color: var(--text-inverse);
}

.currency-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    background: var(--bg-nested);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.city-tag-history-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--border-color);
}

.city-tag-action-note {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.5;
}

.city-tag-action-note-success {
    color: #059669;
    font-weight: 700;
}

.bill-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bill-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    animation: elementFadeIn 0.3s ease;
}

@keyframes elementFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bill-item-name {
    color: var(--text-muted);
}

.bill-item-price {
    font-weight: 600;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.7rem 0;
}

.grand-total-display {
    text-align: center;
    background: var(--bg-nested);
    padding: 0.75rem 0.85rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.total-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.total-price-box {
    margin-top: 4px;
}

.calc-price {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-primary);
}

.calc-currency {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-left: 2px;
}

.rate-info {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.doc-checklist-preview-block h4 {
    font-weight: 700;
    font-size: 0.76rem;
    margin-bottom: 6px;
}

#logistics-quote-panel {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

#logistics-quote-panel .quote-summary-header h3 {
    font-size: 0.95rem !important;
}

#logistics-quote-panel #lcl-quote-preview > div:first-child,
#logistics-quote-panel #fcl-quote-preview > div {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

#logistics-quote-panel #lcl-auto-price {
    font-size: 1.85rem !important;
}

#logistics-quote-panel #fee-breakdown {
    line-height: 1.75 !important;
}

#logistics-quote-panel #logistics-inquiry-history {
    max-height: 260px;
}

#quickquote-result-panel {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

#quickquote-result-panel .panel-card-title {
    font-size: 0.96rem !important;
}

#quickquote-result-panel #qq-result-placeholder {
    padding: 28px 10px !important;
}

#quickquote-result-panel #qq-result-placeholder p {
    font-size: 0.82rem !important;
}

#quickquote-result-panel #qq-result-summary {
    padding: 10px !important;
    margin-bottom: 10px !important;
    font-size: 0.8rem !important;
}

#quickquote-result-panel #qq-result-pallets {
    padding: 9px !important;
    margin-bottom: 10px !important;
    font-size: 0.82rem !important;
}

#quickquote-result-panel table {
    font-size: 0.78rem !important;
}

#quickquote-result-panel th,
#quickquote-result-panel td {
    padding: 4px 6px !important;
}

#quickquote-result-panel tfoot td {
    font-size: 0.92rem !important;
    padding: 8px 6px !important;
}

#quickquote-result-panel #qq-sunday-warning {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
}

#subtab-city-tag .quote-summary-card {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

#subtab-city-tag .quote-summary-card .panel-card-title {
    font-size: 0.95rem;
}

#subtab-city-tag #city-tag-quote-placeholder {
    padding: 32px 12px !important;
}

#subtab-city-tag #city-tag-quote-result > div:first-child {
    padding: 12px !important;
}

#subtab-city-tag #city-tag-quote-total {
    font-size: 1.65rem !important;
    line-height: 1.05;
}

#subtab-city-tag #city-tag-quote-result > div:last-child {
    gap: 6px !important;
    font-size: 0.82rem !important;
}

#individual-rental-summary-card {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

#individual-rental-summary-card .panel-card-title {
    font-size: 0.95rem;
}

#individual-rental-summary-card > div:first-of-type {
    padding: 12px !important;
    margin: 12px 0 !important;
}

#individual-rental-summary-total {
    font-size: 1.45rem !important;
}

#individual-rental-summary-lines {
    gap: 6px !important;
    font-size: 0.78rem !important;
}

#subtab-accounting .quote-summary-card {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

#subtab-accounting .quote-summary-card .panel-card-title {
    font-size: 0.95rem;
}

#accounting-account-info {
    padding: 10px !important;
    margin-top: 10px !important;
}

#btn-download-accounting-contract {
    margin-top: 10px !important;
}

#accounting-workflow-note {
    margin-top: 10px !important;
    padding: 10px !important;
    font-size: 0.76rem !important;
}

.mini-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.mini-checklist-item.filled {
    color: var(--text-main);
}

.check-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mini-checklist-item.filled .check-dot {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.check-dot svg {
    width: 8px;
    height: 8px;
    color: var(--text-inverse);
    opacity: 0;
}

.mini-checklist-item.filled .check-dot svg {
    opacity: 1;
}

/* Tracking History Table style */
.orders-table-card {
    padding: 1.8rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.table-header h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
    border-radius: 12px;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.dashboard-table th {
    background: var(--bg-nested);
    padding: 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
    vertical-align: middle;
}

.city-tag-admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    table-layout: fixed;
}

.city-tag-admin-table th {
    padding: 0 12px 4px;
    color: var(--text-main);
    font-weight: 700;
    text-align: left;
    vertical-align: middle;
}

.city-tag-admin-table th.city-tag-select-cell {
    width: 48px;
}

.city-tag-admin-table td {
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 12px;
    vertical-align: middle;
}

.city-tag-admin-table td:first-child {
    border-left: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
}

.city-tag-admin-table td:last-child {
    border-right: 1px solid var(--border-color);
    border-radius: 0 8px 8px 0;
}

.city-tag-admin-table .city-tag-select-cell {
    text-align: center;
    vertical-align: middle;
}

.city-tag-admin-table .city-tag-select-cell input {
    display: block;
    margin: 0 auto;
}

.ct-matrix-wrap {
    overflow-x: hidden;
    max-width: 100%;
    margin-bottom: 8px;
    padding-bottom: 2px;
}

.ct-matrix-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.ct-matrix-table th,
.ct-matrix-table td {
    border: 1px solid var(--border-color);
    vertical-align: middle;
}

.ct-matrix-color-cell {
    width: 96px;
    min-width: 0;
}

.ct-matrix-size-head,
.ct-matrix-size-cell,
.ct-matrix-footer-cell {
    width: auto;
    min-width: 0;
}

.ct-matrix-total-cell,
.ct-matrix-total-head {
    width: 56px;
    min-width: 0;
    white-space: nowrap;
}

.ct-matrix-table .form-control {
    width: 100%;
    box-sizing: border-box;
    height: 26px;
    font-size: 0.74rem;
    padding: 2px 4px;
    min-width: 0;
}

.dashboard-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem !important;
    font-style: italic;
}

/* Workflow state status pills */
.status-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}

.status-submitted { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid var(--border-color); }
.status-receipt-uploaded { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.status-payment-approved { background: rgba(59, 130, 246, 0.15); color: #2563eb; border: 1px dashed #2563eb; }
.status-waiting-client-notary { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); border: 1px dashed var(--color-warning); }
.status-client-dispatched { background: rgba(167, 139, 250, 0.15); color: var(--color-purple); border: 1px solid var(--color-purple); }
.status-confirmed { background: rgba(167, 139, 250, 0.15); color: var(--color-purple); }
.status-notary-done { background: rgba(37, 99, 235, 0.15); color: #2563eb; }
.status-reg-email-sent { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
.status-email-forwarded { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
.status-email-confirmed { background: rgba(5, 150, 105, 0.15); color: #059669; }
.status-registering { background: rgba(0, 242, 254, 0.15); color: var(--color-primary); }
.status-registration-files-uploaded { background: rgba(5, 150, 105, 0.15); color: #059669; border: 1px solid rgba(5, 150, 105, 0.35); }
.status-completed { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.btn-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.btn-doc-link:hover {
    text-decoration: underline;
}

.btn-link-action {
    background: transparent;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
}

.btn-link-action:hover {
    text-decoration: underline;
}

/* Inspection Overlay Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.modal-card {
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--text-main);
}

/* --- Receipt Upload Modal (modal-box) --- */
.modal-box {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.08);
    width: 92%;
    max-width: 480px;
    overflow: hidden;
    animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-box .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), #00b4d8);
    color: white;
    border-bottom: none;
    margin-bottom: 0;
}

.modal-box .modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.modal-box .modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.modal-box .modal-close:hover {
    background: rgba(255,255,255,0.35);
    transform: rotate(90deg);
}

.modal-box .modal-body {
    padding: 1.5rem;
}

.modal-box .drop-zone {
    border: 2px dashed var(--color-primary);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79,172,254,0.04), rgba(0,242,254,0.04));
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-box .drop-zone:hover {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(79,172,254,0.08), rgba(0,242,254,0.08));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.12);
}

.modal-box .drop-zone .upload-icon {
    width: 36px;
    height: 36px;
    color: var(--color-primary);
    margin-bottom: 8px;
    opacity: 0.7;
}

.modal-box .drop-zone .file-rules {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.modal-box #receipt-modal-submit {
    background: linear-gradient(135deg, var(--color-primary), #00b4d8);
    border: none;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.3px;
}

.modal-box #receipt-modal-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.35);
}

.modal-box #receipt-modal-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h4 {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--color-primary);
}

/* Toast alerts overlay */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 10050;
    font-size: 0.88rem;
    font-weight: 600;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .dashboard-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .col-full {
        grid-column: span 1;
    }
}

@media (max-width: 950px) {
    .sidebar {
        width: 70px;
        padding: 1.5rem 0.5rem;
        align-items: center;
    }
    .brand-text, .settings-label, .switch, .lang-row, .user-info, .user-arrow {
        display: none !important;
    }
    .sidebar-brand {
        justify-content: center;
        width: 100%;
        padding-bottom: 1rem;
    }
    .sidebar-menu,
    .menu-group,
    .sub-menu {
        width: 100%;
        align-items: center;
    }
    .menu-item span {
        display: none !important;
    }
    .menu-item {
        justify-content: center;
        padding: 12px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }
    .sub-menu {
        padding-left: 0;
    }
    .sub-menu-item {
        justify-content: center;
        width: 44px;
        height: 36px;
        padding: 8px 0;
    }
    .sub-menu-item span:not(:first-child) {
        display: none !important;
    }
    .menu-item > .menu-pending-badge,
    .sub-menu-item > .menu-pending-badge {
        display: inline-flex !important;
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        font-size: 0.6rem;
        margin-left: 0;
        z-index: 2;
    }
    .content-wrapper {
        margin-left: 70px;
    }
    .grid-layout {
        grid-template-columns: 1fr;
    }
    .quote-summary-card {
        position: static;
        justify-self: stretch;
        width: 100%;
    }

    #subtab-city-tag > .grid-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #subtab-city-tag .quote-summary-card,
    #subtab-city-tag .form-card {
        min-width: 0 !important;
        width: 100%;
    }

    #subtab-accounting > .grid-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #subtab-accounting > .grid-layout > .form-card,
    #subtab-accounting > .grid-layout > .quote-summary-card {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .dashboard-kpi-row {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    .col-6 {
        width: 100%;
    }
    .documents-grid {
        grid-template-columns: 1fr;
    }
    .payment-upload-panel {
        grid-template-columns: 1fr;
    }
}

/* Document label rows & view example links */
.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2px;
}

.example-link {
    font-size: 0.72rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
}

.example-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ==========================================================================
   Progress Tracking Panel & Stepper CSS (WMS Dark Cyan Aesthetics)
   ========================================================================== */
.tracking-container {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
}

.tracking-search-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.tracking-search-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
}

.search-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.search-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.search-form-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s;
}

.tracking-input {
    padding-left: 42px !important;
    font-family: monospace;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.tracking-input:focus + .search-field-icon {
    color: var(--color-primary);
}

.tracking-results-wrapper {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tracking-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
    gap: 1.15rem;
}

.tracking-flow-card {
    padding: 1.05rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tracking-flow-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.tracking-flow-eyebrow {
    margin: 0 0 3px;
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tracking-flow-title {
    margin: 0;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.35;
    font-weight: 750;
}

.tracking-flow-note {
    flex: 0 0 auto;
    max-width: 220px;
    padding-top: 3px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: right;
}

.logistics-flow-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-card);
    scrollbar-width: thin;
}

.logistics-flow-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-main);
    font-size: 0.76rem;
    line-height: 1.45;
    table-layout: fixed;
}

.logistics-flow-table th,
.logistics-flow-table td {
    padding: 8px 9px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.logistics-flow-table th:last-child,
.logistics-flow-table td:last-child {
    border-right: 0;
}

.logistics-flow-table tbody tr:last-child td {
    border-bottom: 0;
}

.logistics-flow-table th {
    height: 36px;
    background: var(--bg-nested);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.logistics-flow-table th:nth-child(1) { width: 12%; }
.logistics-flow-table th:nth-child(2) { width: 18%; }
.logistics-flow-table th:nth-child(3) { width: 38%; }
.logistics-flow-table th:nth-child(4) { width: 20%; }
.logistics-flow-table th:nth-child(5) { width: 12%; }

.logistics-flow-table .flow-owner,
.logistics-flow-table .flow-stage {
    background: var(--bg-nested);
    color: var(--text-main);
    font-weight: 700;
}

.logistics-flow-table .flow-owner {
    color: var(--color-primary);
    white-space: nowrap;
}

.logistics-flow-table .flow-action {
    color: var(--text-muted);
}

.logistics-flow-table tr.is-substage td {
    background: rgba(var(--color-primary-rgb), 0.045);
}

.logistics-flow-table .flow-task-substage {
    color: var(--text-main);
    font-weight: 750;
}

.logistics-flow-table .flow-status {
    vertical-align: middle;
}

.logistics-flow-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 92px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
}

.logistics-flow-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #94a3b8;
}

.logistics-flow-status.is-done { color: #059669; }
.logistics-flow-status.is-done .logistics-flow-status-dot { background: #059669; }
.logistics-flow-status.is-current { color: #d97706; }
.logistics-flow-status.is-current .logistics-flow-status-dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.13); }
.logistics-flow-status.is-closed { color: #dc2626; }
.logistics-flow-status.is-closed .logistics-flow-status-dot { background: #ef4444; }

.logistics-flow-empty {
    padding: 24px !important;
    color: var(--text-muted);
    text-align: center !important;
}

@media (max-width: 760px) {
    .tracking-flow-card {
        padding: 12px;
    }

    .tracking-flow-card-head {
        flex-direction: column;
        gap: 5px;
    }

    .tracking-flow-note {
        max-width: none;
        padding-top: 0;
        text-align: left;
    }

    .logistics-flow-table {
        min-width: 760px;
    }
}

.tracking-meta-card {
    padding: 1.2rem 1.3rem;
}

.meta-section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.meta-section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 28px;
    height: 2px;
    background-color: var(--color-primary);
}

.meta-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.meta-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.meta-value {
    font-size: 0.86rem;
    color: var(--text-main);
    word-break: break-all;
}

.meta-value-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.price-highlight {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Vertical Stepper CSS */
.stepper-vertical {
    display: flex;
    flex-direction: column;
    position: relative;
}

.stepper-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
    padding-bottom: 2rem;
}

.stepper-item:last-child {
    padding-bottom: 0;
}

.stepper-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-nested);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
    transition: all 0.4s ease;
}

.stepper-line {
    width: 2px;
    position: absolute;
    top: 32px;
    bottom: 0;
    background-color: var(--border-color);
    z-index: 1;
    transition: background-color 0.4s ease;
}

.stepper-item:last-child .stepper-line {
    display: none;
}

.stepper-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 3px;
}

.stepper-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.4s ease;
}

.stepper-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    transition: color 0.4s ease;
}

/* Stepper States styling */

/* 1. Active State */
.stepper-item.active .stepper-circle {
    background-color: var(--bg-app);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
    animation: activeGlowPulse 2s infinite alternate;
}

.stepper-item.active .stepper-title {
    color: var(--color-primary);
    font-weight: 700;
}

.stepper-item.active .stepper-desc {
    color: var(--text-main);
}

/* 2. Completed State */
.stepper-item.completed .stepper-circle {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-inverse);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

.stepper-item.completed .stepper-line {
    background-color: var(--color-primary);
}

.stepper-item.completed .stepper-title {
    color: var(--text-main);
    font-weight: 600;
}

.stepper-item.completed .stepper-desc {
    color: var(--text-muted);
}

/* 3. Completed Success State (Final Step Completed) */
.stepper-item.completed-success .stepper-circle {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    border-color: var(--color-primary);
    color: var(--text-inverse);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.6);
    animation: successPulse 2s infinite alternate;
}

.stepper-item.completed-success .stepper-title {
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.15rem;
}

.stepper-item.completed-success .stepper-desc {
    color: var(--text-main);
    font-weight: 500;
}

@keyframes activeGlowPulse {
    0% {
        box-shadow: 0 0 8px rgba(0, 242, 254, 0.3), inset 0 0 4px rgba(0, 242, 254, 0.1);
    }
    100% {
        box-shadow: 0 0 16px rgba(0, 242, 254, 0.7), inset 0 0 8px rgba(0, 242, 254, 0.3);
    }
}

@keyframes successPulse {
    0% {
        box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 24px rgba(0, 242, 254, 0.8);
        transform: scale(1.05);
    }
}

/* Responsive adjustments for Tracking Grid */
@media (max-width: 1024px) {
    .tracking-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Settings Sub-Tabs Styling --- */
.settings-tab-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.settings-tab-btn:hover {
    color: var(--text-main);
}

.settings-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.settings-sub-panel {
    transition: opacity 0.25s ease-in-out;
}

.settings-sub-panel.hidden {
    display: none !important;
}

.settings-project-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -0.3rem 0 1.4rem;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-nested);
}

.settings-project-tab {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.settings-project-tab:hover {
    color: var(--text-main);
    border-color: rgba(59, 130, 246, 0.45);
}

.settings-project-tab.active {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

/* --- Branding Settings Styling --- */
#branding-dropzone:hover {
    border-color: var(--color-primary) !important;
    background: rgba(0, 242, 254, 0.05) !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

/* --- RBAC Users Settings Styling --- */
.data-table th, .data-table td {
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge-success {
    background: rgba(0, 230, 115, 0.1) !important;
    color: #00e673 !important;
    border: 1px solid rgba(0, 230, 115, 0.2) !important;
    box-shadow: 0 0 10px rgba(0, 230, 115, 0.1);
}

.badge-danger {
    background: rgba(255, 75, 75, 0.1) !important;
    color: #ff4b4b !important;
    border: 1px solid rgba(255, 75, 75, 0.2) !important;
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.1);
}

/* --- Authentication Overlay & Popover --- */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-app);
    backdrop-filter: none;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.auth-overlay.hidden {
    display: none !important;
}

.auth-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
}

.auth-tab-btn.active {
    background: var(--color-primary) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.auth-form.hidden {
    display: none !important;
}

/* User Profile Dropdown Menu */
.profile-dropdown {
    position: absolute;
    bottom: 60px;
    left: 10px;
    right: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 6px;
    backdrop-filter: blur(15px);
    display: block;
}

.profile-dropdown.hidden {
    display: none !important;
}

.profile-settings {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.profile-section {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.profile-section-title {
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.profile-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.35;
    padding: 3px 0;
}

.profile-info-row strong {
    color: var(--text-main);
    font-size: 0.78rem;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.profile-settings-note {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.4;
}

.profile-settings label {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    margin: 8px 0 6px;
}

.profile-settings label:first-child {
    margin-top: 0;
}

.profile-settings-input {
    width: 100%;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-nested);
    color: var(--text-main);
    padding: 5px 8px;
    font-size: 0.8rem;
    outline: none;
}

.profile-settings-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.12);
}

.profile-settings-save {
    width: 100%;
    margin-top: 8px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 800;
    font-size: 0.8rem;
}

.profile-settings-save:hover {
    background: rgba(var(--color-primary-rgb), 0.18);
}

.profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: #ff4b4b;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.profile-dropdown .dropdown-item-settings {
    color: var(--text-main);
}

.profile-dropdown .dropdown-item-settings:hover {
    background: rgba(var(--color-primary-rgb), 0.12) !important;
    color: var(--color-primary);
    box-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.12);
}

.profile-dropdown .dropdown-item:not(.dropdown-item-settings):hover {
    background: rgba(255, 75, 75, 0.1) !important;
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.15);
}

.account-settings-layout {
    width: min(980px, 100%);
    margin: 0 auto;
}

.account-settings-card {
    padding: 28px;
}

.account-settings-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.account-summary-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-nested);
    margin-bottom: 18px;
}

.account-summary-avatar {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #080b11;
    font-size: 1rem;
}

.account-summary-main {
    min-width: 0;
    flex: 1;
}

.account-info-row {
    justify-content: flex-start;
    gap: 18px;
    font-size: 0.86rem;
}

.account-info-row span {
    min-width: 78px;
}

.account-info-row strong {
    max-width: none;
    font-size: 0.9rem;
    text-align: left;
}

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

.account-settings-block {
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.account-settings-block .form-control {
    margin-bottom: 10px;
}

.account-settings-save {
    width: 100%;
    margin-top: 10px;
}

.wechat-binding-code-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed var(--accent-color, #4facfe);
    border-radius: 8px;
    background: rgba(79, 172, 254, 0.08);
    text-align: center;
}

.wechat-binding-code {
    display: block;
    margin: 8px 0 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.3rem;
    letter-spacing: 0.08em;
}

@media (max-width: 820px) {
    .account-settings-head,
    .account-summary-panel {
        flex-direction: column;
    }

    .account-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Service Tooltip (Red Exclamation Icon) --- */
.service-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    cursor: pointer;
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.service-tooltip-trigger:hover {
    transform: scale(1.15);
}

.service-tooltip-trigger svg {
    display: block;
    filter: drop-shadow(0 0 4px rgba(255, 75, 75, 0.4));
    transition: filter 0.2s ease;
}

.service-tooltip-trigger:hover svg {
    filter: drop-shadow(0 0 8px rgba(255, 75, 75, 0.7));
}

/* Fixed-position tooltip managed by JS */
.service-tooltip-popup {
    position: fixed;
    background: rgba(20, 24, 40, 0.96);
    color: #f0f0f0;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 75, 75, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 0 15px rgba(255, 75, 75, 0.12);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
}

.service-tooltip-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Light theme adjustments */
body:not(.dark-theme) .service-tooltip-popup {
    background: rgba(255, 255, 255, 0.97);
    color: #1a1a2e;
    border: 1px solid rgba(255, 75, 75, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 0 12px rgba(255, 75, 75, 0.08);
}

/* Pulse animation for in-progress status dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* --- In-Progress Orders Table --- */
.inprogress-table-wrapper {
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.inprogress-header {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.6rem;
}

.inprogress-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.inprogress-table thead th {
    background: var(--bg-nested);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}

.inprogress-table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
}

.inprogress-table tbody tr:hover {
    background: rgba(0, 242, 254, 0.04);
}

.inprogress-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-color);
}

.inprogress-table tbody td {
    padding: 10px 14px;
    color: var(--text-main);
    vertical-align: middle;
}

.inprogress-table .td-id {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

.inprogress-table .td-company {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inprogress-table .td-date {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.inprogress-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.inprogress-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

/* Progress query tabs */
.progress-tabs-shell {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    overflow: hidden;
}

.progress-tabs {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-nested);
    overflow-x: auto;
    scrollbar-width: thin;
}

.progress-tab-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}

.progress-tab-btn:hover,
.progress-tab-btn:focus-visible {
    border-color: rgba(var(--color-primary-rgb), 0.18);
    background: rgba(var(--color-primary-rgb), 0.05);
    color: var(--color-primary);
    outline: none;
}

.progress-tab-btn.active {
    border-color: rgba(var(--color-primary-rgb), 0.24);
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.08);
}

.progress-tab-count {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.progress-tab-btn.active .progress-tab-count {
    background: var(--color-primary);
    color: #fff;
}

.progress-tab-panels {
    padding: 10px 12px 12px;
}

.progress-tab-panel {
    min-width: 0;
}

.progress-tab-panel .progress-section {
    margin-top: 0;
}

/* Shared progress record cards */
.progress-section {
    max-width: 100%;
    margin-top: 1.2rem;
}

.progress-section + .progress-section {
    margin-top: 1.35rem;
}

.warehouse-legacy-progress {
    margin-top: 14px;
}

.warehouse-legacy-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-nested);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    list-style: none;
}

.warehouse-legacy-summary::-webkit-details-marker {
    display: none;
}

.warehouse-legacy-summary::after {
    content: '+';
    color: var(--color-primary);
    font-size: 1rem;
    line-height: 1;
}

.warehouse-legacy-progress[open] .warehouse-legacy-summary::after {
    content: '-';
}

.warehouse-legacy-count {
    min-width: 22px;
    padding: 2px 6px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.2);
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.08);
    color: var(--color-primary);
    font-size: 0.68rem;
    line-height: 1.2;
    text-align: center;
}

.warehouse-legacy-progress > .progress-record-table-shell {
    margin-top: 8px;
}

.progress-section-header {
    display: flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 0.55rem;
}

.progress-record-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 520px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.progress-record-table-shell {
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
}

.progress-record-table-head,
.progress-record-row {
    display: grid;
    grid-template-columns: 26px minmax(148px, 1.08fr) minmax(205px, 1.55fr) minmax(116px, 0.82fr) minmax(145px, 1fr) minmax(122px, 0.9fr) minmax(70px, auto);
    gap: 12px;
    align-items: center;
}

.progress-record-table-head {
    min-width: 0;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-nested);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.progress-record-table-head span,
.progress-record-cell {
    min-width: 0;
}

.progress-record-card,
.accounting-order-card,
.rental-order-card {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 0.8rem;
    line-height: 1.35;
    box-shadow: none;
}

.progress-record-card {
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.progress-order-card {
    position: relative;
}

.progress-record-card + .progress-record-card,
.accounting-order-card + .accounting-order-card,
.rental-order-card + .rental-order-card {
    border-top: 1px solid var(--border-color);
}

.progress-record-row {
    min-height: 62px;
    padding: 10px 14px;
    transition: background 0.18s ease;
}

.progress-record-row--interactive {
    cursor: pointer;
}

.progress-record-card:hover .progress-record-row,
.progress-record-card:focus-visible .progress-record-row,
.progress-order-card:not(.is-collapsed):hover .progress-record-row,
.progress-order-card.is-collapsed:hover .progress-record-row {
    background: rgba(var(--color-primary-rgb), 0.035);
}

.progress-record-row:focus-visible {
    outline: 2px solid rgba(var(--color-primary-rgb), 0.32);
    outline-offset: -2px;
}

.progress-record-cell {
    overflow-wrap: anywhere;
}

.progress-record-cell--id {
    color: var(--color-primary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    font-weight: 700;
}

.progress-record-cell--summary {
    display: grid;
    gap: 3px;
}

.progress-record-cell--summary strong {
    min-width: 0;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.progress-record-cell--summary span,
.progress-record-cell--date {
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#city-tag-progress-container .progress-record-cell--summary span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-record-cell--value {
    color: #059669;
    font-size: 0.78rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.progress-record-cell--action {
    display: flex;
    justify-content: flex-end;
}

.progress-record-cell--action .progress-order-card-toggle {
    min-width: 54px;
}

.progress-record-open {
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.22);
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.07);
    color: var(--color-primary);
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.progress-record-open:hover,
.progress-record-open:focus-visible {
    border-color: rgba(var(--color-primary-rgb), 0.42);
    background: rgba(var(--color-primary-rgb), 0.12);
    outline: none;
}

.progress-order-card-head {
    min-width: 0;
    border-radius: 0;
    cursor: pointer;
}

.progress-order-card-head:focus-visible {
    outline: 2px solid rgba(var(--color-primary-rgb), 0.32);
    outline-offset: 3px;
}

.progress-order-card-toggle {
    flex: 0 0 auto;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.22);
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.07);
    color: var(--color-primary);
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.progress-order-card-toggle:hover,
.progress-order-card-toggle:focus-visible {
    border-color: rgba(var(--color-primary-rgb), 0.42);
    background: rgba(var(--color-primary-rgb), 0.12);
    outline: none;
}

.progress-order-card-body {
    min-width: 0;
    margin: 0;
    padding: 0 14px 12px;
    border-top: 1px solid rgba(var(--color-primary-rgb), 0.1);
    background: rgba(var(--color-primary-rgb), 0.018);
}

.progress-order-card.is-collapsed .progress-order-card-body {
    display: none;
}

.progress-order-card.is-collapsed:hover {
    box-shadow: none;
}

.progress-record-card--clickable {
    cursor: pointer;
}

.progress-record-card--clickable:hover,
.progress-record-card--clickable:focus-visible {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    outline: none;
}

.eac-progress-record {
    cursor: pointer;
}

.eac-progress-card .stepper-item {
    padding-bottom: 1.45rem;
}

.eac-detail-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eac-detail-action-note {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.eac-detail-action-note--success {
    color: #059669;
    font-weight: 600;
}

.eac-detail-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.eac-workflow-inline-actions {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.16);
    border-radius: 10px;
    background: rgba(var(--color-primary-rgb), 0.04);
}

.eac-workflow-inline-actions .eac-detail-action-note {
    color: var(--text-main);
}

.eac-workflow-inline-actions .eac-detail-action-row {
    margin-top: 8px;
}

.eac-workflow-root {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eac-workflow-current {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-nested);
    font-size: 0.8rem;
    line-height: 1.5;
}

.eac-workflow-current span,
.eac-workflow-current small {
    color: var(--text-muted);
}

.eac-workflow-current strong {
    font-size: 0.92rem;
}

.eac-workflow-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.eac-workflow-tab {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-nested);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.eac-workflow-tab.active {
    border-color: rgba(var(--color-primary-rgb), 0.32);
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
}

.eac-workflow-tab.completed {
    border-color: rgba(16, 185, 129, 0.22);
}

.eac-workflow-tab.current {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.eac-workflow-tab-summary {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.progress-workflow-tabs-root,
.progress-card-flow {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.progress-workflow-tabs-root {
    margin-bottom: 14px;
}

.progress-workflow-current {
    margin-bottom: 0;
}

.workflow-flow-tabs,
.progress-card-flow-tabs {
    margin-top: 8px;
}

.workflow-flow-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
}

.workflow-flow-node {
    display: flex;
    align-items: center;
    flex: 1 0 0;
    min-width: 128px;
}

.workflow-flow-node .workflow-flow-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-nested);
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}

.workflow-flow-node .workflow-flow-tab:disabled {
    cursor: not-allowed;
}

.workflow-flow-node-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.workflow-flow-node-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    overflow-wrap: anywhere;
}

.workflow-flow-node-copy strong {
    color: inherit;
    font-size: 0.76rem;
    line-height: 1.25;
}

.workflow-flow-node-copy small {
    color: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
}

.workflow-flow-node .workflow-flow-tab.completed {
    border-color: rgba(5, 150, 105, 0.34);
    background: rgba(5, 150, 105, 0.08);
    color: #047857;
}

.workflow-flow-node .workflow-flow-tab.completed .workflow-flow-node-index {
    background: #059669;
    color: #fff;
}

.workflow-flow-node .workflow-flow-tab.current,
.workflow-flow-node .workflow-flow-tab.active.current {
    border-color: rgba(var(--color-primary-rgb), 0.5);
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    box-shadow: 0 3px 10px rgba(var(--color-primary-rgb), 0.12);
}

.workflow-flow-node .workflow-flow-tab.current .workflow-flow-node-index,
.workflow-flow-node .workflow-flow-tab.active.current .workflow-flow-node-index {
    background: var(--color-primary);
    color: #fff;
}

.workflow-flow-node .workflow-flow-tab.locked {
    border-color: var(--border-color);
    background: var(--bg-main);
    color: #94a3b8;
    opacity: 0.82;
}

.workflow-flow-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    flex: 0 0 28px;
    color: #94a3b8;
    font-size: 1.05rem;
    font-weight: 800;
}

.workflow-flow-arrow.is-completed { color: #059669; }
.workflow-flow-arrow.is-current { color: var(--color-primary); }

.workflow-flow-summary,
.progress-card-flow-summary {
    margin-bottom: 8px;
}

.logistics-detail-grid.is-workflow-only {
    grid-template-columns: minmax(0, 1fr);
}

#logistics-detail-panel .tracking-meta-card.is-cooperation-confirmed {
    display: none;
}

.progress-card-flow {
    margin-top: 10px;
}

@media (max-width: 760px) {
    .workflow-flow-node {
        flex: 0 0 146px;
    }

    .workflow-flow-arrow {
        width: 22px;
        flex-basis: 22px;
    }
}

.progress-card-flow-body,
.progress-card-flow-section {
    min-width: 0;
}

.progress-card-flow-panel {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--card-bg);
}

.progress-card-flow-panel .progress-record-strip,
.progress-card-flow-panel .progress-record-action-box {
    margin-top: 0;
}

.progress-card-flow-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.progress-card-flow-metric:last-child {
    border-bottom: 0;
}

.progress-card-flow-metric span {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.progress-card-flow-metric strong {
    min-width: 0;
    color: var(--text-main);
    font-size: 0.8rem;
    text-align: right;
    overflow-wrap: anywhere;
}

.rental-status-track-tabbed {
    margin: 6px 0 2px;
}

.admin-eac-workflow-tabs {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-nested);
}

.admin-eac-workflow-tabs .eac-workflow-tab {
    background: var(--card-bg);
}

.eac-workflow-step-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.eac-workflow-step-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.eac-workflow-step-tags span {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.08);
    color: var(--color-primary);
    font-size: 0.68rem;
    font-weight: 700;
}

.eac-workflow-step-tags .eac-owner-client {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.eac-workflow-step-tags .eac-owner-service {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.eac-workflow-step-tags .eac-owner-coord {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.eac-workflow-step-tags .eac-owner-system {
    background: rgba(100, 116, 139, 0.14);
    color: #64748b;
}

.eac-workflow-step-tags .eac-state-completed,
.eac-workflow-step-tags .eac-state-completed-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.eac-workflow-step-tags .eac-state-active {
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
}

.eac-workflow-step-tags .eac-state-waiting {
    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
}

.eac-workflow-step-tags .eac-state-skipped,
.eac-workflow-step-tags .eac-state-closed {
    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
}

.eac-workflow-step.completed .stepper-circle,
.eac-workflow-step.completed-success .stepper-circle {
    background: #10b981;
    color: #fff;
}

.eac-workflow-step.active .stepper-circle {
    background: var(--color-primary);
    color: #fff;
}

.eac-workflow-step.skipped {
    opacity: 0.55;
}

.eac-workflow-step.skipped .stepper-circle {
    background: #94a3b8;
    color: #fff;
}

.eac-workflow-evidence {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.eac-workflow-admin-controls {
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.eac-workflow-admin-controls textarea {
    min-height: 64px;
    resize: vertical;
}

.progress-record-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.progress-record-main.progress-record-row {
    justify-content: initial;
}

.progress-record-title-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
}

.progress-record-id {
    color: var(--color-primary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.progress-record-type {
    min-width: 0;
    color: var(--text-main);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.progress-record-status {
    flex: 0 0 auto;
}

.progress-record-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.progress-record-meta-grid > div {
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.08);
    border-radius: 6px;
    background: var(--card-bg);
}

.progress-record-meta-grid span {
    display: block;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
}

.progress-record-meta-grid strong {
    display: block;
    min-width: 0;
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.progress-record-price,
.progress-record-price span {
    color: #059669 !important;
}

.progress-record-product-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin-top: 8px;
}

.progress-record-thumb {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--card-bg);
}

.progress-record-product-copy {
    min-width: 0;
}

.progress-record-product-copy strong,
.progress-record-product-copy span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.progress-record-product-copy strong {
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 700;
}

.progress-record-product-copy span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.progress-record-reply {
    background: rgba(59, 130, 246, 0.055);
}

.progress-record-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 8px;
    padding: 7px 9px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.1);
    border-radius: 6px;
    background: rgba(var(--color-primary-rgb), 0.045);
    color: var(--text-muted);
    font-size: 0.75rem;
}

.progress-record-strip strong {
    color: var(--text-main);
}

.progress-record-action-box,
.progress-record-notice {
    margin-top: 8px;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.progress-record-action-box {
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(37, 99, 235, 0.04);
}

.progress-record-notice--success {
    border: 1px solid rgba(5, 150, 105, 0.16);
    background: rgba(5, 150, 105, 0.06);
    color: #059669;
}

.progress-record-actions {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.progress-record-actions .btn {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 0.72rem;
    white-space: nowrap;
}

.progress-record-actions .form-control {
    min-width: 0;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 0.72rem;
}

.progress-record-action-hint {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.progress-record-empty {
    margin: 0;
    padding: 18px 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}

/* Accounting workflow */
.accounting-live-quote { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; padding: 12px 14px; border: 1px solid rgba(5, 150, 105, 0.22); border-radius: 6px; background: rgba(5, 150, 105, 0.06); }
.accounting-live-quote span { color: var(--text-muted); font-size: 0.76rem; font-weight: 600; }
.accounting-live-quote strong { color: #047857; font-size: 1rem; font-variant-numeric: tabular-nums; }
.accounting-live-quote small { grid-column: 1 / -1; color: var(--text-muted); font-size: 0.68rem; }
.accounting-orders-shell { margin-top: 16px; padding: 16px; }
.accounting-order-list { display: grid; gap: 12px; margin-top: 12px; }
.accounting-order-list.progress-record-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
}
.accounting-order-card { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.accounting-order-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.accounting-order-head > div { display: grid; gap: 3px; min-width: 0; }
.accounting-order-head > div > strong { color: var(--color-primary); font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.82rem; }
.accounting-order-head > div > span { color: var(--text-muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.accounting-status { flex: 0 0 auto; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--accounting-status) 32%, transparent); border-radius: 4px; background: color-mix(in srgb, var(--accounting-status) 9%, transparent); color: var(--accounting-status); font-size: 0.68rem; font-weight: 700; }
.accounting-quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.accounting-quote-grid > div { min-width: 0; padding: 8px 9px; border: 1px solid var(--border-color); background: var(--bg-nested); }
.accounting-quote-grid span, .accounting-contract-row span { display: block; margin-bottom: 3px; color: var(--text-muted); font-size: 0.66rem; }
.accounting-quote-grid strong { display: block; font-size: 0.79rem; overflow-wrap: anywhere; }
.accounting-quote-grid .is-total strong { color: #047857; }
.accounting-contract-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.accounting-contract-row > div { min-width: 0; padding: 7px 9px; border-left: 2px solid var(--border-color); background: var(--bg-nested); }
.accounting-file-name { display: block; color: var(--text-main); font-size: 0.71rem; overflow-wrap: anywhere; }
.accounting-empty-inline { margin: 0; color: var(--text-muted); font-size: 0.7rem; }
.accounting-order-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.accounting-order-actions .btn { min-height: 30px; padding: 5px 9px; font-size: 0.7rem; }
.accounting-next-step, .accounting-decline-note { margin-top: 10px; padding: 8px 10px; border: 1px solid rgba(245, 158, 11, 0.2); background: rgba(245, 158, 11, 0.06); color: #b45309; font-size: 0.72rem; }
.accounting-decline-note { border-color: rgba(220, 38, 38, 0.2); background: rgba(220, 38, 38, 0.05); color: #b91c1c; }
.accounting-workbench { margin-top: 13px; border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; }
.accounting-workbench-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 11px 12px; border-bottom: 1px solid var(--border-color); background: var(--bg-nested); }
.accounting-workbench-head > div { display: grid; gap: 3px; }
.accounting-workbench-head strong { font-size: 0.79rem; }
.accounting-workbench-head span { color: var(--text-muted); font-size: 0.68rem; }
.accounting-active-chip { flex: 0 0 auto; padding: 3px 7px; border: 1px solid rgba(5, 150, 105, 0.2); background: rgba(5, 150, 105, 0.08); color: #047857 !important; font-weight: 700; }
.accounting-work-section { padding: 11px 12px; border-bottom: 1px solid var(--border-color); }
.accounting-work-section:last-child { border-bottom: 0; }
.accounting-work-section > header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.accounting-work-section > header strong { font-size: 0.74rem; }
.accounting-work-section > header span { color: var(--text-muted); font-size: 0.68rem; }
.accounting-store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 6px; }
.accounting-store-grid .form-control, .accounting-upload-row .form-control { min-width: 0; min-height: 30px; padding: 5px 7px; font-size: 0.68rem; }
.accounting-store-list { display: grid; gap: 5px; margin-top: 8px; }
.accounting-store-list > div { display: grid; grid-template-columns: minmax(100px, .35fr) minmax(0, 1fr); gap: 8px; padding-top: 5px; border-top: 1px solid var(--border-color); font-size: 0.69rem; }
.accounting-store-list span { color: var(--text-muted); overflow-wrap: anywhere; }
.accounting-upload-row { display: grid; grid-template-columns: 130px minmax(160px, 1fr) auto; gap: 6px; }
.accounting-upload-label { display: inline-flex; align-items: center; justify-content: center; }
.accounting-record-list { display: grid; gap: 6px; margin-top: 8px; }
.accounting-record-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px solid var(--border-color); }
.accounting-record-copy { display: grid; gap: 2px; min-width: 0; }
.accounting-record-copy strong { font-size: 0.7rem; overflow-wrap: anywhere; }
.accounting-record-copy span, .accounting-record-copy small { color: var(--text-muted); font-size: 0.64rem; overflow-wrap: anywhere; }
.accounting-record-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.accounting-record-actions .btn { min-height: 27px; padding: 4px 6px; font-size: 0.64rem; }

/* Accounting admin workflow */
.accounting-admin-shell { padding: 18px; }
.accounting-admin-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.accounting-admin-panel-head p { max-width: 760px; margin: 5px 0 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.55; }
.accounting-admin-panel-note { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--border-color); background: var(--bg-nested); color: var(--text-muted); font-size: 0.68rem; font-weight: 700; }
.accounting-admin-empty { margin: 0; padding: 24px; color: var(--text-muted); font-size: 0.82rem; text-align: center; }
.accounting-admin-card { min-width: 0; margin-bottom: 12px; border: 1px solid var(--border-color); border-left: 3px solid var(--accounting-admin-status); border-radius: 6px; background: var(--card-bg); overflow: hidden; }
.accounting-admin-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--border-color); background: var(--bg-nested); }
.accounting-admin-card-head > div { display: grid; gap: 3px; min-width: 0; }
.accounting-admin-card-head > div > strong { color: var(--color-primary); font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.8rem; }
.accounting-admin-card-head > div > span { color: var(--text-muted); font-size: 0.68rem; overflow-wrap: anywhere; }
.accounting-admin-signing { padding: 12px; }
.accounting-admin-section-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.accounting-admin-section-head > div { display: grid; gap: 2px; }
.accounting-admin-section-head strong { font-size: 0.76rem; }
.accounting-admin-section-head span { color: var(--text-muted); font-size: 0.65rem; }
.accounting-admin-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.accounting-admin-summary-grid > div { display: grid; gap: 3px; min-width: 0; padding: 8px 9px; border: 1px solid var(--border-color); background: var(--bg-nested); }
.accounting-admin-summary-grid span, .accounting-admin-file-grid > div > span, .accounting-admin-auto-quote span, .accounting-admin-current-quote span { color: var(--text-muted); font-size: 0.63rem; }
.accounting-admin-summary-grid strong { font-size: 0.73rem; overflow-wrap: anywhere; }
.accounting-admin-summary-grid small { color: var(--text-muted); font-size: 0.62rem; line-height: 1.35; overflow-wrap: anywhere; }
.accounting-admin-quote-row { display: grid; grid-template-columns: minmax(130px, .55fr) minmax(110px, .45fr) 86px minmax(180px, 1fr) auto; gap: 6px; align-items: stretch; margin-top: 8px; }
.accounting-admin-quote-row .form-control { min-width: 0; min-height: 31px; padding: 5px 7px; font-size: 0.68rem; }
.accounting-admin-auto-quote, .accounting-admin-current-quote { display: grid; align-content: center; gap: 2px; padding: 6px 8px; border-left: 2px solid rgba(5, 150, 105, .35); background: rgba(5, 150, 105, .05); }
.accounting-admin-auto-quote strong, .accounting-admin-current-quote strong { color: #047857; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.accounting-admin-current-quote { grid-column: 2 / -1; }
.accounting-admin-file-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
.accounting-admin-file-grid > div { min-width: 0; padding: 8px 9px; border: 1px solid var(--border-color); background: var(--bg-nested); }
.accounting-admin-file { display: grid; gap: 5px; margin-top: 4px; }
.accounting-admin-file > span { color: var(--text-main); font-size: 0.67rem; overflow-wrap: anywhere; }
.accounting-admin-file > div { display: flex; flex-wrap: wrap; gap: 4px; }
.accounting-admin-file .btn, .accounting-admin-file-grid > div > .btn, .accounting-admin-invoice-upload { min-height: 27px; margin-top: 5px; padding: 4px 6px; font-size: 0.63rem; }
.accounting-admin-readonly { margin: 8px 0 0; padding: 7px 9px; background: var(--bg-nested); color: var(--text-muted); font-size: 0.67rem; }
.accounting-admin-workbench { margin: 0; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0; }
.accounting-admin-record-section .accounting-record-list { margin-top: 7px; }
.accounting-admin-upload-grid { display: grid; grid-template-columns: 120px minmax(100px, .65fr) 110px 76px minmax(150px, 1fr) auto; gap: 5px; }
.accounting-admin-upload-grid .form-control { min-width: 0; min-height: 29px; padding: 4px 6px; font-size: 0.65rem; }
.accounting-settings-heading { margin: 28px 0 10px; padding-left: 9px; border-left: 3px solid var(--color-primary); }
.accounting-settings-heading h2 { margin: 0; color: var(--text-main); font-size: 0.9rem; font-weight: 750; }
.accounting-settings-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: none; }
.accounting-settings-card { padding: 18px; }
.accounting-settings-desc { margin: 5px 0 14px; color: var(--text-muted); font-size: 0.76rem; line-height: 1.5; }
.accounting-settings-subtitle { margin: 17px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border-color); font-size: 0.74rem; }
.accounting-pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.accounting-pricing-tier-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.accounting-pricing-grid .form-group, .accounting-pricing-tier-grid .form-group { min-width: 0; margin-bottom: 0; }
.accounting-template-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 9px; border: 1px solid var(--border-color); background: var(--bg-nested); }
.accounting-template-status { min-width: 0; color: var(--text-muted); font-size: 0.68rem; overflow-wrap: anywhere; }
.accounting-template-upload { flex: 0 0 auto; }

body.dark-theme .accounting-live-quote strong, body.dark-theme .accounting-quote-grid .is-total strong, body.dark-theme .accounting-active-chip, body.dark-theme .accounting-admin-auto-quote strong, body.dark-theme .accounting-admin-current-quote strong { color: #6ee7b7 !important; }

@media (max-width: 980px) {
    .accounting-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .accounting-store-grid .btn { width: 100%; }
    .accounting-admin-quote-row { grid-template-columns: minmax(130px, .5fr) minmax(100px, .5fr) 82px; }
    .accounting-admin-quote-row .accounting-admin-reply { grid-column: 1 / 3; }
    .accounting-admin-current-quote { grid-column: 2 / -1; }
    .accounting-admin-upload-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .accounting-pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .accounting-order-head, .accounting-workbench-head, .accounting-record-row { align-items: stretch; flex-direction: column; }
    .accounting-status { align-self: flex-start; }
    .accounting-quote-grid, .accounting-contract-row, .accounting-store-grid, .accounting-upload-row { grid-template-columns: minmax(0, 1fr); }
    .accounting-order-actions, .accounting-record-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .accounting-order-actions .btn, .accounting-record-actions .btn, .accounting-upload-label { width: 100%; }
    .accounting-store-list > div { grid-template-columns: minmax(0, 1fr); }
    .accounting-admin-panel-head, .accounting-admin-card-head { align-items: stretch; flex-direction: column; }
    .accounting-admin-panel-note, .accounting-status { align-self: flex-start; }
    .accounting-admin-summary-grid, .accounting-admin-file-grid, .accounting-admin-quote-row, .accounting-admin-upload-grid, .accounting-pricing-grid, .accounting-pricing-tier-grid { grid-template-columns: minmax(0, 1fr); }
    .accounting-admin-quote-row .accounting-admin-reply, .accounting-admin-current-quote { grid-column: auto; }
    .accounting-admin-file-grid .btn, .accounting-admin-file-grid .accounting-upload-label, .accounting-admin-upload-grid .accounting-upload-label { width: 100%; }
    .accounting-template-row { align-items: stretch; flex-direction: column; }
    .accounting-template-upload { width: 100%; }
}

@media (max-width: 760px) {
    .search-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form-row .btn {
        width: 100%;
    }

    .inprogress-table-wrapper {
        overflow-x: auto;
    }

    .progress-record-table-head,
    .progress-record-row {
        gap: 8px;
        grid-template-columns: 22px minmax(112px, 0.95fr) minmax(160px, 1.2fr) minmax(94px, 0.75fr) minmax(120px, 0.82fr) minmax(102px, 0.72fr) minmax(62px, auto);
    }

    .progress-record-row {
        min-height: 58px;
        padding: 9px 10px;
    }

    .progress-record-cell--summary span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .progress-tabs-shell {
        border-radius: 10px;
    }

    .progress-tabs {
        padding: 7px;
    }

    .progress-tab-panels {
        padding: 9px;
    }
}

/* ========================================================================== 
   Shared information alignment for client and admin workspaces
   ========================================================================== */
.panel-view .dashboard-grid,
.panel-view .grid-layout,
.panel-view .dashboard-grid > *,
.panel-view .grid-layout > *,
.panel-view .card,
.form-row,
.form-group {
    min-width: 0;
}

.form-row {
    align-items: flex-start;
}

.form-group .form-control {
    width: 100%;
    min-width: 0;
}

.table-filters {
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 8px !important;
}

.table-filters > input,
.table-filters > select,
.table-filters > button {
    min-height: 32px;
}

.orders-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
    font-size: 0.82rem;
}

.orders-table thead th,
.data-table thead th {
    height: 42px;
    padding: 10px 12px;
    background: var(--bg-nested);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.orders-table tbody td,
.data-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.35;
    text-align: left;
    vertical-align: middle;
}

.orders-table tbody tr,
.data-table tbody tr {
    transition: background 0.18s ease;
}

.orders-table tbody tr:hover,
.data-table tbody tr:hover {
    background: rgba(var(--color-primary-rgb), 0.035);
}

#logistics-inquiries-list,
#warehouse-inquiries-list,
#city-tag-orders-list,
#orders-tbody,
.inprogress-table-wrapper,
#logistics-progress-container,
#warehouse-progress-container,
#eac-progress-container {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}

.logistics-list-table {
    min-width: 1120px;
    table-layout: fixed;
}

.logistics-list-table th:nth-child(1),
.logistics-list-table td:nth-child(1) {
    width: 42px;
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
}

.logistics-list-table th:nth-child(2),
.logistics-list-table td:nth-child(2) { width: 166px; white-space: nowrap; }
.logistics-list-table th:nth-child(3),
.logistics-list-table td:nth-child(3) { width: 66px; text-align: center; white-space: nowrap; }
.logistics-list-table th:nth-child(4),
.logistics-list-table td:nth-child(4) { width: 150px; }
.logistics-list-table th:nth-child(5),
.logistics-list-table td:nth-child(5) { width: 164px; white-space: nowrap; }
.logistics-list-table th:nth-child(6),
.logistics-list-table td:nth-child(6) { width: 184px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.logistics-list-table th:nth-child(7),
.logistics-list-table td:nth-child(7) { width: 164px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.logistics-list-table th:nth-child(8),
.logistics-list-table td:nth-child(8) { width: 112px; text-align: center; white-space: nowrap; }
.logistics-list-table th:nth-child(9),
.logistics-list-table td:nth-child(9) { width: 62px; text-align: center; white-space: nowrap; }

.logistics-list-table td:nth-child(4) strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warehouse-list-table {
    min-width: 980px;
    table-layout: fixed;
}

.warehouse-list-table th:nth-child(1),
.warehouse-list-table td:nth-child(1) { width: 170px; white-space: nowrap; }
.warehouse-list-table th:nth-child(2),
.warehouse-list-table td:nth-child(2) { width: 132px; }
.warehouse-list-table th:nth-child(3),
.warehouse-list-table td:nth-child(3) { width: 210px; }
.warehouse-list-table th:nth-child(4),
.warehouse-list-table td:nth-child(4) { width: 128px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.warehouse-list-table th:nth-child(5),
.warehouse-list-table td:nth-child(5) { width: 120px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.warehouse-list-table th:nth-child(6),
.warehouse-list-table td:nth-child(6) { width: 140px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.warehouse-list-table th:nth-child(7),
.warehouse-list-table td:nth-child(7) { width: 110px; text-align: center; white-space: nowrap; }
.warehouse-list-table th:nth-child(8),
.warehouse-list-table td:nth-child(8) { width: 70px; text-align: center; white-space: nowrap; }

.city-tag-admin-table th:nth-child(2) { width: 19%; }
.city-tag-admin-table th:nth-child(3) { width: 31%; }
.city-tag-admin-table th:nth-child(4) { width: 15%; }
.city-tag-admin-table th:nth-child(5) { width: 16%; }
.city-tag-admin-table th:nth-child(6) { width: 132px; white-space: nowrap; }

.admin-record-card {
    padding: 16px !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
}

.admin-record-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    min-height: 40px;
    margin-bottom: 12px !important;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.admin-record-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch;
    margin-bottom: 12px;
}

.admin-record-grid > div,
.admin-record-section {
    min-width: 0;
    padding: 12px !important;
    border-radius: 8px !important;
    display: flex;
    flex-direction: column;
}

.admin-record-section > strong:first-child {
    min-height: 1.3em;
    margin-bottom: 8px !important;
    font-size: 0.8rem;
}

.admin-record-controls {
    min-width: 0;
    align-items: center !important;
}

.admin-record-controls .form-control {
    min-width: 0;
}

.logi-product-card {
    margin-bottom: 8px;
    padding: 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    text-align: left;
}

.logistics-inquiry-detail,
.logistics-inquiry-detail > div,
.logistics-inquiry-detail > div > span {
    text-align: left;
}

.logi-product-title {
    display: block;
    margin-bottom: 8px;
    font-size: 0.84rem;
    text-align: left;
}

.logi-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 7px 12px;
    align-items: start;
    font-size: 0.76rem;
    line-height: 1.55;
    text-align: left;
}

.logi-product-grid > span,
.logi-product-field,
.logi-product-field label {
    min-width: 0;
    text-align: left;
}

.logi-product-field label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-main);
}

.logi-inline-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 106px;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.logi-product-editors {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    min-width: 0;
}

.logi-product-field-editor {
    min-width: 0;
}

.logi-product-field-editor label {
    min-height: 1.55em;
    line-height: 1.55;
}

.logi-inline-editor input {
    width: 100%;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 0.76rem;
    text-align: left;
}

.logi-inline-editor .btn {
    width: 106px;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    padding: 7px 12px;
    font-size: 0.72rem;
    border-radius: 6px;
    white-space: nowrap;
}

@media (max-width: 950px) {
    .logi-product-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 560px) {
    .logi-product-grid {
        grid-template-columns: 1fr;
    }

    .logi-product-editors {
        grid-template-columns: 1fr;
    }
}

.logistics-quote-panel {
    width: 100%;
    min-width: 0;
    margin: 14px 0 0;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.logistics-quote-panel .logistics-tax-calculator {
    width: 100% !important;
    margin: 0;
}

.logistics-manual-quote {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.logistics-manual-quote__title {
    margin: 0 0 10px;
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
}

.logistics-manual-quote__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-main);
    font-size: 0.78rem;
}

.logistics-manual-quote__toolbar select {
    min-width: 150px;
    min-height: 34px;
    box-sizing: border-box;
    font-size: 0.78rem;
}

.logistics-manual-quote__table {
    width: 100%;
    margin-bottom: 10px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
}

.logistics-manual-quote__table th,
.logistics-manual-quote__table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
}

.logistics-manual-quote__table th:nth-child(2),
.logistics-manual-quote__table td:nth-child(2),
.logistics-manual-quote__table th:nth-child(3),
.logistics-manual-quote__table td:nth-child(3) {
    text-align: center;
}

.logistics-manual-quote__table .logi-qr-cat {
    width: 100% !important;
    min-height: 34px;
    box-sizing: border-box;
}

.logistics-manual-quote__table .logi-qr-amount {
    width: 120px !important;
    min-height: 34px;
    box-sizing: border-box;
}

.logistics-manual-quote__reply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
}

.logistics-manual-quote__reply input {
    width: 100%;
    min-height: 34px;
    box-sizing: border-box;
}

.logistics-quote-readonly {
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(100,116,139,0.08);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.logistics-operation-log {
    margin-top: 14px;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid rgba(59,130,246,0.14);
    border-radius: 8px;
    background: rgba(59,130,246,0.05);
    color: var(--text-main);
    font-size: 0.8rem;
    line-height: 1.6;
}

.logistics-operation-log > strong {
    display: block;
    margin-bottom: 6px;
}

.inprogress-table-wrapper,
#logistics-progress-container,
#warehouse-progress-container,
#eac-progress-container {
    overflow-y: hidden;
}

.inprogress-table {
    min-width: 680px;
    table-layout: fixed;
}

.inprogress-table thead th,
.inprogress-table tbody td {
    vertical-align: middle;
}

@media (max-width: 1180px) {
    .admin-record-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .admin-record-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-record-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .admin-record-controls {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .orders-table thead th,
    .orders-table tbody td,
    .data-table thead th,
    .data-table tbody td {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ==========================================================================
   OPERATIONAL UI TRANSFER - 2026-07-31
   Neutral, compact presentation contract shared by the client and admin apps.
   ========================================================================== */

:root {
    color-scheme: light;
    --font-primary: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --font-heading: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --bg-app: #f5f6f8;
    --bg-main: #f5f6f8;
    --bg-primary: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-card: #f8f9fb;
    --card-bg: #f8f9fb;
    --bg-card-hover: #f3f4f6;
    --bg-nested: #f8f9fb;
    --border-color: rgba(100, 116, 139, 0.22);
    --border-hover: rgba(37, 99, 235, 0.24);
    --text-main: #1a1d23;
    --text-primary: #1a1d23;
    --text-muted: #667085;
    --text-inverse: #ffffff;
    --color-primary: #2563eb;
    --color-primary-rgb: 37, 99, 235;
    --color-secondary: #2563eb;
    --color-accent: #2563eb;
    --color-accent-rgb: 37, 99, 235;
    --color-warning: #d97706;
    --color-purple: #7c3aed;
    --color-danger: #dc2626;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-glow: none;
    --sidebar-width: 232px;
    --glass-blur: 0;
    --border-radius-lg: 8px;
    --border-radius-md: 6px;
    --border-radius-sm: 4px;
}

body.light-theme {
    color-scheme: light;
    --bg-app: #f5f6f8;
    --bg-main: #f5f6f8;
    --bg-primary: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-card: #f8f9fb;
    --card-bg: #f8f9fb;
    --bg-card-hover: #f3f4f6;
    --bg-nested: #f8f9fb;
    --border-color: rgba(100, 116, 139, 0.22);
    --border-hover: rgba(37, 99, 235, 0.24);
    --text-main: #1a1d23;
    --text-primary: #1a1d23;
    --text-muted: #667085;
    --text-inverse: #ffffff;
    --color-primary: #2563eb;
    --color-primary-rgb: 37, 99, 235;
    --color-secondary: #2563eb;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-glow: none;
}

body.dark-theme {
    color-scheme: dark;
    --bg-app: #0b111a;
    --bg-main: #0b111a;
    --bg-primary: #151b26;
    --bg-sidebar: #111826;
    --bg-card: #151b26;
    --card-bg: #151b26;
    --bg-card-hover: #1b2330;
    --bg-nested: #1e2735;
    --border-color: #2b3445;
    --border-hover: #415170;
    --text-main: #e8eaed;
    --text-primary: #e8eaed;
    --text-muted: #a5acb8;
    --text-inverse: #ffffff;
    --color-primary: #3b82f6;
    --color-primary-rgb: 59, 130, 246;
    --color-secondary: #3b82f6;
    --color-accent: #3b82f6;
    --color-accent-rgb: 59, 130, 246;
    --color-warning: #fbbf24;
    --color-purple: #a78bfa;
    --color-danger: #f87171;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.24);
    --shadow-glow: none;
}

body {
    min-width: 320px;
    background: var(--bg-app);
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
    transition: background-color 0.18s ease, color 0.18s ease;
}

button,
input,
select,
textarea {
    letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.glow-bg,
.glow-sphere {
    display: none !important;
}

.app-layout {
    min-height: 100vh;
    background: var(--bg-app);
}

.sidebar {
    width: var(--sidebar-width);
    padding: 12px 10px 10px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    box-shadow: none;
}

.sidebar-brand {
    min-height: 58px;
    gap: 10px;
    margin-bottom: 10px;
    padding: 4px 8px 12px;
}

.logo-icon,
.sidebar-brand.no-text .logo-icon,
.branding-preview-sidebar-head.no-text .logo-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 6px;
}

.brand-text {
    color: var(--text-main);
    font-size: 15px;
    line-height: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-accent {
    color: var(--text-main);
    background: none;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: currentColor;
}

.sidebar-menu {
    gap: 2px;
    padding-right: 0;
}

.menu-item {
    min-height: 36px;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 18px;
    font-weight: 650;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.menu-item:hover {
    color: var(--text-main);
    background: var(--bg-nested);
}

.menu-item.active {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.08);
    border-color: rgba(var(--color-primary-rgb), 0.24);
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.menu-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.menu-pending-badge,
.menu-item.active .menu-pending-badge,
.sub-menu-item.active .menu-pending-badge {
    box-shadow: none;
}

.sub-menu {
    padding-left: 26px;
}

.sub-menu-item {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.sub-menu-item:hover,
.sub-menu-item.active {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.07);
}

.sidebar-settings {
    gap: 10px;
    padding-top: 10px;
}

.settings-label {
    font-size: 11px;
}

.lang-row {
    gap: 2px;
    padding: 2px;
    border-radius: 6px;
    background: var(--bg-nested);
}

.lang-btn {
    min-height: 28px;
    padding: 5px 4px;
    border-radius: 4px;
    font-size: 11px;
}

.lang-btn.active,
body.light-theme .lang-btn.active {
    color: var(--color-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.user-profile {
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    background: var(--bg-nested);
}

#sidebar-avatar {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.content-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    padding: 20px 24px 28px;
    background: var(--bg-app);
}

.panel-container,
.panel-view.active {
    min-width: 0;
}

.content-wrapper > .panel-container:not(:has(> .panel-view.active)) {
    flex: 0 0 auto;
    height: 0;
    min-height: 0;
    overflow: hidden;
}

.content-header {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.content-header h1 {
    color: var(--text-main);
    font-size: 26px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

.content-header p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 20px;
}

.panel-view.active {
    animation: operationalPanelIn 0.16s ease-out;
}

@keyframes operationalPanelIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card,
.card-nested,
.orders-table-card,
.tracking-search-card,
.tracking-card,
.admin-record-card,
.settings-project-tabs {
    background: var(--bg-card);
    border-color: var(--border-color);
    border-radius: 8px !important;
    box-shadow: var(--shadow-md);
    backdrop-filter: none;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: none;
}

.card-nested {
    padding: 16px;
    margin-bottom: 16px;
    background: var(--bg-nested);
}

.dashboard-kpi-row {
    gap: 10px;
    margin-bottom: 14px;
}

.kpi-card {
    min-height: 86px;
    gap: 12px;
    padding: 14px;
}

.kpi-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

.kpi-icon-wrapper svg {
    width: 19px;
    height: 19px;
}

.kpi-title {
    font-size: 11px;
}

.kpi-value {
    font-size: 22px;
    line-height: 28px;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.kpi-progress-fill,
.bg-gradient-blue {
    background: var(--color-primary);
}

.dashboard-grid {
    gap: 14px;
}

.kpi-grid-card {
    padding: 18px;
}

.panel-card-title {
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 21px;
    letter-spacing: 0;
}

.grid-layout {
    gap: 16px;
}

.form-card,
.quote-summary-card,
.qq-wizard-layout .form-card,
.qq-wizard-layout .quote-summary-card {
    padding: 18px;
}

.quote-summary-card {
    padding: 14px 15px;
    top: 16px;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    min-height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    background: var(--bg-primary);
    box-shadow: none;
}

.form-control:hover,
input:hover,
select:hover,
textarea:hover {
    border-color: var(--border-hover);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

.logistics-type-option,
.container-size-option,
.qq-service-card,
.qq-large-service-card {
    background: var(--bg-card) !important;
}

.logistics-type-option.selected,
.container-size-option.selected,
.qq-service-card.selected,
.qq-large-service-card.selected {
    background: var(--bg-card) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--color-primary-rgb), 0.08);
}

.btn {
    min-height: 36px;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary,
.btn-success,
.modal-box #receipt-modal-submit {
    color: #ffffff;
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: none;
}

.btn-primary:hover,
.btn-success:hover,
.modal-box #receipt-modal-submit:hover:not(:disabled) {
    color: #ffffff;
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: none;
    transform: none;
}

body.dark-theme .btn-primary:hover,
body.dark-theme .btn-success:hover,
body.dark-theme .modal-box #receipt-modal-submit:hover:not(:disabled) {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    color: var(--text-main);
    background: var(--bg-nested);
    border-color: var(--border-hover);
    transform: none;
}

.quick-actions-row {
    gap: 8px;
}

.quick-actions-row .btn {
    padding: 8px 12px;
    font-size: 13px;
}

.wizard-footer {
    margin-top: 18px;
    padding-top: 14px;
}

.registration-order-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 9px 12px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-left: 3px solid var(--color-primary);
    background: rgba(37, 99, 235, 0.06);
    color: var(--text-main);
    font-size: 0.82rem;
}

.registration-order-state {
    margin-left: auto;
    color: var(--color-primary);
    font-weight: 700;
}

.registration-payment-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 18px 0;
    border: 1px solid var(--border-color);
    background: var(--bg-nested);
}

.registration-flow-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.registration-flow-item:last-child { border-bottom: 0; }

.registration-flow-index {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.registration-flow-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.registration-flow-main strong {
    color: var(--text-main);
    font-size: 0.86rem;
}

.registration-flow-note {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.registration-flow-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

/* The flow-card file inputs are triggered by their buttons. They must not
   inherit the full-surface drop-zone hit area, or they intercept other steps. */
.registration-flow-action .file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.registration-upload-status {
    color: #047857;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.btn.is-locked,
.btn.is-locked:hover {
    color: #ffffff;
    background: #64748b;
    border-color: #64748b;
    box-shadow: none;
    transform: none;
    cursor: pointer;
}

body.dark-theme .registration-upload-status {
    color: #34d399;
}

.registration-flow-item:has(.btn:not(.hidden):not(:disabled)) .registration-flow-index {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.registration-flow-item:has(.btn:disabled) .registration-flow-index {
    opacity: 0.62;
}

.registration-submit-summary {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.registration-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    font-size: 0.78rem;
}

.registration-summary-row span { color: var(--text-muted); }
.registration-summary-row strong { text-align: right; word-break: break-word; }
.registration-summary-hint { margin: 2px 0 0; color: var(--text-muted); font-size: 0.72rem; line-height: 1.45; }

@media (max-width: 700px) {
    .registration-flow-item {
        grid-template-columns: 28px minmax(0, 1fr);
        align-items: start;
    }

    .registration-flow-action {
        grid-column: 2;
        justify-content: flex-start;
    }

    .registration-flow-action .btn { width: auto; max-width: 100%; }
    .registration-order-state { width: 100%; margin-left: 0; }
}

.table-wrapper,
#logistics-inquiries-list,
#warehouse-inquiries-list,
#city-tag-orders-list,
#orders-tbody,
.inprogress-table-wrapper,
#logistics-progress-container,
#warehouse-progress-container,
#eac-progress-container {
    scrollbar-color: #9aa3b2 transparent;
}

.dashboard-table,
.orders-table,
.data-table,
.quote-table,
.inprogress-table {
    color: var(--text-main);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.dashboard-table th,
.orders-table thead th,
.data-table thead th,
.quote-table th,
.inprogress-table thead th {
    min-height: 36px;
    height: 36px;
    padding: 8px 10px;
    color: var(--text-muted);
    background: var(--bg-nested);
    border-color: var(--border-color);
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0;
}

.dashboard-table td,
.orders-table tbody td,
.data-table tbody td,
.quote-table td,
.inprogress-table tbody td {
    padding: 8px 10px;
    border-color: var(--border-color);
    line-height: 18px;
}

.dashboard-table tbody tr:hover,
.orders-table tbody tr:hover,
.data-table tbody tr:hover,
.inprogress-table tbody tr:hover {
    background: rgba(var(--color-primary-rgb), 0.04);
}

.table-header {
    min-height: 48px;
    padding: 12px 14px;
}

.table-header h3 {
    font-size: 14px;
    line-height: 20px;
}

.table-filters {
    gap: 8px;
}

.table-filters > input,
.table-filters > select,
.table-filters > button {
    min-height: 34px;
}

.status-badge,
[class*="status-"] {
    box-shadow: none;
}

.settings-tab-btn,
.settings-project-tab {
    letter-spacing: 0;
    text-shadow: none;
}

.settings-project-tab {
    border-radius: 6px;
    background: var(--bg-card);
}

.settings-project-tab.active {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.08);
    border-color: rgba(var(--color-primary-rgb), 0.28);
    box-shadow: none;
}

.timeline-dot.active,
.timeline-dot.success {
    box-shadow: none;
}

.modal-overlay {
    padding: 16px;
    background: rgba(7, 11, 18, 0.66);
    backdrop-filter: blur(5px);
}

.modal-card,
.modal-box {
    color: #f8fafc;
    background: #101827;
    border: 1px solid rgba(87, 109, 145, 0.52);
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
    backdrop-filter: none;
}

.modal-card {
    padding: 20px;
}

.modal-header,
.modal-box .modal-header {
    color: #f8fafc;
    background: #243547;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.modal-card > .modal-header {
    margin: -20px -20px 18px;
    padding: 16px 20px;
}

.modal-header h3,
.modal-box .modal-header h3 {
    color: #f8fafc;
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0;
}

.modal-box .modal-close,
.btn-close-modal {
    color: #cbd5e1;
    background: rgba(15, 23, 38, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 6px;
    box-shadow: none;
}

.modal-box .modal-close:hover,
.btn-close-modal:hover {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.8);
    transform: none;
}

.modal-box .modal-body {
    padding: 18px;
}

.modal-box .drop-zone {
    border: 1px dashed rgba(96, 165, 250, 0.72);
    border-radius: 8px;
    background: #1c2636;
}

.modal-box .drop-zone:hover {
    border-color: #60a5fa;
    background: #243044;
    box-shadow: none;
    transform: none;
}

/* Order dossier content uses theme-aware text on its nested cards. The modal
   shell keeps its dark title bar, while dynamic card content follows the
   active light/dark text tokens for readable labels, files, and logs. */
#order-modal #modal-detail-content .modal-detail-scroll {
    color: var(--text-main);
    min-width: 0;
    overflow-x: hidden;
}

#order-modal #modal-detail-content .modal-detail-grid,
#order-modal #modal-detail-content .modal-detail-grid > * {
    min-width: 0;
}

#order-modal #modal-detail-content .modal-detail-scroll > h3 {
    color: #f8fafc;
}

#order-modal #modal-detail-content .modal-detail-scroll label,
#order-modal #modal-detail-content .modal-detail-scroll select,
#order-modal #modal-detail-content .modal-detail-scroll input,
#order-modal #modal-detail-content .modal-detail-scroll option {
    color: var(--text-main);
}

#order-modal #modal-detail-content .modal-detail-scroll strong {
    color: var(--text-main);
}

@media (max-width: 720px) {
    #order-modal #modal-detail-content .modal-detail-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }
}

.auth-overlay {
    padding: 20px;
    background: var(--bg-app);
    backdrop-filter: none;
}

.auth-card {
    max-width: 400px;
    padding: 28px;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.14);
    backdrop-filter: none;
}

body.dark-theme .auth-card {
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.auth-tabs {
    background: var(--bg-nested) !important;
    border-color: var(--border-color) !important;
    border-radius: 6px !important;
}

.auth-tab-btn {
    border-radius: 4px !important;
    letter-spacing: 0;
}

.auth-tab-btn.active {
    color: #ffffff !important;
    background: var(--color-primary) !important;
    box-shadow: none;
}

.auth-card .btn {
    border-radius: 6px !important;
    box-shadow: none !important;
}

.auth-registrations {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 8px;
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
}

.auth-registrations a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-registrations a:hover,
.auth-registrations a:focus-visible {
    color: var(--color-primary);
    text-decoration: underline;
}

.profile-dropdown {
    background: var(--bg-card);
    border-color: var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    backdrop-filter: none;
}

@media (max-width: 950px) {
    :root {
        --sidebar-width: 64px;
    }

    .sidebar {
        width: var(--sidebar-width);
        padding: 12px 6px;
    }

    .sidebar-brand {
        min-height: 50px;
        padding: 2px 0 10px;
    }

    .logo-icon,
    .sidebar-brand.no-text .logo-icon,
    .branding-preview-sidebar-head.no-text .logo-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .menu-item {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 10px;
        border-radius: 6px;
    }

    .content-wrapper {
        margin-left: var(--sidebar-width);
        padding: 16px;
    }
}

@media (max-width: 700px) {
    .content-wrapper {
        padding: 14px 12px 20px;
    }

    .content-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 12px;
    }

    .content-header h1 {
        font-size: 22px;
    }

    .quick-actions-row,
    .table-filters {
        flex-wrap: wrap;
    }

    .form-card,
    .quote-summary-card,
    .qq-wizard-layout .form-card,
    .qq-wizard-layout .quote-summary-card,
    .kpi-grid-card {
        padding: 14px;
    }

    .modal-overlay {
        padding: 10px;
    }

    .modal-card,
    .modal-box {
        width: 100%;
        max-height: 92vh;
    }

    .auth-card {
        padding: 22px 18px;
    }
}

@media (max-width: 430px) {
    .auth-tabs {
        flex-direction: column;
        gap: 4px;
    }

    .auth-tab-btn {
        width: 100%;
        min-width: 0;
        padding: 8px 10px;
        white-space: normal;
        line-height: 1.2;
    }

    .auth-registrations {
        font-size: 0.66rem;
        line-height: 1.35;
    }

    .auth-registrations a,
    .auth-registrations span {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
    }
}

/* Client home dashboard and stronger sidebar branding. */
.sidebar-brand.no-text {
    min-height: 92px;
    padding: 4px 8px 14px !important;
    overflow: hidden;
}

.sidebar-brand.no-text #sidebar-logo-container {
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand.no-text .logo-icon {
    width: 92px !important;
    height: 92px !important;
}

.sidebar-brand:not(.no-text) .logo-icon {
    width: 48px !important;
    height: 48px !important;
}

.client-home-dashboard {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    min-width: 0;
}

.client-home-summary-bar {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) minmax(190px, 0.8fr) minmax(160px, 0.6fr);
    min-height: 132px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.client-home-primary-stat,
.client-home-secondary-stat,
.client-home-update-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 22px 24px;
}

.client-home-secondary-stat,
.client-home-update-stat {
    border-left: 1px solid var(--border-color);
}

.client-home-stat-label {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 18px;
    font-weight: 650;
}

.client-home-stat-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 4px 0 2px;
    color: var(--text-main);
}

.client-home-stat-value strong {
    color: var(--color-primary);
    font-size: 38px;
    line-height: 44px;
    font-weight: 800;
}

.client-home-stat-value span {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 650;
}

.client-home-stat-value-small strong {
    font-size: 30px;
    line-height: 36px;
}

.client-home-stat-caption {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 18px;
}

.client-home-update-stat strong {
    margin-top: 8px;
    color: var(--text-main);
    font-size: 20px;
    line-height: 26px;
    font-variant-numeric: tabular-nums;
}

.client-home-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.client-home-section-head h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 20px;
    line-height: 28px;
    font-weight: 800;
}

.client-home-section-head p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 19px;
}

.client-home-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.client-home-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    table-layout: fixed;
}

.client-home-table th,
.client-home-table td {
    height: 52px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
}

.client-home-table th {
    height: 42px;
    color: var(--text-muted);
    background: var(--bg-nested);
    font-size: 11px;
    line-height: 16px;
    font-weight: 750;
    text-transform: uppercase;
}

.client-home-table tbody tr:last-child td {
    border-bottom: 0;
}

.client-home-table tbody tr {
    transition: background-color 0.15s ease;
}

.client-home-table tbody tr:hover,
.client-home-table tbody tr.has-in-progress {
    background: rgba(var(--color-primary-rgb), 0.035);
}

.client-home-table td strong {
    color: var(--text-main);
    font-size: 13px;
    line-height: 19px;
    font-weight: 700;
}

.client-home-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 18px;
    font-weight: 650;
}

.client-home-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #98a2b3;
}

.client-home-table tr.has-in-progress .client-home-status {
    color: var(--color-primary);
}

.client-home-table tr.has-in-progress .client-home-status-dot {
    background: var(--color-primary);
}

.client-home-count-col {
    width: 140px;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.client-home-table td.client-home-count-col strong {
    color: var(--color-primary);
    font-size: 18px;
}

.client-home-action-col {
    width: 130px;
    text-align: right !important;
}

.home-module-link {
    min-height: 32px;
    padding: 5px 10px;
    color: var(--color-primary);
    background: transparent;
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: 5px;
    font: inherit;
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
    cursor: pointer;
}

.home-module-link:hover {
    color: #ffffff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

@media (max-width: 950px) {
    .sidebar-brand.no-text {
        min-height: 58px;
        padding: 0 0 10px !important;
    }

    .sidebar-brand.no-text #sidebar-logo-container {
        width: 52px;
        height: 48px;
    }

    .sidebar-brand.no-text .logo-icon,
    .sidebar-brand:not(.no-text) .logo-icon {
        width: 52px !important;
        height: 52px !important;
    }

    .client-home-summary-bar {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    }

    .client-home-update-stat {
        grid-column: 1 / -1;
        border-top: 1px solid var(--border-color);
        border-left: 0;
    }
}

@media (max-width: 700px) {
    .client-home-dashboard {
        gap: 16px;
    }

    .client-home-summary-bar {
        grid-template-columns: 1fr 1fr;
    }

    .client-home-primary-stat {
        grid-column: 1 / -1;
    }

    .client-home-secondary-stat {
        border-top: 1px solid var(--border-color);
        border-left: 0;
    }

    .client-home-update-stat {
        grid-column: auto;
        border-left: 1px solid var(--border-color);
    }

    .client-home-primary-stat,
    .client-home-secondary-stat,
    .client-home-update-stat {
        padding: 18px 16px;
    }

    .client-home-stat-value strong {
        font-size: 32px;
        line-height: 38px;
    }

    .client-home-stat-value-small strong {
        font-size: 26px;
        line-height: 32px;
    }

    .client-home-section-head h2 {
        font-size: 18px;
        line-height: 24px;
    }

    .client-home-table th,
    .client-home-table td {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* LOGISTICS TAX CALCULATOR - 2026-07-31 */
.logistics-tax-calculator {
    position: static;
    margin: 0 0 14px;
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-nested);
    overflow: hidden;
}

.logistics-tax-calculator__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.logistics-tax-calculator__head > div {
    display: flex;
    align-items: baseline;
    gap: 9px;
    min-width: 0;
}

.logistics-tax-calculator__head strong {
    color: var(--text-main);
    font-size: 13px;
    line-height: 18px;
}

.logistics-tax-calculator__head span,
.logistics-tax-calculator__status {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 16px;
}

.logistics-tax-calculator__status {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.logistics-tax-calculator__body {
    padding: 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.logistics-tax-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(240px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 10px;
}

.logistics-tax-toolbar label,
.logi-tax-parameter-grid label {
    display: grid;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 15px;
    font-weight: 650;
}

.logistics-tax-toolbar input,
.logistics-tax-table input,
.logistics-tax-table select {
    width: 100%;
    min-height: 32px;
    padding: 5px 8px;
    color: var(--text-main);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font: inherit;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.logistics-tax-rate {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    min-height: 32px;
    padding: 7px 9px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-muted);
    background: var(--card-bg);
    font-size: 11px;
}

.logistics-tax-rate strong {
    color: var(--text-main);
    white-space: nowrap;
}

.logistics-tax-rate span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-tax-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--card-bg);
}

.logistics-tax-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--text-main);
    font-size: 11px;
}

.logistics-tax-table th,
.logistics-tax-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.logistics-tax-table th {
    color: var(--text-muted);
    background: var(--bg-nested);
    font-size: 10px;
    line-height: 15px;
    font-weight: 750;
}

.logistics-tax-table tbody tr:last-child td {
    border-bottom: 0;
}

.logistics-tax-table th:nth-child(1) { width: 180px; }
.logistics-tax-table th:nth-child(2) { width: 145px; }
.logistics-tax-table th:nth-child(3) { width: 105px; }
.logistics-tax-table th:nth-child(4) { width: 120px; }
.logistics-tax-table th:nth-child(5) { width: 265px; }
.logistics-tax-table th:nth-child(6) { width: 80px; }
.logistics-tax-table th:nth-child(7) { width: 145px; }
.logistics-tax-table th:nth-child(8) { width: 130px; }

.logi-tax-product-row td > strong,
.logi-tax-product-row td > span,
.logi-tax-product-row td > small {
    display: block;
    overflow-wrap: anywhere;
}

.logi-tax-product-row td > span {
    margin-top: 3px;
    color: var(--text-muted);
}

.logi-tax-product-row td > small {
    margin-top: 4px;
    color: var(--text-muted);
    line-height: 14px;
}

.logi-tax-hs {
    font-family: Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.logi-tax-match {
    width: fit-content;
    max-width: 100%;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 14px;
}

.logi-tax-match.is-matched {
    color: #047857;
    background: rgba(5, 150, 105, 0.1);
}

.logi-tax-match.is-unmatched {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
}

.logi-tax-parameter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.logistics-tax-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr)) auto;
    align-items: stretch;
    gap: 1px;
    margin-top: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--border-color);
    overflow: hidden;
}

.logistics-tax-summary > div {
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    background: var(--card-bg);
}

.logistics-tax-summary span {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 14px;
}

.logistics-tax-summary strong {
    color: var(--text-main);
    font-size: 12px;
    line-height: 17px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.logistics-tax-summary .is-total strong {
    color: var(--color-primary);
}

.logistics-tax-summary .logi-tax-apply {
    margin: 8px;
    align-self: center;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .logistics-tax-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .logistics-tax-toolbar .logi-tax-calculate {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .logistics-tax-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .logistics-tax-summary .logi-tax-apply {
        min-height: 34px;
    }
}

@media (max-width: 560px) {
    .logistics-tax-calculator__head,
    .logistics-tax-calculator__head > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .logistics-tax-toolbar,
    .logistics-tax-summary {
        grid-template-columns: 1fr;
    }

    .logistics-tax-rate {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Admin home: six operational modules with eight existing workflows. */
.admin-module-overview {
    width: 100%;
    min-width: 0;
}

.admin-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.admin-module-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.admin-module-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 15px 17px;
    background: var(--bg-nested);
    border-bottom: 1px solid var(--border-color);
}

.admin-module-card__head h2 {
    min-width: 0;
    margin: 0;
    color: var(--text-main);
    font-size: 17px;
    line-height: 23px;
    font-weight: 800;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.admin-module-card__scope {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 17px;
    font-weight: 650;
    white-space: nowrap;
}

.admin-module-process-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.admin-module-process {
    flex: 1 1 auto;
    min-width: 0;
    padding: 15px 17px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}

.admin-module-process:last-child {
    border-bottom: 0;
}

.admin-module-process.has-in-progress {
    background: rgba(var(--color-primary-rgb), 0.035);
}

.admin-module-process__name {
    display: block;
    min-width: 0;
    margin-bottom: 13px;
    color: var(--text-main);
    font-size: 13px;
    line-height: 19px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.admin-module-process__actions {
    display: grid;
    grid-template-columns: minmax(64px, 0.7fr) minmax(74px, 0.9fr) auto;
    align-items: end;
    gap: 12px;
    min-width: 0;
}

.admin-module-metric {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-module-metric span {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 15px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.admin-module-metric strong {
    color: var(--color-primary);
    font-size: 24px;
    line-height: 28px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.admin-module-process .home-module-link {
    align-self: end;
    min-width: 76px;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .admin-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .admin-module-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .admin-module-card__head,
    .admin-module-process {
        padding-right: 15px;
        padding-left: 15px;
    }
}

@media (max-width: 430px) {
    .admin-module-process__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-module-process .home-module-link {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Interactive logistics workflow shared by client and admin views */
.logistics-workflow-card {
    min-width: 0;
}

.workflow-overview {
    display: grid;
    grid-template-columns: minmax(108px, auto) minmax(120px, 1fr) minmax(180px, 1.2fr);
    align-items: center;
    gap: 12px 16px;
    padding: 13px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-nested);
}

.workflow-overview > div:first-child,
.workflow-current {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.workflow-overview-label,
.workflow-current span {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.workflow-overview strong,
.workflow-current strong {
    color: var(--text-main);
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.workflow-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(100, 116, 139, 0.18);
}

.workflow-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0f9f75;
    transition: width 180ms ease;
}

.workflow-banner {
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 6px;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.07);
    font-size: 0.82rem;
    font-weight: 600;
}

.workflow-banner.is-closed {
    border-color: rgba(220, 38, 38, 0.24);
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.07);
}

.workflow-banner.is-completed {
    border-color: rgba(5, 150, 105, 0.24);
    color: #047857;
    background: rgba(5, 150, 105, 0.07);
}

.workflow-stage-list {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.workflow-stage {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.workflow-stage:last-child {
    border-bottom: 0;
}

.workflow-stage-toggle {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 0;
    color: var(--text-main);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.workflow-stage-toggle:hover,
.workflow-stage-toggle:focus-visible {
    background: var(--bg-nested);
}

.workflow-stage-number {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #64748b;
    background: rgba(100, 116, 139, 0.12);
    font-size: 0.76rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.workflow-stage.status-completed .workflow-stage-number,
.workflow-stage.status-skipped .workflow-stage-number {
    color: #047857;
    background: rgba(5, 150, 105, 0.13);
}

.workflow-stage.status-pending .workflow-stage-number,
.workflow-stage.status-in_progress .workflow-stage-number {
    color: #b45309;
    background: rgba(245, 158, 11, 0.15);
}

.workflow-stage-heading {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.workflow-stage-heading strong {
    font-size: 0.84rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.workflow-stage-heading span {
    color: var(--text-muted);
    font-size: 0.69rem;
}

.workflow-stage-status {
    max-width: 116px;
    padding: 3px 7px;
    border-radius: 4px;
    color: #64748b;
    background: rgba(100, 116, 139, 0.1);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
}

.status-completed .workflow-stage-status,
.status-skipped .workflow-stage-status {
    color: #047857;
    background: rgba(5, 150, 105, 0.1);
}

.status-pending .workflow-stage-status,
.status-in_progress .workflow-stage-status {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
}

.status-closed .workflow-stage-status {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
}

.workflow-stage-toggle-text {
    color: var(--color-primary);
    font-size: 0.7rem;
    white-space: nowrap;
}

.workflow-stage-body {
    display: none;
    padding: 2px 14px 14px 58px;
    background: var(--card-bg);
}

.workflow-stage.is-open .workflow-stage-body {
    display: block;
}

.workflow-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 12px;
}

.workflow-form-grid-compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-content: start;
    flex: 1;
}

.workflow-section-grid {
    display: grid;
    gap: 11px 12px;
}

.workflow-section-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}

.workflow-field {
    min-width: 0;
}

.workflow-field-wide {
    grid-column: 1 / -1;
}

.workflow-field-inline-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 12px;
}

.workflow-field.is-condition-hidden {
    display: none;
}

.workflow-field-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.35;
}

.workflow-subsection-compact {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 9px;
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 8px;
    background: var(--bg-nested);
}

.workflow-subsection-compact h5 {
    display: none;
}

.workflow-subsection-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding: 3px 2px 6px;
    border: 0;
    color: var(--text-main);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.workflow-subsection-toggle:hover,
.workflow-subsection-toggle:focus-visible {
    background: transparent;
}

.workflow-subsection-toggle-title {
    min-width: 0;
    color: var(--text-main);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.workflow-subsection-toggle-meta {
    color: #059669;
    font-size: 0.64rem;
    font-weight: 600;
    white-space: nowrap;
}

.workflow-subsection-toggle-text {
    color: var(--color-primary);
    font-size: 0.64rem;
    white-space: nowrap;
}

.workflow-subsection-body {
    display: block;
}

.workflow-subsection-compact.is-collapsed .workflow-subsection-body {
    display: none;
}

.workflow-subsection-compact.is-collapsed {
    min-height: 46px;
}

.workflow-subsection-compact .workflow-field-label {
    margin-bottom: 3px;
    text-align: left;
    color: #059669;
    font-size: 0.66rem;
}

.workflow-subsection-compact .workflow-field-compact {
    padding: 5px 6px 6px;
    border: 1px solid rgba(100, 116, 139, 0.12);
    border-radius: 6px;
    background: var(--card-bg);
}

.workflow-subsection-compact .workflow-file-picker,
.workflow-subsection-compact .workflow-control {
    min-height: 28px;
    font-size: 0.69rem;
}

.workflow-subsection-compact .workflow-file-picker {
    gap: 5px;
    padding: 3px 5px;
}

.workflow-subsection-compact .workflow-file-picker-command,
.workflow-subsection-compact .workflow-file-selection {
    font-size: 0.62rem;
}

.workflow-subsection-compact .workflow-template-actions,
.workflow-subsection-compact .workflow-template-actions-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 6px;
}

.workflow-subsection-compact .workflow-file-hint {
    margin-top: 2px;
    text-align: left;
    font-size: 0.61rem;
    line-height: 1.3;
}

.workflow-subsection-compact .workflow-stored-files {
    gap: 3px;
    margin-bottom: 4px;
}

.workflow-subsection-compact .workflow-file-link {
    min-height: 26px;
    gap: 6px;
    padding: 3px 6px;
}

.workflow-subsection-compact .workflow-file-name {
    font-size: 0.66rem;
}

.workflow-subsection-compact .workflow-file-command {
    font-size: 0.62rem;
}

.workflow-required {
    margin-left: 3px;
    color: #dc2626;
}

.workflow-control {
    width: 100%;
    min-height: 36px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-main);
    background: var(--bg-main);
    font: inherit;
    font-size: 0.78rem;
}

.workflow-control {
    padding: 7px 9px;
}

textarea.workflow-control {
    min-height: 72px;
    resize: vertical;
}

.workflow-control:focus {
    outline: 2px solid rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.workflow-file-input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.workflow-file-picker {
    position: relative;
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    box-sizing: border-box;
    padding: 5px 7px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-main);
    background: var(--bg-main);
    cursor: pointer;
}

.workflow-file-picker:hover {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.04);
}

.workflow-file-picker:focus-within {
    outline: 2px solid rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.workflow-file-picker-command {
    flex: 0 0 auto;
    padding: 4px 9px;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 4px;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}

.workflow-file-selection {
    min-width: 0;
    flex: 1 1 180px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.workflow-file-selection.is-stored {
    color: #047857;
    font-weight: 700;
}

.workflow-file-selection.is-selected {
    color: #1d4ed8;
    font-weight: 700;
}

.workflow-file-hint {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.67rem;
}

/* Warehouse receipt differences remain a dense, scroll-contained table. */
.workflow-difference-table-shell {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-main);
}

.workflow-difference-table-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.workflow-difference-table {
    width: 100%;
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.workflow-difference-table th,
.workflow-difference-table td {
    min-width: 0;
    padding: 6px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    text-align: left;
    vertical-align: middle;
}

.workflow-difference-table th {
    position: relative;
    color: var(--text-secondary);
    background: var(--bg-nested);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}

.workflow-difference-table tr > :last-child {
    border-right: 0;
}

.workflow-difference-table tbody tr:last-child > * {
    border-bottom: 0;
}

.workflow-difference-table input {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    box-sizing: border-box;
    padding: 5px 7px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    background: var(--card-bg);
    font: inherit;
    font-size: 0.74rem;
    text-align: left;
}

.workflow-difference-table input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.workflow-difference-table input[readonly] {
    border-color: transparent;
    color: var(--text-secondary);
    background: transparent;
    font-weight: 600;
}

.workflow-difference-table th:has(.workflow-difference-column-label) {
    padding-right: 34px;
}

.workflow-difference-column-label {
    font-weight: 600;
}

.workflow-difference-remove-column,
.workflow-difference-remove-row {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(220, 38, 38, 0.28);
    border-radius: 4px;
    color: #b91c1c;
    background: transparent;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.workflow-difference-remove-column {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
}

.workflow-difference-remove-column:hover,
.workflow-difference-remove-row:hover,
.workflow-difference-remove-column:focus-visible,
.workflow-difference-remove-row:focus-visible {
    border-color: #dc2626;
    color: #991b1b;
    background: rgba(220, 38, 38, 0.08);
}

.workflow-difference-row-action {
    width: 36px;
    padding: 5px !important;
    text-align: center !important;
}

.workflow-difference-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 10px 0;
}

.workflow-difference-actions .btn {
    min-width: 78px;
}

.workflow-difference-hint {
    display: block;
    padding: 7px 10px 9px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.35;
}

.workflow-difference-readonly {
    display: block;
    min-height: 20px;
    overflow-wrap: anywhere;
}

.workflow-checkbox-field {
    display: flex;
    align-items: center;
    min-height: 36px;
}

.workflow-checkbox-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.45;
    cursor: pointer;
}

.workflow-checkbox-label input {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: #2563eb;
}

.workflow-readonly-value {
    min-height: 34px;
    padding: 7px 9px;
    border-left: 2px solid rgba(100, 116, 139, 0.34);
    color: var(--text-main);
    background: var(--bg-nested);
    font-size: 0.76rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.workflow-stored-files {
    display: grid;
    gap: 6px;
    margin-bottom: 6px;
}

.workflow-file-link {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 9px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 5px;
    color: var(--text-main);
    background: rgba(37, 99, 235, 0.05);
    text-align: left;
    cursor: pointer;
}

.workflow-file-link:hover {
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(37, 99, 235, 0.09);
}

.workflow-file-name {
    min-width: 0;
    font-size: 0.74rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-file-command {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 0.7rem;
    font-weight: 600;
}

.workflow-reference-block {
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(15, 159, 117, 0.22);
    border-radius: 5px;
    background: rgba(15, 159, 117, 0.05);
}

.workflow-reference-block h5,
.workflow-subsection h5 {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 0.75rem;
    line-height: 1.4;
}

.workflow-reference-item + .workflow-reference-item {
    margin-top: 8px;
}

.workflow-reference-item > span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.workflow-subsection {
    padding: 11px 0 13px;
    border-bottom: 1px solid var(--border-color);
}

.workflow-subsection:first-child {
    padding-top: 0;
}

.workflow-subsection:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.workflow-empty-state {
    padding: 12px;
    color: var(--text-muted);
    background: var(--bg-nested);
    font-size: 0.76rem;
    text-align: center;
}

.workflow-transit-state {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 6px;
    color: var(--text-secondary);
    background: rgba(37, 99, 235, 0.04);
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
}

.workflow-stage-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 13px;
    margin-top: 13px;
    border-top: 1px solid var(--border-color);
}

.workflow-stage-message {
    margin-right: auto;
    color: #047857;
    font-size: 0.73rem;
}

.workflow-stage-message.is-error {
    color: #dc2626;
}

body.dark-theme .workflow-banner {
    color: #93c5fd;
}

body.dark-theme .workflow-banner.is-closed,
body.dark-theme .workflow-required,
body.dark-theme .workflow-stage-message.is-error {
    color: #fca5a5;
}

body.dark-theme .workflow-banner.is-completed,
body.dark-theme .status-completed .workflow-stage-status,
body.dark-theme .status-skipped .workflow-stage-status {
    color: #6ee7b7;
}

body.dark-theme .workflow-file-command {
    color: #93c5fd;
}

@media (max-width: 980px) {
    .workflow-section-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .workflow-overview {
        grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
    }

    .workflow-current {
        grid-column: 1 / -1;
    }

    .workflow-stage-toggle {
        grid-template-columns: 32px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 9px 10px;
    }

    .workflow-stage-toggle-text {
        display: none;
    }

    .workflow-stage-body {
        padding: 4px 10px 12px;
    }

    .workflow-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .workflow-field-inline-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .workflow-form-grid-compact {
        grid-template-columns: minmax(0, 1fr);
    }

    .workflow-section-grid-compact {
        grid-template-columns: minmax(0, 1fr);
    }

    .workflow-subsection-compact {
        min-height: auto;
    }

    .workflow-field-wide {
        grid-column: auto;
    }

    .workflow-difference-table {
        min-width: 620px;
    }

    .workflow-difference-actions .btn {
        flex: 1 1 120px;
    }

    .workflow-stage-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-stage-message {
        grid-column: 1 / -1;
        margin: 0;
    }

.workflow-stage-actions .btn {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }
}

/* Client navigation no longer displays pending-count badges. */
.menu-pending-badge {
    display: none !important;
}

.menu-item > .menu-pending-badge,
.sub-menu-item > .menu-pending-badge {
    display: none !important;
}

/* ======================================================================
   UI CONSOLIDATION PASS - 2026-08-08
   Re-unify title, body, and control styling so the two portals read as one
   system with only deliberate density differences.
   ====================================================================== */

:root {
    --ui-title-main-size: 26px;
    --ui-title-section-size: 18px;
    --ui-title-card-size: 15px;
    --ui-control-standard-height: 36px;
    --ui-control-compact-height: 34px;
    --ui-control-dense-height: 32px;
}

body,
button,
input,
select,
textarea {
    font-family: var(--font-primary);
}

#auth-system-name,
#preview-brand-name,
.content-header h1,
.step-title {
    font-family: var(--font-heading) !important;
    color: var(--text-main) !important;
    letter-spacing: 0 !important;
    font-weight: 800 !important;
}

.content-header h1,
.step-title,
#auth-system-name {
    font-size: var(--ui-title-main-size) !important;
    line-height: 1.25 !important;
}

.section-title,
.client-home-section-head h2,
.admin-module-card__head h2,
.accounting-settings-heading h2,
.profile-section-title,
.search-title,
.tracking-flow-title,
.quote-summary-header h3 {
    font-family: var(--font-heading) !important;
    color: var(--text-main) !important;
    font-size: var(--ui-title-section-size) !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.panel-card-title,
.table-header h3,
.modal-header h3,
.stepper-title,
.meta-section-title,
.settings-tab-btn,
.settings-project-tab {
    font-family: var(--font-heading) !important;
    color: var(--text-main) !important;
    font-size: var(--ui-title-card-size) !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

.content-header p,
.step-subtitle,
.kpi-title,
.form-label,
.form-label-small,
.menu-item,
.sub-menu-item,
.text-muted {
    font-family: var(--font-primary) !important;
    letter-spacing: 0 !important;
}

/* Standardize the common login and modal forms; keep dense operational grids
   on their existing compact control variants. */
#auth-overlay .form-control,
#auth-overlay input[type="text"],
#auth-overlay input[type="password"],
#auth-overlay input[type="email"],
#auth-overlay input[type="number"],
#auth-overlay input[type="date"],
#auth-overlay input[type="search"],
#auth-overlay select,
#auth-overlay textarea,
#user-modal .form-control,
#user-modal input[type="text"],
#user-modal input[type="password"],
#user-modal input[type="email"],
#user-modal input[type="number"],
#user-modal input[type="date"],
#user-modal input[type="search"],
#user-modal select,
#user-modal textarea {
    min-height: var(--ui-control-standard-height) !important;
    padding: 8px 10px !important;
    border-radius: 4px !important;
    font-family: var(--font-primary) !important;
    font-size: 14px !important;
    line-height: 20px !important;
    color: var(--text-main) !important;
}

#auth-overlay .btn,
#user-modal .btn {
    min-height: var(--ui-control-standard-height) !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    line-height: 18px !important;
    letter-spacing: 0 !important;
}

.btn-sm {
    min-height: var(--ui-control-compact-height) !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    line-height: 16px !important;
}

#preview-brand-name {
    font-size: 18px !important;
    font-weight: 700 !important;
}

#preview-brand-name .brand-accent,
.auth-brand .brand-accent {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 2026-08-10: Inquiry price/sidebar normalization.
   Keep business forms dense while making every inquiry right quote panel use
   the same sidebar track, title row, padding, and internal scroll behavior. */
#view-inquiry {
    --inquiry-price-sidebar-width: clamp(320px, 24vw, 400px);
}

#view-inquiry .inquiry-price-layout {
    gap: 16px !important;
    align-items: start !important;
}

#view-inquiry .inquiry-price-sidebar {
    box-sizing: border-box;
    min-width: 0 !important;
    width: 100% !important;
    padding: 14px 15px !important;
    top: 16px;
    justify-self: end !important;
}

#view-inquiry .inquiry-price-sidebar .quote-summary-header,
#view-inquiry .inquiry-price-sidebar .inquiry-price-header {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    height: 35px !important;
    min-height: 35px !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid var(--border-color) !important;
}

#view-inquiry .inquiry-price-sidebar .quote-summary-header h3,
#view-inquiry .inquiry-price-sidebar .inquiry-price-header h3,
#view-inquiry .inquiry-price-sidebar .inquiry-price-header .panel-card-title,
#view-inquiry .inquiry-price-sidebar > .panel-card-title:first-child {
    margin: 0 !important;
    font-family: var(--font-heading) !important;
    font-size: 14px !important;
    line-height: 20px !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    letter-spacing: 0 !important;
}

#view-inquiry .inquiry-price-sidebar > .panel-card-title:first-child {
    box-sizing: border-box !important;
    display: flex;
    align-items: center;
    height: 35px !important;
    min-height: 35px !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid var(--border-color) !important;
}

#view-inquiry .inquiry-price-sidebar .currency-switcher {
    flex: 0 0 auto;
}

#view-inquiry .inquiry-price-sidebar .curr-btn {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 11px;
    line-height: 16px;
}

#view-inquiry .inquiry-price-sidebar .currency-badge,
#quickquote-result-panel .inquiry-price-header > span {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 24px !important;
    padding: 3px 9px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    line-height: 16px !important;
    font-weight: 800 !important;
}

#logistics-quote-panel #fcl-quote-preview > div {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

#logistics-quote-panel .inquiry-price-history-block {
    padding-top: 12px !important;
    margin-top: 8px !important;
}

#logistics-quote-panel .inquiry-price-history-block h4 {
    margin: 0 0 8px !important;
    font-size: 13px !important;
    line-height: 18px !important;
    font-weight: 800 !important;
}

#logistics-quote-panel .inquiry-price-history {
    max-height: 220px !important;
    overflow-y: auto !important;
    padding-right: 2px;
}

#logistics-quote-panel .inquiry-price-history > div {
    padding: 9px 10px !important;
    margin-bottom: 6px !important;
}

#quickquote-result-panel #qq-wizard-summary .bill-breakdown {
    gap: 8px !important;
}

#quickquote-result-panel #qq-wizard-summary .bill-breakdown > div {
    font-size: 13px !important;
    line-height: 18px !important;
}

@media (min-width: 901px) {
    #view-inquiry .inquiry-price-layout {
        grid-template-columns: minmax(0, 1fr) var(--inquiry-price-sidebar-width) !important;
    }

    #view-inquiry .inquiry-price-sidebar {
        max-width: var(--inquiry-price-sidebar-width) !important;
    }
}

@media (max-width: 900px) {
    #view-inquiry .inquiry-price-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #view-inquiry .inquiry-price-sidebar {
        position: static;
        max-width: none !important;
        justify-self: stretch !important;
    }
}

/* 2026-08-10: keep logistics declared-value input and its read-only
   suggestion box visually the same size inside the two-column row. */
#subtab-logistics .pi-declared-row > div {
    min-width: 0;
}

#subtab-logistics .pi-declared-row .form-control,
#subtab-logistics .pi-declared-row .pi-declared-suggestion {
    box-sizing: border-box;
    width: min(100%, 13rem);
}

/* Global single-line text inputs: unify size across client/admin pages.
   Dense number/date/select/textarea controls keep their own sizing. */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input:not([type]) {
    box-sizing: border-box;
    height: 42px !important;
    min-height: 42px !important;
    padding: 12px 16px !important;
    border-radius: 4px !important;
    font-size: 13.12px !important;
    line-height: 1.2 !important;
}

/* Standard single-line customer form fields: keep the regular forms on one
   shared height, while leaving dense tables/workbenches on their compact rules. */
#subtab-company .form-group > input.form-control:not([type="file"]),
#subtab-company .form-group > select.form-control,
#subtab-logistics .form-group > input.form-control:not([type="file"]),
#subtab-logistics .form-group > select.form-control,
#subtab-quickquote .form-group > input.form-control:not([type="file"]),
#subtab-quickquote .form-group > select.form-control,
#subtab-city-tag .form-group > input.form-control:not([type="file"]),
#subtab-city-tag .form-group > select.form-control,
#subtab-eac .form-group > input.form-control:not([type="file"]),
#subtab-eac .form-group > select.form-control,
#subtab-individual-rental .form-group > input.form-control:not([type="file"]),
#subtab-individual-rental .form-group > select.form-control,
#subtab-accounting .form-group > input.form-control:not([type="file"]),
#subtab-accounting .form-group > select.form-control,
#view-products .form-group > input.form-control:not([type="file"]),
#view-products .form-group > select.form-control,
#view-hs-query .form-group > input.form-control:not([type="file"]),
#view-hs-query .form-group > select.form-control {
    box-sizing: border-box;
    height: 42px;
    min-height: 42px;
    padding: 12px 16px;
    font-size: 13.12px;
    line-height: 1.2;
}

/* Client library side panels: product library, address templates and HS history
   share the same right-column width, card shape and empty-state rhythm. */
#view-products .client-library-layout,
#view-addresses .client-library-layout,
#view-hs-query .client-library-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 16px;
    align-items: start;
    width: 100%;
    max-width: none;
}

#view-products .client-side-panel,
#view-addresses .client-side-panel,
#view-hs-query .client-side-panel {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 124px;
    padding: 18px;
    position: sticky;
    top: 16px;
    justify-self: stretch;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

#view-products .client-side-panel > .panel-card-title,
#view-addresses .client-side-panel > .panel-card-title,
#view-hs-query .hs-query-history-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#view-products .client-side-panel > .panel-card-title,
#view-addresses .client-side-panel > .panel-card-title,
#view-hs-query .hs-query-history-card__header .panel-card-title {
    font-size: 15px;
    line-height: 21px;
}

#view-products .client-side-panel > .panel-card-title,
#view-addresses .client-side-panel > .panel-card-title {
    font-weight: 700;
}

#view-products #product-library-list,
#view-addresses #address-template-list,
#view-hs-query #hs-query-history {
    margin-top: 0 !important;
}

#view-products #product-library-list > p,
#view-addresses .address-template-empty,
#view-hs-query .hs-query-history-list > p,
#view-hs-query .hs-query-history-list .progress-record-empty {
    box-sizing: border-box;
    min-height: 52px;
    margin: 0 !important;
    padding: 16px 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted) !important;
    text-align: center !important;
    font-size: 0.82rem !important;
    line-height: 1.5;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    background: var(--bg-nested);
}

/* HS query page: use the previously empty right side for recent inquiry
   history while keeping the shared progress-history renderer untouched. */
#view-hs-query .hs-query-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 16px;
    align-items: start;
    width: 100%;
    max-width: none;
}

#view-hs-query .hs-query-form-card,
#view-hs-query .hs-query-history-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 18px;
}

#view-hs-query .hs-query-submit-card {
    margin: 0;
    padding: 16px;
}

#view-hs-query .hs-query-input-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

#view-hs-query .hs-query-input-row .form-group {
    width: auto;
    min-width: 0;
    margin: 0;
}

#view-hs-query .hs-query-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

#view-hs-query #hs-query-result {
    margin-top: 12px;
}

#view-hs-query .hs-query-history-card {
    position: sticky;
    top: 16px;
}

#view-hs-query .hs-query-history-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#view-hs-query .hs-query-history-card__header .panel-card-title {
    margin: 0;
    font-size: 15px;
    line-height: 21px;
}

#view-hs-query .hs-query-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(620px, calc(100vh - 170px));
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

#view-hs-query .hs-query-history-list .progress-record-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
}

#view-hs-query .hs-query-history-list .progress-record-card + .progress-record-card {
    border-top: 1px solid var(--border-color);
}

#view-hs-query .hs-query-history-list .progress-record-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    min-height: 0;
    padding: 12px;
    align-items: start;
}

#view-hs-query .hs-query-history-list .progress-record-cell {
    font-size: 0.76rem;
}

#view-hs-query .hs-query-history-list .progress-record-cell--id {
    grid-column: 1;
    grid-row: 1;
}

#view-hs-query .hs-query-history-list .progress-record-cell--summary {
    grid-column: 1 / -1;
    grid-row: 2;
}

#view-hs-query .hs-query-history-list .progress-record-cell--date {
    grid-column: 1;
    grid-row: 3;
}

#view-hs-query .hs-query-history-list .progress-record-row .progress-record-cell:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

#view-hs-query .hs-query-history-list .progress-record-cell--value {
    grid-column: 1;
    grid-row: 4;
}

#view-hs-query .hs-query-history-list .progress-record-cell--action {
    grid-column: 2;
    grid-row: 3 / span 2;
    align-self: end;
    justify-self: end;
}

#view-hs-query .hs-query-history-list .progress-order-card-body {
    padding: 10px 12px 12px;
}

@media (max-width: 1180px) {
    #view-products .client-library-layout,
    #view-addresses .client-library-layout,
    #view-hs-query .hs-query-workbench {
        grid-template-columns: minmax(0, 1fr);
    }

    #view-products .client-side-panel,
    #view-addresses .client-side-panel,
    #view-hs-query .hs-query-history-card {
        position: static;
    }

    #view-hs-query .hs-query-history-list {
        max-height: none;
    }
}

@media (max-width: 760px) {
    #view-hs-query .hs-query-input-row {
        grid-template-columns: minmax(0, 1fr);
    }

    #view-hs-query .hs-query-actions .btn {
        width: 100%;
    }
}

#logistics-departure,
#logistics-destination {
    box-sizing: border-box;
    height: 42px;
    min-height: 42px;
    line-height: 1.2;
}

/* 2026-08-14: Admin settings logistics pricing rules should use the available
   workspace width. The old inline 560px layout made HS tax fields overlap. */
#view-settings .logistics-pricing-settings-layout {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-self: stretch;
}

#view-settings .logistics-pricing-settings-card {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
}

#view-settings .logistics-pricing-settings-card .form-control {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none !important;
}

#view-settings .logistics-single-fee-field {
    box-sizing: border-box;
    width: min(100%, calc((100% - 12px) / 2));
    min-width: min(100%, 260px);
}

#view-settings #logistics-special-lines,
#view-settings #logistics-tax-rules {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

#view-settings .logistics-rule-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

#view-settings .logistics-rule-card__head {
    flex-wrap: wrap;
}

#view-settings .logistics-rule-grid,
#view-settings .logistics-special-match-grid,
#view-settings .logistics-tax-main-grid,
#view-settings .logistics-tax-parameter-grid {
    display: grid;
    gap: 10px 12px;
    width: 100%;
    min-width: 0;
    margin-bottom: 10px;
    box-sizing: border-box;
    align-items: end;
}

#view-settings .logistics-rule-grid--two,
#view-settings .logistics-tax-main-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

#view-settings .logistics-special-match-grid {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
}

#view-settings .logistics-tax-parameter-grid {
    grid-template-columns: minmax(180px, 1.15fr) repeat(4, minmax(132px, 1fr));
}

#view-settings .logistics-rule-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

#view-settings .logistics-rule-field .form-label-small {
    margin-bottom: 0;
    line-height: 1.35;
}

#view-settings .logistics-rule-field input.form-control,
#view-settings .logistics-rule-field select.form-control {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    line-height: 20px !important;
}

#view-settings .logistics-rule-field textarea.form-control {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none !important;
    min-height: 70px;
    padding: 10px 12px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

#view-settings .logistics-tax-note-field {
    width: 100%;
}

#view-settings .city-tag-settings-layout,
#view-settings .accounting-settings-layout {
    box-sizing: border-box;
    width: 100%;
    max-width: none !important;
}

#view-settings [data-settings-project] {
    box-sizing: border-box;
    max-width: none !important;
}

#view-settings .settings-project-block {
    width: 100%;
    min-width: 0;
}

#view-settings .settings-project-block > .card,
#view-settings #settings-sub-warehouse-pricing > .card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

#view-settings #settings-sub-warehouse-pricing > .card {
    padding: 1.5rem !important;
}

#view-settings .individual-rental-days-field {
    width: 100%;
    max-width: none;
}

/* Company registration settings: group dense address settings and other
   maintenance controls into two full-width frames. Keep the original field
   IDs/buttons untouched; this is presentation-only. */
#view-settings .company-settings-groups {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: none;
    margin-top: 1rem;
}

#view-settings .company-settings-group {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.045), var(--bg-card));
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(var(--glass-blur));
}

#view-settings .company-settings-group__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

#view-settings .company-settings-group__header h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 760;
    line-height: 1.25;
}

#view-settings .company-settings-group__header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

#view-settings .company-settings-address-grid,
#view-settings .company-settings-other-grid {
    box-sizing: border-box;
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: none;
    gap: 14px;
    align-items: stretch;
}

#view-settings .company-settings-address-grid {
    grid-template-columns: repeat(3, minmax(250px, 1fr)) !important;
}

#view-settings .company-settings-other-grid {
    grid-template-columns: repeat(2, minmax(300px, 1fr)) !important;
}

#view-settings .company-settings-address-grid > .card,
#view-settings .company-settings-other-grid > .card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 1.2rem !important;
}

#view-settings .company-settings-address-grid .form-control,
#view-settings .company-settings-other-grid .form-control {
    width: 100%;
    min-width: 0;
    max-width: none !important;
}

@media (max-width: 1180px) {
    #view-settings .company-settings-address-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    #view-settings .company-settings-group {
        padding: 14px;
    }

    #view-settings .company-settings-address-grid,
    #view-settings .company-settings-other-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Logistics detail section headings use one normal, readable title scale. */
.logistics-tax-calculator__head {
    min-height: 34px;
    box-sizing: border-box;
    padding: 6px 0 6px 12px;
}

.logistics-tax-calculator__head > div {
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
}

.logistics-tax-calculator__head strong {
    font-size: 0.9rem;
    line-height: 20px;
}

.logistics-tax-calculator__head span,
.logistics-tax-calculator__status {
    font-size: 0.78rem;
    line-height: 20px;
}

.logistics-manual-quote__title {
    display: flex;
    align-items: center;
    min-height: 34px;
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 20px;
}

.logistics-operation-log {
    font-size: 0.82rem;
    line-height: 1.5;
}

.logistics-operation-log > strong {
    display: flex !important;
    align-items: center;
    min-height: 34px;
    margin: 0 0 6px !important;
    font-size: 0.9rem !important;
    line-height: 20px;
}

.admin-logistics-workflow-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 0 13px 6px 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-logistics-workflow-head span {
    margin: 0;
    font-size: 0.78rem;
    line-height: 20px;
}

.admin-logistics-workflow-head h4 {
    font-size: 0.9rem;
    line-height: 20px;
}

.logistics-manual-quote__head {
    display: flex;
    align-items: center;
    min-height: 34px;
    gap: 10px;
    margin-bottom: 10px;
}

.logistics-manual-quote__head .logistics-manual-quote__title {
    flex: 1 1 auto;
    min-height: 34px;
    margin: 0;
}

.logistics-section-toggle {
    flex: 0 0 auto;
    width: 54px;
    min-width: 54px;
    height: 30px;
    min-height: 30px;
    box-sizing: border-box;
    padding: 4px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--color-primary);
    font-size: 0.72rem;
    line-height: 18px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.logistics-section-toggle:hover,
.logistics-section-toggle:focus-visible {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.06);
    outline: none;
}

.logistics-tax-calculator__head .logistics-section-toggle,
.logistics-operation-log > strong .logistics-section-toggle,
.admin-logistics-workflow-head .logistics-section-toggle {
    margin-left: auto;
}

.logistics-tax-calculator__head .logistics-section-toggle {
    margin-right: -1px;
}

.logistics-detail-section-body[hidden],
.logistics-tax-calculator__body[hidden],
.logistics-manual-quote__body[hidden],
.admin-logistics-workflow-body[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    #view-settings .logistics-special-match-grid,
    #view-settings .logistics-tax-parameter-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    #view-settings .logistics-single-fee-field {
        width: 100%;
    }

    #view-settings .logistics-rule-grid--two,
    #view-settings .logistics-tax-main-grid,
    #view-settings .logistics-special-match-grid,
    #view-settings .logistics-tax-parameter-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Overseas warehouse pricing editor: align dynamic tier fields with table
   headers and reuse the same nested-card visual language as the settings page.
   Dynamic rows intentionally keep their original class names/order for saving. */
#view-settings #settings-sub-warehouse-pricing .op-section {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin-bottom: 14px !important;
    padding: 14px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.025), var(--bg-nested)) !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section h5 {
    margin: 0 !important;
    color: var(--text-main);
    font-size: 0.9rem !important;
    font-weight: 750 !important;
    line-height: 20px !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section > h5 {
    margin-bottom: 10px !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section table + h5 {
    margin: 14px 0 8px !important;
    font-size: 0.85rem !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section h6 {
    margin: 0 0 8px !important;
    color: var(--text-main);
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 18px !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section > div[style*="display:flex"][style*="justify-content:space-between"] {
    min-height: 32px;
    margin-bottom: 10px !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section .form-label-small {
    display: block;
    margin-bottom: 6px;
    line-height: 18px;
}

#view-settings #settings-sub-warehouse-pricing .op-section > div[style*="margin-bottom:8px"],
#view-settings #settings-sub-warehouse-pricing .op-section > div[style*="margin-top:8px"] {
    margin-bottom: 10px !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section > div[style*="display:grid"] {
    gap: 10px 12px !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section table {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: separate !important;
    border-spacing: 0;
    font-size: 0.78rem !important;
    margin: 0 !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section th,
#view-settings #settings-sub-warehouse-pricing .op-section td {
    box-sizing: border-box;
    min-width: 0;
    height: 40px;
    padding: 4px 8px !important;
    text-align: left !important;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

#view-settings #settings-sub-warehouse-pricing .op-section th {
    color: var(--text-main);
    font-weight: 700;
    white-space: nowrap;
}

#view-settings #settings-sub-warehouse-pricing .op-section th:last-child,
#view-settings #settings-sub-warehouse-pricing .op-section td:last-child {
    width: 38px !important;
    padding-right: 0 !important;
    text-align: center !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section table input,
#view-settings #settings-sub-warehouse-pricing .op-section table select {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 6px 10px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    background: var(--bg-app) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
    line-height: 18px !important;
    outline: none;
}

#view-settings #settings-sub-warehouse-pricing .op-section > div:not([class]) > input.form-control,
#view-settings #settings-sub-warehouse-pricing .op-section > div:not([class]) > select.form-control,
#view-settings #settings-sub-warehouse-pricing .op-section > div:not([class]) > textarea.form-control,
#view-settings #settings-sub-warehouse-pricing .op-section div > input.form-control,
#view-settings #settings-sub-warehouse-pricing .op-section div > select.form-control {
    box-sizing: border-box;
    min-height: 34px;
    border-radius: 6px;
}

#view-settings #settings-sub-warehouse-pricing .op-section table input:focus,
#view-settings #settings-sub-warehouse-pricing .op-section table select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1) !important;
}

#view-settings #settings-sub-warehouse-pricing .op-section .op-del-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: var(--color-danger) !important;
    line-height: 1;
}

#view-settings #settings-sub-warehouse-pricing .op-section .op-del-row:hover {
    background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 900px) {
    #view-settings #settings-sub-warehouse-pricing .op-section {
        overflow-x: auto;
    }

    #view-settings #settings-sub-warehouse-pricing .op-section table {
        min-width: 720px;
    }
}

/* Logistics quote details remain available from the workflow after cooperation. */
.tracking-flow-head-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
}

.tracking-quote-detail-button {
    min-width: 118px;
    height: 34px;
    padding: 0 13px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.42);
    border-radius: 6px;
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.06);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

.tracking-quote-detail-button:hover,
.tracking-quote-detail-button:focus-visible {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.12);
    outline: none;
}

.logistics-quote-detail-modal {
    width: min(820px, calc(100vw - 32px));
    max-width: 820px;
    max-height: min(86vh, 820px);
    padding: 0;
    overflow: hidden;
    color: var(--text-main);
    background: var(--bg-card);
}

.logistics-quote-detail-modal > .modal-header {
    margin: 0;
    padding: 14px 18px;
}

.logistics-quote-detail-content {
    max-height: calc(min(86vh, 820px) - 58px);
    padding: 18px;
    overflow-y: auto;
    color: var(--text-main);
    background: var(--bg-card);
}

.logistics-quote-detail-list {
    gap: 12px;
}

.logistics-quote-detail-content .meta-info-item {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.logistics-quote-detail-content .meta-info-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.logistics-quote-detail-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.86rem;
}

@media (max-width: 760px) {
    .tracking-flow-head-actions {
        width: 100%;
        align-items: flex-start;
        gap: 7px;
    }

    .tracking-quote-detail-button {
        min-width: 112px;
    }

    .logistics-quote-detail-modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .logistics-quote-detail-content {
        max-height: calc(100vh - 82px);
        padding: 14px;
    }
}

/* Logistics quote attachment: one inquiry-level XLSX file alongside the product editors. */
.logi-product-editors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.logi-quote-attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
    background: var(--bg-main);
}

.logi-quote-attachment-editor .logi-inline-editor {
    grid-template-columns: minmax(0, 1fr) auto;
}

.logi-quote-attachment-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.logi-product-editors .logi-quote-attachment-actions .btn {
    width: 106px !important;
    flex: 0 0 106px;
}

.logistics-manual-quote__summary,
.logistics-manual-quote__attachment {
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid rgba(59, 130, 246, 0.14);
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.05);
}

.logistics-manual-quote__summary table {
    border-collapse: collapse;
}

.logistics-manual-quote__summary th,
.logistics-manual-quote__summary td {
    padding: 7px 5px;
    border-bottom: 1px solid var(--border-color);
}

.logistics-manual-quote__attachment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.logistics-manual-quote__attachment > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.logistics-manual-quote__attachment strong,
.logistics-manual-quote__attachment span {
    display: block;
}

.logistics-manual-quote__attachment span {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logistics-manual-quote__attachment .btn {
    flex: 0 0 auto;
    min-width: 86px;
    height: 32px;
    padding: 5px 10px;
}

@media (max-width: 950px) {
    .logi-product-editors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .logi-product-editors {
        grid-template-columns: minmax(0, 1fr);
    }

    .logistics-manual-quote__attachment {
        align-items: stretch;
        flex-direction: column;
    }

    .logistics-manual-quote__attachment .btn {
        align-self: flex-start;
    }

    .logi-quote-attachment-editor .logi-inline-editor {
        grid-template-columns: minmax(0, 1fr);
    }

    .logi-quote-attachment-actions {
        justify-content: flex-start;
    }
}

/* ============================================================
   UX polish (2026-08-28): global in-flight indicator + tactile
   feedback so the interface responds instantly and never feels dead
   while a request is in flight.
   ============================================================ */
#global-busy-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--color-primary, #2f6bff), #7dd3fc, var(--color-primary, #2f6bff));
    background-size: 200% 100%;
    opacity: 0;
    pointer-events: none;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 1px 6px rgba(47, 107, 255, 0.55);
    transition: width 0.25s ease, opacity 0.2s ease;
}
#global-busy-bar.active {
    opacity: 1;
    width: 100%;
    animation: global-busy-slide 1.1s linear infinite;
}
@keyframes global-busy-slide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Disabled controls must read as disabled instantly (no dead gray flash). */
button:disabled,
.btn:disabled,
[data-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: saturate(0.6);
}
/* Press feedback: the control visibly acknowledges the click before any
   network round-trip completes. */
button:not(:disabled):active,
.btn:not(:disabled):active {
    transform: translateY(1px) scale(0.99);
}
button:not(:disabled),
.btn:not(:disabled) {
    transition: transform 0.08s ease, opacity 0.15s ease, box-shadow 0.2s ease;
}

/* Skip motion for users who prefer reduced movement. */
@media (prefers-reduced-motion: reduce) {
    #global-busy-bar.active { animation: none; }
    button:not(:disabled),
    .btn:not(:disabled) { transition: none; }
}

/* Logistics v2: wide tables scroll horizontally instead of squashing. */
.logistics-list-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.logistics-list-scroll table {
    min-width: 1180px;
}
/* 列宽统一（fixed 布局）：各行完全对齐，内容超长省略号+悬浮提示 */
.logistics-list-table {
    table-layout: fixed;
}
.logistics-list-table thead th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.logistics-list-table tbody tr td:not([colspan]) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.logistics-list-table thead th:nth-child(1) { width: 44px; }
.logistics-list-table thead th:nth-child(2) { width: 170px; }
.logistics-list-table thead th:nth-child(3) { width: 70px; }
.logistics-list-table thead th:nth-child(4) { width: 210px; }
.logistics-list-table thead th:nth-child(5) { width: 150px; }
.logistics-list-table thead th:nth-child(6) { width: 210px; }
.logistics-list-table thead th:nth-child(7) { width: 160px; }
.logistics-list-table thead th:nth-child(8) { width: 110px; }
.logistics-list-table thead th:nth-child(9) { width: 110px; }
tr.logi-row-clickable {
    cursor: pointer;
}
tr.logi-row-clickable:hover {
    background: var(--bg-hover, rgba(100, 116, 139, 0.06));
}
.logi-reply-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.78rem;
}
.logi-reply-fields input {
    flex: 0 1 180px;
    font-size: 0.78rem;
    padding: 5px 8px;
}
.logi-reply-fields input.logi-quote-note {
    flex: 1 1 220px;
}
.logi-reply-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.logi-reply-row input {
    flex: 1;
    font-size: 0.82rem;
}

/* ============================================================
   TOP-NAV-R1 (20260901): 左侧栏 → 顶部横栏
   适用：客户前台 index.html(8000) 与后台 admin.html(8001)
   交互：菜单直接切换；「智能询价与申报」子菜单为悬停下拉（CSS 控制）
   ============================================================ */
:root {
    --topbar-height: 60px;
}

.app-layout {
    display: block;
    min-height: 100vh;
}

/* --- 后台：菜单项多，提前压缩 --- */
@media (max-width: 1500px) {
    .sidebar-admin .sidebar-menu .menu-item {
        font-size: 12px;
    }
    .sidebar-admin .lang-btn {
        min-height: 26px;
        padding: 3px 6px;
        font-size: 10px;
    }
    .sidebar-admin .sidebar-settings .settings-row:not(.lang-row) {
        display: none !important;
    }
}

/* 后台菜单即使压缩字号也较宽，1300px 以下提前进入图标模式 */
@media (max-width: 1300px) {
    .sidebar-admin .menu-item {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
        gap: 0;
    }
    .sidebar-admin .menu-item > span[data-i18n] {
        display: none !important;
    }
    .sidebar-admin .menu-group > .menu-item::after {
        display: none;
    }
    .sidebar-admin .sub-menu {
        min-width: 200px;
    }
}

/* --- 窄屏：图标模式横栏（菜单文字隐藏，悬停下拉保留文字） --- */
@media (max-width: 950px) {
    .sidebar {
        padding: 0 10px;
        gap: 4px;
    }
    .brand-text,
    .settings-label,
    .user-info,
    .user-arrow {
        display: none !important;
    }
    /* 覆盖旧版窄侧栏规则（原 950px 媒体查询），保持顶部横栏布局 */
    .sidebar-brand {
        justify-content: flex-start;
        width: auto;
    }
    .sidebar-menu,
    .menu-group,
    .sub-menu {
        width: auto;
        align-items: stretch;
    }
    .sub-menu-item {
        width: auto;
        height: auto;
        min-height: 34px;
        justify-content: flex-start;
        padding: 8px 12px;
        border-radius: 4px;
    }
    .switch {
        display: inline-block !important;
    }
    .lang-row {
        display: grid !important;
    }
    .sidebar-brand {
        padding: 0 6px 0 0;
    }
    .menu-item {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
        gap: 0;
    }
    .menu-item > span[data-i18n] {
        display: none !important;
    }
    .menu-group > .menu-item::after {
        display: none;
    }
    .sub-menu {
        min-width: 200px;
    }
    .user-profile {
        padding: 4px 6px;
    }
    .settings-row.lang-row {
        width: auto;
    }
    .lang-btn {
        min-height: 26px;
        padding: 4px 8px;
        font-size: 10px;
    }
    .sidebar-settings .settings-row:not(.lang-row) {
        display: none !important;
    }
}

/* --- 超窄屏：隐藏语言切换，只保留菜单+头像 --- */
@media (max-width: 680px) {
    .sidebar-settings .lang-row {
        display: none !important;
    }
    .user-profile {
        padding: 4px;
    }
}

/* ============================================================
   PROGRESS-SIDENAV-R1 (20260901): 进度查询二级类目 → 左侧竖向导航
   仅作用于客户前台 progress-tabs 结构（admin 无此结构，不受影响）
   ============================================================ */
.progress-tabs-shell {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.progress-tabs {
    flex: 0 0 176px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 8px;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
    overflow-x: visible;
    overflow-y: auto;
    position: sticky;
    top: calc(var(--topbar-height) + 16px);
    align-self: flex-start;
    max-height: calc(100vh - var(--topbar-height) - 32px);
}

.progress-tab-btn {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    border-radius: 8px;
    padding: 8px 10px;
}

.progress-tab-count {
    margin-left: auto;
    flex: 0 0 auto;
}

.progress-tab-panels {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 16px;
}

/* 窄屏：二级类目回到顶部横排（可横向滚动） */
@media (max-width: 980px) {
    .progress-tabs-shell {
        flex-direction: column;
    }
    .progress-tabs {
        flex: none;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        position: static;
        max-height: none;
        padding: 7px;
        width: 100%;
    }
    .progress-tab-btn {
        justify-content: center;
        width: auto;
        min-height: 34px;
        height: auto;
        align-self: center;
    }
    .progress-tab-count {
        margin-left: 0;
    }
}

/* ============================================================
   INQUIRY-SIDENAV-R1 (20260901): 询价二级类目 → 页面左侧竖向导航
   进度查询版块 → 顶栏「进度查询」悬停下拉（原页内左栏隐藏）
   ============================================================ */

/* --- 询价页：左侧类目导航（参照进度查询左侧栏样式） --- */
#view-inquiry .inquiry-layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-width: 0;
}

#view-inquiry .inquiry-subnav {
    flex: 0 0 176px;
    min-width: 0;
    position: sticky;
    top: calc(var(--topbar-height) + 16px);
    align-self: flex-start;
    max-height: calc(100vh - var(--topbar-height) - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 10px 8px;
    box-sizing: border-box;
}

#view-inquiry .inquiry-subnav .sub-menu {
    position: static;
    flex-direction: column;
    max-height: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    gap: 4px;
    width: 100%;
}

#view-inquiry .inquiry-subnav .sub-menu-item {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

#view-inquiry .inquiry-content {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 16px;
}

@media (max-width: 980px) {
    #view-inquiry .inquiry-layout {
        flex-direction: column;
    }
    #view-inquiry .inquiry-subnav {
        flex: none;
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
        padding: 7px;
        border-radius: 10px;
    }
    #view-inquiry .inquiry-subnav .sub-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
    }
    #view-inquiry .inquiry-subnav .sub-menu-item {
        width: auto;
    }
    #view-inquiry .inquiry-content {
        padding-left: 0;
        padding-top: 14px;
    }
}

/* --- 进度查询：版块入口保留顶栏下拉；页内左栏同时保留（两种入口并存） --- */
#view-tracking .progress-tab-panels {
    padding: 14px 16px;
}

.topnav-progress-menu {
    min-width: 168px;
    padding: 6px !important;
}

.topnav-progress-menu .progress-tab-btn {
    width: 100%;
    min-height: 34px;
    justify-content: flex-start;
    border-radius: 8px;
    padding: 8px 10px;
    gap: 8px;
    font-size: 13px;
}

.topnav-progress-menu .progress-tab-count {
    margin-left: auto;
    flex: 0 0 auto;
}

/* ============================================================
   PROGRESS-FILTER-R1 (20260903): 进度查询统一查询筛选工具行
   状态(进行中/已完结) + 客户 + 单号 + 时间区间
   ============================================================ */
.unified-progress-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--bg-nested);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.unified-progress-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 118px;
}

.unified-progress-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.unified-progress-field .form-control {
    height: 32px;
    font-size: 12px;
    padding: 4px 8px;
    min-width: 96px;
}

.unified-progress-toolbar input[type="date"].form-control {
    min-width: 132px;
}

@media (max-width: 700px) {
    .unified-progress-field {
        min-width: 44%;
    }
}

/* 勾选/全选支持 */
.uni-check-cell {
    flex: 0 0 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px !important;
    min-width: 26px;
    width: 26px;
}

.progress-record-cell--check input.uni-row-check,
.td-check input.uni-row-check {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.progress-record-table-head .uni-check-cell,
table.inprogress-table th.td-check,
table.orders-table th.td-check {
    width: 26px;
    min-width: 26px;
    max-width: 28px;
}

.progress-record-table-head .uni-check-cell input.uni-check-all,
table.inprogress-table th.td-check input.uni-check-all,
table.orders-table th.td-check input.uni-check-all {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

tr.uni-row-selected,
.progress-record-card.uni-row-selected {
    background: rgba(var(--color-primary-rgb), 0.05);
    border-color: rgba(var(--color-primary-rgb), 0.22) !important;
}

/* ============================================================
   PROGRESS-TOOLBAR-R2 (20260903): 左栏贴顶 + 工具行等宽统一
   ============================================================ */
.progress-tabs {
    position: static !important;
    align-self: auto !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.progress-tabs-shell {
    align-items: flex-start;
}

.unified-progress-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    align-items: end;
    gap: 10px;
}

.unified-progress-field {
    min-width: 0;
    width: auto;
}

.unified-progress-field .form-control {
    width: 100%;
    min-width: 0;
    height: 32px;
}

.unified-progress-toolbar input[type="date"].form-control {
    min-width: 0;
}

.unified-progress-export {
    height: 32px;
}

@media (max-width: 700px) {
    .unified-progress-toolbar {
        grid-template-columns: 1fr 1fr;
    }
}
