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

:root {
    --bg: #08080d;
    --surface: #111118;
    --surface-alt: #1c1c28;
    --text: #f2f2f7;
    --text-mid: #c0c0d0;
    --text-dim: #707088;
    --green: #34d399;
    --green-bg: rgba(52, 211, 153, 0.1);
    --red: #fb7185;
    --red-bg: rgba(251, 113, 133, 0.1);
    --blue-metro: #0077c8;
    --warm: #fbbf24;
    --bar-cool: #5ba0d4;
    --bar-warm: #e8a63a;
    --bar-hot: #e06040;
}

html, body {
    height: 100%;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.dashboard {
    height: 100vh;
    display: grid;
    grid-template-columns: 30% 1fr;
    padding: 2.5rem 3.5rem;
    gap: 1rem;
}

.panel {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
}

/* === LEFT COLUMN === */
.col-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

/* Weather */
.weather-panel {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 0 0 auto;
}

.weather-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.weather-now {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-icon {
    font-size: 3rem;
    line-height: 1;
}

.weather-temp {
    font-size: 4rem;
    font-weight: 100;
    letter-spacing: -0.04em;
    line-height: 1;
}

.weather-summary {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.weather-desc {
    font-size: 1.05rem;
    color: var(--text-mid);
}

.weather-hilo {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Hourly */
.weather-hourly {
    display: flex;
    gap: 0.3rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--surface-alt);
    border-bottom: 1px solid var(--surface-alt);
}

.hour-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.hour-item .hour-time {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 500;
}

.hour-item .hour-icon {
    font-size: 1.1rem;
}

.hour-item .hour-temp {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Daily forecast with bars */
.weather-daily {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.daily-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.daily-row .day-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-mid);
    min-width: 2.5rem;
}

.daily-row .day-icon {
    font-size: 1.2rem;
    min-width: 1.5rem;
    text-align: center;
}

.daily-row .day-lo {
    font-size: 0.9rem;
    color: var(--text-dim);
    min-width: 2rem;
    text-align: right;
}

.daily-row .day-bar-container {
    flex: 1;
    height: 6px;
    background: var(--surface-alt);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.daily-row .day-bar {
    position: absolute;
    height: 100%;
    border-radius: 3px;
}

.daily-row .day-hi {
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 2rem;
}

/* Radar */
.radar-panel {
    flex: 1;
    min-height: 150px;
}

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

.leaflet-container {
    background: var(--bg);
}

/* === RIGHT COLUMN === */
.col-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.time-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 0.5rem;
}

.clock {
    font-size: 2.8rem;
    font-weight: 100;
    letter-spacing: 0.01em;
}

.time-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.date {
    font-size: 1.05rem;
    color: var(--text-dim);
}

.world-clocks {
    display: flex;
    gap: 1.25rem;
}

.world-clock {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

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

.wc-time {
    font-size: 1rem;
    color: var(--text-mid);
    font-weight: 300;
}

.wc-day {
    font-size: 0.7rem;
    color: var(--text-dim);
    vertical-align: super;
}

/* Finance */
.finance-panel {
    padding: 0.5rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    min-height: 0;
}

.finance-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
    flex: 1;
    align-content: center;
}

.finance-item {
    display: flex;
    align-items: center;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 0.4rem;
}

.finance-item:last-child {
    border-bottom: none;
}

.finance-item .fi-name {
    min-width: 2.5rem;
}

.finance-item .fi-symbol {
    font-size: 0.8rem;
    font-weight: 700;
}

.finance-item .fi-label {
    display: none;
}

.finance-item .fi-spark {
    flex: 1;
    height: 18px;
    display: flex;
    align-items: center;
}

.finance-item .fi-spark svg {
    width: 100%;
    max-width: 50px;
    height: 18px;
}

.finance-item .fi-price {
    font-size: 0.85rem;
    font-weight: 400;
    text-align: right;
}

.finance-item .fi-change {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    text-align: center;
    min-width: 3rem;
}

.finance-item .fi-change.up {
    color: #fff;
    background: var(--green);
}

.finance-item .fi-change.down {
    color: #fff;
    background: var(--red);
}

/* Metro */
.metro-panel {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.metro-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.metro-icon {
    font-size: 1.3rem;
}

.metro-label {
    font-size: 1.2rem;
    font-weight: 500;
}

.metro-direction {
    font-size: 1rem;
    color: var(--text-dim);
}

/* Train map strip */
.metro-map {
    position: relative;
    height: 50px;
    margin-bottom: 0.5rem;
}

.metro-map .track-line {
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    height: 5px;
    background: #252540;
    border-radius: 3px;
}

.metro-map .station-tick {
    position: absolute;
    top: 22px;
    width: 3px;
    height: 16px;
    background: #3a3a55;
    border-radius: 2px;
    transform: translateX(-50%);
}

.metro-map .station-major {
    top: 18px;
    width: 4px;
    height: 24px;
    background: #5a5a75;
}

.metro-map .my-station-marker {
    position: absolute;
    top: 28px;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255,255,255,0.7), 0 0 24px rgba(255,255,255,0.3);
}

.metro-map .my-station-label {
    position: absolute;
    top: 48px;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.metro-map .station-label-major {
    position: absolute;
    top: 48px;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.metro-map .train-marker {
    position: absolute;
    top: 28px;
    transform: translate(-50%, -50%);
    min-width: 28px;
    height: 20px;
    padding: 0 6px;
    background: #0077c8;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 119, 200, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: left 30s linear;
}

.metro-map .train-marker::before {
    content: '▶';
    color: white;
    font-size: 8px;
}

.metro-map .train-eta {
    color: white;
    font-size: 9px;
    font-weight: 700;
}

.metro-map .train-marker.train-passed {
    background: #4a4a6a;
    box-shadow: none;
    opacity: 0.5;
}

.metro-map .train-marker.train-passed::before {
    content: '▶';
}

.metro-list {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metro-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 1rem;
    background: var(--surface-alt);
    border-radius: 10px;
}

.metro-item:first-child {
    padding: 0.6rem 1.25rem;
}

.metro-item:first-child .metro-min {
    font-size: 2.5rem;
}

.metro-item .metro-min {
    font-size: 2rem;
    font-weight: 100;
    line-height: 1;
}

.metro-item .metro-min-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metro-item .metro-dest {
    font-size: 0.8rem;
    color: var(--text-mid);
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.metro-line-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.metro-item .metro-sec {
    font-size: 0.45em;
    color: var(--text-dim);
    font-weight: 300;
}

.metro-item.arriving .metro-min {
    color: var(--warm);
}

.metro-status {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.metro-status.early { color: var(--green); }
.metro-status.late { color: var(--red); }
.metro-status.ontime { color: var(--text-dim); }

.metro-eta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

.metro-eta .eta-row {
    white-space: nowrap;
}

.metro-eta .eta-row b {
    color: var(--text-mid);
    font-weight: 500;
}

.metro-empty {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* === PORTRAIT === */
@media (max-aspect-ratio: 1/1) {
    .dashboard {
        grid-template-columns: 1fr;
        overflow-y: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .weather-temp { font-size: 4rem; }
    .weather-icon { font-size: 3rem; }
    .clock { font-size: 2.5rem; }
    .finance-item .fi-price { font-size: 1.3rem; }
    .metro-item .metro-min { font-size: 2.5rem; }
    .metro-item:first-child .metro-min { font-size: 3rem; }

    .radar-panel { min-height: 250px; }
}
