* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: rgba(13, 18, 29, 0.84);
  --panel-strong: rgba(17, 24, 39, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --text: #f8fafc;
  --muted: #9aa8bc;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(217, 176, 90, 0.38);
  --gold: #d9b05a;
  --gold-2: #f2d48b;
  --green: #7dd3a8;
  --red: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; }
html { width: 100%; }
.backdrop { position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 10% 10%, rgba(217, 176, 90, 0.28), transparent 32%), radial-gradient(circle at 88% 5%, rgba(81, 142, 214, 0.18), transparent 34%), radial-gradient(circle at 55% 95%, rgba(125, 211, 168, 0.13), transparent 36%), linear-gradient(135deg, #060913 0%, #0b1220 50%, #140e0a 100%); }
.backdrop::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent); }
.app-shell { width: 100%; max-width: 1680px; margin: 0 auto; padding: 18px clamp(16px, 2.4vw, 34px) 36px; overflow-x: clip; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; min-width: 0; }
.brand-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 76px; height: 76px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; flex: 0 0 auto; }
.brand-mark img { width: 76px; height: 76px; object-fit: contain; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 3vw, 42px); letter-spacing: -.04em; line-height: 1.05; overflow-wrap: anywhere; }
h2 { margin-bottom: 0; font-size: clamp(22px, 2.3vw, 34px); letter-spacing: -.035em; }
.eyebrow { margin-bottom: 5px; color: var(--gold-2); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 800; }
.session-card, .panel, .hero-card { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.session-card { display: flex; align-items: center; gap: 12px; border-radius: 20px; padding: 10px; min-width: 0; flex-shrink: 0; }
.session-card > div { padding: 0 8px; min-width: 150px; }
.session-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
#status { display: block; font-size: 13px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.button, button { border: 0; cursor: pointer; font: inherit; font-weight: 800; border-radius: 14px; padding: 11px 15px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); transition: transform .16s ease, border-color .16s ease, background .16s ease, opacity .16s ease; }
.button:hover, button:hover { transform: translateY(-1px); }
.button.primary, button.primary { background: linear-gradient(135deg, var(--gold), #b77a28); color: #140d05; box-shadow: 0 14px 32px rgba(217, 176, 90, 0.22); }
.button.ghost, button.ghost { background: rgba(255,255,255,.055); border: 1px solid var(--line); color: var(--text); }
.button.big { min-height: 50px; padding: 14px 20px; }
.hero-card { min-height: 560px; border-radius: 30px; padding: clamp(24px, 4vw, 54px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr); gap: 28px; align-items: center; overflow: hidden; position: relative; }
.hero-card::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -160px; border-radius: 50%; background: rgba(217, 176, 90, 0.12); filter: blur(6px); }
.hero-copy, .hero-preview { position: relative; }
.hero-copy h2 { max-width: 820px; font-size: clamp(38px, 6vw, 76px); line-height: .95; margin-bottom: 20px; }
.hero-copy p { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: rgba(217,176,90,.1); color: var(--gold-2); border-radius: 999px; padding: 8px 12px; font-weight: 800; margin-bottom: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }
.hint, .notice { color: var(--muted); }
.hero-preview { display: grid; gap: 14px; }
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric-card { border: 1px solid var(--line); background: rgba(255,255,255,.07); border-radius: 22px; padding: 18px; min-height: 120px; }
.metric-card.large { min-height: 190px; display: grid; align-content: end; background: linear-gradient(145deg, rgba(217,176,90,.22), rgba(255,255,255,.06)); }
.metric-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.metric-card b { display: block; font-size: 23px; letter-spacing: -.03em; }
.metric-card small { color: var(--muted); line-height: 1.5; }
.portal-layout { display: none; grid-template-columns: minmax(250px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; width: 100%; max-width: 100%; min-width: 0; }
.panel { border-radius: 24px; padding: 18px; min-width: 0; }
.sidebar { position: sticky; top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head.compact { margin-bottom: 14px; }
.panel-head.wrap { flex-wrap: wrap; }
.workspace { display: grid; gap: 16px; min-width: 0; max-width: 100%; }
.entity-list { display: grid; gap: 10px; }
.entity { width: 100%; text-align: left; display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.055); border-radius: 18px; color: var(--text); }
.entity span { font-weight: 900; letter-spacing: -.02em; }
.entity b, .entity small { color: var(--muted); font-size: 12px; }
.entity.active { border-color: var(--gold); background: linear-gradient(135deg, rgba(217,176,90,.2), rgba(255,255,255,.06)); box-shadow: inset 0 0 0 1px rgba(217,176,90,.26); }
.notice { margin-top: 14px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.small { font-size: 13px; line-height: 1.45; }
.overview { background: linear-gradient(135deg, rgba(217,176,90,.13), rgba(13,18,29,.88)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; min-width: 0; }
.stat { background: rgba(4,8,15,.46); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.stat span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.stat b { font-size: 25px; letter-spacing: -.04em; }
.dashboard-grid, .lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 360px); gap: 16px; min-width: 0; }
.lower-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
canvas { width: 100%; max-width: 100%; height: 390px; display: block; background: rgba(4,8,15,.42); border: 1px solid var(--line); border-radius: 18px; }
.form-grid { display: grid; grid-template-columns: 140px 1fr 140px 1.3fr; gap: 10px; margin-bottom: 10px; }
input, select { width: 100%; min-width: 0; border: 1px solid var(--line); outline: none; background: rgba(4,8,15,.55); color: var(--text); border-radius: 14px; padding: 12px 13px; font: inherit; }
input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,176,90,.12); }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; }
.table-wrap { overflow: auto; max-width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: rgba(4,8,15,.28); }
table { width: 100%; border-collapse: collapse; min-width: min(680px, 100%); font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 12px; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: rgba(13,18,29,.98); color: var(--gold-2); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; z-index: 1; }
tr:last-child td { border-bottom: 0; }
td .muted, .muted { color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--text); font-weight: 800; font-size: 12px; }
.status-pill.paid { background: rgba(125,211,168,.12); color: var(--green); border-color: rgba(125,211,168,.25); }
.status-pill.pending, .status-pill.queued { background: rgba(217,176,90,.12); color: var(--gold-2); border-color: rgba(217,176,90,.26); }
.empty-state { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid var(--line); color: var(--muted); line-height: 1.6; }
.payment-log-panel .payment-note { margin-bottom: 12px; }
.settings-grid { grid-template-columns: minmax(0, 1fr) auto !important; }
@media (max-width: 1280px) { .topbar, .hero-card { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; } .portal-layout, .dashboard-grid, .lower-grid { grid-template-columns: minmax(0, 1fr); } .sidebar { position: static; } .form-grid { grid-template-columns: 1fr 1fr; } .session-card { flex-shrink: 1; } }
@media (max-width: 680px) { .app-shell { padding: 12px 11px 28px; } .topbar { align-items: stretch; } .brand-mark { width: 56px; height: 56px; border-radius: 0; } .session-card { flex-direction: column; align-items: stretch; border-radius: 22px; } .hero-card { min-height: auto; border-radius: 24px; } .preview-grid, .form-grid { grid-template-columns: 1fr; } .hero-copy h2 { font-size: 40px; } }

.chart-head { align-items: flex-start; }
.chart-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; max-width: 100%; }
.chart-controls select { width: auto; min-width: 130px; min-height: 42px; }
.chart-controls .button { white-space: nowrap; }
.history-summary { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
@media (max-width: 820px) { .chart-head { display: grid; } .chart-controls { justify-content: stretch; } .chart-controls select, .chart-controls .button { width: 100%; } }


/* OakRidge clean public landing override - v300 */
.compact-landing-shell {
  min-height: 100vh;
  padding-top: 24px;
}
.clean-topbar {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 10px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.clean-topbar .brand-wrap {
  gap: 16px;
}
.clean-topbar .brand-mark,
.clean-topbar .brand-mark img {
  width: 70px;
  height: 70px;
}
.clean-topbar h1 {
  font-size: clamp(28px, 2.5vw, 46px);
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.nav-actions .button {
  min-height: 48px;
  padding-inline: 22px;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#loginPanel,
.landing-placeholder,
.hero-card,
.landing-card,
.hero-copy,
.hero-preview,
.hero-actions,
.preview-grid,
.metric-card,
.pill,
.hint {
  display: none !important;
}
body:has(#appPanel[style*="none"]) .compact-landing-shell {
  display: flex;
  flex-direction: column;
}
body:has(#appPanel[style*="none"]) .clean-topbar {
  width: min(100%, 1600px);
}
@media (max-width: 760px) {
  .clean-topbar {
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
  }
  .clean-topbar .brand-wrap {
    gap: 10px;
  }
  .clean-topbar .brand-mark,
  .clean-topbar .brand-mark img {
    width: 52px;
    height: 52px;
  }
  .clean-topbar h1 {
    font-size: 26px;
    white-space: normal;
  }
  .nav-actions .button {
    width: auto;
    min-height: 44px;
    padding-inline: 16px;
  }
}


/* Ranch employee payment tools */
.settings-block + .settings-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.product-rate-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important; }
.ranch-employee-panel { display: none; }
.small-btn { min-height: 34px; padding: 7px 10px; border-radius: 10px; font-size: 12px; }
@media (max-width: 820px) { .product-rate-grid { grid-template-columns: 1fr !important; } }


/* Portal improvement panels - v400 */
.portal-insights-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; min-width: 0; }
.employee-insights-grid { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
.owner-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
.info-card { border: 1px solid var(--line); background: rgba(4,8,15,.42); border-radius: 18px; padding: 14px; min-height: 112px; }
.info-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.info-card b { display: block; font-size: 23px; letter-spacing: -.035em; margin-bottom: 6px; }
.info-card small { color: var(--muted); line-height: 1.35; }
.notification-list { display: grid; gap: 10px; }
.notification { border: 1px solid var(--line); background: rgba(4,8,15,.42); border-radius: 16px; padding: 12px; }
.notification b { display: block; margin-bottom: 5px; }
.notification p { margin: 0; color: var(--muted); line-height: 1.45; }
.notification small { display: block; color: var(--muted); margin-top: 7px; font-size: 12px; }
.notification.warning { border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.08); }
.notification.success, .notification.good { border-color: rgba(125,211,168,.28); background: rgba(125,211,168,.08); }
.notification.audit { border-color: rgba(139,188,255,.28); background: rgba(139,188,255,.08); }
.timeline-list { display: grid; gap: 10px; max-height: 520px; overflow: auto; padding-right: 4px; }
.timeline-item { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); background: rgba(4,8,15,.34); border-radius: 16px; }
.timeline-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.timeline-item p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.timeline-item small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.profile-detail { max-width: 560px; padding: 12px !important; }
.leaderboard-panel select { width: auto; min-width: 130px; }
@media (max-width: 1180px) { .portal-insights-grid, .employee-insights-grid { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 820px) { .leaderboard-panel select { width: 100%; } }

/* Staff panel additions */
.staff-switch { display: none; }
.staff-layout { display: none; width: 100%; }
.staff-workspace { max-width: 100%; }
.staff-summary-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.staff-layout .timeline-list { max-height: 520px; overflow: auto; }
.staff-layout .table-wrap { max-height: 520px; overflow: auto; }
.staff-layout .overview { margin-bottom: 16px; }
.staff-layout .panel { border-color: rgba(148, 163, 184, .22); }
.staff-layout .info-card b { word-break: break-word; }
@media (max-width: 900px) {
  .nav-actions { flex-wrap: wrap; justify-content: flex-end; }
  .staff-layout .lower-grid, .staff-layout .portal-insights-grid { grid-template-columns: 1fr; }
}


/* Oakridge Images: image-only components. Above this block is the unmodified
   Community Portal stylesheet, preserving its exact shared visual language. */
[hidden] { display: none !important; }
.image-portal-shell .clean-topbar { width: 100%; }
.image-portal-shell #appSection.portal-layout:not([hidden]) { display: grid; margin-top: 8px; }
.image-portal-shell .entity { text-decoration: none; }
.image-portal-shell .entity:hover { border-color: var(--line-strong); }
.image-portal-shell .entity:focus-visible,
.image-portal-shell .image-drop-area:focus-visible,
.image-portal-shell button:focus-visible,
.image-portal-shell a:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.image-portal-shell .image-workspace { min-width: 0; }
.image-portal-shell .account-stat { min-width: 0; }
.image-portal-shell .account-inline { display:flex; align-items:center; gap:10px; min-width:0; }
.image-portal-shell .account-inline b { font-size: clamp(16px, 1.4vw, 20px); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.image-portal-shell .account-initials { display:grid; place-items:center; flex:none; width:36px; height:36px; border:1px solid var(--line-strong); border-radius:12px; background:rgba(217,176,90,.15); color:var(--gold-2); font-size:12px; font-weight:900; }
.image-portal-shell .storage-value { font-size: clamp(16px, 1.4vw, 21px); overflow-wrap:anywhere; }
.image-portal-shell .image-drop-area { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-height:230px; padding:26px 18px; border:1px dashed rgba(217,176,90,.4); border-radius:18px; background:rgba(4,8,15,.42); text-align:center; cursor:pointer; transition:border-color .16s ease, background .16s ease; }
.image-portal-shell .image-drop-area:hover,
.image-portal-shell .image-drop-area.dragover { background:rgba(217,176,90,.09); border-color:var(--gold); }
.image-portal-shell .image-drop-icon { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; border:1px solid var(--line-strong); background:rgba(217,176,90,.13); color:var(--gold-2); font-size:28px; line-height:1; }
.image-portal-shell .image-drop-area strong { font-size:17px; }
.image-portal-shell .image-drop-area > span:last-of-type { color:var(--muted); font-size:13px; }
.image-portal-shell .image-upload-actions { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:15px; }
.image-portal-shell .image-gallery-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 235px), 1fr)); gap:14px; }
.image-portal-shell .image-card { min-width:0; min-height:0; padding:0; overflow:hidden; display:flex; flex-direction:column; }
.image-portal-shell .image-card > a { display:block; background:rgba(4,8,15,.46); border-bottom:1px solid var(--line); }
.image-portal-shell .image-card .thumb { display:block; height:180px; width:100%; object-fit:contain; }
.image-portal-shell .image-card .image-info { display:flex; flex-direction:column; gap:9px; padding:14px; flex:1; }
.image-portal-shell .image-name { font-weight:800; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; }
.image-portal-shell .image-meta { color:var(--muted); font-size:12px; display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; }
.image-portal-shell .card-actions { display:flex; gap:8px; margin-top:auto; padding-top:6px; }
.image-portal-shell .card-actions .button { min-width:0; flex:1; font-size:12px; padding:9px 7px; min-height:38px; }
.image-portal-shell .image-empty { text-align:center; padding:44px 16px; }
.image-portal-shell .image-empty p { margin:7px 0 0; }
.image-portal-shell .image-empty strong { display:block; color:var(--text); }
.image-portal-shell .image-notice { margin:16px 0; border-color:rgba(125,211,168,.35); color:var(--green); background:rgba(125,211,168,.08); }
.image-portal-shell .image-notice.error { border-color:rgba(251,113,133,.35); color:var(--red); background:rgba(251,113,133,.08); }
.image-portal-shell .image-loading { display:flex; align-items:center; justify-content:center; gap:10px; padding:30px 10px; }
.image-portal-shell .image-loading p { margin:0; }
.image-portal-shell .image-spinner { width:18px; height:18px; border:2px solid var(--line-strong); border-top-color:var(--gold); border-radius:50%; animation:image-spin .7s linear infinite; }
@keyframes image-spin { to { transform:rotate(360deg); } }
.image-confirm-dialog { width:min(480px, calc(100vw - 30px)); color:var(--text); background:var(--panel-strong); padding:28px; border:1px solid var(--line-strong); border-radius:24px; box-shadow:var(--shadow); }
.image-confirm-dialog::backdrop { background:rgba(0,0,0,.74); }
.image-confirm-dialog h2 { margin:0 0 12px; }
.image-confirm-dialog .muted { line-height:1.6; }
.image-confirm-dialog .image-dialog-buttons { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:20px; }
.image-confirm-dialog .image-danger { background:rgba(251,113,133,.12); border:1px solid rgba(251,113,133,.4); color:var(--red); }
.image-confirm-dialog .image-danger:hover { background:rgba(251,113,133,.2); }
@media (max-width: 760px) {
  .image-portal-shell .nav-actions { justify-content:flex-start; }
  .image-portal-shell .image-upload-actions { flex-direction:column; align-items:stretch; }
  .image-portal-shell .image-upload-actions .button { width:100%; }
  .image-portal-shell .image-drop-area { min-height:200px; }
}
@media (prefers-reduced-motion: reduce) { .image-portal-shell *, .image-confirm-dialog * { animation:none !important; transition:none !important; } }
