/* ==========================================
   VARIABLES & RESET
   ========================================== */
:root {
    --primary: #f26522;
    --primary-light: #f7905d;
    --primary-dark: #d55317;
    --bg-color: #f4f6f9;
    --text-main: #0f172a;
    --text-muted: #475569;
    --white: #ffffff;
    --border-color: #cbd5e1;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 16px -6px rgba(0, 0, 0, 0.04), inset 0 1.5px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(15, 23, 42, 0.05);
    --card-shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 0 10px 20px -8px rgba(0, 0, 0, 0.06), inset 0 1.5px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(15, 23, 42, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --danger: #ef4444;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.dashboard-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-main);
    background-color: #f1f5f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='900' viewBox='0 0 1440 900' fill='none'%3E%3Crect width='1440' height='900' fill='%23f1f5f9'/%3E%3Cg opacity='0.35'%3E%3Crect x='40' y='500' width='80' height='300' fill='%23cbd5e1' rx='4'/%3E%3Crect x='160' y='420' width='110' height='380' fill='%2394a3b8' rx='4'/%3E%3Crect x='310' y='530' width='90' height='270' fill='%23cbd5e1' rx='4'/%3E%3Crect x='440' y='380' width='130' height='420' fill='%2394a3b8' rx='4'/%3E%3Crect x='610' y='460' width='100' height='340' fill='%23cbd5e1' rx='4'/%3E%3Crect x='750' y='390' width='120' height='410' fill='%2394a3b8' rx='4'/%3E%3Crect x='910' y='510' width='85' height='290' fill='%23cbd5e1' rx='4'/%3E%3Crect x='1030' y='410' width='130' height='390' fill='%2394a3b8' rx='4'/%3E%3Crect x='1200' y='470' width='110' height='330' fill='%23cbd5e1' rx='4'/%3E%3C/g%3E%3Crect x='0' y='760' width='1440' height='140' fill='%23334155'/%3E%3Cline x1='0' y1='760' x2='1440' y2='760' stroke='%23f26522' stroke-width='4' opacity='0.9'/%3E%3Cline x1='0' y1='825' x2='1440' y2='825' stroke='%23ffffff' stroke-width='5' stroke-dasharray='40 25' opacity='0.9'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    background-repeat: no-repeat;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

body.dashboard-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(244, 246, 249, 0.45); /* Light crisp tint */
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: -1;
    transition: background 0.3s ease;
}

/* ==========================================
   DARK THEME VARIABLES AND STYLE OVERRIDES
   ========================================== */
body.dark-theme {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --white: #1e293b;
    --border-color: #334155;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 16px -6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --card-shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.4), 0 10px 20px -8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.05);
    background-color: #0b111e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='900' viewBox='0 0 1440 900' fill='none'%3E%3Crect width='1440' height='900' fill='%230b111e'/%3E%3Cg opacity='0.3'%3E%3Crect x='40' y='500' width='80' height='300' fill='%23334155' rx='4'/%3E%3Crect x='160' y='420' width='110' height='380' fill='%231e293b' rx='4'/%3E%3Crect x='310' y='530' width='90' height='270' fill='%23334155' rx='4'/%3E%3Crect x='440' y='380' width='130' height='420' fill='%23475569' rx='4'/%3E%3Crect x='610' y='460' width='100' height='340' fill='%231e293b' rx='4'/%3E%3Crect x='750' y='390' width='120' height='410' fill='%23334155' rx='4'/%3E%3Crect x='910' y='510' width='85' height='290' fill='%231e293b' rx='4'/%3E%3Crect x='1030' y='410' width='130' height='390' fill='%23475569' rx='4'/%3E%3Crect x='1200' y='470' width='110' height='330' fill='%231e293b' rx='4'/%3E%3Ccircle cx='185' cy='450' r='2' fill='%23fbbf24'/%3E%3Ccircle cx='205' cy='450' r='2' fill='%23fbbf24'/%3E%3Ccircle cx='470' cy='410' r='2.5' fill='%2338bdf8'/%3E%3Ccircle cx='780' cy='430' r='2' fill='%23fbbf24'/%3E%3C/g%3E%3Crect x='0' y='760' width='1440' height='140' fill='%23080d1a'/%3E%3Cline x1='0' y1='760' x2='1440' y2='760' stroke='%23f26522' stroke-width='4' opacity='0.85'/%3E%3Cline x1='0' y1='825' x2='1440' y2='825' stroke='%23fbbf24' stroke-width='5' stroke-dasharray='40 25' opacity='0.85'/%3E%3C/svg%3E");
}

body.dark-theme::before {
    background: rgba(8, 15, 30, 0.78); /* Deep dark navy overlay */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

body.dark-theme .dashboard-nav {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom-color: #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

body.dark-theme .logo-text {
    color: #fdba74; /* Soft orange/peach logo text for dark mode readability */
}

body.dark-theme .panel {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .panel-header {
    background: rgba(15, 23, 42, 0.5);
    border-bottom-color: #334155;
}

body.dark-theme .price-table td:first-child {
    background: rgba(15, 23, 42, 0.3);
    color: #f8fafc;
    border-right-color: #334155;
}

body.dark-theme .price-table th {
    background: #0f172a;
    color: #94a3b8;
    border-bottom-color: #334155;
}

body.dark-theme .price-table td {
    border-bottom-color: #334155;
    color: #e2e8f0;
}

body.dark-theme .price-table tr:hover td {
    background: rgba(242, 101, 34, 0.08);
}

body.dark-theme .price-table tr:hover td:first-child {
    background: rgba(242, 101, 34, 0.12);
}

body.dark-theme .price-table td.highlight {
    background: rgba(242, 101, 34, 0.15);
    color: #ffedd5;
}

body.dark-theme .addon-card {
    background: rgba(15, 23, 42, 0.4);
    border-color: #334155;
}

body.dark-theme .addon-card:hover {
    border-color: var(--primary-light);
    background: rgba(242, 101, 34, 0.05);
}

body.dark-theme .result-box {
    background: #0f172a !important;
    border-color: #334155 !important;
}

body.dark-theme .result-box.success-border {
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

body.dark-theme .result-box.warning-border {
    border-color: rgba(245, 158, 11, 0.4) !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

body.dark-theme .tracking-code {
    color: #f8fafc !important;
}

body.dark-theme .btn-copy {
    color: #34d399 !important;
}

body.dark-theme .btn-copy:hover {
    background: rgba(16, 185, 129, 0.15) !important;
}

body.dark-theme .upload-zone {
    background: rgba(15, 23, 42, 0.4);
    border-color: #475569;
}

body.dark-theme .upload-zone:hover {
    border-color: var(--primary);
    background: rgba(242, 101, 34, 0.08);
}

body.dark-theme .calculator-result {
    background: linear-gradient(135deg, #3c1e0e, #27140a);
    border-color: #7c2d12;
}

body.dark-theme .result-breakdown {
    color: #ffedd5;
    border-bottom-color: #7c2d12;
}

body.dark-theme .parcel-item {
    background: rgba(15, 23, 42, 0.4);
    border-color: #475569;
}

body.dark-theme .parcel-item:hover {
    background: rgba(242, 101, 34, 0.05);
    border-color: var(--primary-light);
}

body.dark-theme input, body.dark-theme select {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

body.dark-theme input:focus, body.dark-theme select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.2) !important;
}

body.dark-theme .tab-nav {
    background: #1e293b;
    border-color: #334155;
}

body.dark-theme .tab-btn:hover {
    background: #334155;
}

body.dark-theme .hgt-item {
    color: #e2e8f0;
}

body.dark-theme .hgt-notes li {
    color: #94a3b8;
}

body.dark-theme .hgt-kekhai-cell--border {
    border-left-color: #334155;
}

body.dark-theme .hgt-divider-h {
    background: #334155;
}

body.dark-theme .hgt-divider-v {
    background: #334155;
}

body.dark-theme .vat-note, body.dark-theme .hgt-footer {
    color: #64748b;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   NAVBAR
   ========================================== */
.dashboard-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 30px;
    border-radius: 6px;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

/* ==========================================
   DASHBOARD LAYOUT
   ========================================== */
.dashboard-main {
    padding-top: 84px;
    padding-bottom: 48px;
}

.dashboard-header {
    margin-bottom: 20px;
    text-align: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    text-transform: uppercase;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 400;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* ==========================================
   TAB NAVIGATION
   ========================================== */
.tab-nav-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-nav {
    display: inline-flex;
    gap: 4px;
    background: var(--white);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    position: relative;
    z-index: 1;
}

.tab-btn:hover {
    background: #f1f5f9;
    color: var(--text-main);
    transform: translateY(-2px);
}

.tab-btn:active {
    transform: translateY(1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 10px rgba(242, 101, 34, 0.25), 0 3px 0 #9a3412, inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.tab-btn.active:hover {
    background: linear-gradient(135deg, var(--primary-dark), #b4380f);
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(242, 101, 34, 0.3), 0 4px 0 #852d0e, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tab-btn.active:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(242, 101, 34, 0.2), 0 1px 0 #852d0e;
}

.tab-btn svg {
    flex-shrink: 0;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-panel.active {
    display: block;
}

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

/* ==========================================
   PANELS / CARDS
   ========================================== */
.panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.panel:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-lg);
}

.panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* Badges */
.badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-orange { background: rgba(242, 101, 34, 0.1); color: #c2410c; }
.badge-blue   { background: rgba(14, 165, 233, 0.1); color: #0369a1; }
.badge-green  { background: rgba(16, 185, 129, 0.1); color: #047857; }
.badge-red    { background: rgba(239, 68, 68, 0.1);  color: #b91c1c; }

/* ==========================================
   FORMS
   ========================================== */
.form-section {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.form-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.tracking-input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 7px;
    border: 1.5px solid var(--border-color);
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    background: var(--white);
}

.tracking-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.08);
}

.tracking-input::placeholder {
    color: #c4c9d2;
    font-weight: 400;
}

/* ==========================================
   PARCEL ITEMS
   ========================================== */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title-row h3 {
    margin-bottom: 0;
}

#parcels-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.parcel-item {
    background: #f9fafb;
    border: 1.5px dashed #d1d5db;
    border-radius: var(--radius);
    padding: 14px 16px;
    position: relative;
    transition: var(--transition);
}

.parcel-item:hover {
    border-color: var(--primary-light);
    background: #fffbf7;
}

.parcel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.parcel-title {
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--text-main);
}

.parcel-actions {
    display: flex;
    gap: 6px;
}

.btn-delete-parcel,
.btn-duplicate-parcel {
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-parcel:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-duplicate-parcel:hover {
    color: var(--primary);
    background: rgba(242, 101, 34, 0.08);
    border-color: rgba(242, 101, 34, 0.2);
}

.tracking-input.error {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.dimension-warning,
.weight-warning {
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    display: none;
    align-items: center;
    gap: 4px;
}

.volumetric-info {
    margin-top: 10px;
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 600;
    text-align: right;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 11px 20px;
    box-shadow: 0 4px 0 #b4380f, 0 8px 16px rgba(242, 101, 34, 0.2);
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), #b4380f);
    box-shadow: 0 5px 0 #852d0e, 0 10px 20px rgba(242, 101, 34, 0.25);
    transform: translateY(-3px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 0px 0 #b4380f, 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8px 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.btn-outline:hover {
    background: rgba(242, 101, 34, 0.05);
    transform: translateY(-1px);
}

.btn-outline-bold {
    background: transparent;
    color: var(--primary);
    border: 2.5px solid var(--primary) !important;
    font-weight: 700 !important;
    padding: 8px 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-bold:hover {
    background: rgba(242, 101, 34, 0.08);
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    border: none;
    padding: 11px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.1s ease;
    box-shadow: 0 4px 0 #0369a1, 0 8px 16px rgba(14, 165, 233, 0.2);
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-3px);
    box-shadow: 0 5px 0 #075985, 0 10px 20px rgba(14, 165, 233, 0.25);
}

.btn-secondary:active {
    transform: translateY(2px);
    box-shadow: 0 0px 0 #0369a1, 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
}

.action-row {
    padding: 18px 20px;
}

/* ==========================================
   CALCULATOR RESULT
   ========================================== */
.calculator-result {
    margin: 0 20px 20px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fff7ed, #fff1e0);
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
}

.result-breakdown {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #fdba74;
    font-size: 0.8125rem;
    color: #9a3412;
    line-height: 1.8;
}

.result-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.estimated-price {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

/* ==========================================
   OCR SECTION
   ========================================== */
.ocr-section {
    padding: 20px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-lg);
    padding: 36px 20px;
    text-align: center;
    background: #f9fafb;
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: #fff7ed;
}

.upload-icon {
    width: 40px;
    height: 40px;
    color: #9ca3af;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.upload-zone:hover .upload-icon {
    color: var(--primary);
}

.upload-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.upload-text strong {
    color: var(--primary);
}

.mt-4 {
    margin-top: 16px;
}

/* Loading & Result */
.scan-loading,
.scan-loading-2 {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.scan-result,
.scan-result-2 {
    margin-top: 16px;
}

.scan-result label,
.scan-result-2 label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 8px;
}

.result-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: border-color 0.25s, background-color 0.25s;
}

.result-box.success-border {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.result-box.warning-border {
    border-color: #fef3c7;
    background: #fffbeb;
}

.tracking-code {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

.tracking-code.success-code {
    color: #166534;
}

.tracking-code.warning-code {
    color: #d97706;
}

.btn-copy {
    background: none;
    border: none;
    color: #15803d;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.btn-copy:hover {
    background: #dcfce7;
}

/* ==========================================
   TOAST
   ========================================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1e293b;
    color: white;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8125rem;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================
   EXPRESS PAGE
   ========================================== */
.express-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.express-controls {
    padding: 0;
}

.express-filter-row {
    padding: 14px 20px;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.express-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.express-filter-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.express-tables-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Select dropdowns */
.service-type-select,
.volume-tier-select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 7px;
    font-size: 0.8125rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    background: var(--white);
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: auto;
}

.service-type-select:focus,
.volume-tier-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==========================================
   PRICE TABLE
   ========================================== */
/* ==========================================
   PRICE TABLE - GHN ORANGE & WHITE COMPACT THEME
   ========================================== */
.price-table-wrap,
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1.5px solid #fed7aa;
    border-radius: 10px;
    background: #ffffff;
    padding: 0;
    margin-top: 4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(242, 101, 34, 0.05);
}

.price-table,
.ghn-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.825rem;
    background: #ffffff;
}

.price-table th,
.ghn-table th,
.ghn-table thead th {
    background: #f26522 !important;
    color: #ffffff !important;
    padding: 9px 12px !important;
    text-align: center;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.price-table th:first-child,
.ghn-table thead th:first-child {
    text-align: left;
}

.price-table td,
.ghn-table tbody td {
    padding: 8px 12px !important;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #fafafa;
    white-space: nowrap;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
}

.price-table td:first-child,
.ghn-table tbody td:first-child {
    text-align: left;
    font-weight: 750;
    color: #c2410c !important;
    background: #fff7f2 !important;
    border-right: 1.5px solid #ffedd5 !important;
}

.price-table tr:last-child td,
.ghn-table tbody tr:last-child td {
    border-bottom: none;
}

.price-table tr:hover td,
.ghn-table tbody tr:hover td {
    background: #ffede0 !important;
}

.price-table tr:hover td:first-child,
.ghn-table tbody tr:hover td:first-child {
    background: #ffdcc4 !important;
}

.price-table td.highlight {
    background: rgba(242, 101, 34, 0.08) !important;
    color: #e8531b !important;
    font-weight: 800;
}

.price-table td.rate-cell {
    color: #0284c7;
    font-weight: 700;
}

.price-table td.hh-cell {
    color: #dc2626;
    font-weight: 800;
}

/* ==========================================
   OCR FULL PAGE
   ========================================== */
.ocr-full-page {
    max-width: 640px;
    margin: 0 auto;
}

.upload-zone-large {
    min-height: 180px;
}

/* ==========================================
   ADDITIONAL SERVICES (ADDONS)
   ========================================== */
.addons-section {
    margin-top: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 24px;
}

.addons-title {
    font-size: 1.125rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.3px;
    position: relative;
    padding-left: 12px;
    color: var(--text-main);
}

.addons-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    background: var(--primary);
    border-radius: 4px;
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.addon-card {
    background: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.addon-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-lg);
    border-color: var(--primary-light);
}

.addon-badge {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
}

.addon-badge.orange { background: #fff7ed; color: #c2410c; }
.addon-badge.blue { background: #f0f9ff; color: #0369a1; }
.addon-badge.red { background: #fef2f2; color: #b91c1c; }
.addon-badge.green { background: #ecfdf5; color: #047857; }

.addon-name {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 12px;
    padding-right: 80px; /* Avoid overlapping badge */
    color: var(--text-main);
}

.addon-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-grow: 1;
}

.addon-sub-section {
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
}

.addon-sub-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.addon-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.addon-highlight {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--primary);
    margin: 4px 0;
}

.addon-highlight.green {
    color: #10b981;
}

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

.addon-list {
    list-style-type: none;
    padding-left: 0;
    margin: 6px 0;
}

.addon-list li {
    font-size: 0.75rem;
    color: var(--text-main);
    position: relative;
    padding-left: 10px;
    margin-bottom: 4px;
}

.addon-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.addon-note {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
}

.addons-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.addons-footer svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .tab-nav {
        width: 100%;
        overflow-x: auto;
    }
    
    .addons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .addons-grid {
        grid-template-columns: 1fr;
    }
    .addon-name {
        padding-right: 0;
        margin-top: 20px;
    }
    .addon-badge {
        top: 14px;
        left: 16px;
        right: auto;
    }
}

@media (max-width: 576px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .tab-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .express-filter-row {
        flex-direction: column;
    }
}

/* ========================
   VAT NOTE
   ======================== */
.vat-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

/* ========================
   DỊCH VỤ CỘNG THÊM (GHN-style)
   ======================== */

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

.addon-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
}

.addon-card-header {
    background: #e8531b;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 11px 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.addon-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    background: #fff;
}

.addon-tier {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.addon-tier-label {
    display: inline-block;
    background: #fff0e6;
    color: #c94a00;
    font-size: 0.675rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.addon-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.3;
}

.addon-desc {
    font-size: 0.73rem;
    color: #666;
    line-height: 1.55;
    margin: 0;
}

.addon-note-list {
    padding-left: 15px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.addon-note-list li {
    font-size: 0.73rem;
    color: #555;
    line-height: 1.55;
}

.addon-note-list li strong {
    color: #1a1a2e;
}

.addon-footer-note {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    line-height: 1.55;
    border-left: 3px solid rgba(255,255,255,0.12);
}

@media (max-width: 1024px) {
    .addon-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .addon-services-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================
   DỊCH VỤ GIA TĂNG – HÀNG NẶNG (3-col orange)
   ======================== */

.heavy-gia-tang-wrap {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 10px !important;
}

.heavy-gia-tang-grid {
    display: flex;
    gap: 0;
    background: #ffffff !important;
    border: 1.5px solid #fed7aa !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(242, 101, 34, 0.05) !important;
    margin-top: 4px !important;
}

.hgt-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.hgt-col-wide {
    flex: 1.6;
}

.hgt-item {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.hgt-divider-h {
    height: 1px;
    background: #f1f5f9;
    margin: 0 16px;
}

.hgt-divider-v {
    width: 1px;
    background: #fed7aa;
    flex-shrink: 0;
}

.hgt-label {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
    line-height: 1.4;
}

.hgt-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f26522;
    line-height: 1.25;
}

.hgt-notes {
    padding-left: 16px;
    margin: 4px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hgt-notes li {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.5;
}

.hgt-kekhai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    overflow: hidden;
    margin: 4px 0;
}

.hgt-kekhai-cell {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff7f2;
}

.hgt-kekhai-cell--border {
    border-left: 1px solid #fed7aa;
}

.hgt-kekhai-range {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

.hgt-footer {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f26522;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #ffffff;
    line-height: 1.5;
}

.hgt-footer strong {
    color: #ffffff;
    font-weight: 800;
}

/* Dark Mode Overrides for Additional Services */
body.dark-theme .heavy-gia-tang-grid {
    background: #0f172a !important;
    border-color: rgba(242, 101, 34, 0.3) !important;
    box-shadow: none !important;
}

body.dark-theme .hgt-divider-v,
body.dark-theme .hgt-divider-h {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .hgt-label {
    color: #cbd5e1 !important;
}

body.dark-theme .hgt-price {
    color: #ff9d5c !important;
}

body.dark-theme .hgt-notes li {
    color: #94a3b8 !important;
}

body.dark-theme .hgt-kekhai-grid {
    border-color: rgba(242, 101, 34, 0.3) !important;
}

body.dark-theme .hgt-kekhai-cell {
    background: #1e293b !important;
}

body.dark-theme .hgt-kekhai-cell--border {
    border-left-color: rgba(242, 101, 34, 0.3) !important;
}

body.dark-theme .hgt-kekhai-range {
    color: #cbd5e1 !important;
}

body.dark-theme .hgt-footer {
    background: #ea580c !important;
}

@media (max-width: 900px) {
    .heavy-gia-tang-grid {
        flex-direction: column;
    }
    .hgt-divider-v {
        width: auto;
        height: 1px;
    }
}

/* ========================
   BẢNG GIÁ GHN (Non-ecom style)
   ======================== */

.nonecom-section-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 18px 0 10px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.nonecom-num {
    color: #e8531b;
    font-weight: 900;
    font-size: 1rem;
}

.nonecom-sub {
    font-weight: 400;
    font-size: 0.78rem;
    text-transform: none;
    color: var(--text-muted);
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ghn-table,
.price-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent !important;
    font-size: 0.84rem;
}

.ghn-table thead tr,
.price-table thead tr {
    background: #f26522 !important;
    color: #ffffff !important;
}

.ghn-table thead th,
.price-table thead th,
.price-table th {
    padding: 10px 12px;
    text-align: center;
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: #f26522 !important;
    color: #ffffff !important;
    border: none !important;
}

.ghn-table thead th:first-child,
.price-table th:first-child {
    text-align: left;
}

/* ==========================================
   PREMIUM ORANGE PRICING TABLES THEME
   ========================================== */
/* Completely Frameless & Borderless Category Headers - Pure Dark Orange Text */
.price-table-wrap {
    border-top: none !important;
}

.tab-panel .panel:has(.price-table) {
    border-top: none !important;
}

/* Square Frame & Balanced Spacing Category Headers */
.price-table-wrap,
.table-wrapper {
    border-radius: 4px !important; /* Khung vuông sắc nét */
}

.panel.glass-panel,
.express-type-panel,
.heavy-region-panel {
    border-radius: 8px !important; /* Khung vuông gọn gàng */
}

.express-type-panel .panel-header,
.heavy-region-panel .panel-header,
.tab-panel .panel:has(.price-table) .panel-header,
.tab-panel .panel:has(.ghn-table) .panel-header,
body.dark-theme .tab-panel .panel:has(.price-table) .panel-header,
body.dark-theme .tab-panel .panel:has(.ghn-table) .panel-header,
body.dark-theme .express-type-panel .panel-header,
body.dark-theme .heavy-region-panel .panel-header {
    background: transparent !important;
    color: #c2410c !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 16px 20px 10px 20px !important; /* Padding cân đối 20px lề 2 bên không bị dính mép */
}

.express-type-panel .panel-header h2,
.heavy-region-panel .panel-header h2,
.tab-panel .panel:has(.price-table) .panel-header h2,
.tab-panel .panel:has(.ghn-table) .panel-header h2,
.panel-header h2 {
    color: #c2410c !important;
    font-weight: 850 !important;
    font-size: 1.05rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    text-shadow: none !important;
    margin: 0 !important;
}

/* Dark Mode Overrides for Headers & Additional Services */
body.dark-theme .express-type-panel .panel-header h2,
body.dark-theme .heavy-region-panel .panel-header h2,
body.dark-theme .tab-panel .panel:has(.price-table) .panel-header h2,
body.dark-theme .tab-panel .panel:has(.ghn-table) .panel-header h2 {
    color: #ff8c42 !important;
}

/* 🎯 SPECIFIC FOR DỊCH VỤ GIA TĂNG HEADER IN DARK MODE: White Uppercase Text on Translucent White Backdrop */
body.dark-theme .heavy-gia-tang-wrap .panel-header,
body.dark-theme .panel:has(.ghn-table-gia-tang) .panel-header {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 6px !important;
    padding: 10px 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    margin-bottom: 6px !important;
}

body.dark-theme .heavy-gia-tang-wrap .panel-header h2,
body.dark-theme .panel:has(.ghn-table-gia-tang) .panel-header h2 {
    color: #ffffff !important;
    font-weight: 850 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    text-shadow: none !important;
}

.express-type-panel .panel-header .badge,
.heavy-region-panel .panel-header .badge,
.tab-panel .panel:has(.price-table) .panel-header .badge,
.tab-panel .panel:has(.ghn-table) .panel-header .badge {
    background: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #fed7aa !important;
    font-weight: 750 !important;
    font-size: 0.75rem !important;
    box-shadow: none !important;
    border-radius: 16px !important;
    padding: 4px 12px !important;
}

body.dark-theme .express-type-panel .panel-header .badge,
body.dark-theme .heavy-region-panel .panel-header .badge,
body.dark-theme .tab-panel .panel:has(.price-table) .panel-header .badge,
body.dark-theme .tab-panel .panel:has(.ghn-table) .panel-header .badge {
    background: rgba(242, 101, 34, 0.15) !important;
    color: #ff8c42 !important;
    border: 1px solid rgba(242, 101, 34, 0.3) !important;
}

/* Non-ecom section headers - Clean Flat Text (No Glow, No 3D) */
.nonecom-section-title {
    background: transparent !important;
    padding: 6px 0 4px 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 4px !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.nonecom-num-text {
    color: #d94b12 !important;
    font-weight: 900 !important;
    font-size: 1.05rem !important;
    text-shadow: none !important;
}

.nonecom-title-text {
    color: #d94b12 !important;
    font-weight: 850 !important;
    font-size: 0.95rem !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-shadow: none !important;
}

.nonecom-sub-desc {
    font-size: 0.825rem !important;
    font-weight: 550 !important;
    color: #475569 !important;
    text-transform: none !important;
    margin-left: 2px;
}

/* ==========================================
   DYNAMIC LIGHT / DARK THEME PRICING TYPOGRAPHY
   ========================================== */
/* ☀️ LIGHT MODE (Default) */
.price-table-wrap,
.table-wrapper {
    background: #ffffff !important;
    border: 1.5px solid #fed7aa !important;
    box-shadow: 0 2px 10px rgba(242, 101, 34, 0.05) !important;
}

.price-table td,
.ghn-table tbody td {
    background: #ffffff !important;
    color: #0f172a !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-right: 1px solid #fafafa !important;
    font-weight: 500 !important;
    font-size: 0.825rem !important;
    padding: 8px 12px !important;
    text-align: center;
}

.price-table td:first-child,
.ghn-table tbody td:first-child {
    background: #fff7f2 !important;
    color: #c2410c !important;
    font-weight: 750 !important;
    border-right: 1.5px solid #ffedd5 !important;
    text-align: left;
}

.price-table tr:hover td,
.ghn-table tbody tr:hover td {
    background: #ffede0 !important;
}

.price-table tr:hover td:first-child,
.ghn-table tbody tr:hover td:first-child {
    background: #ffdcc4 !important;
}

.ghn-table-note-row td {
    background: #fff7f2 !important;
    color: #475569 !important;
    font-style: italic !important;
    font-size: 0.78rem !important;
}

.ghn-table-time-row td {
    background: #fff0e6 !important;
    color: #c2410c !important;
    font-weight: 750 !important;
    border-top: 2px solid #fed7aa !important;
}

.ghn-table-subheader td {
    background: #ffedd5 !important;
    color: #c2410c !important;
    font-weight: 800 !important;
    font-style: italic !important;
    text-align: center !important;
    font-size: 0.82rem !important;
    border-top: 1.5px solid #fed7aa !important;
    border-bottom: 1.5px solid #fed7aa !important;
}

/* 🌙 DARK MODE OVERRIDES */
body.dark-theme .price-table-wrap,
body.dark-theme .table-wrapper {
    background: #0f172a !important;
    border: 1.5px solid rgba(242, 101, 34, 0.3) !important;
    box-shadow: none !important;
}

body.dark-theme .ghn-table,
body.dark-theme .price-table {
    background: #0f172a !important;
}

body.dark-theme .price-table th,
body.dark-theme .ghn-table th,
body.dark-theme .ghn-table thead th {
    background: #ea580c !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

body.dark-theme .price-table td,
body.dark-theme .ghn-table tbody td {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
    font-weight: 500 !important;
}

body.dark-theme .price-table td:first-child,
body.dark-theme .ghn-table tbody td:first-child {
    background: #1e293b !important;
    color: #ff9d5c !important;
    font-weight: 750 !important;
    border-right: 1.5px solid rgba(242, 101, 34, 0.25) !important;
}

body.dark-theme .price-table tr:hover td,
body.dark-theme .ghn-table tbody tr:hover td {
    background: rgba(242, 101, 34, 0.18) !important;
}

body.dark-theme .price-table tr:hover td:first-child,
body.dark-theme .ghn-table tbody tr:hover td:first-child {
    background: rgba(242, 101, 34, 0.28) !important;
}

body.dark-theme .nonecom-num-text,
body.dark-theme .nonecom-title-text {
    color: #ff9d5c !important;
    font-weight: 850 !important;
}

body.dark-theme .nonecom-sub-desc {
    color: #cbd5e1 !important;
    font-weight: 550 !important;
}

body.dark-theme .ghn-table-note-row td {
    background: #1e293b !important;
    color: #cbd5e1 !important;
}

body.dark-theme .ghn-table-time-row td {
    background: rgba(242, 101, 34, 0.25) !important;
    color: #ffaa75 !important;
    border-top-color: rgba(242, 101, 34, 0.3) !important;
}

body.dark-theme .ghn-table-subheader td {
    background: rgba(242, 101, 34, 0.35) !important;
    color: #ffba88 !important;
    border-color: rgba(242, 101, 34, 0.3) !important;
}

@keyframes pulse {
    0% { opacity: 0.85; }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.85; }
}

/* Region and Route Definitions styling */
.definitions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding-top: 15px;
}
@media (max-width: 768px) {
    .definitions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.def-section {
    background: rgba(248, 250, 252, 0.45);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.7);
}
body.dark-theme .def-section {
    background: rgba(15, 23, 42, 0.25);
    border-color: #334155;
    box-shadow: none;
}

.def-title-sub {
    font-size: 1.1rem;
    font-weight: 750;
    color: #e8531b;
    margin-bottom: 2px;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 6px;
}
body.dark-theme .def-title-sub {
    border-bottom-color: #334155;
}

.def-card-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #f26522;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
}
body.dark-theme .def-card-row {
    background: rgba(30, 41, 59, 0.45);
    border-color: #334155;
    border-left-color: #f26522;
}
.def-card-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(242, 101, 34, 0.05);
}
body.dark-theme .def-card-row:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.def-card-header {
    font-weight: 800;
    color: var(--text-main);
    font-size: 0.98rem;
}

.def-card-body {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.def-card-example {
    font-size: 0.8rem;
    font-style: italic;
    color: #e8531b;
}
body.dark-theme .def-card-example {
    color: #ff9d5c;
    background: rgba(242, 101, 34, 0.12);
}

.tracking-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    box-sizing: border-box;
}
body.dark-theme .tracking-grid {
    background: rgba(30, 41, 59, 0.45);
    border-color: #334155;
}

/* Custom export buttons styling */
.btn-capture-orange {
    background: #f26522 !important;
    color: #ffffff !important;
    border: 2px solid #f26522 !important;
    font-weight: 700 !important;
    padding: 8px 16px;
    box-shadow: 0 4px 6px rgba(242, 101, 34, 0.15);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 38px;
    box-sizing: border-box;
}
.btn-capture-orange:hover {
    background: #e04f0f !important;
    border-color: #e04f0f !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(242, 101, 34, 0.25);
}
.btn-capture-orange:active {
    transform: translateY(1px);
}

.btn-pdf-red {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: 2px solid #ef4444 !important;
    font-weight: 700 !important;
    padding: 8px 16px;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 38px;
    box-sizing: border-box;
}
.btn-pdf-red:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.25);
}
.btn-pdf-red:active {
    transform: translateY(1px);
}

/* ==========================================
   FORCE LIGHT THEME & ORANGE FOR HEAVY CALCULATOR
   ========================================== */
#heavy-calc-panel {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

#heavy-calc-panel h2 {
    color: #f26522 !important;
}

#heavy-calc-panel h2 svg {
    color: #f26522 !important;
}

#heavy-calc-panel .panel-header {
    border-bottom: 1.5px solid #f1f5f9 !important;
}

#heavy-calc-panel label {
    color: #475569 !important;
}

#heavy-calc-panel .tracking-input,
#heavy-calc-panel select.tracking-input,
#heavy-calc-panel input.tracking-input {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
}

#heavy-calc-panel .tracking-input:focus {
    border-color: #f26522 !important;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.15) !important;
}

#heavy-calc-panel .tracking-input::placeholder {
    color: #94a3b8 !important;
}

#heavy-calc-panel .parcel-item-heavy {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

#heavy-calc-panel .parcel-title {
    color: #0f172a !important;
}

#heavy-calc-panel .parcel-header {
    border-bottom: 1px dashed #cbd5e1 !important;
}

#heavy-calc-panel .volumetric-info {
    color: #64748b !important;
}

#heavy-calc-panel .vol-weight-val-heavy {
    color: #f26522 !important;
    font-weight: 700;
}

/* Orange Calculate Button */
#heavy-calc-panel .btn-calculate-heavy {
    background: linear-gradient(135deg, #ff8c4b, #f26522) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 0 #b4380f, 0 8px 16px rgba(242, 101, 34, 0.2) !important;
    border: none !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease !important;
    width: 100% !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#heavy-calc-panel .btn-calculate-heavy:hover {
    background: linear-gradient(135deg, #f26522, #b4380f) !important;
    box-shadow: 0 5px 0 #852d0e, 0 10px 20px rgba(242, 101, 34, 0.25) !important;
    transform: translateY(-1px) !important;
}

#heavy-calc-panel .btn-calculate-heavy:active {
    transform: translateY(1px) !important;
}

/* Add parcel / Action buttons styling */
#heavy-calc-panel .btn-add-parcel-heavy {
    border: 1.5px solid #f26522 !important;
    color: #f26522 !important;
    background: transparent !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#heavy-calc-panel .btn-add-parcel-heavy:hover {
    background: rgba(242, 101, 34, 0.08) !important;
    color: #b4380f !important;
    border-color: #b4380f !important;
}

#heavy-calc-panel .btn-duplicate-parcel-heavy,
#heavy-calc-panel .btn-delete-parcel-heavy {
    color: #64748b !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

#heavy-calc-panel .btn-duplicate-parcel-heavy:hover,
#heavy-calc-panel .btn-delete-parcel-heavy:hover {
    color: #f26522 !important;
}

/* Result panel styling */
#heavy-calc-panel #calc-result-heavy {
    background: rgba(242, 101, 34, 0.04) !important;
    border: 1.5px solid rgba(242, 101, 34, 0.15) !important;
    border-radius: 8px !important;
}

#heavy-calc-panel #calc-result-heavy .result-breakdown {
    border-bottom: 1px dashed rgba(242, 101, 34, 0.2) !important;
}

#heavy-calc-panel #calc-result-heavy .total-weight-calc-heavy {
    color: #f26522 !important;
}

#heavy-calc-panel #calc-result-heavy .estimated-price-heavy {
    color: #f26522 !important;
}

#heavy-calc-panel #calc-result-heavy .result-total span {
    color: #f26522 !important;
}

/* ==========================================
   GHN 3D INTERACTIVE PRELOADER STYLING
   ========================================== */
#ghn-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b1118;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    transition: opacity 2.5s cubic-bezier(0.22, 1, 0.36, 1), transform 2.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 2.5s;
}

#ghn-preloader.fade-out {
    opacity: 0;
    transform: scale(1.08) translateY(-15px);
    visibility: hidden;
    pointer-events: none;
}

.preloader-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.fullscreen-2d-city-bg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.preloader-card {
    position: relative;
    z-index: 2;
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    max-height: 100%;
    background: rgba(11, 17, 24, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 0;
    padding: 40px 24px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
}

.preloader-hero-wrap {
    position: relative;
    width: 92%;
    max-width: 680px;
    height: 230px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 60px rgba(242, 101, 34, 0.25);
    border: 1.5px solid rgba(242, 101, 34, 0.45);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes laneMove {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -40; }
}

.dash-lane-anim {
    animation: laneMove 0.4s linear infinite;
}

@keyframes boxFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-12px); }
}

.box-floating-anim {
    animation: boxFloat 2.2s ease-in-out infinite alternate;
}

@keyframes shadowPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(0.85); opacity: 0.25; }
}

.box-shadow-pulse {
    transform-origin: 250px 158px;
    animation: shadowPulse 2.2s ease-in-out infinite alternate;
}

.preloader-2d-city-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.preloader-card:hover .preloader-3d-img {
    transform: scale(1.02) rotateX(0deg) rotateY(0deg);
}

.preloader-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(11, 17, 24, 0.88);
    border: 1px solid rgba(242, 101, 34, 0.6);
    backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #f26522;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f26522;
    box-shadow: 0 0 10px #f26522;
    animation: pulseDot 1.2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.6); }
}

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

.preloader-title {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 0%, #ffc8b0 50%, #f26522 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.preloader-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
    min-height: 22px;
    transition: opacity 0.3s ease;
}

/* ==========================================
   GHN ANIMATED TRUCK TRACK STYLING
   ========================================== */
.preloader-truck-container {
    position: relative;
    width: 92%;
    max-width: 900px;
    height: 54px;
    margin: 4px 0 -6px;
    overflow: hidden;
}

.preloader-road {
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 4px;
    overflow: hidden;
}

@keyframes roadDash {
    0% { background-position: 0 0; }
    100% { background-position: -40px 0; }
}

.road-line {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(90deg, #f26522 50%, transparent 50%);
    background-size: 20px 100%;
    animation: roadDash 0.4s linear infinite;
    opacity: 0.85;
}

.preloader-truck-wrap {
    position: absolute;
    bottom: 5px;
    left: 0%;
    transform: translateX(-30%);
    transition: left 0.15s ease-out;
    z-index: 2;
}

.truck-body-box {
    position: relative;
    display: inline-block;
    animation: truckBounce 0.35s ease-in-out infinite alternate;
}

@keyframes truckBounce {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-3px); }
}

@keyframes wheelSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.truck-wheel circle:nth-child(2) {
    transform-origin: center;
    animation: wheelSpin 0.35s linear infinite;
}

@keyframes smokePuff {
    0% { opacity: 0.8; transform: scale(0.5) translate(0, 0); }
    100% { opacity: 0; transform: scale(1.8) translate(-18px, -10px); }
}

.exhaust-smoke {
    position: absolute;
    left: -4px;
    bottom: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    animation: smokePuff 0.5s ease-out infinite;
}

.preloader-progress-wrap {
    width: 92%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preloader-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

/* ==========================================
   MODAL TÙY CHỌN CHỤP ẢNH BẢNG GIÁ
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1.5px solid #fed7aa;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-theme .modal-card {
    background: #0f172a;
    border-color: rgba(242, 101, 34, 0.4);
    color: #f8fafc;
}

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

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
body.dark-theme .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}
.btn-close-modal:hover { color: #f26522; }

.modal-body {
    padding: 20px;
}

.capture-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.capture-option-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}
body.dark-theme .capture-option-item {
    background: #1e293b;
    border-color: #334155;
}
.capture-option-item:hover {
    border-color: #f26522;
    background: #fff7f2;
}
body.dark-theme .capture-option-item:hover {
    background: rgba(242, 101, 34, 0.1);
}

.capture-option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f26522;
    margin-top: 2px;
    cursor: pointer;
}

.option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.option-info strong {
    font-size: 0.88rem;
    color: #0f172a;
}
body.dark-theme .option-info strong {
    color: #f8fafc;
}
.option-info small {
    font-size: 0.76rem;
    color: #64748b;
}

.btn-preset-opt {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
body.dark-theme .btn-preset-opt {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
.btn-preset-opt.active,
.btn-preset-opt:hover {
    background: #fff7ed;
    border-color: #f26522;
    color: #c2410c;
}
body.dark-theme .btn-preset-opt.active,
body.dark-theme .btn-preset-opt:hover {
    background: rgba(242, 101, 34, 0.2);
    color: #ff9d5c;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
}
body.dark-theme .modal-footer {
    background: #0b1118;
    border-top-color: rgba(255, 255, 255, 0.08);
}

.preloader-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f26522 0%, #ff8c42 50%, #e8531b 100%);
    box-shadow: 0 0 14px rgba(242, 101, 34, 0.9);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.preloader-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================
   EMPLOYEE AUTH OVERLAY & EMPLOYEE INFO CSS
   ========================================== */
#employee-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#employee-auth-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-modal {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 30px rgba(242, 101, 34, 0.15);
    border: 1.5px solid rgba(242, 101, 34, 0.2);
    overflow: hidden;
    animation: authModalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark-theme .auth-modal {
    background: #141c26;
    border-color: rgba(242, 101, 34, 0.3);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(242, 101, 34, 0.25);
}

@keyframes authModalPop {
    0% { opacity: 0; transform: scale(0.92) translateY(15px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-modal-header {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff7e40, #f26522);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(242, 101, 34, 0.4);
}

.auth-logo-brand {
    font-weight: 800;
    font-size: 1.15rem;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.auth-logo-sub {
    font-size: 0.73rem;
    color: #94a3b8;
}

.auth-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.auth-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-title-wrap {
    text-align: center;
}

.auth-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

body.dark-theme .auth-title {
    color: #f8fafc;
}

.auth-subtitle {
    font-size: 0.82rem;
    color: #64748b;
}

body.dark-theme .auth-subtitle {
    color: #94a3b8;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.auth-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f26522;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Custom Searchable Select */
.auth-select-wrapper {
    position: relative;
    width: 100%;
}

.auth-select-display {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 4px 14px;
    transition: all 0.2s ease;
    cursor: text;
}

body.dark-theme .auth-select-display {
    background: #1e293b;
    border-color: #334155;
}

.auth-select-wrapper.open .auth-select-display,
.auth-select-display:focus-within {
    border-color: #f26522;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.15);
    background: #ffffff;
}

body.dark-theme .auth-select-wrapper.open .auth-select-display,
body.dark-theme .auth-select-display:focus-within {
    background: #0f172a;
}

.auth-search-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    padding: 10px 0;
}

body.dark-theme .auth-search-input {
    color: #f8fafc;
}

.auth-search-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.auth-select-arrow {
    color: #64748b;
    transition: transform 0.2s ease;
    margin-left: 8px;
    pointer-events: none;
}

.auth-select-wrapper.open .auth-select-arrow {
    transform: rotate(180deg);
    color: #f26522;
}

/* Dropdown list */
.auth-dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #ffffff;
    border: 1.5px solid #fed7aa;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
    display: none;
    padding: 6px;
}

body.dark-theme .auth-dropdown-list {
    background: #1e293b;
    border-color: rgba(242, 101, 34, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.auth-select-wrapper.open .auth-dropdown-list {
    display: block;
    animation: fadeInDown 0.2s ease;
}

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

.auth-dropdown-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-dropdown-item:hover,
.auth-dropdown-item.active {
    background: #fff0e6;
}

body.dark-theme .auth-dropdown-item:hover,
body.dark-theme .auth-dropdown-item.active {
    background: rgba(242, 101, 34, 0.2);
}

.auth-item-main {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

body.dark-theme .auth-item-main {
    color: #f8fafc;
}

.auth-item-sub {
    font-size: 0.74rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-theme .auth-item-sub {
    color: #94a3b8;
}

.auth-item-id {
    color: #f26522;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.auth-dropdown-empty {
    padding: 16px;
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
    font-style: italic;
}

/* Selected Card Preview */
.auth-selected-card {
    background: linear-gradient(135deg, #fff7ed, #fff0e6);
    border: 1.5px solid #fed7aa;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.2s ease;
}

body.dark-theme .auth-selected-card {
    background: rgba(242, 101, 34, 0.12);
    border-color: rgba(242, 101, 34, 0.3);
}

.auth-selected-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f26522;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(242, 101, 34, 0.3);
}

.auth-selected-info {
    flex: 1;
}

.auth-selected-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

body.dark-theme .auth-selected-name {
    color: #f8fafc;
}

.auth-selected-meta {
    font-size: 0.76rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

body.dark-theme .auth-selected-meta {
    color: #cbd5e1;
}

.auth-selected-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Confirm Button */
.btn-auth-confirm {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff7e40, #f26522);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(242, 101, 34, 0.35);
    transition: all 0.2s ease;
}

.btn-auth-confirm:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(242, 101, 34, 0.45);
    background: linear-gradient(135deg, #ff8c4e, #ea580c);
}

.btn-auth-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(0.6);
}

.auth-note {
    font-size: 0.73rem;
    color: #64748b;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.4;
}

body.dark-theme .auth-note {
    color: #94a3b8;
}

/* Navbar Employee Chip */
.navbar-employee-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff0e6;
    border: 1.5px solid #fed7aa;
    padding: 4px 8px 4px 6px;
    border-radius: 20px;
}

body.dark-theme .navbar-employee-chip {
    background: rgba(242, 101, 34, 0.15);
    border-color: rgba(242, 101, 34, 0.3);
}

.navbar-emp-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f26522;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-emp-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.navbar-emp-name {
    font-size: 0.76rem;
    font-weight: 800;
    color: #0f172a;
}

body.dark-theme .navbar-emp-name {
    color: #f8fafc;
}

.navbar-emp-id {
    font-size: 0.65rem;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}

body.dark-theme .navbar-emp-id {
    color: #cbd5e1;
}

.btn-change-employee {
    background: #ffffff;
    border: 1px solid #fed7aa;
    color: #f26522;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
    margin-left: 2px;
}

.btn-change-employee:hover {
    background: #f26522;
    color: #ffffff;
    border-color: #f26522;
}

/* ==========================================
   EMPLOYEE INFO SECTION IN SHIPPING FEE TABLES
   ========================================== */
.emp-info-section {
    background: #ffffff;
    border-radius: 12px;
    border: 1.5px solid #fed7aa;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(242, 101, 34, 0.06);
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
}

body.dark-theme .emp-info-section {
    background: #141c26;
    border-color: rgba(242, 101, 34, 0.3);
}

.emp-info-header {
    background: linear-gradient(135deg, #ff7e40, #f26522);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 10px 16px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emp-info-body {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: #fffdfb;
}

body.dark-theme .emp-info-body {
    background: #1a2332;
}

@media (max-width: 768px) {
    .emp-info-body {
        grid-template-columns: repeat(2, 1fr);
    }
}

.emp-info-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.emp-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

body.dark-theme .emp-info-label {
    color: #94a3b8;
}

.emp-info-value {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
}

body.dark-theme .emp-info-value {
    color: #f8fafc;
}

.emp-info-value[data-field="id"] {
    color: #f26522;
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================
   ADVANCED MOBILE & RESPONSIVE DESIGN (IOS / ANDROID)
   ========================================== */

/* Touch-friendly base inputs on mobile */
@media (max-width: 768px) {
    /* Prevent font zoom on iOS inputs */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Container & Layout padding */
    .app-container,
    .main-content,
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Header & Navigation bar adjustments */
    header, .navbar, .top-bar {
        padding: 10px 12px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .nav-actions, .header-right {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin-left: auto !important;
    }

    /* Employee chip mobile optimization */
    .emp-chip {
        padding: 4px 10px !important;
        max-width: 220px !important;
    }

    .emp-chip-name {
        max-width: 90px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-size: 0.78rem !important;
    }

    .emp-chip-id {
        display: none !important; /* Hide employee ID on small header to save space */
    }

    /* Tab navigation bar touch scrolling */
    .tab-navigation, .tabs-header, .tabs-nav {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        padding: 6px 4px !important;
        gap: 8px !important;
        border-radius: 12px !important;
        scrollbar-width: none !important; /* Firefox */
    }

    .tab-navigation::-webkit-scrollbar,
    .tabs-header::-webkit-scrollbar {
        display: none !important; /* Chrome / Safari / Edge */
    }

    .tab-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
        min-height: 44px !important; /* Mobile touch target */
    }

    /* Form Rows & Parcel Item Grids */
    .form-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .form-row.single-col-mobile {
        grid-template-columns: 1fr !important;
    }

    /* Route Selection (Gửi từ / Gửi đến) stacked on mobile */
    .express-filter-row,
    .route-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .express-filter-group {
        width: 100% !important;
    }

    /* Price Table Responsive Wrapping */
    .table-container,
    .price-table-wrap,
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 15px !important;
    }

    .price-table {
        min-width: 600px !important; /* Ensures table columns don't break, allows smooth horizontal scrolling */
    }

    /* Heavy / Freight Calculator Result Card */
    .calculator-result {
        padding: 12px !important;
    }

    .result-total {
        font-size: 1.05rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }

    .estimated-price-heavy,
    .estimated-price {
        font-size: 1.25rem !important;
    }

    /* Auth Modal Mobile Optimization */
    .auth-modal {
        width: 92% !important;
        max-width: 400px !important;
        padding: 20px 16px !important;
    }

    .auth-title {
        font-size: 1.15rem !important;
    }

    .custom-option {
        padding: 12px 10px !important;
    }

    /* Employee info grid at table bottoms */
    .emp-info-body {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    /* Extra small phones (iPhone SE, Galaxy S small) */
    .form-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .emp-info-body {
        grid-template-columns: 1fr !important; /* Stack 1 column on tiny screens */
    }

    .tab-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    .btn-calculate-heavy,
    .btn-primary {
        padding: 14px 16px !important;
        font-size: 0.95rem !important;
    }
}

