/* ==========================================================================
   CalcLogistics Premium Design System - Mobile-First Web App
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-main: hsl(222, 47%, 9%);
    --bg-navy: hsl(244, 49%, 14%);
    --bg-card: rgba(17, 24, 39, 0.65);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.35);
    
    /* Neon Accent Brand Colors */
    --primary: hsl(245, 100%, 65%);
    --primary-glow: rgba(99, 102, 241, 0.45);
    --primary-light: hsl(245, 100%, 75%);
    
    --secondary: hsl(270, 95%, 60%);
    --secondary-glow: rgba(168, 85, 247, 0.3);
    
    --accent: hsl(180, 100%, 50%);
    
    /* Text Colors */
    --text-primary: hsl(210, 40%, 98%);
    --text-muted: hsl(215, 20%, 65%);
    --text-dark: hsl(222, 47%, 6%);
    
    /* Typography & Shadows */
    --font: 'Outfit', sans-serif;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
    --shadow-neon: 0 0 20px var(--primary-glow);
}

/* ==========================================================================
   1. Reset & Global Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent; /* Disable highlight on mobile tap */
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* Sleek mobile dynamic viewport support */
    width: 100vw;
}

/* Web Scrollbars */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   2. Desktop Background & Layout
   ========================================================================== */
.web-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh; /* Sleek mobile dynamic viewport support */
    width: 100vw;
    background: radial-gradient(circle at center, var(--bg-navy) 0%, var(--bg-main) 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

/* Glowing background blobs (PC View Only) */
.glow-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    mix-blend-mode: screen;
    animation: floatBlob 12s ease-in-out infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -50px;
    right: 10%;
    animation-delay: -3s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 40%;
    animation-delay: -6s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.15); }
}

/* Info Panel (Visible on Desktop only) */
.pc-info-panel {
    display: flex;
    flex-direction: column;
    width: 380px;
    height: 100%;
    max-height: 780px;
    padding: 2rem;
    margin-right: 4rem;
    z-index: 2;
    color: var(--text-primary);
    animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pc-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.pc-logo-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 8px var(--primary));
}

.pc-logo h2 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.pc-logo h2 span {
    color: var(--primary);
}

.pc-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.pc-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: auto;
}

.pc-feature {
    display: flex;
    gap: 15px;
}

.pf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    font-size: 1.25rem;
    color: var(--primary-light);
    flex-shrink: 0;
}

.pf-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.pf-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.pc-qr-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.qr-container {
    width: 65px;
    height: 65px;
    background: white;
    padding: 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.qr-svg {
    width: 100%;
    height: 100%;
}

.qr-text h5 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--primary-light);
}

.qr-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
}

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

/* ==========================================================================
   3. Phone Frame CSS Mockup
   ========================================================================== */
.phone-frame-wrapper {
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.phone-frame {
    position: relative;
    width: 390px;
    height: 820px;
    background: #090d16;
    border: 11px solid #202430; /* Metallic Bezel */
    border-radius: 46px;
    box-shadow: 
        0px 0px 0px 4px #101217, /* Phone edge outline */
        var(--shadow-lg), 
        0 15px 45px rgba(99, 102, 241, 0.15); /* Soft back glow */
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Hardware Buttons */
.phone-btn {
    position: absolute;
    width: 4px;
    background: #2d3345;
    border-radius: 2px;
    z-index: -1;
}

.phone-btn-volume-up {
    height: 50px;
    left: -15px;
    top: 170px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
}

.phone-btn-volume-down {
    height: 50px;
    left: -15px;
    top: 230px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
}

.phone-btn-power {
    height: 75px;
    right: -15px;
    top: 200px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
}

/* Notch / Dynamic Island */
.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 105px;
    height: 25px;
    background: #000;
    border-radius: 15px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.1);
}

.notch-camera {
    width: 9px;
    height: 9px;
    background: #111424;
    border-radius: 50%;
    box-shadow: inset 0 0 2px #4b5563;
}

.notch-speaker {
    width: 40px;
    height: 4px;
    background: #1a1a1a;
    border-radius: 2px;
}

/* Screen Canvas */
.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 35px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
}

/* Mock Status Bar */
.mock-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    height: 45px;
    background: var(--bg-main);
    z-index: 99;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-primary);
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.status-icons {
    display: flex;
    gap: 6px;
    font-size: 0.8rem;
}

/* ==========================================================================
   4. App Canvas & Navigation
   ========================================================================== */
.app-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100% - 45px); /* Subtracted status bar */
    position: relative;
}

.app-view {
    display: none;
    flex-direction: column;
    flex: 1;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 65px; /* Navbar space */
    overflow: hidden;
    transition: opacity 0.25s ease-in-out;
    background: var(--bg-main);
}

.app-view.active {
    display: flex;
    opacity: 1;
    z-index: 10;
    animation: viewFadeIn 0.35s ease-out forwards;
}

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

.view-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.8rem 1.15rem 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch; /* Smooth momentum scroll on iOS/mobile */
}

/* App Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 1.15rem 8px 1.15rem;
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(10px);
    z-index: 15;
    flex-shrink: 0;
}

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

.brand-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 4px var(--primary-glow));
}

.brand h3 {
    font-size: 1.1rem;
    font-weight: 800;
}

.brand h3 span {
    color: var(--primary);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 3px 8px;
    border-radius: 20px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
}

.status-text {
    font-size: 0.65rem;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
}

.view-intro {
    margin-bottom: 0.8rem;
}

.view-intro h1 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.view-intro p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Bottom Tab Navigation Bar */
.mobile-bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(9, 13, 22, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 90;
    padding: 0 10px 4px 10px; /* space for iOS indicator */
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    gap: 4px;
}

.nav-button-icon {
    font-size: 1.25rem;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.nav-button-label {
    font-size: 0.68rem;
    font-weight: 600;
}

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

.nav-button.active {
    color: var(--primary-light);
}

.nav-button.active .nav-button-icon {
    transform: translateY(-2px) scale(1.1);
    filter: drop-shadow(0 0 6px var(--primary-glow));
}

/* ==========================================================================
   5. Calculator Controls & Inputs
   ========================================================================== */
.form-section {
    margin-bottom: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.section-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-sub-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Custom Segmented Control for Used/New */
.condition-segmented-control {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3px;
    height: 42px;
    overflow: hidden;
}

.segmented-option {
    flex: 1;
    position: relative;
    z-index: 5;
    height: 100%;
}

.segmented-option input[type="radio"] {
    display: none !important;
}

.segmented-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.25s ease;
    border-radius: 10px;
    user-select: none;
}

.segmented-option input[type="radio"]:checked + .segmented-label {
    color: white;
}

/* Sliding active block */
.selector-highlight {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 9px;
    box-shadow: var(--shadow-sm), 0 0 10px rgba(99, 102, 241, 0.3);
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Container Visual Select Cards */
.container-types-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.type-select-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    user-select: none;
}

.type-select-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.type-select-card.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.1), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.card-glow {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -30px;
    right: -30px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.type-select-card.active .card-glow {
    opacity: 1;
}

.card-icon-wrapper {
    font-size: 1.35rem;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.type-select-card.active .card-icon-wrapper {
    animation: iconBounce 0.4s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15) translateY(-2px); }
}

.type-select-card .card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.type-select-card .card-size {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Reefer Card: Ice-blue tint theme */
.type-select-card.reefer-card {
    border-color: rgba(56, 189, 248, 0.25);
}
.type-select-card.reefer-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.04);
}
.type-select-card.reefer-card.active {
    background: rgba(56, 189, 248, 0.1);
    border-color: hsl(199, 100%, 60%);
    box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.12), 0 4px 15px rgba(0, 0, 0, 0.2);
}
.reefer-glow {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, transparent 70%);
}

/* Destination Search Input Box */
.address-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 16px;
    height: 52px;
    padding: 0 16px;
    transition: all 0.3s ease;
}

.address-input-wrapper:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.input-prefix-icon {
    font-size: 1.15rem;
    margin-right: 12px;
    color: var(--primary-light);
}

.address-input-wrapper input {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
}

.address-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.clear-input-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.clear-input-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.dest-badge-container {
    height: 22px;
    position: relative;
}

.loc-badge {
    position: absolute;
    left: 4px;
    top: 2px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.16);
    color: var(--primary-light);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.loc-badge.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Action Submit Button */
.primary-action-btn {
    width: 100%;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    margin-top: 6px;
    position: relative;
    flex-shrink: 0;
}

.primary-action-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.primary-action-btn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.loader-ring {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ==========================================================================
   6. Bottom Sheet Results Screen
   ========================================================================== */
.results-bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 17, 28, 0.92);
    backdrop-filter: blur(25px);
    border-top: 1px solid var(--border);
    border-radius: 28px 28px 0 0;
    z-index: 50;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(100%);
    padding: 10px 1.25rem 20px 1.25rem;
}

.results-bottom-sheet.collapsed {
    transform: translateY(100%) !important;
}

.results-bottom-sheet.expanded {
    transform: translateY(0);
}

.sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 12px auto;
}

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

.sheet-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.sheet-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.sheet-close-btn:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.sheet-price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 22px;
    margin-bottom: 14px;
    text-align: center;
}

.price-box-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.price-display-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 4px 0;
}

.price-display-wrapper .currency {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 6px;
    margin-right: 2px;
}

.price-display-wrapper #final-price {
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
    text-shadow: 0 0 15px rgba(99,102,241,0.25);
}

.price-explanation {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Metrics Pill layout */
.sheet-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.metric-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 18px;
}

.mp-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.mp-info {
    display: flex;
    flex-direction: column;
}

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

.mp-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mp-sub {
    font-size: 0.68rem;
    color: var(--primary-light);
    font-weight: 600;
}

.sheet-action-btn {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: white;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sheet-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* ==========================================================================
   7. Dedicated Map Tab View
   ========================================================================== */
.map-header {
    background: rgba(9, 13, 22, 0.92) !important;
    border-bottom: 1px solid var(--border);
}

.map-indicator {
    background: rgba(99, 102, 241, 0.16);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    animation: fadeIn 0.3s ease;
}

.map-indicator span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-light);
}

.map-view-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
    background: #eef0f3;
}

/* Leaflet clean light road styling matching Google Maps aesthetics */
.leaflet-container {
    background: #eef0f3 !important;
}
.leaflet-tile-container img {
    /* Completely remove dark mode/relief filters to render beautiful natural maps */
    filter: none !important;
}

.leaflet-bar {
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
}

.leaflet-bar a {
    background: #ffffff !important;
    color: #333333 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.leaflet-bar a:hover {
    background: #f4f5f7 !important;
    color: #000000 !important;
}

/* Map FAB button */
.map-fab-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 1000;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-fab-btn:hover {
    transform: scale(1.1);
    background: var(--primary-light);
}

.map-fab-btn.hidden {
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
}

/* ==========================================================================
   8. Settings Tab View
   ========================================================================== */
.settings-wrapper {
    display: flex;
    flex-direction: column;
    overflow-y: auto !important; /* Allow natural vertical scroll on mobile */
    padding: 10px 1.25rem 20px 1.25rem !important;
}

.settings-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.settings-nav-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.03);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.settings-pill {
    flex: 1;
    background: none;
    border: none;
    height: 38px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.settings-pill.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.settings-view-section {
    display: none;
    margin-bottom: 12px;
}

.settings-view-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.settings-info-card {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    margin-bottom: 14px;
}

.sic-icon {
    font-size: 1.15rem;
}

.settings-info-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Accordion Hub Styles */
.accordion-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item.expanded {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.03);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}

.accordion-header h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.accordion-header h4 span {
    font-size: 0.72rem;
    color: var(--primary-light);
    margin-left: 6px;
    background: rgba(99, 102, 241, 0.12);
    padding: 2px 6px;
    border-radius: 6px;
}

.accordion-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.accordion-item.expanded .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    background: rgba(0, 0, 0, 0.15);
    padding: 0 16px;
}

.accordion-item.expanded .accordion-body {
    max-height: 500px; /* Arbitrary large limit */
    padding: 0 16px 18px 16px;
    border-top: 1px solid var(--border);
}

.hub-prices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.hub-col h5 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.hub-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.hub-price-row label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Reefer Prices subsection inside hub accordion */
.reefer-prices-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(56, 189, 248, 0.25);
}

.reefer-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: hsl(199, 100%, 65%);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.reefer-prices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}

.hub-price-row .mobile-input {
    width: 65px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 0.75rem;
    padding: 4px 6px;
    outline: none;
    text-align: center;
}

.hub-price-row .mobile-input:focus {
    border-color: var(--primary);
}

/* Delivery brackets settings card */
.delivery-rates-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
}

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

.input-field-mobile.full-width {
    grid-column: span 2;
    margin-top: 6px;
}

.input-field-mobile label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.mobile-number-input {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 42px;
    padding: 0 12px;
}

.mobile-number-input .symbol {
    color: var(--primary-light);
    font-size: 0.85rem;
    margin-right: 6px;
    font-weight: 700;
}

.mobile-number-input input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 600;
}

.save-hub-btn {
    background: none !important;
    border: none !important;
    font-size: 0.82rem !important;
    cursor: pointer !important;
    padding: 4px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    color: var(--text-muted) !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.save-hub-btn:hover {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    transform: scale(1.1) !important;
}

/* ==========================================================================
   9. Kill-Switch Overlay & Lockout UI
   ========================================================================== */
.lockout-shield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(25px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: shieldFade 0.5s ease forwards;
}

.lockout-glass-card {
    width: 100%;
    max-width: 360px;
    background: rgba(31, 41, 55, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 28px;
    padding: 2.2rem 2rem;
    text-align: center;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(239, 68, 68, 0.05);
}

.shield-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: shieldPulse 2s infinite alternate;
}

.lockout-glass-card h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ef4444;
    margin-bottom: 0.75rem;
}

.shield-divider {
    height: 2px;
    width: 60px;
    background: rgba(239, 68, 68, 0.3);
    margin: 0 auto 1.25rem auto;
}

.shield-message {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
    font-weight: 600;
}

.shield-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 1.5rem;
}

.shield-code {
    display: inline-block;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    color: var(--text-muted);
}

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

@keyframes shieldPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.4)); }
    100% { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.8)); }
}

/* ==========================================================================
   10. Toast Notification Style
   ========================================================================== */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-50px);
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(9, 13, 22, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    padding: 10px 18px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 10px rgba(185, 255, 255, 0.05);
}

.toast-check {
    color: #10b981;
    font-weight: 700;
}

.toast-txt {
    font-size: 0.82rem;
    font-weight: 700;
    color: white;
}

/* ==========================================================================
   11. Media Queries (Desktop Layout Adaptability)
   ========================================================================== */

/* Hide left panel on tablet / medium width screens */
@media (max-width: 950px) {
    .pc-info-panel {
        display: none;
    }
    .web-layout {
        justify-content: center;
        padding: 1rem;
    }
}

/* 100% Native Mobile Scaling (Small Screens) */
@media (max-width: 500px) {
    .web-layout {
        padding: 0;
        background: var(--bg-main);
    }
    
    .glow-bg, .pc-info-panel {
        display: none !important;
    }
    
    /* Remove physical smartphone frame boundaries completely */
    .phone-frame-wrapper {
        width: 100%;
        height: 100%;
    }
    
    .phone-frame {
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height support */
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: var(--bg-main);
    }
    
    .phone-btn, .phone-notch {
        display: none !important; /* Hide hardware buttons and notch on actual phones */
    }
    
    .phone-screen {
        border-radius: 0;
    }
    
    /* Hide custom status bar since physical mobile has its own native status bar */
    .mock-status-bar {
        display: none;
    }
    
    .app-canvas {
        height: 100%;
    }
    
    /* Shift navbar spacing slightly for native safe areas */
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom, 12px);
        height: calc(65px + env(safe-area-inset-bottom, 0px));
    }
    
    .app-view {
        bottom: calc(65px + env(safe-area-inset-bottom, 0px));
    }
}

/* ==========================================================================
   12. General Utility Animations
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* Settings Language Switcher Styles */
.settings-language-picker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.slp-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lang-segmented-control {
    position: relative;
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 2px;
    height: 32px;
    width: 110px;
    overflow: hidden;
}

.lang-segmented-control input[type="radio"] {
    display: none !important;
}

.lang-segmented-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 5;
    transition: color 0.25s ease;
    user-select: none;
}

.lang-segmented-control input[type="radio"]:checked + .lang-segmented-label {
    color: white;
}

.lang-selector-highlight {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 7px;
    z-index: 2;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* License Activation Overlay Elements */
.activation-card {
    padding: 2.2rem 1.8rem;
}

.activation-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 1.25rem 0;
    box-sizing: border-box;
}

.lockout-glass-card input[type="text"]#license-key-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: white !important;
    font-size: 0.9rem !important;
    text-align: center !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.25s ease !important;
    outline: none !important;
}

.lockout-glass-card input[type="text"]#license-key-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px var(--primary-glow) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.lockout-glass-card button.activation-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    width: 100% !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
    transition: all 0.25s ease !important;
    box-sizing: border-box !important;
}

.lockout-glass-card button.activation-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

.trial-option-box {
    margin-top: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.trial-option-box p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.3;
}

.lockout-glass-card button.trial-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 8px 18px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    width: auto !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.lockout-glass-card button.trial-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--text-muted) !important;
}

/* License Details Card inside Settings view — sits OUTSIDE the scroll, pinned at the bottom */
.license-info-card {
    background: rgba(9, 13, 22, 0.95);
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 10px 14px 12px 14px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.lic-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lic-card-icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px var(--primary-glow));
}

.license-info-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.license-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 8px 10px;
}

.lic-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ldr-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ldr-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ldr-badge.trial {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.ldr-badge.expired {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.ldr-key {
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 6px;
    border-radius: 4px;
}

.change-license-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.change-license-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: var(--text-muted);
}

.save-rates-btn {
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 12px;
    padding: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.save-rates-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.3);
}

/* Add Custom Location Form Card */
.add-location-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 8px 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.add-location-card h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.add-loc-inputs {
    display: flex;
    gap: 8px;
    width: 100%;
}

.add-loc-inputs input[type="text"] {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 8px 10px !important;
    color: white !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    outline: none !important;
    box-sizing: border-box !important;
    flex: 1;
}

.add-loc-inputs input[type="text"]#new-hub-zip {
    max-width: 90px;
    text-align: center;
}

.add-loc-inputs input[type="text"]:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 8px var(--primary-glow) !important;
}

.add-hub-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0;
}

.add-hub-btn:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

/* Accordion Header Actions & Delete Button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.delete-hub-btn {
    background: none !important;
    border: none !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    padding: 4px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    color: var(--text-muted) !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.delete-hub-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    transform: scale(1.1) !important;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Hub Active/Inactive Toggle Switch
   ========================================================================== */

/* Wrapper del switch (label clickeable) */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Ocultar el checkbox real */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* Fondo del slider */
.slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 22px;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Círculo blanco del slider */
.slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Estado activo (checked) */
.switch input:checked + .slider {
    background: linear-gradient(135deg, var(--primary), hsl(265, 100%, 65%));
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.switch input:checked + .slider::before {
    transform: translateY(-50%) translateX(18px);
    background: white;
}

/* Hub deshabilitado — estado visual atenuado */
.accordion-item.disabled-hub {
    opacity: 0.45;
    border-style: dashed;
    border-color: var(--border);
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.accordion-item.disabled-hub .accordion-header h4 {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Animación de transición al cambiar estado */
.accordion-item {
    transition: opacity 0.3s ease, border-color 0.3s ease, all 0.3s ease;
}

/* ==========================================================================
   13. Premium Desktop Redesign & Map Split View (Screen width >= 950px)
   ========================================================================== */
@media (min-width: 950px) {
    /* Hide the old static info panel since the app itself becomes a gorgeous full desktop experience */
    .pc-info-panel {
        display: none !important;
    }

    /* Refine the layout background for full desktop */
    .web-layout {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        padding: 2.5rem;
        background: radial-gradient(circle at 50% 50%, var(--bg-navy) 0%, var(--bg-main) 100%);
        overflow: hidden;
    }

    /* Expand the smartphone physical mockup into a stunning glassmorphic desktop dashboard */
    .phone-frame-wrapper {
        width: 100%;
        height: 100%;
        max-width: 1440px;
        max-height: 880px;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 5;
    }

    .phone-frame {
        width: 100%;
        height: 100%;
        background: rgba(13, 17, 28, 0.7) !important;
        backdrop-filter: blur(20px);
        border: 1px solid var(--border) !important;
        border-radius: 24px !important;
        box-shadow: 
            var(--shadow-lg), 
            0 25px 60px rgba(99, 102, 241, 0.18),
            inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Disable physical hardware simulator features */
    .phone-notch,
    .phone-btn,
    .mock-status-bar {
        display: none !important;
    }

    .phone-screen {
        border-radius: 0 !important;
        width: 100%;
        height: 100%;
        background: transparent !important;
    }

    /* Convert single column tab system to a robust split dashboard layout */
    .app-canvas {
        display: grid !important;
        grid-template-columns: 460px 1fr !important;
        grid-template-rows: 1fr auto !important;
        grid-template-areas: 
            "left-pane right-pane"
            "nav-pane right-pane" !important;
        height: 100% !important;
        width: 100% !important;
    }

    /* Left pane views styling (Calculator / Settings form containers) */
    #view-calc,
    #view-settings {
        grid-area: left-pane;
        display: none;
        flex-direction: column;
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        bottom: 0 !important;
        background: rgba(9, 13, 22, 0.6) !important;
        border-bottom: none !important;
        min-height: 0 !important;
    }

    /* Clean scrolling behavior inside the forms */
    .view-content {
        padding: 1.5rem 1.8rem 1.5rem 1.8rem !important;
    }

    /* Active view displays beautifully in left column */
    #view-calc.active,
    #view-settings.active {
        display: flex !important;
        opacity: 1 !important;
        z-index: 5;
        animation: fadeIn 0.4s ease-out forwards;
    }

    /* Non-active views in left pane must remain hidden */
    #view-calc:not(.active),
    #view-settings:not(.active) {
        display: none !important;
    }

    /* Right pane interactive map view is always permanently visible */
    #view-map {
        grid-area: right-pane !important;
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        bottom: 0 !important;
        right: auto !important;
        width: 100% !important;
        height: 100% !important;
        border-left: 1px solid var(--border) !important;
        z-index: 10 !important;
        animation: none !important;
        transition: none !important;
        background: #eef0f3 !important;
    }

    .map-view-wrapper {
        width: 100%;
        height: 100%;
        flex: 1;
        position: relative;
    }

    #map {
        width: 100%;
        height: 100%;
    }

    /* Navigation Bar placed beautifully at the bottom of the left column */
    .mobile-bottom-nav {
        grid-area: nav-pane !important;
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        height: 72px !important;
        background: rgba(13, 17, 28, 0.95) !important;
        border-top: 1px solid var(--border) !important;
        border-right: 1px solid var(--border) !important;
        padding: 0 1rem 0 1rem !important;
        z-index: 20 !important;
    }

    /* Hide the 'Ver Mapa' tab button since the map is already persistent on the right side */
    .mobile-bottom-nav [data-target-view="view-map"] {
        display: none !important;
    }

    /* Optimize the remaining buttons to feel desktop dashboard-like */
    .nav-button {
        flex: 1;
        height: 100%;
        gap: 6px;
    }

    .nav-button-icon {
        font-size: 1.35rem;
    }

    .nav-button-label {
        font-size: 0.75rem;
        letter-spacing: 0.3px;
    }

    /* Inline desktop representation of calculated results bottom sheet */
    .results-bottom-sheet {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(13, 17, 28, 0.96) !important;
        border-top: 1px solid var(--primary-glow) !important;
        border-right: 1px solid var(--border) !important;
        border-bottom: none !important;
        border-left: none !important;
        border-radius: 24px 24px 0 0 !important;
        box-shadow: 
            0 -10px 40px rgba(0, 0, 0, 0.6), 
            0 0 30px rgba(99, 102, 241, 0.15) !important;
        z-index: 30 !important;
        padding: 1.25rem 1.5rem 1.5rem 1.5rem !important;
        transform: translateY(100%);
    }

    .results-bottom-sheet.collapsed {
        transform: translateY(100%) !important;
    }

    .results-bottom-sheet.expanded {
        transform: translateY(0) !important;
    }

    /* Hide drag handles and redundant route redirect actions */
    .sheet-drag-handle,
    #view-route-map-btn {
        display: none !important;
    }

    .sheet-price-box {
        padding: 14px !important;
        border-radius: 18px !important;
        margin-bottom: 12px !important;
    }

    .price-display-wrapper #final-price {
        font-size: 2.5rem !important;
    }

    .sheet-metrics-row {
        gap: 8px !important;
        margin-bottom: 0 !important; /* Eliminate extra margin since redirection button is gone */
    }

    .metric-pill {
        padding: 8px 12px !important;
        border-radius: 14px !important;
        gap: 8px !important;
    }

    .mp-icon {
        font-size: 1.15rem !important;
    }

    /* Refined styles for Settings sections inside desktop viewports */
    .settings-wrapper {
        padding: 1.5rem 1.8rem !important;
    }

    .add-location-card,
    .license-info-card,
    .delivery-rates-card {
        border-radius: 18px !important;
        background: rgba(255, 255, 255, 0.015) !important;
    }
}

/* ==========================================================================
   Route Mode Extra Controls: Container Size Selector + Extra Service Toggle
   ========================================================================== */

/* Extra Service Toggle Card (iOS-style) */
.route-extra-service-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    margin-top: 2px;
}

.route-extra-service-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.35);
}

.res-toggle-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.res-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.6));
}

.res-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.res-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

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

/* Hide native checkbox */
.res-checkbox {
    display: none !important;
}

/* iOS-style switch track */
.res-switch-wrapper {
    flex-shrink: 0;
}

.res-switch-track {
    position: relative;
    width: 46px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 13px;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.res-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Checked state */
.res-checkbox:checked ~ .res-switch-wrapper .res-switch-track,
.route-extra-service-toggle:has(.res-checkbox:checked) .res-switch-track,
.route-extra-service-toggle.checked .res-switch-track {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.res-checkbox:checked ~ .res-switch-wrapper .res-switch-thumb,
.route-extra-service-toggle:has(.res-checkbox:checked) .res-switch-thumb,
.route-extra-service-toggle.checked .res-switch-thumb {
    transform: translateX(20px);
}

/* Toggle glow on checked */
.route-extra-service-toggle:has(.res-checkbox:checked),
.route-extra-service-toggle.checked {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.12);
}

/* Discount settings hint text */
.rate-discount-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 4px;
    padding: 0 2px;
}

/* Route discount setting card accent */
.route-discount-setting {
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    margin-top: 2px;
}

.route-discount-setting label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.route-discount-setting .mobile-number-input .symbol {
    color: hsl(270, 95%, 70%);
    font-weight: 700;
}
