:root {
  color-scheme: light;
  --ink: #1c2b27;
  --muted: #65736d;
  --green: #14352e;
  --green-2: #24584b;
  --lime: #d8e9aa;
  --sand: #f5f3eb;
  --paper: #ffffff;
  --line: #e2e8e2;
  --danger: #9f3434;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--sand); min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.loading-card { width: min(460px, calc(100% - 32px)); margin: 15vh auto; padding: 32px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 20px 60px #15382b12; }
.brand-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--lime); color: var(--green); font-weight: 850; letter-spacing: -0.06em; margin: 0 auto 16px; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); }
.auth-aside { background: var(--green); color: white; padding: clamp(36px, 8vw, 104px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; width: 430px; height: 430px; border: 1px solid #ffffff20; border-radius: 50%; right: -160px; bottom: -180px; box-shadow: 0 0 0 48px #ffffff08, 0 0 0 96px #ffffff06; }
.brand-lockup { display: flex; align-items: center; gap: 13px; font-weight: 750; letter-spacing: -.02em; }
.brand-lockup .brand-mark { margin: 0; }
.eyebrow { color: #c9dea0; text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 800; }
.aside-copy { max-width: 560px; margin: 80px 0; position: relative; z-index: 1; }
h1 { font-size: clamp(2.3rem, 5vw, 4.5rem); line-height: .99; letter-spacing: -.055em; margin: 15px 0 22px; }
.aside-copy p { color: #d7e4df; font-size: 1.1rem; line-height: 1.65; max-width: 450px; }
.aside-foot { color: #c6d5cf; font-size: .85rem; position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(440px, 100%); padding: clamp(24px, 4vw, 42px); background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 52px #193b2a10; }
.auth-card h2 { margin: 0 0 8px; font-size: 1.75rem; letter-spacing: -.04em; }
.subtle { color: var(--muted); line-height: 1.55; margin: 0 0 25px; }
.field { display: grid; gap: 7px; margin: 16px 0; }
.field label { font-weight: 700; font-size: .88rem; }
.field input { min-width: 0; width: 100%; padding: 12px 13px; border: 1px solid #cdd8d1; border-radius: 10px; background: #fcfdfb; color: var(--ink); }
.field input:focus { outline: 3px solid #d8e9aa88; border-color: var(--green-2); }
.primary, .secondary, .link-button { border: 0; border-radius: 10px; padding: 12px 16px; font-weight: 750; }
.primary { width: 100%; color: white; background: var(--green); margin-top: 8px; }
.primary:hover { background: var(--green-2); }
.secondary { color: var(--green); background: #edf3e3; }
.link-button { color: var(--green-2); background: transparent; padding-inline: 0; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; }
.message { display: none; padding: 12px 14px; margin: 16px 0 0; border-radius: 10px; line-height: 1.45; background: #edf3e3; color: var(--green); }
.message[data-kind="error"] { color: var(--danger); background: #fff0ef; }
.message[data-kind="info"] { color: #47566b; background: #eff4fa; }
.hidden { display: none !important; }
.dashboard { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { color: #eef5ef; background: var(--green); padding: 24px 16px; display: flex; flex-direction: column; }
.sidebar .brand-lockup { padding: 0 10px 28px; font-size: .95rem; }
.nav-label { color: #a8c1b6; margin: 18px 10px 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 800; }
.nav-item { border: 0; color: #d9e6df; background: transparent; text-align: left; padding: 11px 12px; border-radius: 9px; margin: 2px 0; font-weight: 650; }
.nav-item.active, .nav-item:hover { background: #ffffff16; color: white; }
.sidebar-bottom { margin-top: auto; padding: 14px 10px 0; color: #bbcec5; font-size: .82rem; }
.main-panel { min-width: 0; padding: 28px clamp(20px, 4vw, 56px) 56px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 auto 34px; max-width: 1180px; }
.topbar h1 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.45rem); color: var(--ink); }
.user-chip { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--green); font-weight: 800; }
.content { max-width: 1180px; margin: auto; }
.welcome { margin-bottom: 24px; }
.welcome h2 { font-size: 1.2rem; margin: 0 0 4px; }
.welcome p { margin: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.stat-card, .panel { border: 1px solid var(--line); background: var(--paper); border-radius: 15px; box-shadow: 0 7px 22px #193b2a08; }
.stat-card { padding: 18px; }
.stat-label { color: var(--muted); font-size: .8rem; font-weight: 700; }
.stat-value { display: block; margin-top: 8px; font-size: 1.8rem; font-weight: 780; letter-spacing: -.04em; }
.panel { margin-top: 18px; padding: 22px; }
.panel h2 { font-size: 1.05rem; margin: 0 0 6px; }
.panel p { color: var(--muted); line-height: 1.55; margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.feature { min-height: 105px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdfb; }
.feature strong { display: block; margin-bottom: 6px; }
.feature span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.status-card { width: min(540px, calc(100% - 32px)); margin: 12vh auto; padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: white; text-align: center; }
.status-card h1 { color: var(--ink); font-size: 2rem; margin: 12px 0; }
@media (max-width: 880px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { min-height: 285px; padding: 27px; }
  .aside-copy { margin: 48px 0 18px; }
  .aside-copy h1 { font-size: clamp(2.1rem, 11vw, 3.2rem); }
  .aside-foot { display: none; }
  .auth-main { padding: 22px 16px 34px; }
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { padding: 12px; }
  .sidebar .brand-lockup { padding: 2px 6px 10px; }
  .nav-label, .sidebar-bottom { display: none; }
  .nav-list { display: flex; gap: 5px; overflow-x: auto; }
  .nav-item { white-space: nowrap; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .main-panel { padding: 20px 15px 34px; }
  .topbar { align-items: flex-start; }
  .user-chip span:not(.user-avatar) { display: none; }
  .stats { gap: 9px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 1.5rem; }
  .feature-grid { grid-template-columns: 1fr; }
}
