:root {
    /* Colors */
    --ios-bg: #FFFFFF;
    --ios-gray-100: #F5F5F7;
    --ios-gray-200: #EBEBEB;
    --ios-gray-400: #A1A1A6;
    --ios-gray-500: #86868B;
    --ios-gray-600: #6E6E73;
    --primary: #000000;
    --status-green: #10B981;
    --status-yellow: #FBBF24;
    --status-red: #EF4444;
    --offer-border: #E5E5E5;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Border Radius */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Playfair Display", serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--ios-bg);
    color: var(--primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Layout */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.view-container {
    flex: 1;
    width: 100%;
}

/* Common Components */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--offer-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
}

.bento-card {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover {
    background-color: #fcfcfc;
    border-color: #000000;
}

/* Status Colors & Tokens */
.status-green {
    color: #10B981;
}

.status-yellow {
    color: #FBBF24;
}

.status-red {
    color: #EF4444;
}

/* Special Animations from Stitch */
@keyframes pulse-ring {
    0% {
        transform: scale(0.33);
        opacity: 1;
    }

    80%,
    100% {
        opacity: 0;
    }
}

@keyframes pulse-dot {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.8);
    }
}

@keyframes dash-scroll {
    to {
        stroke-dashoffset: -20;
    }
}

@keyframes vessel-move {
    0% {
        offset-distance: 0%;
    }

    100% {
        offset-distance: 65%;
    }
}

.radar-pulse {
    position: absolute;
    width: 32px;
    height: 32px;
}

.radar-pulse::before {
    content: '';
    position: absolute;
    left: -100%;
    top: -100%;
    width: 300%;
    height: 300%;
    background-color: black;
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.route-line {
    stroke-dasharray: 4 6;
    animation: dash-scroll 2s linear infinite;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.2));
}

.topography-texture {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50 Q 25 45 50 50 T 100 50' fill='none' stroke='%23f0f0f0' stroke-width='0.5'/%3E%3Cpath d='M0 30 Q 25 35 50 30 T 100 30' fill='none' stroke='%23f3f3f3' stroke-width='0.5'/%3E%3Cpath d='M0 70 Q 25 65 50 70 T 100 70' fill='none' stroke='%23f3f3f3' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.6;
}

/* Typography Extensions */
.text-huge {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 1.15;
    letter-spacing: 0.35em;
}

.text-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ios-gray-400);
}

/* Glass Utilities from Inventory */
.glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--offer-border);
}

.glass-kpi {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--offer-border);
}

/* Utility Classes */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.rounded-ios-lg {
    border-radius: 22px;
}

.rounded-ios-xl {
    border-radius: 30px;
}

/* Navigation & Header Overrides */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ios-tab-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
}

/* Material Symbols Adjustments */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .view-container {
        padding: 0;
        /* Bento layouts handle their own padding usually */
    }
}

/* ─── Apple-style Winery Cards ──────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.winery-card-apple {
    animation: card-in 0.35s cubic-bezier(.34,1.2,.64,1) both;
}

.winery-card-apple:nth-child(1) { animation-delay: 0ms; }
.winery-card-apple:nth-child(2) { animation-delay: 50ms; }
.winery-card-apple:nth-child(3) { animation-delay: 100ms; }
.winery-card-apple:nth-child(4) { animation-delay: 150ms; }
.winery-card-apple:nth-child(5) { animation-delay: 200ms; }
.winery-card-apple:nth-child(6) { animation-delay: 250ms; }
.winery-card-apple:nth-child(7) { animation-delay: 300ms; }
.winery-card-apple:nth-child(8) { animation-delay: 350ms; }

/* ─── Ultra-Minimalist High-Impact Countdown Typography ─── */
.cd-num {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Outfit", "Inter", sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}