@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

:root {
    --primary: #4a89f3;
    --primary-dark: #3b6dbf;
    --primary-light: #EBF4FF;
    --secondary: #ffa59a;
    --secondary-dark: #ff8a7c;
    --secondary-light: #fff4f3;
    --uncollected: #ffa59a;
    --abandoned: #ef476f;
    --abandoned-dark: #d63159;
    --abandoned-light: #fff0f4;
    --idle: #a1a1a1;
    --sidebar-bg: #F9FAFB;
    --bg-light: #F3F4F6;
    --bg-main: #F8F9FB;
    --text-main: #0F172A;
    --text-sub: #475569;
    --card-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 2px 12px rgba(0, 0, 0, 0.04);
    --soft-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.01);
    --sidebar-w: clamp(200px, 16vw, 260px);
    --brand-h: clamp(62px, 8vh, 92px);
    --brand-font: clamp(18px, 2vw, 30px);
    --header-h: var(--brand-h);
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}


/* Dark theme readability tune (home / stats / modal) */


.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    border-right: 1px solid #e2e8f0;
}

.sidebar-logo {
    height: var(--brand-h);
    display: flex;
    align-items: center;
    padding: 0 clamp(16px, 1.5vw, 32px);
    flex-shrink: 0;
}

.lundret-logo {
    display: flex;
    align-items: center;
    line-height: 1;
    height: var(--brand-font);
    font-size: var(--brand-font);
    font-weight: 900;
    letter-spacing: 0.02em;
    font-family: 'Noto Sans JP', sans-serif;
}

.lundret-logo .logo-dark {
    background: linear-gradient(180deg, #0f1a3d 0%, #08122f 55%, #0b173a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lundret-logo .logo-blue {
    background: linear-gradient(100deg, #4a89f3 0%, #6ea6ff 45%, #4a89f3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo img {
    height: clamp(24px, 2.5vw, 36px);
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: clamp(8px, 1vh, 16px) 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 16px);
    padding: clamp(10px, 1.2vh, 18px) clamp(16px, 1.5vw, 24px);
    font-size: clamp(12px, 1vw, 16px);
    font-weight: 500;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border-right: 3px solid transparent;
    position: relative;
}

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

.nav-item.active {
    color: var(--primary);
    font-weight: 700;
    background: rgba(74, 137, 243, 0.06);
    border-right-color: var(--primary);
}

.nav-item .material-symbols-outlined {
    font-size: clamp(18px, 1.6vw, 28px);
}

.nav-item.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* AI Insight rainbow hover */
.nav-item.ai-nav:hover .nav-label,
.nav-item.ai-nav:hover .material-symbols-outlined,
.nav-item.ai-nav.active .nav-label,
.nav-item.ai-nav.active .material-symbols-outlined,
.insight-active .nav-item.ai-nav .nav-label,
.insight-active .nav-item.ai-nav .material-symbols-outlined {
    background: linear-gradient(90deg, #4a89f3, #7cb9ff, #ffd2cc, #a1a1a1, #4a89f3);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow-shift 2s linear infinite;
    filter: drop-shadow(0 0 4px rgba(124, 185, 255, 0.35));
}

@keyframes rainbow-shift {
    to {
        background-position: 200% center;
    }
}

/* Live badge on sidebar */
.live-badge-nav {
    position: absolute;
    top: clamp(6px, 0.8vh, 10px);
    left: clamp(32px, 2.8vw, 44px);
    background: #ef4444;
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 3px;
    line-height: 1;
}

/* Sidebar footer */
.sidebar-footer {
    padding: clamp(8px, 1vh, 16px) clamp(12px, 1.2vw, 20px);
    flex-shrink: 0;
}

.sidebar-update {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: clamp(8px, 1vh, 12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sidebar-update-label {
    font-size: clamp(8px, 0.6vw, 10px);
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

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

.sidebar-update-time {
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 700;
    color: #334155;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef2f2;
    color: #ef4444;
    font-size: clamp(8px, 0.6vw, 10px);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    animation: pulse-live 2s ease-in-out infinite;
}

.live-indicator .dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
}

@keyframes pulse-live {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-w);
    height: 100vh;
    overflow: hidden;
    background: var(--bg-main);
    position: relative;
}

.pc-api-boot-overlay {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
}

body:not(.pc-api-booting) .pc-api-boot-overlay {
    display: none;
}

.pc-api-boot-overlay-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #dbe3f0;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.pc-api-boot-overlay-inner .material-symbols-outlined {
    font-size: 16px;
    animation: pc-api-boot-spin 1s linear infinite;
}

body.pc-api-booting #header-home-meta,
body.pc-api-booting .ui2-store-selector {
    visibility: hidden;
}

@keyframes pc-api-boot-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

body.insight-active .main-container {
    background:
        radial-gradient(at 8% 10%, rgba(74, 137, 243, 0.16) 0, transparent 54%),
        radial-gradient(at 92% 12%, rgba(255, 165, 154, 0.16) 0, transparent 56%),
        radial-gradient(at 60% 90%, rgba(161, 161, 161, 0.14) 0, transparent 54%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.82), rgba(247, 250, 255, 0.85));
}

body.insight-active .app-header {
    background: rgba(255, 255, 255, 0.28);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

/* ===== HEADER ===== */
.app-header {
    height: var(--header-h);
    padding: 0 clamp(16px, 2vw, 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #f1f5f9;
    z-index: 10;
}

.header-title {
    font-size: var(--brand-font);
    line-height: 1;
    height: var(--brand-font);
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #1e293b;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1vw, 18px);
    min-width: 0;
}

.header-analytics-toggle {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    transform: translateX(18px);
}

.header-analytics-toggle[hidden] {
    display: none !important;
}

.header-home-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header-home-meta[hidden] {
    display: none !important;
}

.header-weather-chip {
    width: 44px;
    height: 44px;
    border-radius: 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: none !important;
    padding: 0;
    flex-shrink: 0;
}

.header-weather-chip .weather-icon-svg {
    width: 42px;
    height: 42px;
    display: block;
    transform: translateY(4px);
}

.header-update-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #dbe3f0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    white-space: nowrap;
}

.header-update-label {
    font-size: clamp(9px, 0.7vw, 11px);
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.header-update-chip .sidebar-update-time {
    font-size: clamp(10px, 0.8vw, 13px);
}

.header-update-chip .live-indicator {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    gap: 0;
    border-radius: 999px;
    justify-content: center;
}

.header-update-chip .live-indicator .dot {
    width: 7px;
    height: 7px;
}

.store-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 188px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid #dbe3f0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: all 0.18s ease;
    cursor: pointer;
    overflow: hidden;
}

.store-selector:hover {
    background: #fff;
    border-color: #d3deee;
}

.store-selector:focus-within {
    border-color: rgba(74, 137, 243, 0.28);
    box-shadow: 0 0 0 3px rgba(74, 137, 243, 0.10);
    background: #fff;
}

.store-selector .material-symbols-outlined {
    font-size: 18px;
}

.store-selector .icon-store {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    flex-shrink: 0;
    pointer-events: none;
    z-index: 2;
}

.store-select {
    position: absolute;
    inset: 0;
    z-index: 1;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    background-image: none !important;
    color: #334155;
    font-family: inherit;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.2;
    height: 100%;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0 36px 0 38px;
    cursor: pointer;
    outline: none;
    border-radius: inherit;
}

.store-select:focus {
    outline: none;
}

.store-select option {
    color: #334155;
    font-weight: 600;
    letter-spacing: normal;
}

.store-selector-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px !important;
    pointer-events: none;
    flex-shrink: 0;
    z-index: 2;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(12px, 2vh, 32px) clamp(16px, 2vw, 40px) 80px;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* ===== CARDS ===== */
.card {
    background: #fff;
    border-radius: clamp(12px, 1.2vw, 24px);
    padding: clamp(12px, 1.5vw, 32px);
    box-shadow: var(--card-shadow);
    border: 1px solid #f8fafc;
}

/* ===== HOME TAB ===== */
.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: clamp(12px, 1.5vw, 32px);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.home-grid > .card {
    min-width: 0;
}

.status-item {
    padding: clamp(10px, 1.2vw, 20px);
    border-radius: clamp(10px, 1vw, 20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
    cursor: default;
}

.status-item:hover {
    background: #fff;
    box-shadow: var(--soft-shadow);
    border-color: #e2e8f0;
}

.status-item .icon-wrap {
    width: clamp(32px, 3vw, 48px);
    height: clamp(32px, 3vw, 48px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.status-item .icon-wrap .material-symbols-outlined {
    font-size: clamp(20px, 2vw, 32px);
}

.status-item .label {
    font-size: clamp(13px, 1.1vw, 20px);
    font-weight: 700;
}

.status-item-label-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.unattended-alert-light {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%, #ffd1dc 0%, var(--abandoned) 45%, var(--abandoned-dark) 100%);
    box-shadow: 0 0 0 1px rgba(214, 49, 89, 0.16), 0 0 0 0 rgba(239, 71, 111, 0.36);
}

.unattended-alert-light.is-active {
    animation: unattended-alert-pulse 1.1s ease-in-out infinite;
}

@keyframes unattended-alert-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 1px rgba(214, 49, 89, 0.16), 0 0 0 0 rgba(239, 71, 111, 0.34);
    }

    50% {
        opacity: 0.48;
        transform: scale(0.88);
        box-shadow: 0 0 0 1px rgba(214, 49, 89, 0.1), 0 0 0 10px rgba(239, 71, 111, 0);
    }
}

.status-item .count {
    font-size: clamp(18px, 2vw, 30px);
    font-weight: 700;
}

.status-item .total {
    font-size: clamp(10px, 0.8vw, 14px);
    color: #94a3b8;
    font-weight: 500;
}

/* Donut chart */
.live-status-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.live-status-donut-row {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(10px, 1.2vw, 24px);
    margin-bottom: clamp(10px, 1.8vh, 28px);
}

.live-status-donut-row .donut-container {
    margin: 0;
    flex-shrink: 0;
}

.live-status-donut-legend {
    min-width: 0;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    padding: clamp(8px, 0.9vw, 12px) clamp(6px, 0.7vw, 10px) clamp(8px, 0.9vw, 12px) clamp(8px, 0.9vw, 12px);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 18px -18px rgba(15, 23, 42, 0.28);
    display: grid;
    gap: 6px;
    margin-bottom: clamp(6px, 0.8vh, 14px);
}

.live-status-donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: clamp(10px, 0.78vw, 12px);
    font-weight: 700;
    white-space: nowrap;
}

.live-status-donut-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.live-status-donut-legend-dot.is-running {
    background: var(--primary);
}

.live-status-donut-legend-dot.is-uncollected {
    background: var(--uncollected);
}

.live-status-donut-legend-dot.is-idle {
    background: var(--idle);
}

.donut-container {
    width: clamp(140px, 14vw, 240px);
    aspect-ratio: 1;
    margin: 0 auto clamp(12px, 2vh, 32px);
    position: relative;
}

.donut-container>svg {
    display: block;
}

.live-donut-segment {
    cursor: pointer;
    transition: opacity 0.15s ease, filter 0.15s ease;
    pointer-events: stroke;
}

.live-donut-segment:hover,
.live-donut-segment:focus-visible {
    filter: brightness(1.04);
}

.donut-hover-tooltip {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 8;
    min-width: 134px;
    max-width: 200px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 14px 22px -18px rgba(15, 23, 42, 0.28), 0 6px 14px -10px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.donut-hover-tooltip.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.donut-hover-tooltip-title {
    color: #0f172a;
    font-size: clamp(10px, 0.8vw, 12px);
    font-weight: 800;
    line-height: 1.35;
}

.donut-hover-tooltip-sub {
    margin-top: 2px;
    color: #64748b;
    font-size: clamp(9px, 0.72vw, 11px);
    font-weight: 700;
    line-height: 1.4;
}

.donut-center-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1px, 0.2vh, 4px);
    pointer-events: none;
    text-align: center;
}

.donut-center-title {
    font-size: clamp(11px, 0.95vw, 16px);
    font-weight: 700;
    color: #475569;
    line-height: 1.1;
}

.donut-center-value {
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: #0f172a;
    font-weight: 800;
    line-height: 1;
}

.donut-center-value #live-operating-rate-number {
    font-size: clamp(24px, 2.2vw, 38px);
    letter-spacing: -0.02em;
}

.donut-center-unit {
    font-size: clamp(12px, 1vw, 18px);
    color: #334155;
    font-weight: 700;
}

.donut-shift-up {
    margin-left: 17px;
    transform: translateY(clamp(-6px, -1vh, -14px));
}

.stats-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(8px, 1vh, 16px);
    flex-wrap: wrap;
    gap: 8px;
}

.stats-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: clamp(8px, 1vw, 16px);
    margin-bottom: clamp(8px, 1vh, 12px);
}

.stats-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stats-control-label {
    font-size: clamp(10px, 0.78vw, 13px);
    font-weight: 700;
    color: #475569;
}

.stats-select {
    width: 100%;
    border: 1px solid #dbe3f0;
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: clamp(11px, 0.85vw, 14px);
    color: #334155;
    cursor: pointer;
}

.stats-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 137, 243, 0.12);
}

.stats-select[size="8"] {
    border-radius: 10px;
    max-height: 240px;
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe3f0;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
}

.threshold-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 20px;
    background: transparent;
    cursor: pointer;
    --threshold-progress: 0%;
}

.threshold-slider:focus {
    outline: none;
}

.threshold-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    border: 0;
    box-shadow: none;
    background: linear-gradient(90deg,
            rgba(255, 165, 154, 0.45) 0%,
            rgba(255, 165, 154, 0.45) var(--threshold-progress),
            #e5e7eb var(--threshold-progress),
            #e5e7eb 100%);
}

.threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -6px;
    border-radius: 999px;
    border: 0;
    background: var(--uncollected);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);
}

.threshold-slider::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: #e5e7eb;
}

.threshold-slider::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 165, 154, 0.45);
}

.threshold-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 0;
    background: var(--uncollected);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);
}

.threshold-value {
    min-width: 56px;
    text-align: right;
    color: #475569;
    font-size: clamp(10px, 0.78vw, 12px);
    font-weight: 700;
}

.stats-rate-note {
    margin: 2px 0 clamp(6px, 0.8vh, 10px);
    font-size: clamp(9px, 0.72vw, 11px);
    color: #94a3b8;
    line-height: 1.45;
}

.stats-peaks {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: clamp(8px, 1vw, 16px);
    margin-bottom: clamp(16px, 1.9vh, 24px);
}

.peak-chip {
    background: #f8fbff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.peak-label {
    font-size: clamp(9px, 0.7vw, 12px);
    color: #64748b;
    font-weight: 700;
}

.peak-value {
    font-size: clamp(11px, 0.9vw, 14px);
    color: #1e293b;
    font-weight: 700;
}

/* Chart area */
.chart-area {
    flex: 1;
    position: relative;
    padding-left: 32px;
}

.chart-y-axis {
    position: absolute;
    left: 0;
    top: 0;
    bottom: clamp(24px, 3vh, 40px);
    width: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: clamp(8px, 0.6vw, 10px);
    font-weight: 500;
    color: #94a3b8;
    text-align: right;
    padding-right: 4px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(4px, 0.5vw, 16px);
    padding: clamp(8px, 1vh, 16px) 0 0;
    height: 100%;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    cursor: default;
    position: relative;
}

.bar-hover-line {
    position: absolute;
    top: 0;
    bottom: clamp(24px, 3vh, 40px);
    left: 50%;
    width: 1px;
    background: rgba(148, 163, 184, 0.22);
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.bar-stack {
    width: clamp(24px, 3.5vw, 56px);
    display: flex;
    flex-direction: column-reverse;
    border-radius: clamp(4px, 0.4vw, 8px) clamp(4px, 0.4vw, 8px) 0 0;
    overflow: hidden;
    transition: none;
}

.bar-blue {
    background: var(--primary);
}

.bar-red {
    background: var(--secondary);
    opacity: 0.9;
}

.bar-label {
    margin-top: clamp(4px, 0.5vh, 8px);
    font-size: clamp(11px, 0.78vw, 13px);
    font-weight: 700;
    color: #94a3b8;
    text-align: center;
    line-height: 1;
}

.bar-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(255, 255, 255, 0.84);
    color: #1e293b;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 14px 22px -18px rgba(15, 23, 42, 0.28), 0 6px 14px -10px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    font-weight: 700;
    z-index: 5;
}

.bar-group:hover .bar-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.bar-group:hover .bar-hover-line {
    opacity: 1;
}

.bar-group.is-closed .bar-stack {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(148, 163, 184, 0.10) 3px,
        rgba(148, 163, 184, 0.10) 6px
    );
    min-height: 100%;
    border-radius: 0;
}

.bar-group.is-closed .bar-tooltip {
    color: #94a3b8;
}

.stats-chart-area {
    height: clamp(220px, 30vh, 360px);
    min-height: clamp(220px, 30vh, 360px);
    padding-left: 40px;
}

.stats-chart-area.is-empty {
    padding-left: 0;
}

.home-stats-bars {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: clamp(8px, 0.9vh, 14px);
    align-items: stretch;
    width: 100%;
    height: 100%;
    padding-top: 0;
}

.home-stats-bars.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-top: 0;
}

.stats-chart-empty {
    width: min(620px, 100%);
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 24px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    text-align: center;
}

.stats-chart-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #eff6ff;
    color: #3b82f6;
}

.stats-chart-empty-icon .material-symbols-outlined {
    font-size: 28px;
}

.stats-chart-empty-title {
    color: #334155;
    font-weight: 700;
    font-size: 16px;
}

.stats-chart-empty-sub {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.home-stats-bars .bar-group {
    justify-content: flex-end;
    align-self: stretch;
    height: auto;
    min-height: 0;
}

.home-stats-plot-window {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 0;
    padding: 8px 10px 0;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background:
        linear-gradient(to top, rgba(148, 163, 184, 0.06) 1px, transparent 1px) 0 0 / 100% 25%,
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 251, 255, 0.98) 100%);
}

.home-stats-plot-bars {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: clamp(6px, 0.7vw, 14px);
    width: 100%;
    min-height: 0;
}

.home-stats-bars .bar-stack {
    width: clamp(22px, 2.6vw, 40px);
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 3px;
    border-radius: 0;
    overflow: visible;
}

.home-stats-bars .bar-blue,
.home-stats-bars .bar-red {
    width: 100%;
    flex: 0 0 auto;
    border-radius: 4px 4px 0 0;
}

.home-stats-x-axis {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(6px, 0.7vw, 14px);
    width: 100%;
    padding: 0 10px;
    color: #94a3b8;
    font-size: clamp(11px, 0.78vw, 13px);
    font-weight: 700;
}

.home-stats-x-axis span {
    flex: 1;
    min-width: 0;
    text-align: center;
    line-height: 1;
}

/* ===== INSIGHT TAB ===== */
.insight-layout {
    display: flex;
    gap: clamp(12px, 1.5vw, 32px);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.insight-page-disclaimer {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto clamp(10px, 1.2vh, 18px);
    color: #64748b;
    font-size: clamp(11px, 0.82vw, 13px);
    line-height: 1.45;
}

.insight-sidebar {
    width: clamp(200px, 18vw, 280px);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.insight-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.report-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: clamp(12px, 1.2vw, 24px);
    padding: clamp(16px, 2vw, 32px);
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.report-card .top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #60a5fa, var(--primary), var(--secondary));
}

.history-item {
    display: block;
    padding: clamp(8px, 0.8vh, 12px);
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
    background: transparent;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

.history-item.active {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--primary);
}

.insight-history-scroll {
    min-height: 0;
}

.insight-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.insight-history-entry {
    position: relative;
}

.insight-history-entry .history-item {
    padding-right: 40px;
}

.insight-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.insight-history-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 18px;
    flex-wrap: wrap;
}

.insight-history-badge {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.insight-history-badge.is-latest {
    color: var(--primary);
    background: #eff6ff;
    border-color: #dbeafe;
}

.insight-history-badge.is-pinned {
    color: var(--primary);
    background: rgba(74, 137, 243, 0.08);
    border-color: rgba(74, 137, 243, 0.26);
}

.insight-history-date {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
    line-height: 18px;
}

.insight-history-title {
    font-size: clamp(11px, 0.8vw, 14px);
    font-weight: 700;
    color: #334155;
}

.insight-history-excerpt {
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
}

.insight-history-pin-btn {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.insight-history-pin-btn:hover {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(148, 163, 184, 0.18);
    color: #64748b;
}

.insight-history-pin-btn.is-pinned {
    color: var(--primary);
    background: rgba(239, 246, 255, 0.95);
    border-color: rgba(74, 137, 243, 0.22);
}

.insight-history-pin-btn .material-symbols-outlined {
    font-size: 16px;
}

.insight-history-pin-btn.is-pinned .material-symbols-outlined,
.insight-report-pin-btn.is-pinned .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.insight-history-footnote {
    margin: 8px 2px 0;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.5;
}

.insight-report-header {
    flex-shrink: 0;
    margin-bottom: clamp(12px, 2vh, 24px);
    padding-bottom: clamp(12px, 2vh, 24px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.insight-report-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.insight-report-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.insight-report-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid transparent;
}

.insight-report-tag.kind {
    background: rgba(74, 137, 243, 0.1);
    color: var(--primary);
    border-color: rgba(74, 137, 243, 0.2);
}

.insight-report-tag.priority-high {
    background: rgba(255, 155, 143, 0.1);
    color: var(--secondary-dark);
    border-color: rgba(255, 155, 143, 0.2);
}

.insight-report-tag.priority-medium {
    background: rgba(251, 191, 36, 0.12);
    color: #b45309;
    border-color: rgba(251, 191, 36, 0.24);
}

.insight-report-tag.priority-low {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.22);
}

.insight-report-pin-btn {
    height: 28px;
    min-width: 92px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.insight-report-pin-btn:hover {
    background: #fff;
    border-color: #dbe3f0;
}

.insight-report-pin-btn.is-pinned {
    color: var(--primary);
    border-color: rgba(74, 137, 243, 0.24);
    background: rgba(239, 246, 255, 0.88);
}

.insight-report-pin-btn .material-symbols-outlined {
    font-size: 16px;
}

.insight-report-title {
    font-size: clamp(18px, 2vw, 30px);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.insight-report-period {
    color: #64748b;
    font-size: clamp(11px, 0.85vw, 14px);
}

.insight-report-summary-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: clamp(12px, 1.5vw, 24px);
    margin-bottom: clamp(12px, 2vh, 32px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.insight-report-summary-metrics {
    display: grid;
    grid-template-columns: minmax(220px, 360px);
    gap: clamp(8px, 1vw, 16px);
}

.insight-report-summary-metric {
    background: rgba(255, 255, 255, 0.7);
    padding: clamp(8px, 1vw, 16px);
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    text-align: center;
}

.insight-report-summary-metric-label {
    display: block;
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
}

.insight-report-summary-metric-value {
    display: block;
    font-size: clamp(16px, 1.5vw, 24px);
    font-weight: 700;
    color: var(--secondary-dark);
}

.insight-report-strategy {
    display: flex;
    gap: clamp(8px, 1vw, 16px);
    padding: clamp(8px, 1vw, 16px);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.insight-report-strategy:last-child {
    margin-bottom: 0;
}

.insight-report-strategy-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.insight-report-strategy-title {
    font-weight: 700;
    font-size: clamp(11px, 0.85vw, 14px);
    color: #1e293b;
    margin-bottom: 4px;
}

.insight-report-strategy-desc {
    font-size: clamp(10px, 0.75vw, 12px);
    color: #475569;
    margin: 0;
}

@media (max-width: 900px) {
    .insight-report-top {
        flex-direction: column;
        align-items: stretch;
    }

    .insight-report-pin-btn {
        align-self: flex-start;
    }
}

.prose-premium h3 {
    color: #1e293b;
    font-weight: 700;
    font-size: clamp(14px, 1.1vw, 18px);
    margin: clamp(12px, 1.5vh, 24px) 0 clamp(6px, 0.8vh, 12px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.prose-premium h3::before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 4px;
}

.prose-premium p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: clamp(11px, 0.85vw, 14px);
}

.prose-premium ul {
    list-style: disc;
    margin-left: 20px;
    color: #475569;
    font-size: clamp(11px, 0.85vw, 14px);
    margin-bottom: 16px;
}

/* Insight background */
.insight-bg {
    background: transparent;
}

body.insight-active #tab-insight {
    background: transparent;
}

/* ===== ANALYTICS TAB ===== */
.analytics-layout {
    display: flex;
    gap: clamp(12px, 1.5vw, 24px);
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.analytics-charts {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.5vw, 24px);
}

.analytics-sidebar {
    flex: 1;
    min-width: clamp(280px, 24vw, 420px);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.5vw, 24px);
}

.analytics-main-card {
    display: flex;
    flex-direction: column;
    min-height: clamp(260px, 34vh, 420px);
}

.analytics-title-icon {
    width: clamp(28px, 2.5vw, 40px);
    height: clamp(28px, 2.5vw, 40px);
    border-radius: clamp(8px, 0.8vw, 16px);
    background: #edf4ff;
    border: 1px solid #dbeafe;
    padding: 3px;
}

.analytics-main-card:nth-child(2) .analytics-title-icon {
    background: #fff3f1;
    border-color: #ffd7d2;
}

.analytics-main-chart-area {
    min-height: clamp(180px, 26vh, 300px);
    padding-left: 40px;
}

.grouped-bar-chart {
    height: clamp(200px, 30vh, 400px);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    padding: 16px 0 0;
}

.grouped-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.grouped-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    width: 100%;
    justify-content: center;
}

.grouped-bars .bar {
    width: clamp(8px, 1.2vw, 20px);
    border-radius: 2px 2px 0 0;
    transition: all 0.2s;
    cursor: pointer;
}

.grouped-bars .bar:hover {
    opacity: 0.8;
}

.analytics-empty-bars .grouped-bars {
    display: none;
}

.analytics-empty-bars .grouped-bar-col {
    justify-content: flex-end;
}

.analytics-dnd-hint {
    font-size: clamp(10px, 0.78vw, 12px);
    font-weight: 700;
    color: #64748b;
    margin-bottom: clamp(8px, 1vh, 12px);
    padding: 8px 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.9);
}

.analytics-sidebar-block {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vh, 12px);
}

.mini-chart-card {
    background: #fff;
    padding: clamp(8px, 1vh, 12px);
    border-radius: clamp(10px, 1vw, 16px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background-color 0.2s;
}

.mini-chart-card:hover {
    border-color: #d5e4ff;
}

.mini-chart-card[draggable="true"],
.mini-chart-card[draggable="true"] .mini-chart-head,
.mini-chart-card[draggable="true"] .mini-chart-area {
    cursor: grab;
}

.mini-chart-card[draggable="true"]:active,
.mini-chart-card[draggable="true"].is-dragging {
    cursor: grabbing;
}

.mini-chart-card .mini-chart-controls,
.mini-chart-card .mini-chart-controls * {
    cursor: auto;
}

.mini-chart-card.is-dragging {
    opacity: 0.6;
    transform: scale(0.99);
    border-color: rgba(74, 137, 243, 0.28);
    box-shadow: 0 8px 24px -14px rgba(74, 137, 243, 0.35);
}

.mini-chart-card.drop-target {
    border-color: rgba(148, 163, 184, 0.35);
}

.mini-chart-card.drop-over {
    border-color: rgba(74, 137, 243, 0.55);
    background: rgba(239, 246, 255, 0.92);
    box-shadow: 0 0 0 2px rgba(74, 137, 243, 0.12);
    transform: translateY(-1px);
}

.mini-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-chart-title {
    font-size: clamp(10px, 0.78vw, 12px);
    font-weight: 700;
    color: #334155;
}

.mini-chart-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.period-picker {
    position: relative;
}

.period-picker summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #dbe3f0;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 10px;
    color: #475569;
    cursor: pointer;
    background: #fff;
    font-weight: 700;
}

.period-picker summary::-webkit-details-marker {
    display: none;
}

.period-picker summary .material-symbols-outlined {
    font-size: 14px;
}

.period-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    background: #fff;
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.3);
    display: grid;
    gap: 6px;
    min-width: 180px;
}

.period-popover label {
    display: grid;
    gap: 2px;
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
}

.period-popover input {
    border: 1px solid #dbe3f0;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 10px;
    font-family: inherit;
}

.unit-picker {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
}

.unit-picker select {
    border: 1px solid #dbe3f0;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 10px;
    color: #334155;
    background: #fff;
    font-family: inherit;
}

.mini-chart-area {
    position: relative;
    height: clamp(84px, 10vh, 120px);
    padding-left: 28px;
}

.mini-chart-area .chart-y-axis {
    width: 28px;
    font-size: 8px;
    padding-right: 3px;
    bottom: 16px;
}

.mini-bars-chart {
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3px;
}

.mini-bar-col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.mini-bar {
    width: 100%;
    max-width: 14px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}

.mini-bar-uncollected {
    background: var(--uncollected);
}

.mini-day {
    margin-top: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
}

/* ===== LIVE TAB ===== */
.machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(110px, 10vw, 160px), 1fr));
    gap: clamp(8px, 1vw, 16px);
}

.machine-card {
    background: #fff;
    border-radius: clamp(10px, 1vw, 16px);
    padding: clamp(8px, 1vw, 16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 0.5vh, 12px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.machine-card.operating {
    border: 1px solid rgba(74, 137, 243, 0.2);
    box-shadow: 0 0 15px rgba(74, 137, 243, 0.2);
}

.machine-card.uncollected {
    border: 1px solid rgba(255, 165, 154, 0.4);
    box-shadow: 0 0 15px rgba(255, 165, 154, 0.3);
    animation: pulse-card 1.5s ease-in-out infinite;
}

.machine-card.idle {
    border: 1px solid rgba(161, 161, 161, 0.35);
    opacity: 0.7;
}

.machine-card.idle:hover {
    opacity: 1;
}

@keyframes pulse-card {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.machine-svg {
    width: clamp(60px, 7vw, 96px);
    height: clamp(60px, 7vw, 96px);
}

.machine-card .machine-no {
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 700;
    color: #334155;
}

.machine-card .machine-status {
    font-size: clamp(9px, 0.7vw, 12px);
    font-weight: 700;
}

/* Camera grid */
.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(250px, 22vw, 400px), 1fr));
    gap: clamp(8px, 1vw, 24px);
}

.camera-feed {
    background: #18181b;
    border-radius: clamp(10px, 1vw, 16px);
    overflow: hidden;
    aspect-ratio: 16/9;
    position: relative;
}

.camera-feed .cam-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: clamp(9px, 0.7vw, 12px);
    color: #fff;
    font-family: monospace;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.camera-feed .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #3f3f46;
}

.camera-feed .placeholder .material-symbols-outlined {
    font-size: 48px;
    opacity: 0.2;
}

.camera-feed .placeholder span:last-child {
    font-size: 10px;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.4;
    margin-top: 8px;
}

/* ===== STORE TAB ===== */
.store-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: clamp(12px, 1.5vw, 24px);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    align-items: stretch;
}

.store-column {
    height: 100%;
    min-width: 0;
}

.hours-card,
.holiday-card {
    flex: 1;
}

.form-card {
    background: #fff;
    border-radius: clamp(8px, 0.8vw, 12px);
    padding: clamp(12px, 1.5vw, 24px);
    box-shadow: var(--card-shadow);
    border: 1px solid #f1f5f9;
    transition: box-shadow 0.3s;
}

.form-card-address {
    position: relative;
}

.form-card:hover {
    box-shadow: var(--soft-shadow);
}

.form-card label {
    display: block;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.form-card label .req {
    color: #ef4444;
}

.form-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.form-card-head label {
    margin-bottom: 0;
}

.form-card-address .form-inline-action {
    flex-shrink: 0;
    margin-top: -2px;
}

.form-inline-action {
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: clamp(12px, 0.95vw, 16px);
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    padding: 0;
}

.form-inline-action:hover {
    color: var(--primary);
}

.form-inline-action-dashed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #94a3b8;
    min-height: auto;
    padding: 0;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 500;
    transition: all 0.2s;
}

.form-inline-action-dashed:hover {
    color: var(--primary);
}

.form-input-wrap {
    position: relative;
}

.form-input-wrap.is-readonly {
    cursor: default;
}

.form-input-wrap .material-symbols-outlined {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

.form-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 500;
    color: #334155;
    height: clamp(32px, 4vh, 40px);
    padding: 0 12px 0 36px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input.is-readonly {
    background: #f8fafc;
    color: #334155;
    cursor: default;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 137, 243, 0.1);
    background: #fff;
}

.form-input.is-readonly:focus {
    border-color: #e2e8f0;
    box-shadow: none;
    background: #f8fafc;
}

.form-input-wrap-select .form-input-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    padding-right: 38px;
}

.form-input-wrap-select .form-input-chevron {
    position: absolute;
    right: 10px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    pointer-events: none;
}

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

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: #d1d5db;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.on {
    background: var(--primary);
}

.toggle-switch .toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.on .toggle-knob {
    transform: translateX(18px);
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.day-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: clamp(28px, 3.5vh, 40px);
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.day-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.day-btn.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.holiday-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 10px;
    padding-right: 42px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    position: relative;
}

.holiday-item .date {
    flex: 1;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 500;
    color: #334155;
}

.holiday-list {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 8px;
}

.holiday-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #94a3b8;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 600;
    text-align: center;
    padding: 12px;
}

.holiday-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.holiday-remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

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

.holiday-date-input {
    padding: 0 12px;
}

.holiday-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 132px;
    min-height: clamp(32px, 4vh, 40px);
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.holiday-add-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8fbff;
}

.machine-price-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.machine-price-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.machine-price-note {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: clamp(10px, 0.75vw, 12px);
    font-weight: 600;
    line-height: 1.5;
}

.machine-price-bulk {
    margin-left: auto;
    width: auto;
    max-width: 100%;
    border: 1px dashed #d6e1f0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.machine-price-bulk-label {
    color: #64748b;
    font-size: clamp(10px, 0.8vw, 12px);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.machine-price-bulk-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.machine-price-bulk-text {
    color: #64748b;
    font-size: clamp(11px, 0.9vw, 13px);
    font-weight: 800;
    line-height: 1;
}

.machine-price-bulk-mini-input.form-input,
.machine-price-bulk-amount.form-input {
    height: clamp(30px, 3.3vh, 36px);
    border-radius: 10px;
    font-weight: 700;
}

.machine-price-bulk-mini-input.form-input {
    width: 54px;
    text-align: center;
    padding: 0 8px;
}

.machine-price-bulk-mini-input.form-input::-webkit-outer-spin-button,
.machine-price-bulk-mini-input.form-input::-webkit-inner-spin-button,
.machine-price-bulk-amount.form-input::-webkit-outer-spin-button,
.machine-price-bulk-amount.form-input::-webkit-inner-spin-button {
    margin: 0;
}

.machine-price-bulk-amount-wrap {
    position: relative;
}

.machine-price-bulk-amount.form-input {
    width: 110px;
    padding: 0 32px 0 10px;
}

.machine-price-bulk-unit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: clamp(10px, 0.75vw, 12px);
    font-weight: 700;
    pointer-events: none;
}

.machine-price-bulk-apply {
    border: 1px solid rgba(74, 137, 243, 0.24);
    background: rgba(74, 137, 243, 0.1);
    color: var(--primary);
    border-radius: 10px;
    height: clamp(30px, 3.3vh, 36px);
    padding: 0 12px;
    font-size: clamp(10px, 0.8vw, 12px);
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.machine-price-bulk-apply:hover {
    background: rgba(74, 137, 243, 0.16);
    border-color: rgba(74, 137, 243, 0.34);
}

.machine-price-bulk-apply:active {
    transform: translateY(1px);
}

.machine-price-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.machine-price-item {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.machine-price-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.machine-price-no {
    color: #334155;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 800;
}

.machine-price-kind {
    color: #94a3b8;
    font-size: clamp(9px, 0.72vw, 11px);
    font-weight: 700;
}

.machine-price-input-wrap {
    position: relative;
}

.machine-price-input.form-input {
    height: clamp(32px, 3.6vh, 38px);
    padding: 0 34px 0 10px;
    background: #fff;
}

.machine-price-input::-webkit-outer-spin-button,
.machine-price-input::-webkit-inner-spin-button {
    margin: 0;
}

.machine-price-unit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: clamp(10px, 0.75vw, 12px);
    font-weight: 700;
    pointer-events: none;
}

.save-btn-float {
    position: fixed;
    bottom: clamp(16px, 2vh, 32px);
    right: clamp(16px, 2vw, 32px);
    background: #0f172a;
    color: #fff;
    padding: clamp(8px, 1vh, 14px) clamp(16px, 2vw, 32px);
    border-radius: 999px;
    font-weight: 700;
    font-size: clamp(11px, 0.85vw, 14px);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-family: inherit;
    z-index: 30;
}

.save-btn-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
}

/* ===== HELP TAB ===== */
.help-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.help-card {
    max-width: 700px;
    width: 100%;
    background: #fff;
    border-radius: clamp(12px, 1.5vw, 24px);
    padding: clamp(20px, 3vw, 56px);
    box-shadow: var(--card-shadow);
    border: 1px solid #f1f5f9;
}

.help-card .icon-wrap {
    width: clamp(40px, 4vw, 64px);
    height: clamp(40px, 4vw, 64px);
    border-radius: clamp(8px, 0.8vw, 16px);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(12px, 2vh, 24px);
}

.help-card .icon-wrap .material-symbols-outlined {
    font-size: clamp(24px, 2.5vw, 36px);
    color: var(--primary);
}

.help-card h2 {
    text-align: center;
    font-size: clamp(16px, 1.8vw, 28px);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: clamp(8px, 1vh, 16px);
}

.help-card .desc {
    text-align: center;
    color: #64748b;
    font-size: clamp(11px, 0.9vw, 16px);
    line-height: 1.7;
    margin-bottom: clamp(16px, 3vh, 40px);
}

.help-textarea {
    width: 100%;
    padding: clamp(10px, 1.2vw, 16px);
    border: 1px solid #e2e8f0;
    border-radius: clamp(8px, 0.8vw, 12px);
    background: #f8fafc;
    font-size: clamp(12px, 1vw, 16px);
    font-family: inherit;
    resize: none;
    height: clamp(120px, 20vh, 256px);
    transition: all 0.2s;
    color: #334155;
}

.help-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 137, 243, 0.12);
    background: #fff;
}

.contact-attach-field {
    display: grid;
    gap: 8px;
}

.contact-attach-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.contact-attach-label {
    display: block;
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 700;
    color: #334155;
}

.contact-attach-meta {
    color: #64748b;
    font-size: clamp(10px, 0.78vw, 12px);
    font-weight: 700;
}

.contact-attach-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.contact-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact-image-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(74, 137, 243, 0.18);
    background: rgba(74, 137, 243, 0.06);
    color: var(--primary);
    font-size: clamp(11px, 0.86vw, 14px);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.contact-image-trigger .material-symbols-outlined {
    font-size: 18px;
}

.contact-image-clear {
    margin-left: auto;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.contact-image-clear:hover {
    border-color: #cbd5e1;
    color: #475569;
}

.contact-image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
}

.contact-image-thumb {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.contact-image-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f8fafc;
}

.contact-image-thumb-name {
    display: block;
    padding: 6px 7px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-image-thumb-more {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 12px;
}

.contact-attach-note {
    margin: 0;
    color: #94a3b8;
    font-size: clamp(10px, 0.75vw, 12px);
    line-height: 1.4;
}

@media (max-width: 900px) {
    .contact-attach-box {
        flex-wrap: wrap;
    }

    .contact-image-clear {
        margin-left: 0;
    }

    .machine-price-bulk {
        width: 100%;
    }

    .machine-price-grid {
        grid-template-columns: 1fr;
    }
}

.help-submit {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: clamp(10px, 1.5vh, 16px);
    border-radius: clamp(8px, 0.8vw, 12px);
    font-size: clamp(13px, 1.1vw, 18px);
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(74, 137, 243, 0.2);
    transition: all 0.2s;
    font-family: inherit;
    margin-top: clamp(8px, 1vh, 16px);
}

.help-submit:hover {
    background: var(--primary-dark);
}

/* ===== HELP DOCS TAB ===== */
.help-docs-wrap {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.6vw, 20px);
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.help-docs-hero {
    border: 1px solid #eef2f8;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.help-docs-hero-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(74, 137, 243, 0.08);
    border: 1px solid rgba(74, 137, 243, 0.18);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.help-docs-hero h2 {
    margin: 12px 0 8px;
    font-size: clamp(18px, 1.8vw, 28px);
    font-weight: 800;
    color: #0f172a;
}

.help-docs-hero p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
    font-size: clamp(11px, 0.9vw, 15px);
}

.help-docs-hero-chips {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-doc-chip {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #dbe3f0;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}

.help-docs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.4vw, 20px);
}

.help-doc-card {
    border: 1px solid #eef2f8;
    min-height: 0;
}

.help-doc-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.help-doc-card-head .material-symbols-outlined {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 137, 243, 0.08);
    color: var(--primary);
    font-size: 20px;
}

.help-doc-card-head h3 {
    margin: 0;
    font-size: clamp(14px, 1vw, 18px);
    font-weight: 800;
    color: #1e293b;
}

.help-doc-steps,
.help-doc-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: #475569;
    font-size: clamp(11px, 0.85vw, 14px);
    line-height: 1.65;
}

.help-doc-list strong {
    color: #334155;
}


.help-docs-note {
    border: 1px solid #eef2f8;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.help-docs-note-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    font-size: clamp(12px, 0.9vw, 15px);
    margin-bottom: 8px;
}

.help-docs-note-head .material-symbols-outlined {
    color: var(--primary);
    font-size: 20px;
}

.help-docs-note p {
    margin: 0;
    color: #64748b;
    font-size: clamp(11px, 0.86vw, 14px);
    line-height: 1.65;
}

@media (max-width: 1100px) {
    .help-docs-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Section headers ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.6vw, 12px);
    margin-bottom: clamp(8px, 1.2vh, 16px);
}

.section-header .icon-circle {
    width: clamp(24px, 2.2vw, 32px);
    height: clamp(24px, 2.2vw, 32px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-header .icon-circle .material-symbols-outlined {
    font-size: clamp(14px, 1.2vw, 20px);
}

.section-header h2 {
    font-size: clamp(13px, 1.1vw, 18px);
    font-weight: 700;
    color: #334155;
}

/* Legend */
.legend {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 24px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-label {
    font-size: clamp(9px, 0.7vw, 12px);
    font-weight: 700;
    color: #475569;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Shake animation for operating machines */
@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(1px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-1px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(1px, 0, 0);
    }
}

.animate-shake {
    animation: shake 2s cubic-bezier(.36, .07, .19, .97) infinite;
}

@keyframes wave-rotate {
    0% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(-10deg);
    }
}

.animate-wave {
    transform-origin: center;
    animation: wave-rotate 3s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 1200px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .analytics-layout {
        flex-direction: column;
    }

    .analytics-sidebar {
        min-width: unset;
    }

    .store-grid {
        grid-template-columns: 1fr;
    }

    .insight-layout {
        flex-direction: column;
    }

    .insight-sidebar {
        width: 100%;
    }

    .stats-controls {
        grid-template-columns: 1fr;
    }

    .stats-peaks {
        grid-template-columns: 1fr;
    }

    .machine-price-bulk {
        width: 100%;
        margin-left: 0;
    }

    .machine-price-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ===== Compare V3 ===== */
.compare-v2-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.compare-v2-board {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 1.8vh, 24px);
    min-height: 0;
}

.compare-v2-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.compare-reset-shell {
    display: flex;
    flex-direction: column;
}

.compare-reset-stage {
    position: relative;
    min-height: clamp(520px, 62vh, 760px);
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.compare-seed-graph {
    width: 100%;
    min-height: clamp(520px, 62vh, 760px);
    padding: clamp(8px, 1.2vw, 16px) 0;
}

.compare-seed-shell {
    display: grid;
    grid-template-rows: auto auto auto auto;
    row-gap: 12px;
    width: calc(100% - 60px);
    margin-inline: 30px;
    box-sizing: border-box;
    transform: translate(-41px, 0);
}

.compare-seed-shell.has-summary {
    transform: translate(-41px, -5px);
}

.compare-seed-y-axis {
    position: relative;
    min-height: clamp(420px, 52vh, 620px);
    padding: 0 6px 0 0;
    box-sizing: border-box;
}

.compare-seed-head {
    display: grid;
    gap: 0;
    padding-left: calc(52px + 18px);
    padding-right: 22px;
    margin-bottom: 12px;
    box-sizing: border-box;
    transform: translateX(-7px);
}

.compare-seed-shell:not(.has-summary) .compare-seed-head {
    margin-bottom: 30px;
}

.compare-seed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.compare-seed-metric-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid rgba(219, 227, 240, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.compare-seed-metric-btn {
    border: 0;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: 800;
    line-height: 1;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.compare-seed-metric-btn.is-active {
    background: var(--accent, var(--compare-seed-accent));
    color: #ffffff;
    box-shadow: 0 10px 22px -16px color-mix(in srgb, var(--accent, var(--compare-seed-accent)) 70%, transparent);
}

.compare-seed-header-tools {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.compare-seed-charttype-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(219, 227, 240, 0.78);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.compare-seed-charttype-btn {
    border: 0;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: 800;
    line-height: 1;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.compare-seed-charttype-btn.is-active {
    background: color-mix(in srgb, var(--accent, var(--compare-seed-accent, #2f6df6)) 12%, rgba(255, 255, 255, 0.98));
    color: var(--accent, var(--compare-seed-accent, #2f6df6));
    box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--accent, var(--compare-seed-accent, #2f6df6)) 42%, transparent);
}

.compare-seed-period-wrap {
    position: relative;
}

.compare-seed-period-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(219, 227, 240, 0.84);
    box-shadow: 0 10px 24px -20px color-mix(in srgb, var(--accent, var(--compare-seed-accent, #2f6df6)) 50%, transparent);
    cursor: pointer;
}

.compare-seed-period-copy {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.compare-seed-period-value {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.compare-seed-period-icon {
    font-size: 18px;
    color: #64748b;
}

.popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
}

.popup-backdrop.is-open {
    display: block;
}

.analytics-v3-config-popup {
    --accent: #2f6df6;
    position: fixed;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    border: 1px solid #e2e8f0;
    padding: 16px;
    width: 320px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 16px;
}

.analytics-v3-config-popup.is-open {
    display: flex;
}

.config-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.config-section-title {
    color: #1e293b;
    font-size: 16px;
    font-weight: 900;
}

.config-radio-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #475569;
}

.config-radio-row.is-disabled {
    opacity: 0.34;
}

.config-radio-row input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

.config-radio-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.config-radio-label {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
}

.compare-seed-picker-inline-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compare-seed-picker-inline-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    color: #475569;
}

.compare-seed-picker-number {
    width: 72px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #dbe3f0;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    outline: none;
}

.compare-seed-picker-number:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.config-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.config-popup-close,
.config-popup-apply {
    min-width: 88px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #dbe3f0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.config-popup-close {
    background: #fff;
    color: #475569;
}

.config-popup-apply {
    background: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 24%, transparent);
    color: #ffffff;
}

/* User refers to this horizontal comparison chooser as the "revolver". */
.compare-seed-revolver-wrap {
    position: relative;
    min-width: 0;
    width: calc(100% + 56px);
    margin-left: -56px;
    margin-right: 0;
    transform: translateY(0);
    padding-inline: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%);
    overflow: visible;
    isolation: isolate;
    box-sizing: border-box;
}

.compare-seed-revolver-wrap::before,
.compare-seed-revolver-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(104px, 11vw, 152px);
    pointer-events: none;
    z-index: 3;
    background: rgba(248, 249, 251, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: inherit;
    transition: opacity 180ms ease;
}

.compare-seed-revolver-wrap.is-at-start::before {
    opacity: 0;
}

.compare-seed-revolver-wrap.is-at-end::after {
    opacity: 0;
}

.compare-seed-revolver-wrap::before {
    left: 0;
    mask-image: linear-gradient(90deg,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.96) 10%,
        rgba(0, 0, 0, 0.84) 28%,
        rgba(0, 0, 0, 0.58) 48%,
        rgba(0, 0, 0, 0.28) 68%,
        rgba(0, 0, 0, 0.1) 84%,
        rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(90deg,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.96) 10%,
        rgba(0, 0, 0, 0.84) 28%,
        rgba(0, 0, 0, 0.58) 48%,
        rgba(0, 0, 0, 0.28) 68%,
        rgba(0, 0, 0, 0.1) 84%,
        rgba(0, 0, 0, 0) 100%);
}

.compare-seed-revolver-wrap::after {
    right: 0;
    width: calc(clamp(104px, 11vw, 152px) + 30px);
    mask-image: linear-gradient(270deg,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.96) 10%,
        rgba(0, 0, 0, 0.84) 28%,
        rgba(0, 0, 0, 0.58) 48%,
        rgba(0, 0, 0, 0.28) 68%,
        rgba(0, 0, 0, 0.1) 84%,
        rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(270deg,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.96) 10%,
        rgba(0, 0, 0, 0.84) 28%,
        rgba(0, 0, 0, 0.58) 48%,
        rgba(0, 0, 0, 0.28) 68%,
        rgba(0, 0, 0, 0.1) 84%,
        rgba(0, 0, 0, 0) 100%);
}

.compare-seed-revolver {
    --compare-seed-choice-height: 118px;
    --compare-seed-choice-radius: 8px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(290px, 340px);
    align-items: stretch;
    gap: 14px;
    height: 124px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 2px 34px 0;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.compare-seed-revolver::-webkit-scrollbar {
    display: none;
}

.compare-seed-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 72px;
    border-radius: 999px;
    border: none;
    background: rgba(136, 145, 158, 0.34);
    color: rgba(99, 109, 124, 0.96);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    z-index: 6;
    opacity: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color 160ms ease, background-color 160ms ease, opacity 180ms ease, box-shadow 160ms ease, transform 180ms ease;
    transform-origin: center;
    will-change: opacity, transform;
    transform: translateY(-50%) scale(0.94);
}

.compare-seed-scroll-btn.is-left {
    left: 8px;
}

.compare-seed-scroll-btn.is-right {
    right: -57px;
}

.compare-seed-scroll-btn:hover {
    color: rgba(79, 89, 104, 0.98);
    background: rgba(128, 138, 152, 0.42);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.32);
}

.compare-seed-revolver-wrap.is-pointer-near .compare-seed-scroll-btn,
.compare-seed-revolver-wrap:hover .compare-seed-scroll-btn,
.compare-seed-revolver-wrap:focus-within .compare-seed-scroll-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.compare-seed-scroll-btn-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 160ms ease;
}

.compare-seed-scroll-btn-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.compare-seed-scroll-btn-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.compare-seed-scroll-btn.is-right .compare-seed-scroll-btn-icon {
    transform: rotate(180deg);
}

.compare-seed-scroll-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.22), inset 0 0 0 1px rgba(148, 163, 184, 0.34);
}

.compare-seed-scroll-btn:disabled {
    opacity: 0.22;
    cursor: default;
    pointer-events: none;
}

.compare-seed-choice-wrap {
    position: relative;
    width: 100%;
    height: var(--compare-seed-choice-height);
    scroll-snap-align: start;
}

.compare-seed-choice {
    border: 1px solid rgba(219, 227, 240, 0.55);
    border-radius: var(--compare-seed-choice-radius);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 8%, rgba(255, 255, 255, 0.95)) 0%, rgba(255, 255, 255, 0.86) 100%),
        linear-gradient(180deg, rgba(226, 230, 236, 0.42) 0%, rgba(205, 212, 222, 0.24) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 100%;
    padding: 8px;
    display: block;
    box-sizing: border-box;
    text-align: left;
    cursor: grab;
    scroll-snap-align: start;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.compare-seed-choice:active {
    cursor: grabbing;
}

.compare-seed-choice:hover {
    border-color: color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 42%, rgba(191, 211, 251, 0.9));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 10%, rgba(255, 255, 255, 0.96)) 0%, rgba(255, 255, 255, 0.9) 100%),
        linear-gradient(180deg, rgba(232, 236, 242, 0.52) 0%, rgba(214, 222, 232, 0.32) 100%);
}

.compare-seed-choice.is-active {
    border-color: color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 38%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 12%, rgba(255, 255, 255, 0.96)) 0%, rgba(255, 255, 255, 0.92) 100%),
        linear-gradient(180deg, rgba(223, 231, 243, 0.64) 0%, rgba(209, 221, 240, 0.42) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.compare-seed-choice.is-dragging {
    opacity: 0.34;
    transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

body.compare-seed-dragging {
    cursor: grabbing;
    user-select: none;
}

.compare-seed-drag-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    margin: 0;
    pointer-events: none;
    transform-origin: top left;
    opacity: 1;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 12%, rgba(255, 255, 255, 0.98)) 0%, rgba(255, 255, 255, 0.98) 100%),
        linear-gradient(180deg, rgba(232, 236, 242, 0.68) 0%, rgba(214, 222, 232, 0.44) 100%);
    box-shadow:
        0 34px 56px -28px rgba(15, 23, 42, 0.42),
        0 18px 36px -26px color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 34%, transparent);
    transition: none;
}

.compare-seed-choice-title {
    position: absolute;
    left: 12px;
    top: 10px;
    z-index: 2;
    color: #334155;
    font-size: clamp(14px, 1vw, 16px);
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.compare-seed-choice-sub {
    color: #94a3b8;
    font-size: clamp(11px, 0.82vw, 13px);
    font-weight: 700;
    line-height: 1.25;
}

.compare-seed-choice-chart {
    position: relative;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 6%, rgba(255, 255, 255, 0.78)) 0%, rgba(248, 251, 255, 0.18) 100%);
}

.compare-seed-choice-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.compare-seed-choice-area {
    stroke: none;
}

.compare-seed-choice-line {
    fill: none;
    stroke: var(--accent, var(--compare-seed-accent, #2f6df6));
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.compare-seed-choice-value {
    position: absolute;
    right: 10px;
    top: 44px;
    color: var(--compare-seed-series-color, #2f6df6);
    font-size: clamp(11px, 0.82vw, 13px);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.compare-seed-choice-tag {
    position: absolute;
    right: 10px;
    bottom: 10px;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 12%, white);
    border: 1px solid color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 28%, transparent);
    color: var(--compare-seed-series-color, #2f6df6);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.compare-seed-choice-history-remove {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--compare-seed-series-color, #2f6df6);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 4px 12px -10px rgba(15, 23, 42, 0.34);
    transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.compare-seed-choice-history-remove:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 14px -10px rgba(15, 23, 42, 0.42);
}

.compare-seed-choice-history-remove:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.2), 0 6px 14px -10px rgba(15, 23, 42, 0.42);
}

/* ---- Plus card: "add older history" trigger ---- */
.compare-seed-choice-plus {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: var(--compare-seed-choice-height);
    border: 1px solid rgba(203, 213, 225, 0.38);
    border-radius: var(--compare-seed-choice-radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(248, 250, 252, 0.34) 100%),
        linear-gradient(180deg, rgba(203, 213, 225, 0.16) 0%, rgba(148, 163, 184, 0.08) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    cursor: pointer;
    scroll-snap-align: start;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.compare-seed-choice-plus:hover {
    border-color: rgba(148, 163, 184, 0.56);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(248, 250, 252, 0.42) 100%),
        linear-gradient(180deg, rgba(203, 213, 225, 0.2) 0%, rgba(148, 163, 184, 0.12) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 8px 22px -18px rgba(15, 23, 42, 0.24);
}

.compare-seed-choice-plus:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.compare-seed-choice-plus-icon {
    color: #94a3b8;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
    transform: translateY(-1px);
}

.compare-seed-choice-plus:hover .compare-seed-choice-plus-icon {
    color: #64748b;
}

/* ---- Date picker overlay (opened from + card) ---- */
.compare-seed-date-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.compare-seed-date-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.32);
    cursor: pointer;
}

.compare-seed-date-modal-panel {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    z-index: 1;
}

.compare-seed-date-picker-overlay {
    margin-top: 0;
    padding: 14px;
    border-radius: 12px;
    background: #f1f1f3;
    border: 1px solid #dcdcdc;
    box-shadow: 0 14px 34px -24px rgba(15, 23, 42, 0.35);
    animation: compareSeedDatePickerIn 180ms ease both;
}

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

.compare-seed-date-picker-title {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 0;
}

.compare-seed-date-picker-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.compare-seed-date-close-btn {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.compare-seed-date-close-btn:hover {
    background: rgba(148, 163, 184, 0.28);
    color: #334155;
}

.compare-seed-calendar-legend {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.compare-seed-calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.compare-seed-calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border: 1px solid rgba(148, 163, 184, 0.36);
}

.compare-seed-calendar-legend-dot.is-available {
    background: #ffffff;
}

.compare-seed-calendar-legend-dot.is-unavailable {
    background: #d1d5db;
}

.compare-seed-calendar-month-list {
    display: grid;
    gap: 14px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.compare-seed-calendar-month {
    border-radius: 0;
    border: 1px solid #dcdcdc;
    background: #ffffff;
    overflow: hidden;
}

.compare-seed-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 54px;
    background: #147af3;
    color: #ffffff;
    padding: 8px 42px;
}

.compare-seed-calendar-month-title {
    margin: 0;
    color: inherit;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.compare-seed-calendar-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.compare-seed-calendar-nav.is-prev {
    left: 10px;
}

.compare-seed-calendar-nav.is-next {
    right: 10px;
}

.compare-seed-calendar-nav:disabled {
    opacity: 0.34;
    cursor: default;
}

.compare-seed-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #147af3;
}

.compare-seed-calendar-weekdays span {
    text-align: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 2px;
}

.compare-seed-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #e7e7e7;
    border-left: 1px solid #e7e7e7;
}

.compare-seed-calendar-day {
    appearance: none;
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-right: 1px solid #e7e7e7;
    border-bottom: 1px solid #e7e7e7;
    border-radius: 0;
    background: #ffffff;
    color: #222222;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 8px;
    transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.compare-seed-calendar-date {
    display: inline-block;
    font-size: 15px;
    font-weight: 500;
    color: inherit;
}

.compare-seed-calendar-weather {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.compare-seed-calendar-weather .weather-icon-svg {
    width: 14px;
    height: 14px;
    display: block;
    transform: none;
}

.compare-seed-calendar-day.is-empty {
    background: #f1f1f3;
    color: #b8b8b8;
    pointer-events: none;
}

.compare-seed-calendar-day.is-available {
    background: #ffffff;
    color: #222222;
    cursor: pointer;
}

.compare-seed-calendar-day.is-available:hover {
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(20, 122, 243, 0.42);
}

.compare-seed-calendar-day.is-unavailable {
    background: #d1d5db;
    color: #8a8a8a;
}

.compare-seed-calendar-day.is-outside-range {
    background: #f1f1f3;
    color: #b8b8b8;
}

.compare-seed-calendar-day.is-sun.is-available .compare-seed-calendar-date {
    color: #d14b4b;
}

.compare-seed-calendar-day.is-sat.is-available .compare-seed-calendar-date {
    color: #4c79d8;
}

.compare-seed-calendar-day.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.compare-seed-calendar-day:disabled {
    cursor: default;
}

.compare-seed-date-picker-empty {
    padding: 0 0 10px;
    color: #8a8a8a;
    font-size: 12px;
    font-weight: 600;
}

.compare-seed-date-picker-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    color: #8a8a8a;
    font-size: 13px;
}

.compare-seed-chart-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 30px;
}

.compare-seed-summary {
    width: 100%;
    min-height: 78px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 34px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.96);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 34px -30px rgba(15, 23, 42, 0.14);
    color: #334155;
    font-size: calc(clamp(18px, 1.45vw, 22px) - 3px);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0.01em;
}

.compare-seed-summary-copy {
    flex: 1 1 auto;
}

.compare-seed-summary.is-idle {
    color: #94a3b8;
    font-weight: 400;
}

.compare-seed-summary-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.compare-seed-summary-detail-toggle {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(100, 116, 139, 0.72);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.compare-seed-summary-detail-toggle:hover,
.compare-seed-summary-detail-toggle.is-open {
    color: rgba(51, 65, 85, 0.84);
}

.compare-seed-summary-details {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.compare-seed-summary-detail-row {
    display: grid;
    gap: 4px;
}

.compare-seed-summary-detail-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-seed-summary-detail-tone {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.compare-seed-summary-detail-title {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.compare-seed-summary-detail-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
}

.compare-seed-summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px 0 14px;
    border: 1px solid #dbe3f0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #475569;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.compare-seed-summary-toggle:hover {
    border-color: #cfd8e6;
    background: #fff;
}

.compare-seed-summary-toggle.is-active {
    border-color: rgba(34, 197, 94, 0.32);
    background: rgba(255, 255, 255, 0.98);
    color: #166534;
    box-shadow: 0 12px 28px -24px rgba(34, 197, 94, 0.55);
}

.compare-seed-summary-toggle-label {
    line-height: 1;
}

.compare-seed-summary-switch {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.18s ease;
}

.compare-seed-summary-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
    transition: transform 0.18s ease;
}

.compare-seed-summary-toggle.is-active .compare-seed-summary-switch {
    background: #22c55e;
}

.compare-seed-summary-toggle.is-active .compare-seed-summary-switch-knob {
    transform: translateX(18px);
}

.compare-seed-summary-panel {
    width: calc(100% - (52px + 18px));
    margin-left: calc(52px + 18px);
    padding-right: 0;
    margin-bottom: 2px;
    box-sizing: border-box;
}

.compare-seed-shell.has-summary .compare-seed-summary-panel {
    margin-bottom: 8px;
}

.compare-v2-field.compare-v2-threshold-field {
    display: grid;
    grid-template-columns: max-content minmax(280px, 520px);
    align-items: center;
    gap: 20px;
    padding: 10px 2px 0;
}

.compare-v2-field-label {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    white-space: nowrap;
}

.compare-v2-threshold-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe3f0;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
}

.compare-v2-threshold-input {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 20px;
    background: transparent;
    cursor: pointer;
    --threshold-progress: 50%;
}

.compare-v2-threshold-input:focus {
    outline: none;
}

.compare-v2-threshold-input::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    border: 0;
    box-shadow: none;
    background: linear-gradient(90deg,
            rgba(255, 165, 154, 0.45) 0%,
            rgba(255, 165, 154, 0.45) var(--threshold-progress),
            #e5e7eb var(--threshold-progress),
            #e5e7eb 100%);
}

.compare-v2-threshold-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -6px;
    border-radius: 999px;
    border: 0;
    background: var(--uncollected);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);
}

.compare-v2-threshold-input::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: #e5e7eb;
}

.compare-v2-threshold-input::-moz-range-progress {
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 165, 154, 0.45);
}

.compare-v2-threshold-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 0;
    background: var(--uncollected);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);
}

.compare-v2-threshold-value {
    flex: 0 0 auto;
    min-width: 42px;
    color: #334155;
    font-size: 15px;
    font-weight: 900;
    text-align: right;
}

.compare-seed-legend {
    position: absolute;
    top: 12px;
    right: 19px;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    max-width: calc(100% - 40px);
}

.compare-seed-y-axis-track {
    position: relative;
    height: 100%;
}

.compare-seed-y-axis-label {
    position: absolute;
    right: 0;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: clamp(11px, 0.8vw, 13px);
    font-weight: 700;
    line-height: 1;
    text-align: right;
}

.compare-seed-y-axis-label:first-child {
    transform: translateY(0);
}

.compare-seed-y-axis-label:last-child {
    transform: translateY(-100%);
}

.compare-seed-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateY(12px);
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid color-mix(in srgb, var(--compare-seed-series-color, #2f6df6) 20%, rgba(226, 232, 240, 0.94));
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.3);
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.compare-seed-legend-swatch {
    width: 15px;
    height: 15px;
    border-radius: 999px;
}

.compare-seed-legend-swatch.is-a {
    background: var(--compare-seed-accent, #2f6df6);
}

.compare-seed-legend-swatch.is-b {
    background: #f59e8b;
}

.compare-seed-plot {
    position: relative;
    min-height: clamp(420px, 52vh, 620px);
    overflow: visible;
}

.compare-seed-plot.is-drop-over .compare-seed-plot-frame {
    border-color: color-mix(in srgb, var(--accent, var(--compare-seed-accent, #2f6df6)) 34%, #bfdbfe);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--accent, var(--compare-seed-accent, #2f6df6)) 12%, transparent),
        0 0 0 10px color-mix(in srgb, var(--accent, var(--compare-seed-accent, #2f6df6)) 5%, transparent),
        0 28px 60px -48px color-mix(in srgb, var(--accent, var(--compare-seed-accent, #2f6df6)) 34%, transparent);
}

.compare-seed-plot-frame {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.compare-seed-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 2;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    pointer-events: none;
    text-align: center;
}

.compare-seed-empty span:last-child {
    font-size: 13px;
    font-weight: 600;
}

.compare-seed-grid-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.compare-seed-grid-lines span {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.compare-seed-grid-columns {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.compare-seed-grid-columns span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(148, 163, 184, 0.12);
    transform: translateX(-50%);
}

.compare-seed-hover {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.compare-seed-hover-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--compare-seed-hover-color, var(--accent, var(--compare-seed-accent, #2f6df6))) 28%, transparent) 0%, color-mix(in srgb, var(--compare-seed-hover-color, var(--accent, var(--compare-seed-accent, #2f6df6))) 14%, transparent) 100%);
    transform: translateX(-50%);
    box-shadow: 0 0 18px color-mix(in srgb, var(--compare-seed-hover-color, var(--accent, var(--compare-seed-accent, #2f6df6))) 12%, transparent);
    transition: left 120ms ease;
}

.compare-seed-hover-point {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--compare-seed-hover-color, var(--accent, var(--compare-seed-accent, #2f6df6)));
    border: 3px solid rgba(255, 255, 255, 0.96);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--compare-seed-hover-color, var(--accent, var(--compare-seed-accent, #2f6df6))) 12%, transparent), 0 10px 26px color-mix(in srgb, var(--compare-seed-hover-color, var(--accent, var(--compare-seed-accent, #2f6df6))) 18%, transparent);
    transition: left 120ms ease, top 120ms ease;
}

.compare-seed-hover-value,
.compare-seed-hover-x {
    position: absolute;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--compare-seed-hover-color, var(--accent, var(--compare-seed-accent, #2f6df6)));
    font-size: clamp(11px, 0.84vw, 13px);
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: left 120ms ease, top 120ms ease;
}

.compare-seed-hover-value {
    top: 0;
    transform: translate(-50%, calc(-100% - 32px));
    padding: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.compare-seed-hover-x {
    top: 0;
    transform: translateX(-50%);
    color: var(--compare-seed-hover-color, var(--accent, var(--compare-seed-accent, #2f6df6)));
    font-weight: 700;
}

.compare-seed-legend-text {
    line-height: 1;
}

.compare-seed-legend-period {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.compare-seed-legend-remove {
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
}

.compare-seed-legend-remove:hover {
    color: #475569;
}

.compare-seed-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.compare-seed-area {
    stroke: none;
}

.compare-seed-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.compare-seed-bar {
    opacity: 0.86;
    shape-rendering: crispEdges;
}

.compare-seed-line.is-a {
    stroke: #2f6df6;
}

.compare-seed-line.is-b {
    stroke: #f59e8b;
}

.compare-seed-dot {
    display: none;
}

.compare-seed-x-axis {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: calc(52px + 18px);
    padding-inline: 0;
    box-sizing: border-box;
    transform: translateY(-31px);
    color: #94a3b8;
    font-size: clamp(11px, 0.78vw, 13px);
    font-weight: 700;
}

.compare-seed-x-axis span {
    text-align: center;
    flex: 0 0 auto;
}

@media (max-width: 900px) {
    .compare-seed-shell {
        row-gap: 12px;
    }

    .compare-seed-plot {
        min-height: 340px;
    }

    .compare-seed-head {
        padding-left: calc(36px + 10px);
        padding-right: 18px;
        margin-bottom: 12px;
    }

    .compare-seed-shell:not(.has-summary) .compare-seed-head {
        margin-bottom: 30px;
    }

    .compare-seed-toolbar {
        gap: 12px;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .compare-seed-header-tools {
        gap: 8px;
        flex-wrap: wrap;
    }

    .compare-v2-field.compare-v2-threshold-field {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .compare-seed-summary-panel {
        width: calc(100% - (36px + 10px));
        margin-left: calc(36px + 10px);
        padding-right: 0;
    }

    .compare-seed-charttype-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .compare-seed-revolver-wrap::before,
    .compare-seed-revolver-wrap::after {
        width: 76px;
    }

    .compare-seed-revolver-wrap::after {
        width: 106px;
    }

    .compare-seed-revolver-wrap {
        width: calc(100% + 56px);
        margin-left: -56px;
        margin-right: 0;
        padding-inline: 12px;
        border-radius: 24px;
    }

    .compare-seed-revolver {
        --compare-seed-choice-height: 104px;
        grid-auto-columns: minmax(244px, 272px);
        gap: 10px;
        height: 110px;
        padding: 2px 30px 0;
    }

    .compare-seed-scroll-btn {
        width: 28px;
        height: 58px;
    }

    .compare-seed-scroll-btn-icon {
        width: 12px;
        height: 12px;
    }

    .compare-seed-scroll-btn.is-left {
        left: 6px;
    }

    .compare-seed-scroll-btn.is-right {
        right: -59px;
    }

    .compare-seed-choice {
        padding: 8px;
    }

    .compare-seed-choice-plus-icon {
        font-size: 30px;
    }

    .compare-seed-date-modal {
        padding: 12px;
    }

    .compare-seed-date-modal-panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .compare-seed-date-picker-overlay {
        padding: 10px;
    }

    .compare-seed-date-close-btn {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }

    .compare-seed-calendar-header {
        min-height: 46px;
        padding: 8px 36px;
    }

    .compare-seed-calendar-month-title {
        font-size: 16px;
    }

    .compare-seed-calendar-nav {
        width: 24px;
        height: 24px;
        font-size: 18px;
    }

    .compare-seed-calendar-nav.is-prev {
        left: 6px;
    }

    .compare-seed-calendar-nav.is-next {
        right: 6px;
    }

    .compare-seed-calendar-weekdays span {
        font-size: 11px;
        padding: 6px 2px;
    }

    .compare-seed-calendar-day {
        min-height: 38px;
        padding: 6px;
        font-size: 11px;
    }

    .compare-seed-calendar-date {
        font-size: 13px;
    }

    .compare-seed-calendar-weather {
        right: 3px;
        bottom: 3px;
        width: 13px;
        height: 13px;
    }

    .compare-seed-calendar-weather .weather-icon-svg {
        width: 12px;
        height: 12px;
    }

    .compare-seed-chart-row {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
    }

    .compare-seed-svg {
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .compare-seed-x-axis {
        gap: 6px;
        margin-left: calc(36px + 10px);
        padding-inline: 18px;
        font-size: 10px;
    }

    .compare-seed-period-control {
        width: 100%;
        justify-content: space-between;
    }

    .analytics-v3-config-popup {
        width: min(320px, calc(100vw - 48px));
    }
}

@media (max-width: 1360px) {
    .compare-reset-stage {
        min-height: 460px;
    }
}

@media (max-width: 900px) {
    .store-selector {
        min-width: 170px;
        height: 40px;
    }

    .store-select {
        font-size: 14px !important;
    }

    .live-status-donut-row {
        align-items: center;
        flex-direction: column;
        gap: 6px;
        margin-bottom: clamp(10px, 1.8vh, 20px);
    }

    .live-status-donut-legend {
        margin-left: 0;
        margin-bottom: 0;
        width: auto;
    }

    .compare-v2-board-header {
        align-items: stretch;
    }

    .compare-reset-stage {
        min-height: 380px;
    }
}


/* ===== Store Settings Leave Confirm Modal ===== */
.settings-leave-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 28px);
    z-index: 320;
}

.settings-leave-modal-backdrop.open {
    display: flex;
}

.settings-leave-modal {
    width: min(760px, 100%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 20px;
    box-shadow: 0 28px 60px -20px rgba(15, 23, 42, 0.34);
    padding: clamp(18px, 2.2vw, 30px);
}

.settings-leave-modal-title {
    color: #0f172a;
    font-size: clamp(24px, 2.1vw, 42px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.settings-leave-modal-sub {
    margin-top: 10px;
    color: #64748b;
    font-size: clamp(12px, 1vw, 18px);
    font-weight: 500;
}

.settings-leave-modal-actions {
    margin-top: clamp(16px, 2vw, 24px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.settings-leave-btn {
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid #dbe3f0;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
    font-size: clamp(12px, 0.95vw, 16px);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
}

.settings-leave-btn:hover {
    border-color: #bfd5ff;
}

.settings-leave-btn.is-ghost {
    background: #f8fafc;
}

.settings-leave-btn.is-primary {
    background: linear-gradient(180deg, #2386ff 0%, #1678ea 100%);
    border-color: rgba(23, 120, 234, 0.5);
    color: #fff;
    box-shadow: 0 14px 24px -16px rgba(23, 120, 234, 0.65);
}

.settings-leave-btn.is-primary:hover {
    filter: brightness(0.98);
}

/* ===== PC Auth Modal ===== */
.pc-auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 28px);
    z-index: 12000;
}

.pc-auth-modal {
    width: min(420px, 92vw);
    display: grid;
    gap: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.98) 100%);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 20px;
    box-shadow: 0 28px 60px -20px rgba(15, 23, 42, 0.34);
    padding: 20px 20px 18px;
}

.pc-auth-modal-head {
    display: grid;
    gap: 8px;
}

.pc-auth-modal-logo {
    height: auto;
    font-size: clamp(20px, 1.5vw, 26px);
}

.pc-auth-modal-title {
    color: #0f172a;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.pc-auth-modal-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}

.pc-auth-modal-field {
    display: grid;
    gap: 6px;
}

.pc-auth-modal-label {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.pc-auth-modal-input {
    width: 100%;
    height: 42px;
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    padding: 0 14px;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.pc-auth-modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 137, 243, 0.1);
}

.pc-auth-modal-password-wrap {
    position: relative;
}

.pc-auth-modal-password-input {
    padding-right: 56px;
}

.pc-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    width: 36px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3f0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
    color: #64748b;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.pc-auth-password-toggle:hover,
.pc-auth-password-toggle:focus-visible {
    border-color: #bfd5ff;
    color: var(--primary);
    outline: none;
}

.pc-auth-password-toggle .material-symbols-outlined {
    font-size: 18px;
}

.pc-auth-submit {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #2386ff 0%, #1678ea 100%);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 24px -16px rgba(23, 120, 234, 0.65);
    transition: filter 0.18s ease, opacity 0.18s ease;
}

.pc-auth-submit:hover {
    filter: brightness(0.98);
}

.pc-auth-submit:disabled {
    opacity: 0.72;
    cursor: default;
}

/* ===== Store Address Edit Modal ===== */
.address-edit-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 28px);
    z-index: 340;
}

.address-edit-modal-backdrop.open {
    display: flex;
}

.address-edit-modal {
    width: min(760px, 100%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.98) 100%);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 24px;
    box-shadow: 0 32px 72px -28px rgba(15, 23, 42, 0.42);
    padding: clamp(18px, 2.2vw, 30px);
}

.address-edit-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.address-edit-modal-title {
    color: #0f172a;
    font-size: clamp(24px, 2.1vw, 40px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.address-edit-modal-sub {
    margin-top: 10px;
    color: #64748b;
    font-size: clamp(12px, 0.95vw, 15px);
    font-weight: 500;
    line-height: 1.6;
}

.address-edit-modal-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3f0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    cursor: pointer;
    transition: all 0.18s ease;
}

.address-edit-modal-close:hover {
    border-color: #bfd5ff;
    color: var(--primary);
}

.address-edit-modal-form {
    margin-top: clamp(16px, 2vw, 24px);
}

.address-edit-modal-postal-row {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 14px;
    align-items: end;
}

.address-edit-modal-field label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: clamp(11px, 0.85vw, 13px);
    font-weight: 700;
}

.address-edit-modal-postal-inputs {
    display: grid;
    grid-template-columns: 92px 18px 1fr;
    gap: 8px;
    align-items: center;
}

.address-edit-modal-postal-sep {
    text-align: center;
    color: #94a3b8;
    font-weight: 700;
}

.address-edit-modal-input {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid #dbe3f0;
    background: #fff;
    color: #334155;
    font-family: inherit;
    font-size: clamp(12px, 0.95vw, 15px);
    font-weight: 500;
    padding: 0 14px;
    transition: all 0.2s ease;
}

.address-edit-modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 137, 243, 0.12);
}

.address-edit-modal-note {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(239, 246, 255, 0.9);
    border: 1px solid rgba(191, 219, 254, 0.85);
    color: #4f5f7c;
    font-size: clamp(11px, 0.85vw, 13px);
    font-weight: 600;
    line-height: 1.5;
}

.address-edit-modal-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.address-edit-modal-preview-wrap {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e2e8f0;
}

.address-edit-modal-preview-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.address-edit-modal-preview {
    margin-top: 8px;
    color: #0f172a;
    font-size: clamp(14px, 1.05vw, 18px);
    font-weight: 700;
    line-height: 1.6;
}

.address-edit-modal-error {
    margin-top: 10px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.address-edit-modal-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.address-edit-modal-actions .settings-leave-btn {
    min-width: 152px;
}

@media (max-width: 900px) {
    .settings-leave-modal-actions {
        grid-template-columns: 1fr;
    }

    .settings-leave-btn {
        min-height: 44px;
    }

    .address-edit-modal-postal-row,
    .address-edit-modal-grid {
        grid-template-columns: 1fr;
    }

    .address-edit-modal-actions {
        flex-direction: column-reverse;
    }

    .address-edit-modal-actions .settings-leave-btn {
        width: 100%;
        min-width: 0;
    }
}


/* ===== Home Machine Status Button & Modal ===== */
.machine-status-open-btn {
    margin-top: clamp(10px, 1.4vh, 18px);
    width: 100%;
    min-height: clamp(40px, 4.6vh, 52px);
    border-radius: 12px;
    border: 1px solid #dbe3f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #334155;
    font-family: inherit;
    font-size: clamp(11px, 0.9vw, 14px);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.machine-status-open-btn:hover {
    border-color: rgba(74, 137, 243, 0.35);
    color: var(--primary);
    box-shadow: 0 10px 24px -16px rgba(74, 137, 243, 0.45);
    transform: translateY(-1px);
}

.machine-status-open-btn .material-symbols-outlined {
    font-size: clamp(16px, 1.2vw, 20px);
}

.machine-status-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 28px);
    z-index: 300;
}

.machine-status-modal-backdrop.open {
    display: flex;
}

.machine-status-modal {
    width: min(980px, 100%);
    max-height: min(82vh, 900px);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    box-shadow: 0 28px 60px -18px rgba(15, 23, 42, 0.32);
    display: flex;
    flex-direction: column;
}

.machine-status-modal-head {
    padding: clamp(12px, 1.5vw, 18px) clamp(14px, 1.8vw, 22px);
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.machine-status-modal-title {
    font-size: clamp(16px, 1.25vw, 22px);
    font-weight: 800;
    color: #0f172a;
}

.machine-status-modal-sub {
    margin-top: 2px;
    font-size: clamp(10px, 0.78vw, 12px);
    font-weight: 700;
    color: #64748b;
}

.machine-status-modal-close {
    border: 1px solid #dbe3f0;
    background: #fff;
    color: #475569;
    border-radius: 10px;
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(11px, 0.82vw, 13px);
    font-weight: 700;
    transition: all 0.2s;
}

.machine-status-modal-close:hover {
    border-color: rgba(74, 137, 243, 0.28);
    color: var(--primary);
}

.machine-status-modal-close .material-symbols-outlined {
    font-size: 18px;
}

.machine-status-modal-grid {
    padding: clamp(12px, 1.6vw, 20px);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: clamp(10px, 1vw, 14px);
    overflow: auto;
}

.machine-status-modal-grid.is-empty {
    grid-template-columns: minmax(0, 1fr);
    min-height: 360px;
    align-content: center;
    justify-items: center;
}

.machine-status-modal-empty {
    width: min(360px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 24px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    text-align: center;
}

.machine-status-modal-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #eff6ff;
    color: #3b82f6;
}

.machine-status-modal-empty-icon .material-symbols-outlined {
    font-size: 28px;
}

.machine-status-modal-empty-title {
    color: #334155;
    font-weight: 700;
    font-size: 16px;
}

.machine-status-modal-empty-sub {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.machine-status-modal-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px;
    display: grid;
    grid-template-rows: auto auto auto;
    justify-items: center;
    gap: 6px;
    min-height: 132px;
}

.machine-status-modal-card.running {
    border-color: rgba(74, 137, 243, 0.24);
    box-shadow: inset 0 0 0 1px rgba(74, 137, 243, 0.05);
}

.machine-status-modal-card.uncollected {
    border-color: rgba(255, 165, 154, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 165, 154, 0.08);
}

.machine-status-modal-card.abandoned {
    background: linear-gradient(180deg, var(--abandoned-light) 0%, #fff7f9 100%);
    border-color: rgba(214, 49, 89, 0.45);
    box-shadow: inset 0 0 0 1px rgba(214, 49, 89, 0.12), 0 12px 24px -18px rgba(214, 49, 89, 0.35);
}

.machine-status-modal-icon {
    width: 58px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    --runwash-stroke: 3px;
}

.machine-status-modal-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.machine-status-modal-machine-no {
    font-size: 12px;
    font-weight: 800;
    color: #334155;
}

.machine-status-modal-status-wrap {
    display: grid;
    justify-items: center;
    gap: 2px;
}

.machine-status-modal-status {
    font-size: 11px;
    font-weight: 700;
}

.machine-status-modal-status.running {
    color: var(--primary);
}

.machine-status-modal-status.uncollected {
    color: var(--uncollected);
}

.machine-status-modal-status.abandoned {
    color: var(--abandoned);
}

.machine-status-modal-status.idle {
    color: var(--idle);
}

.machine-status-modal-status-sub {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.machine-status-modal-status-sub.abandoned {
    color: rgba(214, 49, 89, 0.72);
}

/* Animated running machine icon (used in home/live/modal) */
.runwash-shell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.runwash-icon {
    --runwash-blue: #4a8deb;
    --runwash-blue-soft: #a9cbfa;
    width: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 13 / 16;
    border: var(--runwash-stroke) solid var(--runwash-blue);
    border-radius: 12%;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.runwash-panel {
    height: 22%;
    border-bottom: var(--runwash-stroke) solid var(--runwash-blue);
    display: flex;
    align-items: center;
    padding: 0 12%;
    gap: 8%;
    flex-shrink: 0;
}

.runwash-knob {
    width: 14%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--runwash-blue);
    flex-shrink: 0;
}

.runwash-btn-group {
    display: flex;
    gap: 6%;
    width: 24%;
    align-items: center;
}

.runwash-btn {
    width: 35%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--runwash-blue);
    flex-shrink: 0;
}

.runwash-window-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 9%;
}

.runwash-window {
    width: 72%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: var(--runwash-stroke) solid var(--runwash-blue);
    background: #fff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.runwash-wave-back,
.runwash-wave {
    position: absolute;
    left: 50%;
    top: 58%;
    width: 220%;
    aspect-ratio: 1;
    border-radius: 43%;
    transform: translate(-50%, -50%);
}

.runwash-wave-back {
    background: var(--runwash-blue-soft);
    opacity: 0.9;
    animation: runwash-wave-rotate 4s linear infinite reverse;
    z-index: 1;
}

.runwash-wave {
    background: var(--runwash-blue);
    animation: runwash-wave-rotate 3s linear infinite;
    z-index: 3;
}

.runwash-fabric-bob {
    position: absolute;
    left: 64%;
    top: 64%;
    width: 52%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    animation: runwash-bob 2.8s ease-in-out infinite;
    z-index: 2;
}

.runwash-fabric-spin {
    width: 100%;
    height: 100%;
    animation: runwash-fabric-spin 1.17s linear infinite reverse;
}

.runwash-fabric {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: var(--runwash-stroke) solid var(--runwash-blue);
    box-sizing: border-box;
    background: radial-gradient(circle at 40% 35%, #f7f7f3 0%, #f2f1ea 50%, #ebe9dd 100%);
    position: relative;
}

.runwash-fabric::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 65% 30%, rgba(0, 0, 0, 0.08), transparent 60%),
        radial-gradient(circle at 30% 70%, rgba(0, 0, 0, 0.06), transparent 65%);
    opacity: 0.6;
}

@keyframes runwash-wave-rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes runwash-fabric-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes runwash-bob {

    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    50% {
        transform: translate(-50%, -44%);
    }
}

.operating-icon-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.operating-icon-wrapper>svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.drum-container {
    position: absolute;
    top: 38%;
    left: 26%;
    width: 48%;
    height: 48%;
    container-type: inline-size;
}

/* ドラム（丸窓）だけ */
.drum {
    width: 100cqw;
    height: 100cqw;
    border: 10cqw solid #4a8deb;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
    /* Mask Safari subpixel seam between rim and animated water layer */
    box-shadow: inset 0 0 0 2cqw #4a8deb;
}

/* 水（奥） */
.wave-back {
    position: absolute;
    top: 48%;
    left: 45%;
    width: 237.5cqw;
    height: 218.75cqw;
    background: #a9cbfa;
    border-radius: 40%;
    animation: spinWave 4s linear infinite reverse;
    z-index: 0;
}

/* 水（手前） */
.wave {
    position: absolute;
    top: 55%;
    left: 45%;
    width: 243.75cqw;
    height: 225cqw;
    background: #4a8deb;
    border-radius: 40%;
    animation: spinWave 3s linear infinite;
    z-index: 2;
}

/* 洗濯物ラッパー */
.fabric-wrap {
    position: absolute;
    top: calc(50% + 41.875cqw);
    left: calc(50% + 36.25cqw);
    width: 72.5cqw;
    height: 72.5cqw;
    transform-origin: 36.25cqw 36.25cqw;
    animation: spin 1.17s linear infinite reverse, bob 2.8s ease-in-out infinite;
    z-index: 1;
}

/* 洗濯物本体 */
.fabric {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10cqw solid #4a8deb;
    box-sizing: border-box;
    background: radial-gradient(circle at 40% 35%, #f7f7f3 0%, #f2f1ea 50%, #ebe9dd 100%);
    position: relative;
}

.fabric::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 65% 30%, rgba(0, 0, 0, 0.08), transparent 60%),
        radial-gradient(circle at 30% 70%, rgba(0, 0, 0, 0.06), transparent 65%);
    opacity: 0.6;
}

@keyframes spinWave {
    0% {
        transform: translate(-50%, 0) rotate(0deg);
    }

    100% {
        transform: translate(-50%, 0) rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes bob {
    0% {
        translate: -50% -50%;
    }

    50% {
        translate: -50% -46%;
    }

    100% {
        translate: -50% -50%;
    }
}

.status-item .icon-wrap,
.machine-svg,
.machine-status-modal-icon {
    --runwash-stroke: 3px;
}

.machine-svg {
    --runwash-stroke: 4px;
}

.status-item .icon-wrap .runwash-shell,
.machine-svg .runwash-shell,
.machine-status-modal-icon .runwash-shell {
    width: 100%;
    height: 100%;
}

@media (prefers-reduced-motion: reduce) {

    .runwash-wave-back,
    .runwash-wave,
    .runwash-fabric-bob,
    .runwash-fabric-spin {
        animation: none !important;
    }
}

@media (max-width: 900px) {
    .machine-status-modal {
        max-height: 88vh;
    }

    .machine-status-modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    }
}

/* ===== Required Settings Prompt Modal ===== */
.required-settings-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 28px);
    z-index: 11000;
}

.required-settings-modal-backdrop[aria-hidden="true"] {
    display: none;
}

.required-settings-modal {
    width: min(420px, 100%);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 20px;
    box-shadow: 0 28px 60px -20px rgba(15, 23, 42, 0.34);
    padding: clamp(20px, 2.5vw, 32px);
    display: grid;
    gap: 10px;
}

.required-settings-modal-icon {
    display: flex;
    justify-content: center;
    color: #f59e0b;
    font-size: 40px;
}

.required-settings-modal-icon .material-symbols-outlined {
    font-size: 42px;
}

.required-settings-modal-title {
    color: #0f172a;
    font-size: clamp(18px, 1.6vw, 24px);
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.required-settings-modal-sub {
    color: #64748b;
    font-size: clamp(12px, 0.95vw, 14px);
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
}

.required-settings-modal-list {
    margin: 0;
    padding: 12px 16px;
    background: #fef9ec;
    border: 1px solid #fde68a;
    border-radius: 10px;
    list-style: disc;
    list-style-position: inside;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: clamp(13px, 1vw, 15px);
    color: #92400e;
    font-weight: 600;
}

.required-settings-modal-list[hidden] {
    display: none;
}

.required-settings-modal-actions {
    margin-top: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Required settings nav highlight */
.nav-item.req-highlight {
    color: #d97706;
    background: rgba(245, 158, 11, 0.10);
    border-right-color: #f59e0b;
    animation: req-nav-pulse 1.6s ease-in-out infinite;
}
.nav-item.req-highlight .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
@keyframes req-nav-pulse {
    0%, 100% { background: rgba(245, 158, 11, 0.08); }
    50%       { background: rgba(245, 158, 11, 0.18); }
}
