/* Root Variables */
:root {
    --ldm-primary: #2259E3;
    --ldm-primary-hover: #1a47c4;
    --ldm-gray-50: #fafafa;
    --ldm-gray-100: #f5f5f5;
    --ldm-gray-200: #eeeeee;
    --ldm-gray-300: #e0e0e0;
    --ldm-gray-400: #bdbdbd;
    --ldm-gray-500: #9e9e9e;
    --ldm-gray-600: #757575;
    --ldm-gray-700: #616161;
    --ldm-gray-800: #424242;
    --ldm-gray-900: #212121;
    --ldm-border-radius: 8px;
    --ldm-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --ldm-box-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Public Container */
.ldm-public-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Public Filters */
.ldm-public-filters {
    margin-bottom: 30px;
}

.ldm-public-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    color: var(--ldm-gray-900);
    margin: 0 0 20px 0;
}

.ldm-public-title svg {
    color: var(--ldm-primary);
}

/* Clean Minimal Statistics Cards */
.ldm-public-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ldm-public-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--ldm-gray-200);
    border-radius: var(--ldm-border-radius);
    transition: all 0.3s ease;
}

.ldm-public-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--ldm-box-shadow-hover);
    border-color: var(--ldm-gray-300);
}

.ldm-public-stat svg {
    width: 48px;
    height: 48px;
    padding: 12px;
    background: var(--ldm-gray-50);
    border-radius: 10px;
    color: var(--ldm-gray-600);
    flex-shrink: 0;
}

.ldm-public-stat>div {
    flex: 1;
}

.ldm-stat-label {
    font-size: 13px;
    color: var(--ldm-gray-600);
    margin-bottom: 4px;
    font-weight: 500;
}

.ldm-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--ldm-gray-900);
}

/* ============================================================
   Statistics Grid — Rich colored cards
   ============================================================ */
/* Stats grid + glow blobs (give backdrop-filter something to blur) */
.ldm-stats-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 28px 0;
    isolation: isolate;
}

.ldm-stats-grid::before {
    content: '';
    position: absolute;
    inset: -30px;
    z-index: -1;
    background:
        radial-gradient(60% 80% at 15% 50%, rgba(220, 38, 38, 0.22) 0%, transparent 70%),
        radial-gradient(60% 80% at 50% 50%, rgba(37, 99, 235, 0.20) 0%, transparent 70%),
        radial-gradient(60% 80% at 85% 50%, rgba(22, 163, 74, 0.20) 0%, transparent 70%);
    filter: blur(30px);
    opacity: 0.9;
    pointer-events: none;
}

/* Glass card base */
.ldm-kpi {
    position: relative;
    padding: 24px 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(15, 23, 42, 0.04),
        0 12px 36px -8px rgba(15, 23, 42, 0.12),
        0 4px 12px -4px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                background 0.35s ease;
}

.ldm-kpi:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(15, 23, 42, 0.04),
        0 22px 48px -10px rgba(15, 23, 42, 0.18),
        0 6px 16px -4px rgba(15, 23, 42, 0.08);
}

/* Top-left glass sheen */
.ldm-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 70%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
    z-index: 0;
}

/* Tinted glass per metric */
.ldm-kpi--peak {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.55) 0%, rgba(255, 255, 255, 0.55) 100%);
    border-color: rgba(252, 165, 165, 0.55);
}
.ldm-kpi--min {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.55) 0%, rgba(255, 255, 255, 0.55) 100%);
    border-color: rgba(147, 197, 253, 0.55);
}
.ldm-kpi--avg {
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.55) 0%, rgba(255, 255, 255, 0.55) 100%);
    border-color: rgba(134, 239, 172, 0.55);
}
.ldm-kpi--peak:hover { background: linear-gradient(135deg, rgba(254, 226, 226, 0.7) 0%, rgba(255, 255, 255, 0.7) 100%); }
.ldm-kpi--min:hover  { background: linear-gradient(135deg, rgba(219, 234, 254, 0.7) 0%, rgba(255, 255, 255, 0.7) 100%); }
.ldm-kpi--avg:hover  { background: linear-gradient(135deg, rgba(220, 252, 231, 0.7) 0%, rgba(255, 255, 255, 0.7) 100%); }

/* Head (icon + label) */
.ldm-kpi-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.ldm-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.65);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 4px 10px -2px rgba(15, 23, 42, 0.08);
}

.ldm-kpi-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
    fill: none;
}

.ldm-kpi--peak .ldm-kpi-icon svg { stroke: #dc2626; }
.ldm-kpi--min  .ldm-kpi-icon svg { stroke: #2563eb; }
.ldm-kpi--avg  .ldm-kpi-icon svg { stroke: #16a34a; }

.ldm-kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
}

.ldm-kpi--peak .ldm-kpi-label { color: #991b1b; }
.ldm-kpi--min  .ldm-kpi-label { color: #1e3a8a; }
.ldm-kpi--avg  .ldm-kpi-label { color: #166534; }

/* Value (big number) */
.ldm-kpi-value {
    position: relative;
    z-index: 1;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.05;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.ldm-kpi--peak .ldm-kpi-value { color: #b91c1c; }
.ldm-kpi--min  .ldm-kpi-value { color: #1d4ed8; }
.ldm-kpi--avg  .ldm-kpi-value { color: #15803d; }

.ldm-kpi-unit {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.55;
    letter-spacing: 0;
    margin-left: 2px;
}

/* Sub-line with sparkle */
.ldm-kpi-sub {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ldm-gray-600);
}

.ldm-kpi-sub::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
    flex-shrink: 0;
}

.ldm-kpi--peak .ldm-kpi-sub { color: #9b2c2c; }
.ldm-kpi--min  .ldm-kpi-sub { color: #1e40af; }
.ldm-kpi--avg  .ldm-kpi-sub { color: #166534; }

/* ============================================================
   Weather Panel — Realistic sky with animated clouds
   ============================================================ */
.ldm-wx {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    min-height: 200px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Background image layer */
.ldm-wx::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/weather-bg.jpg') center center / cover no-repeat;
    z-index: 0;
}

/* Dark overlay for text readability */
.ldm-wx::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 20, 50, 0.70) 0%,
        rgba(0, 15, 45, 0.60) 40%,
        rgba(0, 10, 35, 0.75) 100%
    );
    z-index: 0;
}

/* ---- Atmospheric mist layers — gentle wandering glows ---- */
.ldm-wx-haze {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.ldm-wx-haze__layer {
    position: absolute;
    border-radius: 50%;
}

.ldm-wx-haze--1 {
    width: 60%;
    height: 120%;
    top: -30%;
    right: -10%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.18) 0%, transparent 60%);
    filter: blur(30px);
    animation: ldm-haze-wander-1 20s ease-in-out infinite;
}

.ldm-wx-haze--2 {
    width: 50%;
    height: 100%;
    bottom: -25%;
    left: -8%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.14) 0%, transparent 55%);
    filter: blur(35px);
    animation: ldm-haze-wander-2 25s ease-in-out infinite;
    animation-delay: -8s;
}

.ldm-wx-haze--3 {
    width: 40%;
    height: 80%;
    top: 10%;
    left: 20%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.10) 0%, transparent 55%);
    filter: blur(25px);
    animation: ldm-haze-wander-3 30s ease-in-out infinite;
    animation-delay: -15s;
}

@keyframes ldm-haze-wander-1 {
    0%   { transform: translate(0, 0) scale(1);      opacity: 0.5; }
    25%  { transform: translate(-15px, 8px) scale(1.06); opacity: 0.8; }
    50%  { transform: translate(-25px, 3px) scale(1.02); opacity: 0.6; }
    75%  { transform: translate(-10px, 10px) scale(1.08); opacity: 0.9; }
    100% { transform: translate(0, 0) scale(1);      opacity: 0.5; }
}

@keyframes ldm-haze-wander-2 {
    0%   { transform: translate(0, 0) scale(1);      opacity: 0.4; }
    30%  { transform: translate(18px, -6px) scale(1.05); opacity: 0.7; }
    60%  { transform: translate(8px, -12px) scale(1.02); opacity: 0.5; }
    100% { transform: translate(0, 0) scale(1);      opacity: 0.4; }
}

@keyframes ldm-haze-wander-3 {
    0%   { transform: translate(0, 0) scale(1);      opacity: 0.3; }
    20%  { transform: translate(10px, 5px) scale(1.07); opacity: 0.6; }
    50%  { transform: translate(-5px, 8px) scale(1.03); opacity: 0.4; }
    80%  { transform: translate(8px, -3px) scale(1.06); opacity: 0.7; }
    100% { transform: translate(0, 0) scale(1);      opacity: 0.3; }
}

/* ---- Drifting cloud wisps — soft, slow, organic ---- */
.ldm-wx-clouds {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.ldm-wx-cloud {
    position: absolute;
    background: rgba(255,255,255,0.22);
    border-radius: 50%;
}

.ldm-wx-cloud::before,
.ldm-wx-cloud::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.20);
}

/* Cloud 1 — large foreground cumulus */
.ldm-wx-cloud--1 {
    width: 200px;
    height: 55px;
    border-radius: 100px;
    top: 12%;
    left: -14%;
    filter: blur(14px);
    animation: ldm-drift 140s linear infinite, ldm-sway-a 18s ease-in-out infinite;
}
.ldm-wx-cloud--1::before {
    width: 85px; height: 68px;
    top: -32px; left: 35px;
    filter: blur(10px);
}
.ldm-wx-cloud--1::after {
    width: 62px; height: 50px;
    top: -22px; left: 105px;
    filter: blur(12px);
}

/* Cloud 2 — high thin wisp */
.ldm-wx-cloud--2 {
    width: 150px;
    height: 35px;
    border-radius: 80px;
    top: 4%;
    left: -10%;
    filter: blur(16px);
    opacity: 0.7;
    animation: ldm-drift 180s linear infinite, ldm-sway-b 22s ease-in-out infinite;
    animation-delay: -60s, -8s;
}
.ldm-wx-cloud--2::before {
    width: 58px; height: 45px;
    top: -22px; left: 25px;
    filter: blur(11px);
}
.ldm-wx-cloud--2::after {
    width: 44px; height: 35px;
    top: -16px; left: 75px;
    filter: blur(13px);
}

/* Cloud 3 — mid layer puff */
.ldm-wx-cloud--3 {
    width: 170px;
    height: 42px;
    border-radius: 90px;
    top: 48%;
    left: -12%;
    filter: blur(15px);
    opacity: 0.6;
    animation: ldm-drift 160s linear infinite, ldm-sway-a 20s ease-in-out infinite;
    animation-delay: -90s, -5s;
}
.ldm-wx-cloud--3::before {
    width: 68px; height: 52px;
    top: -26px; left: 30px;
    filter: blur(10px);
}
.ldm-wx-cloud--3::after {
    width: 50px; height: 40px;
    top: -18px; left: 90px;
    filter: blur(12px);
}

/* Cloud 4 — low horizon haze */
.ldm-wx-cloud--4 {
    width: 220px;
    height: 32px;
    border-radius: 120px;
    top: 76%;
    left: -16%;
    filter: blur(18px);
    opacity: 0.45;
    animation: ldm-drift 200s linear infinite, ldm-sway-b 24s ease-in-out infinite;
    animation-delay: -120s, -10s;
}
.ldm-wx-cloud--4::before {
    width: 75px; height: 38px;
    top: -16px; left: 50px;
    filter: blur(14px);
}
.ldm-wx-cloud--4::after {
    width: 60px; height: 30px;
    top: -12px; left: 135px;
    filter: blur(15px);
}

/* Single slow drift — 140-200s to cross screen */
@keyframes ldm-drift {
    0%   { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 300px)); }
}

/* Gentle vertical float */
@keyframes ldm-sway-a {
    0%, 100% { margin-top: 0; }
    35%      { margin-top: -5px; }
    70%      { margin-top: 3px; }
}
@keyframes ldm-sway-b {
    0%, 100% { margin-top: 0; }
    40%      { margin-top: 4px; }
    75%      { margin-top: -4px; }
}

/* ---- Content sits above clouds ---- */
.ldm-wx-content {
    position: relative;
    z-index: 2;
    padding: 28px 30px 24px;
}

/* ---- Top bar: location + date ---- */
.ldm-wx-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.ldm-wx-location {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ldm-wx-location svg {
    opacity: 0.8;
    flex-shrink: 0;
}

.ldm-wx-loc-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ldm-wx-loc-coords {
    font-size: 11px;
    color: rgba(255,255,255,0.60);
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ldm-wx-meta {
    text-align: right;
    flex-shrink: 0;
}

.ldm-wx-date {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ldm-wx-src {
    font-size: 10px;
    color: rgba(255,255,255,0.60);
    margin-top: 3px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ---- Hero: big temperature + condition ---- */
.ldm-wx-hero {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 28px;
}

.ldm-wx-hero-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.ldm-wx-hero-icon svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
    stroke-width: 1.5;
    fill: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.ldm-wx-hero-temp {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.ldm-wx-hero-temp sup {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0;
    vertical-align: super;
}

.ldm-wx-hero-details {
    padding-bottom: 8px;
}

.ldm-wx-hero-condition {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.ldm-wx-hero-range {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.80);
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ---- Frosted glass stat cards grid ---- */
.ldm-wx-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ldm-wx-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 20px 18px;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.10);
}

.ldm-wx-card:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.15);
}

.ldm-wx-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.ldm-wx-card-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.10);
}

.ldm-wx-card-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    fill: none;
    stroke: #fff;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

.ldm-wx-card-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ldm-wx-card-val {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 6px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.ldm-wx-card-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.90);
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

/* When no weather data is available, the section is simply not rendered */

/* Chart Container */
.ldm-public-chart-container {
    background: #fff;
    border: 1px solid var(--ldm-gray-200);
    border-radius: var(--ldm-border-radius);
    padding: 24px;
    margin-bottom: 30px;
}

/* ============================================================
   Shadcn-style Tabs
   ============================================================ */
.ldm-tabs {
    margin-bottom: 20px;
}

.ldm-tabs-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--ldm-gray-100);
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.ldm-tab-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ldm-gray-600);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
    font-family: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldm-tab-trigger:hover {
    color: var(--ldm-gray-900);
}

.ldm-tab-trigger.ldm-tab-active {
    background: #fff;
    color: var(--ldm-gray-900);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

.ldm-tab-panel-custom {
    margin-top: 16px;
}

/* Chart title block (main title + mode badge) */
.ldm-chart-title-block {
    margin-bottom: 14px;
}

.ldm-chart-main-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ldm-gray-900);
    margin-bottom: 6px;
}

/* Mode indicator badge */
.ldm-chart-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.ldm-chart-mode-badge--single {
    background: #e8f0fe;
    color: #1967d2;
}

.ldm-chart-mode-badge--overlay {
    background: #e8f0fe;
    color: #1967d2;
}

.ldm-chart-mode-badge--band {
    background: #fef7e0;
    color: #ea8600;
}

.ldm-chart-mode-badge--summary {
    background: #e6f4ea;
    color: #137333;
}

.ldm-chart-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.ldm-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ldm-filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ldm-gray-700);
}

.ldm-filter-group input[type="date"] {
    padding: 10px 14px;
    border: 1px solid var(--ldm-gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.ldm-chart-filters .ldm-btn {
    height: 42px;
    margin-bottom: 0;
}

/* Chart loading spinner */
.ldm-chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    color: var(--ldm-gray-500);
    font-size: 14px;
}

.ldm-chart-loading svg {
    animation: spin 1s linear infinite;
}

.ldm-chart-wrapper {
    position: relative;
    background: #fff;
    border-radius: var(--ldm-border-radius);
}

/* Buttons */
.ldm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--ldm-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.ldm-btn-primary {
    background: var(--ldm-primary);
    color: #fff;
}

.ldm-btn-primary:hover {
    background: var(--ldm-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--ldm-box-shadow-hover);
}

.ldm-public-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--ldm-gray-100);
    color: var(--ldm-gray-800);
    border: none;
    border-radius: var(--ldm-border-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ldm-public-btn:hover {
    background: var(--ldm-gray-200);
    color: var(--ldm-gray-900);
}

/* Table */
.ldm-public-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid var(--ldm-gray-200);
    border-radius: var(--ldm-border-radius);
    background: #fff;
}

.ldm-public-table {
    width: 100%;
    border-collapse: collapse;
}

.ldm-public-table thead {
    background: var(--ldm-gray-50);
}

.ldm-public-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--ldm-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--ldm-gray-200);
}

.ldm-public-table td {
    padding: 16px;
    border-bottom: 1px solid var(--ldm-gray-200);
    font-size: 14px;
    color: var(--ldm-gray-800);
}

.ldm-public-table tbody tr:hover {
    background: var(--ldm-gray-50);
}

.ldm-public-load-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--ldm-primary);
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

/* No Data */
.ldm-public-no-data {
    text-align: center;
    padding: 60px 20px !important;
}

.ldm-public-no-data svg {
    color: var(--ldm-gray-400);
    margin-bottom: 16px;
}

.ldm-public-no-data p {
    color: var(--ldm-gray-600);
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.ldm-public-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.ldm-public-page-info {
    font-size: 14px;
    color: var(--ldm-gray-600);
}

/* Responsive */
@media (max-width: 768px) {
    .ldm-public-stats {
        grid-template-columns: 1fr;
    }

    .ldm-stats-grid {
        grid-template-columns: 1fr;
    }

    .ldm-chart-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .ldm-tabs-list {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }

    .ldm-tab-trigger {
        padding: 8px 10px;
        font-size: 12px;
        white-space: normal;
        text-align: center;
    }

    .ldm-tab-panel-custom {
        margin-top: 12px;
    }

    .ldm-filter-group input[type="date"],
    .ldm-chart-filters .ldm-btn {
        width: 100%;
    }

    .ldm-public-chart-container {
        padding: 16px;
    }

    .ldm-wx-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ldm-wx-topbar {
        flex-direction: column;
        gap: 8px;
    }

    .ldm-wx-meta { text-align: left; }

    .ldm-wx-hero {
        flex-wrap: wrap;
        gap: 16px;
    }

    .ldm-wx-hero-temp {
        font-size: 44px;
    }
}

@media (max-width: 480px) {
    .ldm-public-chart-container {
        padding: 12px;
    }

    .ldm-tab-trigger {
        padding: 7px 6px;
        font-size: 11px;
    }

    .ldm-wx-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ldm-wx-content {
        padding: 20px 18px 18px;
    }

    .ldm-wx-hero-temp {
        font-size: 40px;
    }

    .ldm-wx-hero-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .ldm-wx-hero-icon svg {
        width: 32px;
        height: 32px;
    }
}