/* Core Design Tokens - Apple Light Style */
:root {
    --bg-main: #f5f5f7; /* Apple light gray */
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.06);
    
    --text-primary: #1d1d1f; /* Soft near-black */
    --text-secondary: #86868b; /* Medium gray */
    --text-muted: #b0b0b5; /* Light gray */
    
    --primary: #0071e3; /* Apple Blue */
    --primary-hover: #0077ed;
    --primary-light: rgba(0, 113, 227, 0.06);
    
    --success: #34c759; /* Apple Green */
    --success-bg: #e6f4ea;
    --success-border: rgba(52, 199, 89, 0.15);
    
    --warning: #ff9500; /* Apple Orange */
    --warning-bg: #fff2e0;
    --warning-border: rgba(255, 149, 0, 0.15);
    
    --error: #ff3b30; /* Apple Red */
    --error-bg: #fdf2f2;
    --error-border: rgba(255, 59, 48, 0.15);

    --font-heading: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
    --font-number: 'JetBrains Mono', 'SF Mono', 'PingFang SC', "Microsoft YaHei UI", monospace;
    
    --glass-blur: blur(20px);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-dropdown: 0 30px 60px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.02);
}

/* Antigravity Particles Background Canvas */
#antigravity-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Ambient Mesh Glows */
.ambient-glow {
    display: none;
    position: fixed;
    width: 650px;
    height: 650px;
    filter: blur(140px);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
    animation: floatGlow 25s infinite alternate ease-in-out, morphGlow 18s infinite ease-in-out;
}
.glow-1 {
    top: -250px;
    left: -150px;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.45) 0%, transparent 80%);
}
.glow-2 {
    bottom: -200px;
    right: -150px;
    background: radial-gradient(circle, rgba(219, 68, 85, 0.35) 0%, transparent 80%);
    animation-delay: -5s;
}
.glow-3 {
    top: 35%;
    left: 45%;
    background: radial-gradient(circle, rgba(244, 180, 0, 0.22) 0%, transparent 80%);
    animation-delay: -10s;
}
.glow-4 {
    top: 15%;
    right: 15%;
    background: radial-gradient(circle, rgba(15, 157, 88, 0.25) 0%, transparent 80%);
    animation-delay: -15s;
}
@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(80px, 100px) scale(1.2);
    }
    100% {
        transform: translate(-40px, -60px) scale(0.85);
    }
}
@keyframes morphGlow {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%;
    }
    34% {
        border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%;
    }
    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }
    100% {
        border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%;
    }
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.3s ease;
}

/* Smooth transitions for theme switching */
.panel-card,
#welcome-state,
#loading-state,
.skeleton-card,
.top-status-bar,
.app-nav {
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.3s ease, box-shadow 0.4s ease;
}

/* Top Status Bar (Premium Charcoal Black control ribbon) */
.top-status-bar {
    width: 100%;
    background: #1d1d1f; /* Premium Apple dark black */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.72rem; /* 11px */
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6); /* Soft white-gray secondary text */
    font-family: var(--font-body);
    z-index: 1001;
    position: relative;
}

.status-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.status-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
}

.status-bar-rates-wrapper {
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    mask-image: linear-gradient(to right, transparent, white 20px, white calc(100% - 20px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, white 20px, white calc(100% - 20px), transparent);
}

.status-bar-rates-track {
    display: flex;
    align-items: center;
    gap: 8px;
    animation: statusMarquee 30s linear infinite;
    flex-shrink: 0;
    padding-right: 8px;
}

.status-bar-rates-wrapper:hover .status-bar-rates-track {
    animation-play-state: paused;
}

@keyframes statusMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.status-bar-text {
    color: rgba(255, 255, 255, 0.85); /* Off-white for high readability */
}

.status-bar-divider {
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
    margin: 0 4px;
}

.status-bar-text.version {
    color: rgba(255, 255, 255, 0.4);
}

.status-indicator-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 rgba(52, 199, 89, 0.4);
    animation: statusPulse 1.8s infinite;
}

.status-indicator-dot.error-state {
    background: #ff453a !important;
    box-shadow: 0 0 8px rgba(255, 69, 58, 0.6) !important;
}

.status-bar-rate-label {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.status-bar-rate-item {
    font-family: var(--font-number);
    font-weight: 600;
    color: #ffffff; /* Bright white for primary rates values */
    font-variant-numeric: tabular-nums;
}

.status-bar-rate-divider {
    color: rgba(255, 255, 255, 0.12);
    user-select: none;
    margin: 0 4px;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px 24px; /* Trimmed top padding since we have navbar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

/* Navigation Bar */
.app-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 36px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 15;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.nav-logo .logo-img {
    height: 84px; /* Clean premium profile inside navbar */
    width: auto;
    object-fit: contain;
}

.nav-left .badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.04), rgba(0, 113, 227, 0.08));
    border: 1px solid rgba(0, 113, 227, 0.15);
    color: #0071e3;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-left .badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #34c759;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.6);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 16px;
}

.nav-links::before {
    content: '';
    display: block;
    width: 1px;
    height: 14px;
    background: rgba(0, 0, 0, 0.1);
    margin-right: 4px;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: #515154;
    text-decoration: none;
    transition: color 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-separator {
    color: rgba(0, 0, 0, 0.15);
    font-size: 0.85rem;
    user-select: none;
}

.nav-version {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Segmented Control Language Switcher - Apple style */
.lang-toggle-pills {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    padding: 2px;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 35px; /* Matches currency-select-trigger height */
    box-sizing: border-box;
    gap: 2px;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    outline: none;
    height: 100%;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 0.82rem; /* Matches currency selector font size */
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    font-family: var(--font-body);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none !important;
}

.lang-pill:hover {
    color: var(--text-primary);
}

.lang-pill.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

/* Custom Currency Dropdown Selector - Apple Glassmorphism styling */
.currency-select-container {
    display: inline-flex;
    position: relative;
}

.currency-select-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.03);
    padding: 8px 14px;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-body);
}

.currency-select-trigger:focus {
    outline: none;
}

.currency-select-trigger:focus-visible {
    outline: none;
    border-color: rgba(0, 113, 227, 0.4);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12), 0 2px 8px rgba(0, 113, 227, 0.04);
}

.currency-select-trigger:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    transform: translateY(-0.5px);
}

.currency-select-container.open .currency-select-trigger {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.currency-select-trigger .chevron-icon {
    width: 12px;
    height: 12px;
    color: var(--text-secondary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.currency-select-trigger .globe-icon {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.currency-select-trigger:hover .globe-icon {
    color: var(--primary);
}

.currency-select-container.open .chevron-icon {
    transform: rotate(180deg);
}

.currency-select-container .currency-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 290px; /* Wider to comfortably fit currency names and rates without wrapping */
    background: rgba(255, 255, 255, 0.95); /* Increased opacity for premium glassmorphism visibility */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow: var(--shadow-dropdown);
    padding: 6px 0;
    z-index: 1000;
    display: none;
    transform-origin: top right;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.currency-select-container.open .currency-select-dropdown {
    display: block;
}

.currency-select-dropdown .custom-select-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.currency-select-dropdown .custom-select-options li {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none !important;
    gap: 16px;
    white-space: nowrap; /* Prevent option row wrapping */
}

.currency-select-dropdown .custom-select-options li:hover {
    background: rgba(0, 0, 0, 0.03); /* Soft Apple grey hover */
}

.currency-select-dropdown .custom-select-options li.selected {
    background: var(--primary-light);
    color: var(--primary);
}

.currency-select-dropdown .custom-select-options li.selected:hover {
    background: rgba(0, 113, 227, 0.08); /* Distinct selected item hover */
}

.currency-name-lbl {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap; /* Prevent text wrapping */
}

.currency-select-dropdown .custom-select-options li.selected .currency-name-lbl {
    color: var(--primary);
}

.currency-rate-lbl {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    white-space: nowrap; /* Prevent rate wrapping */
}

.currency-select-dropdown .custom-select-options li.selected .currency-rate-lbl {
    color: var(--primary);
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0px rgba(52, 199, 89, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(52, 199, 89, 0);
    }
    100% {
        box-shadow: 0 0 0 0px rgba(52, 199, 89, 0);
    }
}

/* Header */
.app-header {
    margin-bottom: 48px;
    text-align: left;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.045em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1d1d1f 0%, #515154 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Metrics Dashboard Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
    animation: fadeIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) both;
    width: 100%;
}

.metrics-grid.hidden {
    display: none;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.01);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.metric-card.cheapest {
    border-color: rgba(52, 199, 89, 0.12);
    background: linear-gradient(180deg, rgba(52, 199, 89, 0.02) 0%, #ffffff 100%);
}

.metric-card.fastest {
    border-color: rgba(255, 149, 0, 0.12);
    background: linear-gradient(180deg, rgba(255, 149, 0, 0.02) 0%, #ffffff 100%);
}

.metric-card.total-channels {
    border-color: rgba(0, 113, 227, 0.12);
    background: linear-gradient(180deg, rgba(0, 113, 227, 0.02) 0%, #ffffff 100%);
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.metric-card.cheapest:hover {
    border-color: rgba(52, 199, 89, 0.25);
    box-shadow: 0 16px 40px rgba(52, 199, 89, 0.06);
}

.metric-card.fastest:hover {
    border-color: rgba(255, 149, 0, 0.25);
    box-shadow: 0 16px 40px rgba(255, 149, 0, 0.06);
}

.metric-card.total-channels:hover {
    border-color: rgba(0, 113, 227, 0.25);
    box-shadow: 0 16px 40px rgba(0, 113, 227, 0.06);
}

.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f5f5f7;
    color: var(--text-primary);
}

.metric-icon svg {
    width: 20px;
    height: 20px;
}

.cheapest .metric-icon {
    background: #e6f4ea;
    color: #1a7f37;
}

.fastest .metric-icon {
    background: #fff2e0;
    color: #b25e00;
}

.total-channels .metric-icon {
    background: #e6f7ff;
    color: #0071e3;
}

.metric-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-val {
    font-family: var(--font-number);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    font-variant-numeric: tabular-nums;
}

.metric-converted-sub {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    margin-left: 8px;
    font-family: var(--font-number);
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: baseline;
    font-variant-numeric: tabular-nums;
}

.metric-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashboard Layout (Sidebar + Main panel) */
.dashboard-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* Left Sidebar panel */
.sidebar-panel {
    flex: 0 0 380px;
    position: sticky;
    top: 36px;
    z-index: 10;
}

.panel-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px 20px;
    box-shadow: var(--shadow-card);
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

/* Quote Calculator Form styling */
.quote-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-row .form-field.col-left {
    flex: 0 0 35%;
}

.form-row .form-field.col-right {
    flex: 1;
    min-width: 0;
}

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

.field-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 2px;
}

.form-field label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-field label .req {
    color: var(--error);
}

.form-field input, .form-field select {
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
}

.form-field input:hover, .form-field select:hover {
    border-color: rgba(0, 0, 0, 0.24);
}

.form-field input:focus, .form-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12), 0 2px 8px rgba(0, 113, 227, 0.04);
}

.form-field-static {
    padding: 12px 14px;
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    width: 100%;
    cursor: not-allowed;
    user-select: none;
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 44px;
}

.dimensions-input-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 2px 8px;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dimensions-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12), 0 2px 8px rgba(0, 113, 227, 0.04);
}

.dimensions-input-group input {
    text-align: center;
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 4px;
    outline: none !important;
    box-shadow: none !important;
    font-family: var(--font-number);
    font-size: 15px;
}

.dimensions-input-group .times {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
    padding: 0 4px;
    user-select: none;
}



.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--text-primary); /* Apple premium dark black button */
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.submit-btn:hover {
    background: #323236;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

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

.submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.full-width {
    width: 100%;
}

/* Right Main Content Panel */
.main-content-panel {
    flex: 1;
    min-width: 0;
}

.state-panel {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.state-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Welcome state */
#welcome-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
}

.empty-graphic {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 113, 227, 0.06);
    border: 1px solid rgba(0, 113, 227, 0.12);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.08);
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.empty-graphic svg {
    width: 32px;
    height: 32px;
}

#welcome-state h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

#welcome-state p {
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Skeleton Loading state */
#loading-state {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.skeleton-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 500px;
    margin: 0 auto 30px auto;
}

.skeleton-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}

.skeleton-icon-block {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0f0f3 25%, #e8e8ed 50%, #f0f0f3 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-text-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f3 25%, #e8e8ed 50%, #f0f0f3 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-line.line-long {
    width: 70%;
}

.skeleton-line.line-short {
    width: 40%;
}

.skeleton-price-block {
    width: 80px;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f3 25%, #e8e8ed 50%, #f0f0f3 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#loading-state h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

#loading-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Error state */
#error-state {
    background: var(--card-bg);
    border: 1px solid var(--error-border);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.error-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--error-bg);
    color: var(--error);
    margin-bottom: 24px;
}

.error-badge svg {
    width: 28px;
    height: 28px;
}

#error-state h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

#error-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Results State panel styling */
#quote-results-state {
    display: none;
    flex-direction: column;
    gap: 28px;
}

#quote-results-state.active {
    display: flex;
}

.results-header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 20px;
}

.results-header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.panel-section-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quote-summary-details {
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
    padding: 8px 16px;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-top: 12px;
    font-weight: 500;
}

.sort-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #f5f5f7;
    border-radius: 8px;
    padding: 0;
    height: 36px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sort-select-wrapper:hover {
    background: #e8e8ed;
}

.sort-select-wrapper .sort-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--primary);
    pointer-events: none;
}

.sort-select-wrapper select.sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    outline: none;
    color: var(--primary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.90rem;
    cursor: pointer;
    height: 100%;
    padding: 0 36px 0 36px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.sort-select-wrapper .chevron-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    color: var(--primary);
    pointer-events: none;
}

/* Quotation Channels list and cards */
.quote-channels-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quote-channel-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.quote-channel-card:hover {
    border-color: rgba(0, 113, 227, 0.18);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 40px rgba(0, 113, 227, 0.05), 0 2px 4px rgba(0, 113, 227, 0.02);
}

.channel-brand-icon-area {
    flex-shrink: 0;
}

.channel-brand-icon-bg {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.channel-brand-icon-bg i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.channel-brand-icon-bg.brand-icon-mail {
    background: rgba(9, 109, 217, 0.07);
    border-color: rgba(9, 109, 217, 0.12);
}
.channel-brand-icon-bg.brand-icon-mail i {
    color: #096dd9;
}

.channel-brand-icon-bg.brand-icon-express {
    background: rgba(255, 149, 0, 0.07);
    border-color: rgba(255, 149, 0, 0.12);
}
.channel-brand-icon-bg.brand-icon-express i {
    color: #ff9500;
}

.channel-brand-icon-bg.brand-icon-direct {
    background: rgba(0, 113, 227, 0.07);
    border-color: rgba(0, 113, 227, 0.12);
}
.channel-brand-icon-bg.brand-icon-direct i {
    color: #0071e3;
}

.channel-brand-icon-bg.brand-icon-parcel {
    background: rgba(134, 134, 139, 0.07);
    border-color: rgba(134, 134, 139, 0.12);
}
.channel-brand-icon-bg.brand-icon-parcel i {
    color: #86868b;
}

/* Hover effects */
.quote-channel-card:hover .channel-brand-icon-bg {
    transform: translateY(-2px);
}

.quote-channel-card:hover .channel-brand-icon-bg.brand-icon-mail {
    background: rgba(9, 109, 217, 0.13);
    border-color: rgba(9, 109, 217, 0.22);
    box-shadow: 0 6px 16px rgba(9, 109, 217, 0.15);
}

.quote-channel-card:hover .channel-brand-icon-bg.brand-icon-express {
    background: rgba(255, 149, 0, 0.13);
    border-color: rgba(255, 149, 0, 0.22);
    box-shadow: 0 6px 16px rgba(255, 149, 0, 0.18);
}

.quote-channel-card:hover .channel-brand-icon-bg.brand-icon-direct {
    background: rgba(0, 113, 227, 0.13);
    border-color: rgba(0, 113, 227, 0.22);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.15);
}

.quote-channel-card:hover .channel-brand-icon-bg.brand-icon-parcel {
    background: rgba(134, 134, 139, 0.13);
    border-color: rgba(134, 134, 139, 0.22);
    box-shadow: 0 6px 16px rgba(134, 134, 139, 0.12);
}

.quote-channel-card:hover .channel-brand-icon-bg i {
    transform: scale(1.1);
}

.channel-info-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.channel-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.channel-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.channel-code {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 7px;
    background: #f5f5f7;
    border: none;
    color: var(--text-secondary);
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.channel-days-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--warning-bg);
    color: #b25e00;
}

.transit-api-badge {
    background: rgba(9, 109, 217, 0.08) !important;
    color: #096dd9 !important;
}

.transit-excel-badge {
    background: rgba(82, 196, 26, 0.08) !important;
    color: #2f8e0a !important;
}

.channel-ename {
    font-size: 0.88rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-meta-row {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.channel-meta-item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.channel-meta-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.channel-meta-item.packaging-fee {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem !important;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--success-bg) !important;
    color: #1a7f37 !important;
    border: none;
}

.channel-meta-item.packaging-fee strong {
    color: #1a7f37 !important;
}

.channel-meta-item.channel-remark-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem !important;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f5f5f7 !important;
    color: var(--text-secondary) !important;
    border: none;
}

.channel-meta-item.channel-remark-tag strong {
    color: var(--text-primary) !important;
}

.channel-price-area {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 180px;
}

.channel-total-badge {
    display: inline-flex;
    align-items: baseline;
    color: var(--text-primary);
}

.channel-total-badge .currency {
    font-size: 0.95rem;
    font-weight: 600;
}

.channel-total-badge .amount {
    font-size: 1.45rem;
    font-weight: 700;
    font-family: var(--font-number);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.channel-converted-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    font-family: var(--font-number);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.channel-price-breakdown {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
    letter-spacing: 0;
    max-width: 320px;
    word-wrap: break-word;
    white-space: normal;
    text-align: right;
    font-family: var(--font-number);
    font-variant-numeric: tabular-nums;
}

/* Custom Searchable Country Select Dropdown - Apple Glassmorphism list */
.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-container.open {
    z-index: 999;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    outline: none;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.custom-select-trigger:hover {
    border-color: rgba(0, 0, 0, 0.24);
}

.custom-select-trigger:focus, .custom-select-container.open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12), 0 2px 8px rgba(0, 113, 227, 0.04);
}

.trigger-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    text-align: left;
    margin-right: 8px;
}

.chevron-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.custom-select-container.open .chevron-icon {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 270px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: var(--shadow-dropdown);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.custom-select-container.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

#country-search-input {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    width: 100%;
}

#country-search-input::placeholder {
    color: var(--text-secondary);
}

.custom-select-options {
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    margin: 0;
}

/* Custom scrollbar for options list */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.custom-select-options li {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-select-options li:hover {
    background: rgba(0, 0, 0, 0.04);
}

.custom-select-options li.selected {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.custom-select-options li.no-results, 
.custom-select-options li.loading-option {
    color: var(--text-secondary);
    cursor: default;
    justify-content: center;
    padding: 24px 0;
}

.custom-select-options li.no-results:hover,
.custom-select-options li.loading-option:hover {
    background: transparent;
    color: var(--text-secondary);
}

.custom-select-trigger.input-error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.15) !important;
}

/* App Footer */
.app-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 60px;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-stats {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-stats .stats-num {
    font-family: var(--font-number);
    font-weight: 600;
    color: var(--primary);
}

.footer-stats .stats-divider {
    color: rgba(0, 0, 0, 0.15);
}

body.dark-mode .footer-stats .stats-divider {
    color: rgba(255, 255, 255, 0.15);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive media queries */
@media (max-width: 1024px) {
    .dashboard-layout {
        flex-direction: column;
        gap: 24px;
    }
    .sidebar-panel,
    .main-content-panel {
        flex: 1;
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 20px 16px 40px 16px;
    }
    
    #welcome-state,
    #loading-state,
    #error-state {
        padding: 40px 20px;
    }
    
    .app-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        row-gap: 16px;
        column-gap: 12px;
        align-items: center;
        padding: 16px 0;
        margin-bottom: 20px;
    }
    
    .nav-left, .nav-right {
        display: contents;
    }
    
    .theme-toggle-btn {
        grid-column: 2 / 3;
        grid-row: 1;
        justify-self: end;
        margin-right: 156px;
    }
    
    .nav-logo {
        grid-column: 1 / 2;
        justify-self: start;
    }
    
    .nav-logo .logo-img {
        height: 80px;
    }
    
    .currency-select-container {
        grid-column: 2 / 3;
        justify-self: end;
        width: 100%;
        max-width: 140px;
        margin-right: 0;
    }
    
    .currency-select-trigger {
        width: 100%;
        justify-content: space-between;
    }
    
    .lang-toggle-pills {
        grid-column: 1 / 3;
        grid-row: 2;
        width: 100%;
        display: flex;
    }
    
    .lang-toggle-pills .lang-pill {
        flex: 1;
        text-align: center;
    }
    
    .nav-left .badge {
        grid-column: 1 / 3;
        grid-row: 3;
        justify-self: center;
        text-align: center;
        width: 100%;
        padding: 6px 12px;
        font-size: 0.62rem;
    }
    
    .nav-links {
        grid-column: 1 / 3;
        grid-row: 4;
        justify-content: center;
        margin-left: 0;
        border-left: none;
        padding-left: 0;
        gap: 24px;
        width: 100%;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding-top: 12px;
    }
    
    .nav-links::before {
        display: none;
    }

    /* Top Status Bar Responsive Ticker */
    .top-status-bar {
        font-size: 0.68rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .top-status-bar::-webkit-scrollbar {
        display: none;
    }
    
    .status-bar-content {
        flex-direction: row;
        white-space: nowrap;
        gap: 16px;
        padding: 10px 16px;
    }
    
    .status-bar-left, .status-bar-right {
        width: auto;
        gap: 12px;
        flex-wrap: nowrap;
    }
    
    .status-bar-right {
        flex: none;
    }
    
    .status-bar-rates-wrapper {
        overflow: visible;
        flex: none;
        display: flex;
        align-items: center;
        gap: 8px;
        mask-image: none;
        -webkit-mask-image: none;
    }
    
    .status-bar-rates-track {
        animation: none;
        flex-shrink: 1;
        padding-right: 0;
    }
    
    .status-bar-rates-track:nth-child(2) {
        display: none;
    }
    
    .app-header {
        margin-bottom: 24px;
    }

    .main-title {
        font-size: 1.8rem;
        letter-spacing: -0.02em;
    }
    
    .main-subtitle {
        font-size: 0.95rem;
        line-height: 1.45;
    }
    
    .panel-section-title {
        font-size: 1.15rem;
    }
    
    /* Horizontal Scrolling Metrics Grid on Mobile (Saves vital screen height!) */
    .metrics-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding: 4px 0 12px 0;
        margin-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .metrics-grid::-webkit-scrollbar {
        height: 4px;
    }
    
    .metrics-grid::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.02);
        border-radius: 10px;
    }
    
    .metrics-grid::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.08);
        border-radius: 10px;
    }
    
    .metric-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
        margin-bottom: 0;
        padding: 16px;
    }

    /* Form fields legibility - prevent iOS Safari auto-zoom by setting font-size to 16px */
    .form-field input, 
    .form-field select, 
    #country-search-input,
    .admin-input-group input,
    .admin-input-with-suffix input {
        font-size: 16px !important;
    }
    
    .quote-channel-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 16px;
        padding: 20px;
    }
    
    .channel-brand-icon-area {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        align-self: start;
    }
    
    .channel-info-area {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        min-width: 0;
    }
    
    /* Clean flex alignment for mobile prices and breakdown */
    .channel-price-area {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        width: 100%;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding-top: 14px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    
    .channel-total-badge {
        order: 1;
    }
    
    .channel-converted-badge {
        order: 2;
        margin-left: auto;
    }
    
    .channel-price-breakdown {
        order: 3;
        width: 100%;
        text-align: left;
        font-size: 0.78rem;
        color: var(--text-secondary);
        margin-top: 4px;
        max-width: 100% !important;
    }

    /* WhatsApp Alert Box Mobile Layout */
    .info-alert-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }
    
    .whatsapp-btn {
        justify-content: center;
        width: 100%;
    }
}

/* Goods Type Badges */
.channel-meta-item.goods-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem !important;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    border: none;
}

.channel-meta-item.goods-type-badge.type-general {
    background: #e8e8ed !important;
    color: var(--text-primary) !important;
}

.channel-meta-item.goods-type-badge.type-general strong {
    color: var(--text-primary) !important;
}

.channel-meta-item.goods-type-badge.type-battery {
    background: var(--warning-bg) !important;
    color: var(--warning) !important;
    border: 1px solid rgba(255, 149, 0, 0.1) !important;
}

.channel-meta-item.goods-type-badge.type-battery strong {
    color: var(--warning) !important;
}

.channel-meta-item.goods-type-badge.type-special {
    background: var(--error-bg) !important;
    color: var(--error) !important;
    border: 1px solid rgba(255, 59, 48, 0.1) !important;
}

.channel-meta-item.goods-type-badge.type-special strong {
    color: var(--error) !important;
}

/* Alert Notice Bar */
.info-alert-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #fdf6ec; /* Soft warning orange background */
    border: 1px solid #faecd8;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(250, 236, 216, 0.1);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c27813;
}

.info-icon {
    width: 20px;
    height: 20px;
    color: #e6a23c;
    flex-shrink: 0;
}

.alert-text {
    font-size: 0.88rem;
    line-height: 1.4;
    font-weight: 500;
}

.alert-text strong {
    color: #c27813;
    font-weight: 700;
}

/* WhatsApp CTA Button */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366; /* WhatsApp Green */
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
    flex-shrink: 0;
}

.whatsapp-btn:hover {
    background: #20ba59;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
}

.whatsapp-btn:active {
    transform: translateY(0);
}

.whatsapp-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Admin Trigger Link in Top Status Bar */
.admin-trigger {
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.admin-trigger:hover {
    color: #ffffff;
}

/* Admin Modal Styles */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.admin-modal.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.admin-modal-card {
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
    padding: 32px 28px;
    position: relative;
    transform: scale(0.94) translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.admin-modal.open .admin-modal-card {
    transform: scale(1) translateY(0);
}

.admin-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5f5f7;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    line-height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    outline: none;
}

.admin-modal-close:hover {
    background: #e8e8ed;
    color: var(--text-primary);
}

.admin-modal-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.admin-modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.4;
}

.admin-input-group {
    margin-bottom: 16px;
    width: 100%;
}

.admin-input-group input[type="password"],
.admin-input-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-body);
    box-sizing: border-box;
}

.admin-input-group input[type="password"]:focus,
.admin-input-group input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12), 0 2px 8px rgba(0, 113, 227, 0.04);
}

.admin-error-text {
    font-size: 0.8rem;
    color: var(--error);
    margin-bottom: 16px;
    min-height: 18px;
    font-weight: 500;
}

/* Control Panel State Form */
.admin-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-form-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-input-with-suffix {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.admin-input-with-suffix input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-heading);
}

.admin-input-with-suffix input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12), 0 2px 8px rgba(0, 113, 227, 0.04);
}

.admin-input-with-suffix .suffix {
    position: absolute;
    right: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}

.admin-success-text {
    font-size: 0.8rem;
    color: var(--success);
    margin-bottom: 20px;
    min-height: 18px;
    font-weight: 600;
}

.admin-action-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.admin-btn-logout {
    padding: 12px 20px;
    background: #f5f5f7;
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-body);
}

.admin-btn-logout:hover {
    background: #e8e8ed;
}

/* State management classes */
.admin-state-hidden {
    display: none !important;
}

.admin-state-active {
    display: block !important;
}

/* Shake animation for password failure */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.admin-shake {
    animation: shake 0.3s ease;
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .form-row .form-field.col-left,
    .form-row .form-field.col-right {
        flex: 1;
        width: 100%;
    }
    .results-header-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .sort-select-wrapper {
        width: 100%;
    }
}

/* --- Premium Theme Toggle Button --- */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    margin-right: 12px;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-0.5px);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.theme-toggle-btn .sun-icon {
    display: none;
}

.theme-toggle-btn .moon-icon {
    display: block;
}

/* --- Premium Apple-style Dark Mode overrides --- */
body.dark-mode {
    --bg-main: #0a0a0c;
    --card-bg: #16161a;
    --card-border: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f5f5f7;
    --text-secondary: #98989d;
    --text-muted: #48484a;
    
    --primary: #2997ff;
    --primary-hover: #41a4ff;
    --primary-light: rgba(41, 151, 255, 0.12);
    
    --success: #30d158;
    --success-bg: rgba(48, 209, 88, 0.12);
    --success-border: rgba(48, 209, 88, 0.22);
    
    --warning: #ff9f0a;
    --warning-bg: rgba(255, 159, 10, 0.12);
    --warning-border: rgba(255, 159, 10, 0.22);
    
    --error: #ff453a;
    --error-bg: rgba(255, 69, 58, 0.12);
    --error-border: rgba(255, 69, 58, 0.22);

    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-dropdown: 0 30px 60px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Base Body Styles in Dark Mode */
body.dark-mode {
    background-color: var(--bg-main);
    color: var(--text-primary);
    color-scheme: dark;
}

/* Theme button states in Dark Mode */
body.dark-mode .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .theme-toggle-btn .sun-icon {
    display: block;
}

body.dark-mode .theme-toggle-btn .moon-icon {
    display: none;
}

/* Form inputs & select in Dark Mode */
body.dark-mode .form-field input,
body.dark-mode .form-field select,
body.dark-mode .dimensions-input-group {
    background-color: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

body.dark-mode .form-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

body.dark-mode .form-field input:hover,
body.dark-mode .form-field select:hover,
body.dark-mode .dimensions-input-group:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .form-field-static {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

/* Custom Select Dropdowns in Dark Mode */
body.dark-mode .custom-select-trigger,
body.dark-mode .currency-select-trigger {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

body.dark-mode .custom-select-trigger:hover,
body.dark-mode .currency-select-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

body.dark-mode .custom-select-dropdown,
body.dark-mode .currency-select-dropdown {
    background: rgba(22, 22, 26, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .dropdown-search-wrapper {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .custom-select-options li:hover,
body.dark-mode .currency-select-dropdown ul li:hover {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .custom-select-options li.selected,
body.dark-mode .currency-select-dropdown ul li.selected {
    background: var(--primary-light);
    color: var(--primary);
}

/* Lang toggle pills in Dark Mode */
body.dark-mode .lang-toggle-pills {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .lang-pill {
    color: var(--text-secondary);
}

body.dark-mode .lang-pill.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

body.dark-mode .lang-pill:hover {
    color: var(--text-primary);
}

/* Skeleton loader in Dark Mode */
body.dark-mode .skeleton-card {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .skeleton-icon-block,
body.dark-mode .skeleton-line,
body.dark-mode .skeleton-price-block {
    background: linear-gradient(90deg, #242426 25%, #2c2c2e 50%, #242426 75%);
    background-size: 200% 100%;
}

/* Empty State / Welcome Panel in Dark Mode */
body.dark-mode .welcome-panel .empty-graphic {
    background: rgba(41, 151, 255, 0.08);
    border-color: rgba(41, 151, 255, 0.2);
}

body.dark-mode .welcome-panel h3 {
    color: var(--text-primary);
}

/* Nav separator and links in Dark Mode */
body.dark-mode .app-nav .nav-left .nav-links::before {
    background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .app-nav .nav-link {
    color: var(--text-secondary);
}

body.dark-mode .app-nav .nav-link:hover {
    color: var(--text-primary);
}

/* Status summary details panel in Dark Mode */
body.dark-mode .results-header-actions p {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

/* Admin config inputs in Dark Mode */
body.dark-mode .admin-input-group input,
body.dark-mode .admin-input-with-suffix input {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

body.dark-mode .admin-input-with-suffix .suffix {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
}

/* Admin panel modal card in Dark Mode */
body.dark-mode .admin-modal-card {
    background: rgba(22, 22, 26, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

body.dark-mode .admin-modal {
    background: rgba(0, 0, 0, 0.7);
}

/* Country search input wrapper in Dark Mode */
body.dark-mode .country-search-wrapper {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .country-search-wrapper svg {
    color: var(--text-secondary);
}

/* WhatsApp Link card in Dark Mode */
body.dark-mode .alert-notice-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Metric Cards in Dark Mode */
body.dark-mode .metric-card.cheapest {
    border-color: rgba(48, 209, 88, 0.2);
    background: linear-gradient(180deg, rgba(48, 209, 88, 0.04) 0%, var(--card-bg) 100%);
}

body.dark-mode .metric-card.fastest {
    border-color: rgba(255, 159, 10, 0.2);
    background: linear-gradient(180deg, rgba(255, 159, 10, 0.04) 0%, var(--card-bg) 100%);
}

body.dark-mode .metric-card.total-channels {
    border-color: rgba(41, 151, 255, 0.2);
    background: linear-gradient(180deg, rgba(41, 151, 255, 0.04) 0%, var(--card-bg) 100%);
}

/* Sort dropdown in Dark Mode */
body.dark-mode .sort-select-wrapper {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .sort-select-wrapper:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Brand icon background inside card in Dark Mode */
body.dark-mode .channel-brand-icon-bg {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

body.dark-mode .channel-brand-icon-bg.brand-icon-mail {
    background: rgba(9, 109, 217, 0.12);
    border-color: rgba(9, 109, 217, 0.22);
}
body.dark-mode .channel-brand-icon-bg.brand-icon-express {
    background: rgba(255, 149, 0, 0.12);
    border-color: rgba(255, 149, 0, 0.22);
}
body.dark-mode .channel-brand-icon-bg.brand-icon-direct {
    background: rgba(0, 113, 227, 0.12);
    border-color: rgba(0, 113, 227, 0.22);
}
body.dark-mode .channel-brand-icon-bg.brand-icon-parcel {
    background: rgba(134, 134, 139, 0.12);
    border-color: rgba(134, 134, 139, 0.22);
}

body.dark-mode .quote-channel-card:hover .channel-brand-icon-bg.brand-icon-mail {
    background: rgba(9, 109, 217, 0.22);
    border-color: rgba(9, 109, 217, 0.35);
    box-shadow: 0 8px 24px rgba(9, 109, 217, 0.25);
}
body.dark-mode .quote-channel-card:hover .channel-brand-icon-bg.brand-icon-express {
    background: rgba(255, 149, 0, 0.22);
    border-color: rgba(255, 149, 0, 0.35);
    box-shadow: 0 8px 24px rgba(255, 149, 0, 0.3);
}
body.dark-mode .quote-channel-card:hover .channel-brand-icon-bg.brand-icon-direct {
    background: rgba(0, 113, 227, 0.22);
    border-color: rgba(0, 113, 227, 0.35);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.25);
}
body.dark-mode .quote-channel-card:hover .channel-brand-icon-bg.brand-icon-parcel {
    background: rgba(134, 134, 139, 0.22);
    border-color: rgba(134, 134, 139, 0.35);
    box-shadow: 0 8px 24px rgba(134, 134, 139, 0.2);
}

/* General Goods badge in dark mode to fix text/background contrast */
body.dark-mode .channel-meta-item.goods-type-badge.type-general {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e5e5ea !important;
}
body.dark-mode .channel-meta-item.goods-type-badge.type-general strong {
    color: #ffffff !important;
}

/* Invert dark text/parts of logo in Dark Mode */
body.dark-mode .nav-logo .logo-img {
    filter: invert(1) brightness(1.5);
}

/* --- V1.6.1 Dark Mode Readability and Selector Fixes --- */

/* Main title text gradient in dark mode */
body.dark-mode .main-title {
    background: linear-gradient(135deg, #ffffff 0%, #a1a1a6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Channel code badge in dark mode */
body.dark-mode .channel-code {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
}

/* Estimated days badge text in dark mode */
body.dark-mode .channel-days-badge {
    color: #ff9f0a !important;
}

/* Transit API badge in dark mode */
body.dark-mode .transit-api-badge {
    background: rgba(41, 151, 255, 0.15) !important;
    color: #2997ff !important;
}

/* Transit Excel badge in dark mode */
body.dark-mode .transit-excel-badge {
    background: rgba(48, 209, 88, 0.15) !important;
    color: #30d158 !important;
}

/* Packaging sub-fee tags in dark mode */
body.dark-mode .channel-meta-item.packaging-fee {
    background: var(--success-bg) !important;
    color: #30d158 !important;
}
body.dark-mode .channel-meta-item.packaging-fee strong {
    color: #30d158 !important;
}

/* Channel remarks tag in dark mode */
body.dark-mode .channel-meta-item.channel-remark-tag {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
}

/* Metrics circular icon backdrops in dark mode */
body.dark-mode .cheapest .metric-icon {
    background: rgba(48, 209, 88, 0.15) !important;
    color: #30d158 !important;
}
body.dark-mode .fastest .metric-icon {
    background: rgba(255, 159, 10, 0.15) !important;
    color: #ff9f0a !important;
}
body.dark-mode .total-channels .metric-icon {
    background: rgba(41, 151, 255, 0.15) !important;
    color: #2997ff !important;
}

/* Info alert notice bottom card in dark mode */
body.dark-mode .info-alert-bar {
    background: rgba(255, 159, 10, 0.08) !important;
    border-color: rgba(255, 159, 10, 0.15) !important;
    box-shadow: none !important;
}
body.dark-mode .alert-content,
body.dark-mode .info-icon,
body.dark-mode .alert-text strong {
    color: #ff9f0a !important;
}

/* Welcome empty status state panel in dark mode */
body.dark-mode #welcome-state .empty-graphic {
    background: rgba(41, 151, 255, 0.08) !important;
    border-color: rgba(41, 151, 255, 0.2) !important;
}

/* Results section divider lines in dark mode */
body.dark-mode .results-header-actions {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* --- V1.6.2 Dark Mode Submit Button Contrast --- */
body.dark-mode .submit-btn {
    background: #ffffff !important;
    color: #0a0a0c !important;
}

body.dark-mode .submit-btn:hover {
    background: #e5e5ea !important;
}

body.dark-mode .admin-btn-logout {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .admin-btn-logout:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

/* --- V1.6.3 Mobile Navigation and Card Borders in Dark Mode --- */
body.dark-mode .app-nav .nav-links {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .channel-price-area {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* --- Vercel-Native Embedding Layout Overrides --- */

/* Cleanly remove headers and branding when embedded inside an iframe */
body.iframe-embed .top-status-bar,
body.iframe-embed .nav-left,
body.iframe-embed .app-header {
    display: none !important;
}

/* Align theme, language, and currency switchers to the right */
body.iframe-embed .app-nav {
    justify-content: flex-end;
    margin-bottom: 24px;
    padding: 12px 0;
}

/* Mobile responsive adjustments when embedded */
@media (max-width: 768px) {
    body.iframe-embed .app-nav {
        grid-template-columns: 1fr; /* Single column layout for switchers */
        row-gap: 12px;
        margin-bottom: 16px;
    }
    body.iframe-embed .theme-toggle-btn {
        grid-column: 1 / 2;
        grid-row: 1;
        justify-self: start;
        margin-right: 0;
    }
    body.iframe-embed .currency-select-container {
        grid-column: 1 / 2;
        grid-row: 1;
        justify-self: end;
    }
    body.iframe-embed .lang-toggle-pills {
        grid-column: 1 / 2;
        grid-row: 2;
    }
}

