/* --- GLOBAL RESET TO PROTECT FROM THEME INTERFERENCE --- */
.live-weathers-card,
.live-weathers-card *,
.live-weathers-card *::before,
.live-weathers-card *::after {
    box-sizing: border-box !important;
}

.live-weathers-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    border: 1px solid rgba(81, 96, 111, 0.14);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(78, 161, 255, 0.18), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
    box-shadow: 0 18px 40px rgba(30, 42, 56, 0.10);
    font-family: inherit;
    animation: liveWeathersFadeIn 0.45s ease-out both;
    overflow: hidden; 
}

/* Layout Variations */
.live-weathers-card--large { max-width: 100%; padding: 32px; }
.live-weathers-card--large .live-weathers-card__title { font-size: 36px; }
.live-weathers-card--large .live-weathers-card__icon { font-size: 64px; }
.live-weathers-card--large .live-weathers-card__stats { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 20px; margin-top: 32px; }

.live-weathers-card--compact { max-width: 280px; padding: 16px; }
.live-weathers-card--compact .live-weathers-card__title { font-size: 20px; }
.live-weathers-card--compact .live-weathers-card__icon { font-size: 32px; }
.live-weathers-card--compact .live-weathers-card__stats { grid-template-columns: 1fr !important; gap: 8px; margin-top: 12px; }

.live-weathers-card--banner { max-width: 100%; padding: 30px; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 40px; }
.live-weathers-card--banner .live-weathers-card__header { flex: 0 0 300px; margin-bottom: 0; }
.live-weathers-card--banner .live-weathers-card__stats { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important; margin-top: 0; gap: 20px 30px; }
.live-weathers-card--banner .live-weathers-card__daily { display: none; }
.live-weathers-card--banner .live-weathers-card__powered { position: absolute; bottom: 12px; right: 20px; margin-top: 0; font-size: 10px; }

.live-weathers-card__orb {
    position: absolute;
    top: -36px;
    right: -36px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(110, 190, 255, 0.28), rgba(110, 190, 255, 0));
    filter: blur(1px);
    animation: liveWeathersFloat 6s ease-in-out infinite;
}

.live-weathers-card__header { display: flex !important; flex-direction: row !important; justify-content: space-between; gap: 16px; align-items: flex-start; position: relative; z-index: 10; }
.live-weathers-card__header > div { min-width: 0; flex: 1 !important; }
.live-weathers-card__eyebrow { font-size: 14px; color: #51606f; text-transform: uppercase; letter-spacing: 0.08em; }
.live-weathers-card__title { margin: 6px 0 0; font-size: 32px; line-height: 1.1; font-weight: 900; }
.live-weathers-card__subtitle { margin: 4px 0 0; font-size: 16px; font-weight: 600; }
.live-weathers-card__logo img { display: block; max-width: 180px; max-height: 50px; height: auto; }

.standalone-agri-header .live-weathers-card__title { font-size: 36px; letter-spacing: -0.02em; }
.standalone-agri-header .live-weathers-card__subtitle { font-size: 18px; opacity: 0.9; }

/* SEARCH BAR */
.lw-location-search { position: relative; display: flex; width: 100%; max-width: 320px; margin: 15px 0; background: #ffffff !important; border: 2px solid #e2e8f0 !important; border-radius: 12px; padding: 4px 6px 4px 14px; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.05); z-index: 50; }
.lw-location-search:focus-within { box-shadow: 0 6px 20px rgba(0,0,0,0.1); border-color: #6ebeff !important; }
.lw-location-input { background: transparent !important; border: none !important; box-shadow: none !important; padding: 8px 0 !important; font-size: 14px !important; width: 100%; color: #1e2a38; margin: 0 !important; }
.lw-location-input:focus { outline: none !important; }
.lw-location-search-btn { background: #f1f5f9; border: none; border-radius: 8px; cursor: pointer; padding: 6px 12px; font-size: 14px; transition: background 0.2s; margin: 0 !important; }
.lw-location-search-btn:hover { background: #e2e8f0; }

.lw-search-results { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; min-width: 280px; background: #ffffff !important; border-radius: 12px; border: 1px solid rgba(0,0,0,0.1); box-shadow: 0 20px 50px rgba(0,0,0,0.3) !important; z-index: 99999 !important; max-height: 250px; overflow-y: auto; display: none; }
.lw-search-result-item { padding: 12px 16px; font-size: 14px; cursor: pointer; border-bottom: 1px solid #f1f5f9; color: #1e2a38; line-height: 1.4; background: #ffffff; text-align: left;}
.lw-search-result-item:last-child { border-bottom: none; }
.lw-search-result-item:hover { background: #f8fafc; color: #6ebeff; }

/* ICONS & ANIMATIONS */
.live-weathers-card__summary { margin: 6px 0 0; color: #51606f; font-weight: 600; }
.live-weathers-card__icon { font-size: 40px; line-height: 1; display: inline-block; animation: liveWeathersPulse 5s ease-in-out infinite; position: relative; z-index: 10; }

@keyframes liveWeathersRain { 0% { transform: translateY(-3px); } 50% { transform: translateY(3px); } 100% { transform: translateY(-3px); } }
@keyframes liveWeathersSun { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes liveWeathersSnow { 0% { transform: translate(0, -3px) rotate(0deg); } 50% { transform: translate(2px, 3px) rotate(10deg); } 100% { transform: translate(0, -3px) rotate(0deg); } }
@keyframes liveWeathersCloud { 0% { transform: translateX(-2px); } 50% { transform: translateX(2px); } 100% { transform: translateX(-2px); } }

/* FULL BACKGROUND EFFECTS */
.live-weathers-card__fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; border-radius: inherit; opacity: 1; }
.lw-fx-element { position: absolute; background: white; opacity: 0.4; }
@keyframes weatherBgPan { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.live-weathers-card.is-thunder { background: linear-gradient(120deg, #1e293b, #334155, #0f172a, #1e293b) !important; background-size: 200% 200% !important; animation: liveWeathersFadeIn 0.45s ease-out both, weatherBgPan 6s ease infinite !important; border-color: rgba(255,255,255,0.1); }
.live-weathers-card.is-fog { background: linear-gradient(120deg, #e2e8f0, #cbd5e1, #94a3b8, #e2e8f0) !important; background-size: 200% 200% !important; animation: liveWeathersFadeIn 0.45s ease-out both, weatherBgPan 25s ease infinite !important; }
.live-weathers-card.is-sunny { background: linear-gradient(120deg, #fffcf5, #fff6e0, #ffe6a0, #fffcf5) !important; background-size: 200% 200% !important; animation: liveWeathersFadeIn 0.45s ease-out both, weatherBgPan 15s ease infinite !important; border-color: rgba(255, 193, 7, 0.2); }
.live-weathers-card.is-rainy { background: linear-gradient(120deg, #f2f5f8, #e8eef3, #d0dce5, #f2f5f8) !important; background-size: 200% 200% !important; animation: liveWeathersFadeIn 0.45s ease-out both, weatherBgPan 10s ease infinite !important; border-color: rgba(81, 113, 138, 0.2); }
.live-weathers-card.is-cloudy { background: linear-gradient(120deg, #f8fafc, #f1f5f9, #e2e8f0, #f8fafc) !important; background-size: 200% 200% !important; animation: liveWeathersFadeIn 0.45s ease-out both, weatherBgPan 20s ease infinite !important; border-color: rgba(148, 163, 184, 0.2); }
.live-weathers-card.is-snowy { background: radial-gradient(circle at top right, rgba(226, 232, 240, 0.5), transparent 40%), linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); border-color: rgba(226, 232, 240, 0.6); }

.is-rainy .live-weathers-card__icon { animation: liveWeathersRain 1.5s ease-in-out infinite; }
.is-sunny .live-weathers-card__icon { animation: liveWeathersSun 20s linear infinite; filter: drop-shadow(0 0 10px rgba(255, 200, 0, 0.4)); }
.is-snowy .live-weathers-card__icon { animation: liveWeathersSnow 3s ease-in-out infinite; }
.is-cloudy .live-weathers-card__icon { animation: liveWeathersCloud 4s ease-in-out infinite; }

.is-rainy .live-weathers-card__fx, .is-thunder .live-weathers-card__fx { background: linear-gradient(180deg, rgba(75, 106, 138, 0.2) 0%, rgba(140, 155, 165, 0.05) 100%); }
.is-rainy .lw-fx-element, .is-thunder .lw-fx-element { width: 2px; height: 15px; background: linear-gradient(to bottom, rgba(110,190,255,0), rgba(110,190,255,0.8)); animation: lwRainFall 0.8s linear infinite; }
@keyframes lwRainFall { 0% { transform: translateY(-100px) rotate(15deg); } 100% { transform: translateY(500px) rotate(15deg); } }

.is-cloudy .live-weathers-card__fx { background: linear-gradient(180deg, rgba(148, 163, 184, 0.15) 0%, transparent 100%); }
.is-cloudy .lw-fx-element { width: 100px; height: 40px; background: rgba(255, 255, 255, 0.15); border-radius: 50px; filter: blur(15px); animation: lwCloudDrift 15s linear infinite; }
@keyframes lwCloudDrift { 0% { transform: translateX(-150px); } 100% { transform: translateX(500px); } }

.is-sunny .live-weathers-card__fx { background: radial-gradient(circle at top right, rgba(255, 193, 7, 0.15) 0%, transparent 70%); }
.is-sunny .live-weathers-card__fx::before { content: ''; position: absolute; top: -50px; right: -50px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255, 220, 0, 0.2), transparent 70%); animation: lwSunPulse 4s ease-in-out infinite; }
@keyframes lwSunPulse { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.2); opacity: 0.8; } }

.is-windy .lw-fx-element { width: 60px; height: 2px; background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent); animation: lwWindFlow 2s linear infinite; }
@keyframes lwWindFlow { 0% { transform: translateX(-100px); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateX(500px); opacity: 0; } }

/* ============================================================== */
/* PERFECTED UNIFIED DARK THEME (Night Mode, Admin Dark, OS Dark) */
/* ============================================================== */
.live-weathers-card.is-night,
.live-weathers-card.is-dark {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    border-color: #334155 !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4) !important;
}

.live-weathers-card.is-night .live-weathers-card__title, 
.live-weathers-card.is-night .lw-location-display, 
.live-weathers-card.is-night .live-weathers-card__value,
.live-weathers-card.is-dark .live-weathers-card__title, 
.live-weathers-card.is-dark .lw-location-display, 
.live-weathers-card.is-dark .live-weathers-card__value { 
    color: #f8fafc !important; 
}

.live-weathers-card.is-night .live-weathers-card__eyebrow, 
.live-weathers-card.is-night .live-weathers-card__label, 
.live-weathers-card.is-night .live-weathers-card__summary, 
.live-weathers-card.is-night .lw-vital-item span,
.live-weathers-card.is-night .lw-forecast-day,
.live-weathers-card.is-dark .live-weathers-card__eyebrow, 
.live-weathers-card.is-dark .live-weathers-card__label, 
.live-weathers-card.is-dark .live-weathers-card__summary, 
.live-weathers-card.is-dark .lw-vital-item span,
.live-weathers-card.is-dark .lw-forecast-day { 
    color: #94a3b8 !important; 
}

.live-weathers-card.is-night .lw-vital-item strong,
.live-weathers-card.is-night .lw-forecast-temps,
.live-weathers-card.is-dark .lw-vital-item strong,
.live-weathers-card.is-dark .lw-forecast-temps { 
    color: #e2e8f0 !important; 
}

.live-weathers-card.is-night .lw-forecast-temps span,
.live-weathers-card.is-dark .lw-forecast-temps span { 
    color: #64748b !important; 
}

.live-weathers-card.is-night .lw-expert-vitals,
.live-weathers-card.is-night .lw-forecast-item,
.live-weathers-card.is-dark .lw-expert-vitals,
.live-weathers-card.is-dark .lw-forecast-item { 
    background: rgba(255,255,255,0.05) !important; 
    border-color: rgba(255,255,255,0.1) !important; 
}

.live-weathers-card.is-night .lw-forecast-row,
.live-weathers-card.is-dark .lw-forecast-row { 
    border-top-color: rgba(255,255,255,0.1) !important; 
}

.live-weathers-card.is-night .lw-forecast-item:hover,
.live-weathers-card.is-dark .lw-forecast-item:hover { 
    background: rgba(255,255,255,0.1) !important; 
    box-shadow: none !important; 
}

.live-weathers-card.is-night .live-weathers-card__orb,
.live-weathers-card.is-dark .live-weathers-card__orb { 
    background: radial-gradient(circle, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0)) !important; 
}

.live-weathers-card.is-night .live-weathers-card__daily span,
.live-weathers-card.is-dark .live-weathers-card__daily span { 
    background: rgba(255, 255, 255, 0.1) !important; 
    color: #cbd5e1 !important; 
}

/* Twinkling Stars for Night Mode */
.live-weathers-card.is-night .live-weathers-card__fx::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 90px 40px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.8), rgba(0,0,0,0));
    background-repeat: repeat; background-size: 200px 200px;
    opacity: 0.5; animation: lwStarsTwinkle 4s infinite alternate;
}
@keyframes lwStarsTwinkle { 0% { opacity: 0.2; } 100% { opacity: 0.7; } }

/* Light Custom Colors */
.live-weathers-card.is-light { background: #ffffff; color: #333333; border-color: #e2e8f0; }
.live-weathers-card.is-light .live-weathers-card__orb { background: radial-gradient(circle, rgba(226, 232, 240, 0.4), rgba(226, 232, 240, 0)); }
.live-weathers-card.is-light .live-weathers-card__eyebrow, .live-weathers-card.is-light .live-weathers-card__summary, .live-weathers-card.is-light .live-weathers-card__label, .live-weathers-card.is-light .live-weathers-card__updated { color: #64748b; }
.live-weathers-card.is-light .live-weathers-card__daily span { background: rgba(241, 245, 249, 1); color: #475569; }

.live-weathers-card.is-custom { background: linear-gradient(180deg, var(--lw-bg-top) 0%, var(--lw-bg-bot) 100%); color: var(--lw-text); }
.live-weathers-card.is-custom .live-weathers-card__orb { background: radial-gradient(circle, var(--lw-orb) 40%, transparent 100%); }
.live-weathers-card.is-custom .live-weathers-card__icon { color: var(--lw-icon); }
.live-weathers-card.is-custom .live-weathers-card__eyebrow, .live-weathers-card.is-custom .live-weathers-card__summary, .live-weathers-card.is-custom .live-weathers-card__label, .live-weathers-card.is-custom .live-weathers-card__updated { opacity: 0.8; color: var(--lw-text); }
.live-weathers-card.is-custom .live-weathers-card__daily span { background: rgba(128, 128, 128, 0.15); color: var(--lw-text); }

/* System Preference Theme */
@media (prefers-color-scheme: dark) {
    .live-weathers-card.is-system { background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important; border-color: #334155 !important; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4) !important; }
    .live-weathers-card.is-system .live-weathers-card__title, .live-weathers-card.is-system .lw-location-display, .live-weathers-card.is-system .live-weathers-card__value { color: #f8fafc !important; }
    .live-weathers-card.is-system .live-weathers-card__eyebrow, .live-weathers-card.is-system .live-weathers-card__label, .live-weathers-card.is-system .live-weathers-card__summary, .live-weathers-card.is-system .lw-vital-item span, .live-weathers-card.is-system .lw-forecast-day { color: #94a3b8 !important; }
    .live-weathers-card.is-system .lw-vital-item strong, .live-weathers-card.is-system .lw-forecast-temps { color: #e2e8f0 !important; }
    .live-weathers-card.is-system .lw-forecast-temps span { color: #64748b !important; }
    .live-weathers-card.is-system .lw-expert-vitals, .live-weathers-card.is-system .lw-forecast-item { background: rgba(255,255,255,0.05) !important; border-color: rgba(255,255,255,0.1) !important; }
    .live-weathers-card.is-system .lw-forecast-row { border-top-color: rgba(255,255,255,0.1) !important; }
    .live-weathers-card.is-system .lw-forecast-item:hover { background: rgba(255,255,255,0.1) !important; box-shadow: none !important; }
    .live-weathers-card.is-system .live-weathers-card__orb { background: radial-gradient(circle, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0)) !important; }
    .live-weathers-card.is-system .live-weathers-card__daily span { background: rgba(255, 255, 255, 0.1) !important; color: #cbd5e1 !important; }
}
@media (prefers-color-scheme: light) {
    .live-weathers-card.is-system { background: #ffffff; color: #333333; border-color: #e2e8f0; }
    .live-weathers-card.is-system .live-weathers-card__orb { background: radial-gradient(circle, rgba(226, 232, 240, 0.4), rgba(226, 232, 240, 0)); }
    .live-weathers-card.is-system .live-weathers-card__eyebrow, .live-weathers-card.is-system .live-weathers-card__summary, .live-weathers-card.is-system .live-weathers-card__label, .live-weathers-card.is-system .live-weathers-card__updated { color: #64748b; }
    .live-weathers-card.is-system .live-weathers-card__daily span { background: rgba(241, 245, 249, 1); color: #475569; }
}
/* ============================================================== */

/* MAIN STATS */
.live-weathers-card__stats { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 15px !important; margin-top: 18px; position: relative; z-index: 10; }
.live-weathers-card__stats > div { min-width: 0 !important; overflow: hidden !important; text-align: left; }
.live-weathers-card__label { font-size: 13px; font-weight: 500; color: #51606f; display: flex; align-items: center; gap: 4px; white-space: normal !important; margin-bottom: 2px; line-height: 1.2 !important; }
.live-weathers-card__label span.lw-emoji { font-size: 18px; flex-shrink: 0; }
.live-weathers-card__value { font-size: 24px; font-weight: 800; color: #1e2a38; white-space: nowrap !important; line-height: 1.1; display: flex; align-items: center; gap: 5px; margin: 0 !important;}

/* FORECAST ROW UI */
.lw-forecast-row { display: flex !important; flex-direction: row !important; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(0,0,0,0.05); position: relative; z-index: 10; }
.lw-forecast-item { flex: 1 !important; min-width: 0 !important; text-align: center; background: rgba(255,255,255,0.4); padding: 12px 5px; border-radius: 12px; transition: transform 0.2s; border: 1px solid rgba(0,0,0,0.03); }
.lw-forecast-item:hover { transform: translateY(-2px); background: #ffffff; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.lw-forecast-day { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #51606f; margin-bottom: 5px; }
.lw-forecast-icon { font-size: 22px; margin: 4px 0; }
.lw-forecast-temps { font-size: 14px; font-weight: 800; color: #1e2a38; }
.lw-forecast-temps span { color: #8c9ba5; font-weight: 600; font-size: 12px; margin-left: 4px; }

.live-weathers-card__powered { margin-top: 16px; font-size: 11px; color: #8c9ba5; text-align: right; position: relative; z-index: 1; }
.live-weathers-card__powered a { color: #6ebeff; text-decoration: none; font-weight: 600; }
.live-weathers-card__powered a:hover { text-decoration: underline; }

.live-weathers-card__daily span, .live-weathers-dashboard-widget__meta, .live-weathers-admin__hero-label, .live-weathers-tabs__tab { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

.live-weathers--error { max-width: 420px; padding: 18px 20px; border-radius: 16px; border: 1px solid #e2b8b8; background: #fff7f7; color: #8a2c2c; }
.live-weathers--error strong { display: block; margin-bottom: 6px; }

/* Admin Grid Fixes */
.live-weathers-admin { --live-weathers-panel: #ffffff; --live-weathers-panel-border: rgba(81, 96, 111, 0.14); color: #1f2933; }
.live-weathers-admin__hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 320px); gap: 20px; align-items: stretch; margin: 18px 0 20px; }
.live-weathers-admin__eyebrow { margin: 0 0 8px; color: #51606f; }
.live-weathers-admin__hero-card, .live-weathers-admin__panel { padding: 18px; border: 1px solid var(--live-weathers-panel-border); border-radius: 18px; background: var(--live-weathers-panel); box-shadow: 0 14px 30px rgba(30, 42, 56, 0.06); }
.live-weathers-admin__hero-card { background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%); }
.live-weathers-admin__hero-value { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.live-weathers-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.live-weathers-tabs__tab { padding: 10px 14px; border-radius: 999px; background: rgba(81, 96, 111, 0.08); color: #51606f; }
.live-weathers-tabs__tab.is-active { background: #1e3346; color: #ffffff; }
.live-weathers-admin__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 20px; }

@keyframes liveWeathersFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes liveWeathersFloat { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, 6px, 0); } }
@keyframes liveWeathersPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* --- AGGRESSIVE MOBILE RESETS (Protect from Theme Constraints) --- */
@media (max-width: 480px) {
    /* Solid White default fallback ONLY for day/default cards to stop transparency bleed */
    .live-weathers-card.is-default, .live-weathers-card.is-light {
        background: #ffffff !important;
    }

    .live-weathers-card { 
        padding: 16px !important; 
        margin: 15px auto !important; 
    }
    
    .live-weathers-card__header { flex-direction: column !important; text-align: center !important; }
    .live-weathers-card__title { font-size: 24px !important; text-align: center !important; }
    .live-weathers-card__eyebrow { text-align: center !important; }
    
    .lw-location-search { margin: 15px auto !important; } 

    /* Forced Horizontal Scroll for Tabs */
    .lw-agri-tabs { 
        display: flex !important; 
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch !important; 
        padding-bottom: 8px !important; 
        gap: 8px !important; 
        justify-content: flex-start !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    .lw-agri-tabs::-webkit-scrollbar { display: none !important; }
    
    /* Lock Button Widths */
    .lw-agri-tab { 
        flex: 0 0 auto !important; 
        width: auto !important;
        white-space: nowrap !important;
        padding: 8px 14px !important; 
        font-size: 12px !important; 
        margin: 0 !important;
    }

    /* Prevent Stat Wrapping */
    .live-weathers-card__stats { 
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
        gap: 10px !important; 
    }
    .live-weathers-card__value { font-size: 18px !important; }
    .live-weathers-card__label { font-size: 11px !important; white-space: normal !important; line-height: 1.2 !important;}
    
    /* Vitals Grid Reflow */
    .lw-vitals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .lw-vitals-grid > div { min-width: 0 !important; text-align: left !important; }
    .lw-vitals-grid > div:last-child { grid-column: span 2 !important; text-align: center !important; }
    
    /* 3-Day Forecast Shrink */
    .lw-forecast-row { gap: 5px !important; }
    .lw-forecast-item { padding: 8px 4px !important; }
    .lw-forecast-day { font-size: 10px !important; }
    .lw-forecast-icon { font-size: 18px !important; }
    .lw-forecast-temps { font-size: 12px !important; }
    
    /* Action Plan Flex Resets to stop word wrapping */
    .lw-agri-action-item { 
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 12px !important; 
        margin-bottom: 12px !important; 
    }
    .lw-agri-action-item > div {
        flex: 1 !important; 
        min-width: 0 !important; 
        word-wrap: break-word !important;
        text-align: left !important;
    }
    .lw-agri-action-header { flex-wrap: nowrap !important; gap: 10px !important; }
    .lw-agri-seriousness { flex-shrink: 0 !important; white-space: nowrap !important; }
    
    .lw-risk-meter { padding: 12px !important; flex-direction: column !important; gap: 8px !important; text-align: center !important; }
}

@media (max-width: 768px) {
    .live-weathers-admin__hero, .live-weathers-admin__grid { grid-template-columns: 1fr; }
}

.lw-detecting { font-size: 16px; opacity: 0.8; color: #6ebeff; animation: lwPulseDetect 1.5s ease-in-out infinite; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
@keyframes lwPulseDetect { 0% { opacity: 0.6; transform: translateX(0); } 50% { opacity: 1; transform: translateX(5px); } 100% { opacity: 0.6; transform: translateX(0); } }

.lw-agri-section-divider { display: flex; align-items: center; margin: 30px 0 25px 0; text-align: center; position: relative; z-index: 10;}
.lw-agri-section-divider::before, .lw-agri-section-divider::after { content: ''; flex: 1; border-bottom: 1px solid rgba(0,0,0,0.08); }
.lw-agri-section-divider span { padding: 0 15px; font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; color: #4caf50; white-space: normal; line-height: 1.2;}

.lw-vitals-grid > div { animation: liveWeathersSlideUp 0.6s ease-out both; }
.lw-vitals-grid > div:nth-child(1) { animation-delay: 0.1s; }
.lw-vitals-grid > div:nth-child(2) { animation-delay: 0.2s; }
.lw-vitals-grid > div:nth-child(3) { animation-delay: 0.3s; }
@keyframes liveWeathersSlideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.lw-risk-meter--critical { animation: lwCriticalGlow 2s infinite alternate; }
@keyframes lwCriticalGlow { 0% { box-shadow: inset 0 0 5px rgba(255, 68, 68, 0.2); border-bottom-color: #ff4444; } 100% { box-shadow: inset 0 0 20px rgba(255, 68, 68, 0.4); border-bottom-color: #ff8888; } }
.lw-risk-meter--warning { animation: lwWarningGlow 2s infinite alternate; }
@keyframes lwWarningGlow { 0% { border-bottom-color: #ffbb33; } 100% { border-bottom-color: #ffeb3b; } }

.live-weathers-card__value:has(.lw-emoji) { display: flex; align-items: center; gap: 5px; }

.lw-agri-accuracy-disclaimer::before { content: 'EXPERT CERTIFIED'; display: inline-block; padding: 2px 6px; background: #1e2a38; color: #fff; font-size: 8px; border-radius: 3px; margin-bottom: 8px; font-weight: 900; }
.lw-agri-alert--ai { border: 1px solid rgba(142, 68, 173, 0.2); background: linear-gradient(135deg, #fff 0%, rgba(142, 68, 173, 0.03) 100%); }
.lw-agri-alert--ai:hover { box-shadow: 0 8px 25px rgba(142, 68, 173, 0.1); }

/* --- ENHANCED TYPOGRAPHY FOR VITALS --- */
.lw-expert-vitals { margin-top: 25px; padding: 18px; background: rgba(0, 0, 0, 0.03); border-radius: 12px; border: 1px solid rgba(0, 0, 0, 0.05); position: relative; z-index: 10;}

.lw-vitals-header {
    position: relative;
    display: inline-block;
    font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 18px; padding-bottom: 6px;
    background: linear-gradient(90deg, #334155, #6ebeff, #334155); 
    background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text;
    animation: smartTextShine 3s linear infinite;
}
@keyframes smartTextShine { to { background-position: 200% center; } }
.lw-vitals-header::after { content: ''; position: absolute; bottom: 0; left: 0; height: 2px; background: #6ebeff; border-radius: 2px; animation: smartLinePulse 2s ease-in-out infinite alternate; }
@keyframes smartLinePulse { 0% { width: 15px; opacity: 0.4; box-shadow: 0 0 2px rgba(110, 190, 255, 0.4); } 100% { width: 45px; opacity: 1; box-shadow: 0 0 8px rgba(110, 190, 255, 0.8); } }

.lw-vitals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.lw-vital-item span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #475569; margin-bottom: 4px; }
.lw-vital-item strong { font-size: 16px; font-weight: 900; color: #0f172a; word-break: break-word;}

.lw-agri-ticker { display: flex; overflow: hidden; white-space: nowrap; padding: 8px 15px; background: rgba(0, 0, 0, 0.02); border-top: 1px solid rgba(0, 0, 0, 0.05); }
.lw-agri-ticker span { display: inline-block; padding-left: 100%; animation: lwTicker 25s linear infinite; }
@keyframes lwTicker { 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } }
@keyframes lwShimmer { 0% { background-position: -468px 0; } 100% { background-position: 468px 0; } }

.lw-skeleton { background: #f6f7f8; background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%); background-repeat: no-repeat; background-size: 800px 104px; display: block; line-height: 1; position: relative; overflow: hidden; animation: lwShimmer 1.5s linear infinite forwards; border-radius: 4px; }
.lw-skeleton--title { height: 32px; width: 60%; margin-bottom: 10px; }
.lw-skeleton--text { height: 16px; width: 40%; margin-bottom: 20px; }
.lw-skeleton--grid { height: 80px; width: 100%; border-radius: 12px; }

.lw-error-state { padding: 30px 20px; text-align: center; background: #fff; border-radius: 16px; border: 1px solid #fee2e2; }
.lw-error-icon { font-size: 40px; margin-bottom: 15px; display: block; }
.lw-error-title { font-size: 18px; font-weight: 700; color: #991b1b; margin-bottom: 8px; }
.lw-error-msg { font-size: 14px; color: #7f1d1d; opacity: 0.8; margin-bottom: 20px; }
.lw-retry-btn { background: #ef4444; color: #fff; border: none; padding: 10px 25px; border-radius: 30px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; margin: 0 !important;}
.lw-retry-btn:hover { background: #dc2626; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3); }

/* Agri-Vet-Aqua Dashboard */
.live-weathers-card__agri { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(81, 96, 111, 0.1); position: relative; z-index: 20;}
.lw-agri-tabs { display: flex; gap: 6px; margin-bottom: 16px; position: relative; z-index: 30;}
.lw-agri-tab { flex: 1; padding: 10px 4px; border: none; background: rgba(81, 96, 111, 0.05); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); color: #51606f; font-family: inherit; margin: 0 !important; }
.lw-agri-tab.active { background: #6ebeff; color: white; font-weight: 700; box-shadow: 0 4px 12px rgba(110, 190, 255, 0.3); }
.lw-agri-tab:not(.active):hover { background: rgba(81, 96, 111, 0.08); transform: translateY(-1px); }
.lw-agri-sector { display: none !important; animation: liveWeathersFadeIn 0.3s ease-out; }
.lw-agri-sector.active { display: block !important; }
.lw-agri-alert { padding: 14px; border-radius: 14px; margin-bottom: 12px; border-left: 4px solid #ccc; background: #f8f9fa; }

/* Safe Status Colors */
.lw-agri-alert--safe { background: rgba(0, 200, 81, 0.06); border-left-color: #00c851; }
.lw-agri-alert--safe .lw-agri-alert-badge { background: #00c851; }

.lw-agri-alert--critical { background: rgba(255, 68, 68, 0.06); border-left-color: #ff4444; }
.lw-agri-alert--warning { background: rgba(255, 187, 51, 0.06); border-left-color: #ffbb33; }
.lw-agri-alert--success { background: rgba(0, 200, 81, 0.06); border-left-color: #00c851; }
.lw-agri-alert-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lw-agri-alert-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 800; letter-spacing: 0.05em; color: white; text-transform: uppercase; }
.lw-agri-alert--critical .lw-agri-alert-badge { background: #ff4444; }
.lw-agri-alert--warning .lw-agri-alert-badge { background: #ffbb33; }
.lw-agri-alert--success .lw-agri-alert-badge { background: #00c851; }
.lw-agri-alert--critical { animation: lwAlertPulse 2s infinite; }

.lw-agri-action-plan { background: #fff; border: 1px solid rgba(0,0,0,0.05); border-radius: 16px; padding: 20px; }
.lw-agri-action-title { margin: 0 0 15px 0; font-size: 16px; color: #1e2a38; display: flex; align-items: center; gap: 8px; }
.lw-agri-action-item { padding: 12px; background: rgba(255, 68, 68, 0.05); border-radius: 10px; margin-bottom: 10px; font-size: 14px; line-height: 1.5; border-left: 3px solid #ff4444; }
.lw-agri-action-item--safe { background: rgba(0, 200, 81, 0.05); border-left-color: #00c851; color: #007e33; font-weight: 600; }

.lw-agri-status-bar { margin-bottom: 24px; }
.lw-risk-meter { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #1e2a38; color: white; border-radius: 12px 12px 0 0; border-bottom: 3px solid #00c851; }
.lw-risk-meter--warning { border-bottom-color: #ffbb33; }
.lw-risk-meter--critical { border-bottom-color: #ff4444; }
.lw-risk-level { font-weight: 800; font-size: 11px; letter-spacing: 0.1em; }
.lw-risk-level span { font-size: 15px; margin-left: 8px; }
.lw-risk-meter--critical .lw-risk-level span { color: #ff4444; }
.lw-risk-meter--warning .lw-risk-level span { color: #ffbb33; }
.lw-risk-meter--safe .lw-risk-level span { color: #00c851; }
.lw-risk-accuracy { font-size: 11px; opacity: 0.8; }

.lw-agri-action-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.lw-agri-seriousness { font-size: 10px; font-weight: 900; padding: 4px 10px; background: rgba(255, 68, 68, 0.1); color: #ff4444; border-radius: 20px; }
.lw-agri-action-item { display: flex; gap: 15px; padding: 16px; background: #f8faff; border-radius: 14px; border: 1px solid rgba(0,0,0,0.03); }
.lw-action-icon { font-size: 24px; flex-shrink: 0; }

.lw-agri-accuracy-disclaimer { margin-top: 24px; padding: 15px; background: rgba(0,0,0,0.02); border-radius: 10px; font-size: 11px; line-height: 1.6; color: #8c9ba5; border: 1px dashed rgba(0,0,0,0.1); }
.lw-agri-alert-title { font-size: 15px; font-weight: 800; color: #1e2a38; }
.lw-agri-alert-msg { font-size: 14px; line-height: 1.5; color: #475569; margin-top: 4px; }
.lw-agri-empty { font-size: 13px; text-align: center; color: #8c9ba5; padding: 24px 0; background: rgba(0,0,0,0.02); border-radius: 12px; }

.live-weathers-product--standalone { border-top: 6px solid #4caf50 !important; }
.standalone-agri-header { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.live-weathers-product--standalone .live-weathers-card__agri { margin-top: 0; padding-top: 0; border-top: none; }

.lw-agri-alert { position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; cursor: default; }
.lw-agri-alert:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.lw-agri-alert::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); transform: translateX(-100%); pointer-events: none; }
.lw-agri-alert:hover::before { animation: lwShine 0.8s ease-in-out; }
@keyframes lwShine { 100% { transform: translateX(100%); } }

.lw-ai-actions { display: flex; gap: 8px; }
.lw-ai-btn { background: rgba(142, 68, 173, 0.1); color: #8e44ad; border: 1px solid rgba(142, 68, 173, 0.2); border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 4px; margin: 0 !important; }
.lw-ai-btn:hover { background: #8e44ad; color: #fff; }
.lw-ai-btn:active { transform: scale(0.95); }

@media print {
    body { background: #fff !important; }
    .live-weathers-card { border: none !important; box-shadow: none !important; background: transparent !important; color: #000 !important; }
    .lw-location-search, .lw-agri-tabs, .lw-ai-actions { display: none !important; }
    .lw-agri-sector { display: block !important; margin-bottom: 20px; color: #000 !important; }
    .live-weathers-card__fx, .live-weathers-card__orb { display: none !important; }
}