/* ====================================================================
   SBS INTERNATIONAL SHIPMENT TRACKER — STYLESHEET
   Version 1.0 — March 2026
   ==================================================================== */

/* ---- Variables ---- */
:root {
    --navy:       #1b3a6b;
    --navy-dark:  #132b52;
    --blue:       #2563eb;
    --blue-lt:    #eff6ff;
    --success:    #16a34a;
    --warning:    #d97706;
    --danger:     #dc2626;
    --purple:     #7c3aed;
    --teal:       #0d9488;
    --orange:     #ea580c;
    --gray-50:    #f8fafc;
    --gray-100:   #f1f5f9;
    --gray-200:   #e2e8f0;
    --gray-300:   #cbd5e1;
    --gray-400:   #94a3b8;
    --gray-500:   #64748b;
    --gray-600:   #475569;
    --gray-700:   #334155;
    --gray-800:   #1e293b;
    --white:      #ffffff;
    --sidebar-w:  240px;
    --radius:     6px;
    --radius-lg:  10px;
    --shadow:     0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    background: var(--gray-100);
    line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ================================================================
   LAYOUT — Sidebar + Main
   ================================================================ */

.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--navy);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: block;
    text-decoration: none;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand-name {
    font-weight: 800;
    font-size: 14px;
    color: white;
    display: block;
    line-height: 1.2;
}
.sidebar-brand-sub {
    font-size: 10.5px;
    color: rgba(255,255,255,.4);
    display: block;
    margin-top: 3px;
    letter-spacing: .01em;
}

.sidebar-nav { flex: 1; padding: 10px 0; }
.sidebar-nav-section {
    padding: 14px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.3);
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: rgba(255,255,255,.65);
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: all .15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: white; text-decoration: none; }
.sidebar-nav a.active {
    background: rgba(37,99,235,.3);
    color: white;
    border-left-color: var(--blue);
    font-weight: 600;
}
.sidebar-nav a .nav-icon { font-size: 15px; opacity: .8; width: 18px; text-align: center; }

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user-name { font-weight: 700; color: white; font-size: 13px; display: block; }
.sidebar-user-role { color: rgba(255,255,255,.45); font-size: 11px; text-transform: capitalize; }
.sidebar-logout {
    display: inline-block;
    margin-top: 10px;
    color: rgba(255,255,255,.45);
    font-size: 12px;
}
.sidebar-logout:hover { color: white; }

/* ---- Main content ---- */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-notif {
    position: relative;
    color: var(--gray-500);
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
}
.topbar-notif:hover { color: var(--gray-800); text-decoration: none; }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 100px;
    padding: 1px 4px;
    min-width: 16px;
    text-align: center;
}

.content { padding: 20px 24px; flex: 1; }

/* ================================================================
   CARDS
   ================================================================ */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-header h2, .card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}
.card-body { padding: 18px; }
.card + .card { margin-top: 16px; }

/* ================================================================
   STATS GRID
   ================================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: default;
    transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card a { text-decoration: none; display: block; }
.stat-card a:hover { text-decoration: none; }
.stat-number {
    font-size: 30px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 5px;
}
.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.stat-card.danger  .stat-number { color: var(--danger); }
.stat-card.warning .stat-number { color: var(--warning); }
.stat-card.success .stat-number { color: var(--success); }
.stat-card.purple  .stat-number { color: var(--purple); }
.stat-owner {
    font-size: 10px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* ================================================================
   TABLES
   ================================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    background: var(--gray-50);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-500);
    padding: 9px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
    font-size: 13.5px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
.td-muted { color: var(--gray-400); font-size: 12px; }

/* ================================================================
   BADGES
   ================================================================ */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.4;
}
.badge-po_submitted      { background: #f1f5f9; color: #475569; }
.badge-product_ready     { background: #eff6ff; color: #1d4ed8; }
.badge-details_submitted { background: #dbeafe; color: #1e40af; }
.badge-duties_verified   { background: #ecfdf5; color: #065f46; }
.badge-pickup_scheduled  { background: #f0fdf4; color: #15803d; }
.badge-in_transit        { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-customs_hold      { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.badge-customs_action    { background: #fef2f2; color: #991b1b; }
.badge-customs_released  { background: #fffbeb; color: #92400e; }
.badge-delivered         { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-received          { background: #ecfdf5; color: #065f46; }
.badge-duty_audit        { background: #f5f3ff; color: #5b21b6; }
.badge-closed            { background: #f1f5f9; color: #374151; }

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.role-buyer      { background: #eff6ff; color: #1d4ed8; }
.role-warehouse  { background: #fff7ed; color: #c2410c; }
.role-accounting { background: #f5f3ff; color: #5b21b6; }
.role-admin      { background: #1e293b; color: white; }

.tag { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; background: var(--gray-100); color: var(--gray-600); font-weight: 600; }
.tag-exw    { background: #eff6ff; color: #1d4ed8; }
.tag-ddp    { background: #f0fdf4; color: #15803d; }
.tag-landed { background: #fdf4ff; color: #7e22ce; }
.tag-new_vendor { background: #f5f3ff; color: #5b21b6; }
.tag-reorder    { background: #eff6ff; color: #1d4ed8; }
.tag-samples    { background: #fff7ed; color: #c2410c; }

/* ================================================================
   FORMS
   ================================================================ */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-group.full-col { grid-column: 1 / -1; }
.form-group.span-2   { grid-column: span 2; }

label {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: .04em;
}
label .req { color: var(--danger); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 13.5px;
    color: var(--gray-800);
    background: white;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
input[readonly], input[disabled], select[disabled], textarea[disabled] {
    background: var(--gray-50);
    color: var(--gray-500);
    cursor: not-allowed;
}
textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.form-required-note { font-size: 11px; color: var(--gray-400); margin-bottom: 14px; }

.checkbox-row { display: flex; align-items: flex-start; gap: 8px; }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.checkbox-row label { font-size: 13px; font-weight: 500; color: var(--gray-700); text-transform: none; letter-spacing: 0; cursor: pointer; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--blue); color: white; border-color: var(--blue); }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-secondary { background: white; color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); }
.btn-success   { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { background: #15803d; }
.btn-danger    { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-warning   { background: var(--warning); color: white; border-color: var(--warning); }
.btn-warning:hover { background: #b45309; }
.btn-navy      { background: var(--navy); color: white; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-dark); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 14px; }

/* ================================================================
   ALERTS & FLASH MESSAGES
   ================================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13.5px;
    border: 1px solid transparent;
}
.alert ul { margin: 6px 0 0 18px; }
.alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* ================================================================
   ACTION BOXES (on shipment detail)
   ================================================================ */
.action-box {
    background: var(--blue-lt);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.action-box h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #bfdbfe;
}
.action-box.warning-box { background: #fffbeb; border-color: #fde68a; }
.action-box.warning-box h3 { color: #92400e; border-color: #fde68a; }
.action-box.danger-box  { background: #fef2f2; border-color: #fecaca; }
.action-box.danger-box  h3 { color: #991b1b; border-color: #fecaca; }
.action-box.success-box { background: #f0fdf4; border-color: #bbf7d0; }
.action-box.success-box h3 { color: #15803d; border-color: #bbf7d0; }
.action-box.neutral-box { background: var(--gray-50); border-color: var(--gray-200); }
.action-box.neutral-box h3 { color: var(--gray-700); border-color: var(--gray-200); }

/* ================================================================
   SHIPMENT DETAIL LAYOUT
   ================================================================ */
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.detail-main > * + * { margin-top: 16px; }
.detail-side > * + * { margin-top: 16px; }

/* Info rows */
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 7px 0; vertical-align: top; font-size: 13.5px; }
.info-table td:first-child {
    font-weight: 700;
    color: var(--gray-500);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    width: 40%;
    padding-right: 12px;
}
.info-table tr + tr td { border-top: 1px solid var(--gray-100); }

/* Status timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 10px; top: 8px; bottom: 8px;
    width: 2px;
    background: var(--gray-200);
}
.tl-item { position: relative; margin-bottom: 14px; }
.tl-dot {
    position: absolute;
    left: -30px; top: 2px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--gray-300);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--gray-300);
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 800; color: white;
}
.tl-dot.done    { background: var(--success); box-shadow: 0 0 0 2px #bbf7d0; }
.tl-dot.current { background: var(--blue); box-shadow: 0 0 0 2px #bfdbfe; }
.tl-dot.hold    { background: var(--danger); box-shadow: 0 0 0 2px #fecaca; }
.tl-content { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 10px 14px; }
.tl-content.current { border-color: var(--blue); background: #f8fbff; }
.tl-content.done    { opacity: .85; }
.tl-title { font-size: 12.5px; font-weight: 700; color: var(--gray-800); }
.tl-meta  { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* File list */
.file-list { list-style: none; }
.file-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.file-list li:last-child { border-bottom: none; }
.file-icon { color: var(--gray-400); font-size: 14px; }
.file-info { flex: 1; min-width: 0; }
.file-name { display: block; font-weight: 600; color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 11px; color: var(--gray-400); }

/* Duty comparison panel */
.duty-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.duty-col h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--gray-200);
}
.duty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}
.duty-row:last-child { border-bottom: none; font-weight: 700; font-size: 14px; }
.duty-row-label { color: var(--gray-600); }
.duty-row-val { font-weight: 600; }
.variance-panel { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px; text-align: center; margin-top: 16px; }
.variance-num { font-size: 26px; font-weight: 800; }
.variance-num.over  { color: var(--danger); }
.variance-num.under { color: var(--success); }
.variance-label { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ================================================================
   FILTER BAR
   ================================================================ */
.filter-bar {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px 18px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-bar .form-group { flex: 1; min-width: 120px; }
.filter-bar label { font-size: 10.5px; margin-bottom: 4px; }
.filter-bar input, .filter-bar select { padding: 6px 8px; font-size: 13px; }
.filter-bar .btn { margin-bottom: 0; align-self: flex-end; }

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination { display: flex; gap: 4px; align-items: center; padding: 16px 0 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 11px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--gray-600);
    background: white;
    text-decoration: none;
}
.pagination a:hover { background: var(--gray-50); text-decoration: none; }
.pagination span { color: var(--gray-400); border-color: transparent; background: none; }
.pagination .current { background: var(--blue); color: white; border-color: var(--blue); }

/* ================================================================
   LOGIN PAGES
   ================================================================ */
.login-wrap {
    min-height: 100vh;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}
.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo-img {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}
.login-logo-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    display: block;
    line-height: 1.2;
}
.login-logo-sub {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
    display: block;
}
.login-card .form-group + .form-group { margin-top: 14px; }
.login-card label { font-size: 12px; margin-bottom: 5px; }
.login-card .btn { width: 100%; margin-top: 20px; padding: 10px; font-size: 14px; }
.login-card .alert { margin-top: 16px; margin-bottom: 0; }

/* ================================================================
   VENDOR PORTAL HEADER
   ================================================================ */
.vendor-topbar {
    background: var(--navy);
    color: white;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vendor-topbar-brand { font-size: 15px; font-weight: 700; color: white; }
.vendor-topbar-brand span { color: rgba(255,255,255,.45); font-weight: 400; margin-left: 8px; font-size: 12px; }
.vendor-topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: rgba(255,255,255,.6); }
.vendor-topbar-right a { color: rgba(255,255,255,.6); }
.vendor-topbar-right a:hover { color: white; }
.vendor-wrap { max-width: 960px; margin: 0 auto; padding: 24px; }
.vendor-back { display: inline-flex; align-items: center; gap: 6px; color: var(--gray-600); font-size: 13px; margin-bottom: 16px; }
.vendor-back:hover { color: var(--gray-800); text-decoration: none; }

/* ================================================================
   MISC UTILITIES
   ================================================================ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--gray-400); font-size: 12px; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.fw-bold { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.separator { border: none; border-top: 1px solid var(--gray-200); margin: 20px 0; }
.section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--gray-200);
}
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-400);
}
.empty-state p { font-size: 14px; margin-top: 8px; }

/* Reports */
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Overdue indicator */
.overdue { color: var(--danger); font-weight: 600; }
.days-in { font-size: 11px; color: var(--gray-400); }

/* ================================================================
   LOGO
   ================================================================ */
.sidebar-logo {
    display: block;
    height: 36px;
    width: auto;
    margin-bottom: 8px;
    object-fit: contain;
}

/* ================================================================
   VENDOR PORTAL — LOGO + LAYOUT UPDATES
   ================================================================ */
.vendor-topbar-left {
    display: flex;
    align-items: center;
}
.vendor-topbar-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.vendor-topbar-brand-link:hover { text-decoration: none; }
.vendor-topbar-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}
.vendor-topbar-name {
    font-weight: 600;
    color: white;
}

/* ================================================================
   VENDOR PORTAL — RESOURCES PAGE
   ================================================================ */
.vendor-page-header {
    margin-bottom: 24px;
}
.vendor-page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}
.vendor-page-header p {
    font-size: 13px;
    color: var(--gray-500);
}
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.resource-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: var(--shadow);
}
.resource-card-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}
.resource-card-body h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}
.resource-card-body p {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
    line-height: 1.5;
}
.resource-contact-note {
    font-size: 13px;
    color: var(--gray-500);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px 16px;
}
.resource-contact-note strong { color: var(--gray-700); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .detail-layout   { grid-template-columns: 1fr; }
    .form-grid       { grid-template-columns: 1fr; }
    .form-grid-3     { grid-template-columns: 1fr; }
    .duty-compare    { grid-template-columns: 1fr; }
    .report-grid     { grid-template-columns: 1fr; }
    .stats-grid      { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
@media (max-width: 640px) {
    .sidebar { display: none; }
    .main    { margin-left: 0; }
    .content { padding: 16px; }
}

/* ====================================================================
   MULTI-LANGUAGE SWITCHER
   ==================================================================== */

/* ── In-app header dropdown ────────────────────────────────────────── */
.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
    transition: background 0.15s;
}
.lang-btn:hover {
    background: rgba(255,255,255,0.22);
}
.lang-arrow {
    font-size: 10px;
    opacity: 0.7;
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    min-width: 155px;
    z-index: 300;
    overflow: hidden;
}
.lang-switcher.open .lang-dropdown {
    display: block;
}

/* Use higher-specificity selector to beat .vendor-topbar-right a (0,1,1)
   which would otherwise force white text over the white dropdown bg.    */
.lang-dropdown .lang-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    color: #334155;          /* = var(--gray-700) — explicit to avoid inheritance */
    text-decoration: none;
    white-space: nowrap;
    background: #ffffff;
    transition: background 0.1s, color 0.1s;
}
.lang-dropdown .lang-opt:hover {
    background: var(--gray-100);
    color: #1e293b;          /* = var(--gray-800) */
    text-decoration: none;
}
.lang-dropdown .lang-opt.active {
    font-weight: 600;
    color: var(--blue);
    background: #eff6ff;     /* = var(--blue-lt) */
}

/* ── Login page language selector ──────────────────────────────────── */
.login-lang-select {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 22px;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.lang-pill:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    border-color: var(--gray-300);
}
.lang-pill.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    font-weight: 600;
}

@media (max-width: 480px) {
    .login-lang-select { gap: 5px; }
    .lang-pill         { font-size: 11px; padding: 4px 9px; }
}

/* ====================================================================
   RESOURCE CARDS (Resources page)
   ==================================================================== */

.vendor-page-header {
    margin-bottom: 24px;
}
.vendor-page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 4px;
}
.vendor-page-header p {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
}

/* Grid layout — side-by-side on wider screens */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

/* Base card */
.resource-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 22px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: box-shadow 0.15s;
}
.resource-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* Featured card — language-specific guide */
.resource-card-featured {
    border-color: var(--blue);
    border-width: 2px;
    background: #f8f9ff;
}

/* Secondary card (English when a localised version is also shown) */
.resource-card-secondary {
    opacity: 0.88;
}
.resource-card-secondary:hover {
    opacity: 1;
}

/* Icon column */
.resource-card-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Body column */
.resource-card-body {
    flex: 1;
    min-width: 0;
}
.resource-card-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 6px;
}
.resource-card-body p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0 0 14px;
    line-height: 1.5;
}

/* Badges row */
.resource-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.resource-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.resource-badge-lang {
    background: #e8eeff;
    color: var(--blue);
    border: 1px solid #c7d2fc;
}
.resource-badge-en {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

/* Contact note below the grid */
.resource-contact-note {
    font-size: 13px;
    color: var(--gray-500);
    padding: 14px 18px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}
.resource-contact-note a {
    color: var(--blue);
    text-decoration: none;
}
.resource-contact-note a:hover {
    text-decoration: underline;
}

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