* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0a1628; color: #e0e8f0; min-height: 100vh; }

/* ── PUBLIC LANDING PAGE ── */
.signin-screen { position: fixed; inset: 0; overflow-y: auto; background: #071421; z-index: 200; color: #e6f3f7; scroll-behavior: smooth; }
.landing-nav { position: sticky; top: 0; z-index: 2; height: 74px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: rgba(7,20,33,.94); border-bottom: 1px solid rgba(125,211,252,.16); backdrop-filter: blur(14px); }
.landing-brand { display: inline-flex; align-items: center; gap: 11px; color: #e6f3f7; font-size: 1.05rem; font-weight: 800; text-decoration: none; }
.landing-brand .logo { width: 40px; height: 40px; }
.landing-actions { display: flex; align-items: center; gap: 18px; }
.landing-login { padding: 8px 14px; border: 1px solid #2d5a8e; border-radius: 5px; background: transparent; color: #e6f3f7; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; }
.landing-login:hover { border-color: #7dd3fc; color: #7dd3fc; }
.landing-signin { color: #7dd3fc; font-size: .8rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid #2d5a8e; padding-bottom: 3px; }
.landing-hero { min-height: calc(100vh - 74px); max-width: 1180px; margin: 0 auto; padding: 72px 24px 58px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); align-items: center; gap: 72px; }
.hero-copy { max-width: 720px; }
.hero-kicker { color: #38bdf8; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; }
.hero-copy h1 { max-width: 680px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(3rem, 6vw, 5.4rem); font-weight: 400; line-height: .98; color: #f4fbfd; }
.hero-lede { max-width: 580px; margin-top: 26px; color: #9bb2bf; font-size: 1.05rem; line-height: 1.7; }
.hero-cta { display: inline-flex; align-items: center; gap: 12px; margin-top: 34px; padding: 14px 18px; background: #35c4df; color: #061522; border-radius: 6px; font-size: .88rem; font-weight: 800; text-decoration: none; }
.hero-cta:hover { background: #7dd3fc; }
.hero-note { margin-top: 10px; color: #617b8b; font-size: .72rem; }
.hero-mark { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #0d2736; background-image: radial-gradient(circle at 1px 1px, rgba(125,211,252,.16) 1px, transparent 0); background-size: 22px 22px; border: 1px solid #1c4c62; border-radius: 8px; box-shadow: 22px 22px 0 #05101b; }
.hero-mark .logo { width: min(220px, 58%); height: auto; filter: drop-shadow(0 18px 32px rgba(0,0,0,.35)); }
.hero-mark strong { margin-top: 22px; color: #f4fbfd; font-family: Georgia, 'Times New Roman', serif; font-size: 2rem; font-weight: 400; }
.hero-mark span { margin-top: 6px; color: #7a9baa; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.landing-features { padding: 96px max(24px, calc((100vw - 1180px) / 2)); background: #e8f2f1; color: #102b35; }
.feature-heading { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: end; margin-bottom: 52px; }
.feature-heading .hero-kicker { margin: 0 0 8px; color: #087996; }
.feature-heading h2, .landing-start h2 { max-width: 700px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.2rem, 4vw, 3.7rem); line-height: 1.04; font-weight: 400; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #9eb9ba; }
.feature-grid article { padding: 26px 26px 10px 0; border-right: 1px solid #b8cecd; }
.feature-grid article + article { padding-left: 26px; }
.feature-grid article:last-child { border-right: 0; }
.feature-number { color: #087996; font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.feature-grid h3 { margin-top: 34px; font-size: 1rem; }
.feature-grid p { margin-top: 12px; color: #4c6a70; font-size: .82rem; line-height: 1.65; }
.landing-start { padding: 96px max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; background: #0c2d3a; }
.landing-start > div > p:last-child { max-width: 520px; margin-top: 20px; color: #91adb7; font-size: .9rem; line-height: 1.7; }
.trial-form { padding: 30px; background: #f4fbfd; color: #102b35; border-radius: 8px; }
.trial-form label { display: block; margin-bottom: 9px; font-size: .76rem; font-weight: 800; }
.trial-fields { display: grid; grid-template-columns: 1fr auto; }
.trial-fields input { min-width: 0; padding: 14px 15px; border: 1px solid #9eb9ba; border-right: 0; border-radius: 5px 0 0 5px; color: #102b35; background: #fff; font: inherit; font-size: .86rem; }
.trial-fields input:focus { outline: 2px solid #35c4df; outline-offset: -2px; }
.trial-fields button { padding: 0 18px; border: 0; border-radius: 0 5px 5px 0; background: #087996; color: #fff; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.trial-fields button:hover { background: #075f77; }
.trial-disclaimer { margin-top: 11px; color: #668087; font-size: .68rem; line-height: 1.5; }
.signin-error { margin-top: 14px; font-size: .78rem; color: #b42318; line-height: 1.45; }
@media (max-width: 820px) {
  .landing-hero { grid-template-columns: 1fr; gap: 48px; padding-top: 52px; }
  .hero-mark { min-height: 330px; box-shadow: 12px 12px 0 #05101b; }
  .feature-heading, .landing-start { grid-template-columns: 1fr; gap: 34px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid article:nth-child(2) { border-right: 0; }
  .feature-grid article:nth-child(n+3) { border-top: 1px solid #b8cecd; }
}
@media (max-width: 520px) {
  .landing-nav { height: 64px; padding: 0 18px; }
  .landing-brand .logo { width: 34px; height: 34px; }
  .landing-brand span { display: none; }
  .landing-actions { gap: 12px; }
  .landing-login { padding: 7px 11px; }
  .landing-hero { min-height: auto; padding: 46px 18px 54px; }
  .hero-copy h1 { font-size: 2.8rem; }
  .hero-mark { min-height: 280px; }
  .landing-features, .landing-start { padding: 70px 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article, .feature-grid article + article { padding: 24px 0; border-right: 0; border-top: 1px solid #b8cecd; }
  .trial-form { padding: 22px; }
  .trial-fields { grid-template-columns: 1fr; gap: 9px; }
  .trial-fields input, .trial-fields button { min-height: 48px; border: 1px solid #9eb9ba; border-radius: 5px; }
}

/* ── HEADER ── */
header { background: linear-gradient(135deg, #0d2240 0%, #1a3a5c 100%); padding: 20px 28px; border-bottom: 1px solid #1e3a5c; display: flex; align-items: center; gap: 16px; }
header svg.logo { width: 36px; height: 36px; flex-shrink: 0; }
header h1 { font-size: 1.4rem; font-weight: 700; color: #7dd3fc; }
header p { font-size: .78rem; color: #94a3b8; margin-top: 2px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 7px; background: #132033; border: 1px solid #1e3a5c; border-radius: 20px; padding: 4px 12px 4px 8px; cursor: pointer; font: inherit; transition: border-color .15s; }
.user-chip:hover { border-color: #2d5a8e; }
.user-chip[aria-expanded="true"] { border-color: #2d5a8e; background: #16273d; }
.user-chev { font-size: .6rem; color: #64748b; transition: transform .15s; }
.user-chip[aria-expanded="true"] .user-chev { transform: rotate(180deg); }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: #0f1c2e; border: 1px solid #1e3a5c; border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.5); z-index: 60; display: flex; flex-direction: column; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; color: #cbd5e1; cursor: pointer; font: inherit; font-size: .8rem; padding: 8px 12px; text-decoration: none; transition: background .12s, color .12s; }
.menu-item:hover, .menu-item:focus-visible { background: #16273d; color: #7dd3fc; outline: none; }
.menu-item:disabled { color: #475569; cursor: default; background: none; }
.menu-danger { color: #f87171; }
.menu-danger:hover, .menu-danger:focus-visible { background: #2a1520; color: #fca5a5; }
.menu-sep { height: 1px; background: #1e3a5c; margin: 5px 6px; }
.user-avatar { width: 24px; height: 24px; border-radius: 50%; background: #2d5a8e; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #7dd3fc; flex-shrink: 0; }
.user-name { font-size: .75rem; color: #94a3b8; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-status { font-size: .75rem; color: #64748b; display: flex; align-items: center; gap: 5px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; flex-shrink: 0; }
.sync-dot.ok   { background: #22c55e; }
.sync-dot.busy { background: #f59e0b; animation: pulse 1s infinite; }
.sync-dot.err  { background: #ef4444; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.btn-icon { background: none; border: 1px solid #1e3a5c; border-radius: 6px; color: #64748b; cursor: pointer; font-size: .78rem; padding: 5px 10px; transition: all .15s; white-space: nowrap; }
.btn-icon:hover { border-color: #2d5a8e; color: #7dd3fc; }

/* ── STATUS BAR ── */
.status-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 28px; background: #0d1f35; border-bottom: 1px solid #1e3a5c; }
.status-card { background: #132033; border-radius: 10px; padding: 10px 16px; flex: 1; min-width: 120px; border-left: 3px solid #64748b; }
.status-card.ok   { border-left-color: #22c55e; }
.status-card.warn { border-left-color: #f59e0b; }
.status-card.bad  { border-left-color: #ef4444; }
.status-card .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; margin-bottom: 4px; }
.status-card .val   { font-size: 1.25rem; font-weight: 700; }
.status-card.ok   .val { color: #4ade80; }
.status-card.warn .val { color: #fbbf24; }
.status-card.bad  .val { color: #f87171; }
.status-card .ideal { font-size: .68rem; color: #64748b; margin-top: 2px; }

/* ── WEATHER BAR ── */
.weather-bar { background: #0b1c30; border-bottom: 1px solid #1e3a5c; padding: 14px 28px; }
.wx-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.wx-now { display: flex; align-items: baseline; gap: 10px; }
.wx-now .temp { font-size: 1.9rem; font-weight: 700; color: #7dd3fc; line-height: 1; }
.wx-now .cond { font-size: .82rem; color: #94a3b8; }
.wx-meta { font-size: .72rem; color: #64748b; display: flex; gap: 14px; flex-wrap: wrap; }
.wx-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; }
.wx-refresh { margin-left: auto; background: none; border: 1px solid #1e3a5c; border-radius: 6px; color: #64748b; cursor: pointer; font-size: .72rem; padding: 4px 10px; transition: all .15s; }
.wx-refresh:hover { border-color: #2d5a8e; color: #7dd3fc; }
.wx-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.wx-day { background: #132033; border-radius: 10px; padding: 9px 12px; min-width: 96px; flex: 1; text-align: center; border-top: 3px solid #334155; }
.wx-day.hot  { border-top-color: #ef4444; }
.wx-day.warm { border-top-color: #f59e0b; }
.wx-day.wet  { border-top-color: #38bdf8; }
.wx-day.cold { border-top-color: #a78bfa; }
.wx-day .d-name { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; margin-bottom: 5px; }
.wx-day .d-hi { font-size: 1.05rem; font-weight: 700; color: #e0e8f0; }
.wx-day .d-lo { font-size: .74rem; color: #64748b; }
.wx-day .d-pop { font-size: .68rem; color: #38bdf8; margin-top: 3px; min-height: .9em; }
.wx-day .d-cond { font-size: .64rem; color: #64748b; margin-top: 3px; line-height: 1.25; }
.wx-impacts { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.wx-impact { background: #132033; border-left: 3px solid #64748b; border-radius: 6px; padding: 8px 12px; font-size: .76rem; color: #94a3b8; line-height: 1.45; }
.wx-impact.alert { border-left-color: #ef4444; }
.wx-impact.warn  { border-left-color: #f59e0b; }
.wx-impact.info  { border-left-color: #38bdf8; }
.wx-impact.ok    { border-left-color: #22c55e; }
.wx-impact b { color: #e0e8f0; font-weight: 600; }
.wx-msg { font-size: .76rem; color: #64748b; padding: 4px 0; }
.wx-msg.err { color: #f87171; }

/* ── CHART TOOLTIP (custom HTML so we can render weather icons) ── */
.chart-tip { position: absolute; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 120;
  background: #0d1f35; border: 1px solid #2d5a8e; border-radius: 8px; padding: 9px 12px; min-width: 158px;
  font-size: .78rem; color: #e0e8f0; box-shadow: 0 6px 20px rgba(0,0,0,.5); transform: translate(-50%,-100%); }
.chart-tip .tip-date { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: 4px; }
.chart-tip .tip-val { font-size: 1.02rem; font-weight: 700; }
.chart-tip .tip-band { font-size: .66rem; color: #64748b; margin-top: 1px; }
.chart-tip .tip-wx { display: flex; align-items: center; gap: 9px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #1e3a5c; }
.chart-tip .tip-wx svg { width: 24px; height: 24px; flex-shrink: 0; }
.chart-tip .tip-temps { font-weight: 700; font-size: .84rem; }
.chart-tip .tip-cond { font-size: .68rem; color: #94a3b8; }
.chart-tip .tip-precip { font-size: .68rem; color: #38bdf8; margin-top: 5px; }
.chart-tip .tip-flag { display: inline-block; margin-top: 6px; margin-right: 4px; border-radius: 4px; padding: 1px 6px; font-size: .62rem; font-weight: 700; letter-spacing: .04em; }
.chart-tip .tip-flag.freeze { background: #2e1065; color: #c4b5fd; }
.chart-tip .tip-flag.heat   { background: #450a0a; color: #fca5a5; }
.chart-tip .tip-flag.rain   { background: #082f49; color: #7dd3fc; }
.chart-tip .tip-nowx { font-size: .66rem; color: #475569; margin-top: 7px; padding-top: 7px; border-top: 1px solid #1e3a5c; }

/* ── POOL SETUP ── */
.pool-setup-cta { color: #7dd3fc; font-weight: 600; cursor: pointer; text-decoration: none; border-bottom: 1px solid #2d5a8e; }
.pool-setup-cta:hover { border-bottom-color: #7dd3fc; }
.pool-setup-why { color: #475569; margin-left: 12px; font-size: .96em; }
.empty-row { text-align: center; color: #475569; padding: 26px 12px !important; font-size: .84rem; }
.wx-link { color: #7dd3fc; cursor: pointer; border-bottom: 1px solid #2d5a8e; }
.wx-link:hover { border-bottom-color: #7dd3fc; }
.pool-name { color: #e0e8f0; font-weight: 600; }
.pool-glyph { display: inline-block; vertical-align: -2px; margin-right: 7px; }
.pool-glyph svg { width: 15px; height: 12px; }
.setup-overlay { position: fixed; inset: 0; background: rgba(6,14,26,.82); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
.setup-overlay.hidden { display: none; }
.setup-panel { background: #0d1f35; border: 1px solid #2d5a8e; border-radius: 14px; width: 100%; max-width: 700px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.setup-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid #1e3a5c; }
.setup-head h2 { font-size: 1.05rem; font-weight: 700; color: #e0e8f0; }
.setup-head p { font-size: .74rem; color: #64748b; margin-top: 2px; }
.setup-close { margin-left: auto; background: none; border: 1px solid #1e3a5c; border-radius: 6px; color: #64748b; cursor: pointer; font-size: 1rem; line-height: 1; padding: 5px 9px; }
.setup-close:hover { border-color: #2d5a8e; color: #7dd3fc; }
.setup-body { padding: 20px 24px; }
.setup-section { margin-bottom: 22px; }
.setup-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #94a3b8; margin-bottom: 10px; }
.opt-grid { display: grid; gap: 10px; }
.opt-grid.shapes { grid-template-columns: repeat(4, 1fr); }
.opt-grid.grades { grid-template-columns: repeat(3, 1fr); }
.opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; background: #132033; border: 1px solid #1e3a5c; border-radius: 10px; padding: 12px 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: #2d5a8e; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt:has(input:checked) { border-color: #38bdf8; background: #16293f; }
.opt:has(input:focus-visible) { outline: 2px solid #7dd3fc; outline-offset: 2px; }
.opt-fig svg { display: block; width: 100%; height: auto; }
.opt-grid.shapes .opt-fig { width: 46px; }
.opt-grid.grades .opt-fig { width: 100%; }
.opt-name { font-size: .74rem; font-weight: 600; color: #94a3b8; text-align: center; }
.opt:has(input:checked) .opt-name { color: #7dd3fc; }
.opt-sub { font-size: .64rem; color: #475569; text-align: center; line-height: 1.3; }
.dim-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dim { display: flex; flex-direction: column; gap: 5px; }
.dim.hidden { display: none; }
.dim label { font-size: .72rem; color: #94a3b8; }
.dim .hint { font-size: .64rem; color: #475569; }
.ftin { display: flex; align-items: center; gap: 5px; }
.ftin input { width: 100%; min-width: 0; background: #0a1628; border: 1px solid #1e3a5c; border-radius: 6px; color: #e0e8f0; font-size: .86rem; padding: 7px 8px; font-family: inherit; }
.ftin input:focus { outline: none; border-color: #38bdf8; }
.ftin span { font-size: .68rem; color: #64748b; }
.setup-text { width: 100%; background: #0a1628; border: 1px solid #1e3a5c; border-radius: 6px; color: #e0e8f0; font-size: .86rem; padding: 8px 10px; font-family: inherit; }
.setup-text:focus { outline: none; border-color: #38bdf8; }
.vol-box { background: #132033; border: 1px solid #1e3a5c; border-radius: 10px; padding: 14px 18px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.vol-box .vol-num { font-size: 1.6rem; font-weight: 700; color: #7dd3fc; }
.vol-box .vol-unit { font-size: .8rem; color: #94a3b8; }
.vol-box .vol-detail { font-size: .7rem; color: #64748b; margin-left: auto; text-align: right; line-height: 1.5; }
.vol-err { color: #f87171; font-size: .76rem; margin-top: 8px; }
.vol-warn { color: #fbbf24; font-size: .74rem; margin-top: 8px; line-height: 1.45; }
.setup-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid #1e3a5c; }
.btn-save { background: #2d5a8e; border: 0; border-radius: 6px; color: #fff; cursor: pointer; font-size: .82rem; font-weight: 600; padding: 8px 20px; }
.btn-save:hover { background: #38bdf8; color: #0a1628; }
.btn-save:disabled { opacity: .4; cursor: default; }
@media (max-width: 620px) {
  .opt-grid.shapes { grid-template-columns: repeat(2, 1fr); }
  .opt-grid.grades { grid-template-columns: 1fr; }
  .dim-grid { grid-template-columns: 1fr; }
}

/* ── TABS ── */
.tabs { display: flex; gap: 4px; padding: 16px 28px 0; overflow-x: auto; }
.tab { padding: 8px 18px; border-radius: 8px 8px 0 0; font-size: .82rem; font-weight: 600; cursor: pointer; background: #132033; color: #64748b; border: 1px solid #1e3a5c; border-bottom: none; transition: all .15s; white-space: nowrap; user-select: none; }
.tab.active { background: #1a3a5c; color: #7dd3fc; border-color: #2d5a8e; }
.tab:hover:not(.active) { background: #1a2d45; color: #94a3b8; }

/* ── CHARTS ── */
.chart-section { background: #132033; margin: 0 28px; border: 1px solid #1e3a5c; border-radius: 0 12px 12px 12px; padding: 20px; }
.chart-wrap { position: relative; height: 280px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #1e3a5c; font-size: .75rem; color: #94a3b8; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot  { width: 10px; height: 10px; border-radius: 50%; }
.legend-band { width: 18px; height: 8px; border-radius: 2px; opacity: .35; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 28px; }
@media(max-width:700px){ .grid { grid-template-columns: 1fr; } }
.mini-card { background: #132033; border: 1px solid #1e3a5c; border-radius: 10px; padding: 14px; }
.mini-card h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: #64748b; margin-bottom: 10px; }
.mini-chart-wrap { position: relative; height: 160px; }

/* ── TABLE ── */
.table-section { margin: 0 28px 28px; background: #132033; border: 1px solid #1e3a5c; border-radius: 12px; overflow: hidden; }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #1e3a5c; }
.table-header h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: #64748b; }
.add-btn { background: #1a3a5c; border: 1px solid #2d5a8e; color: #7dd3fc; border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: .78rem; font-weight: 600; transition: background .15s; }
.add-btn:hover { background: #2d5a8e; }
.add-btn:disabled { opacity: .4; cursor: default; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.export-btn { background: none; border: 1px solid #2d5a8e; color: #94a3b8; border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: .78rem; font-weight: 600; transition: all .15s; white-space: nowrap; }
.export-btn:hover:not(:disabled) { background: #132033; border-color: #7dd3fc; color: #7dd3fc; }
.export-btn:disabled { opacity: .4; cursor: default; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 860px; }
th { padding: 8px 10px; text-align: left; background: #0d1f35; color: #64748b; font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
td { padding: 7px 10px; border-top: 1px solid #1a2d45; vertical-align: middle; }
tr.data-row { cursor: pointer; }
tr.data-row:hover td { background: #1e3a5c !important; }
tr.today-row td { background: #152a40 !important; }
tr.today-row:hover td { background: #1e3a5c !important; }
tr.add-row td, tr.edit-row td { background: #0d1f35 !important; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: .7rem; font-weight: 700; }
.badge-ok   { background: #14532d; color: #4ade80; }
.badge-warn { background: #451a03; color: #fbbf24; }
.badge-bad  { background: #450a0a; color: #f87171; }

/* ── NOTES ── */
.notes-cell { max-width: 240px; }
.notes-text { color: #94a3b8; font-size: .78rem; line-height: 1.4; word-break: break-word; }
.notes-toggle { background: none; border: none; color: #3b82f6; cursor: pointer; font-size: .72rem; margin-left: 4px; padding: 0; }
.notes-toggle:hover { color: #7dd3fc; }

/* ── EDIT CONTROLS ── */
.edit-input { background: #0a1628; border: 1px solid #2d5a8e; border-radius: 4px; color: #e0e8f0; padding: 4px 6px; font-size: .8rem; font-family: inherit; transition: border-color .15s; }
.edit-input:focus { outline: none; border-color: #7dd3fc; }
.edit-input.w-date  { width: 130px; color-scheme: dark; cursor: text; }
.edit-input.w-date::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .8; }
.edit-input.w-date::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.edit-input.w-num   { width: 66px; }
.edit-input.w-notes { width: 100%; min-height: 52px; resize: vertical; }
.action-cell { white-space: nowrap; }
.btn-save   { background: #14532d; color: #4ade80; border: none; border-radius: 4px; padding: 5px 10px; cursor: pointer; font-size: .8rem; font-weight: 700; }
.btn-cancel { background: #1e293b; color: #94a3b8; border: 1px solid #334155; border-radius: 4px; padding: 5px 10px; cursor: pointer; font-size: .8rem; margin-left: 4px; }
.btn-save:hover   { background: #166534; }
.btn-cancel:hover { background: #334155; }
.btn-delete { background: transparent; color: #64748b; border: none; border-radius: 4px; padding: 4px 6px; cursor: pointer; font-size: .85rem; opacity: .6; }
.btn-delete:hover { background: #7f1d1d; color: #fca5a5; opacity: 1; }

/* ── LOADING ── */
.loading-overlay { position: fixed; inset: 0; background: rgba(10,22,40,.9); z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.spinner { width: 40px; height: 40px; border: 3px solid #1e3a5c; border-top-color: #7dd3fc; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { color: #94a3b8; font-size: .9rem; }
.hidden { display: none !important; }

/* ── ADMIN CONSOLE ── */
.admin-gate { display: flex; align-items: center; justify-content: center; padding: 64px 20px; }
.admin-gate-card { background: #0f1c2e; border: 1px solid #1e3a5c; border-radius: 12px; padding: 28px 32px; text-align: center; max-width: 420px; }
.admin-gate-card h2 { color: #7dd3fc; font-size: 1.05rem; margin-bottom: 8px; }
.admin-gate-card p { color: #94a3b8; font-size: .82rem; line-height: 1.5; margin-bottom: 16px; }
.gate-identity { text-align: left; background: #0b1524; border: 1px solid #1e3a5c; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.gate-identity-who { color: #cbd5e1 !important; font-size: .78rem !important; margin-bottom: 10px !important; }
.gate-identity-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.gate-identity-label { color: #64748b; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; min-width: 62px; }
.gate-identity-value { color: #7dd3fc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; word-break: break-all; flex: 1; user-select: all; }
.gate-copy { background: #1e3a5c; border: none; border-radius: 5px; color: #cbd5e1; cursor: pointer; font-size: .68rem; padding: 4px 9px; }
.gate-copy:hover { background: #2b5183; }
.admin-main { padding: 20px 28px 40px; }
.admin-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-search { flex: 1; min-width: 240px; background: #0f1c2e; border: 1px solid #1e3a5c; border-radius: 8px; color: #e2e8f0; font: inherit; font-size: .82rem; padding: 8px 12px; }
.admin-search:focus { outline: none; border-color: #2d5a8e; }
.admin-count { color: #64748b; font-size: .75rem; }
.admin-banner { border-radius: 8px; font-size: .8rem; margin-bottom: 14px; padding: 10px 14px; }
.admin-banner.ok { background: #0d2a1a; border: 1px solid #1e5c3a; color: #86efac; }
.admin-banner.err { background: #2a1520; border: 1px solid #7f1d1d; color: #fca5a5; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.admin-table th { background: #0d1c30; color: #64748b; font-size: .68rem; font-weight: 600; letter-spacing: .04em; padding: 10px 12px; text-align: left; text-transform: uppercase; }
.admin-table td { border-top: 1px solid #16273d; color: #cbd5e1; padding: 10px 12px; vertical-align: middle; }
.admin-user-name { color: #e2e8f0; font-weight: 600; }
.admin-user-sub { color: #64748b; font-size: .72rem; margin-top: 2px; word-break: break-all; }
.admin-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-date { background: #0f1c2e; border: 1px solid #1e3a5c; border-radius: 6px; color: #cbd5e1; font: inherit; font-size: .76rem; padding: 4px 8px; color-scheme: dark; }
.admin-empty { color: #64748b; padding: 24px 12px; text-align: center; }
.pill { border-radius: 12px; display: inline-block; font-size: .7rem; font-weight: 600; padding: 3px 10px; white-space: nowrap; }
.pill-trial { background: #1a2f4a; color: #7dd3fc; }
.pill-licensed { background: #0d2a1a; color: #86efac; }
.pill-expired { background: #2a1520; color: #fca5a5; }

footer { text-align: center; padding: 16px; font-size: .72rem; color: #334155; }