:root {
  --ink: #182035;
  --muted: #697188;
  --line: #e6e8ef;
  --canvas: #f5f6fa;
  --panel: #ffffff;
  --navy: #10172a;
  --violet: #6554e8;
  --violet-dark: #4f3fd0;
  --green: #14866d;
  --red: #ba3c49;
  --shadow: 0 18px 50px rgba(22, 29, 51, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, .primary, .secondary, .ghost { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .6rem; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.02; letter-spacing: -.055em; }
h2 { margin-bottom: .45rem; font-size: 1.35rem; letter-spacing: -.025em; }
h3 { margin-bottom: .45rem; }
.muted, .page-head p, .privacy-note { color: var(--muted); }
.overline, .eyebrow, .nav-label { margin-bottom: .6rem; color: var(--violet); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at 20% 15%, rgba(101,84,232,.18), transparent 28%), linear-gradient(145deg, #0e1528, #171e35 55%, #0b1120); }
.auth-card { width: min(100%, 510px); padding: clamp(28px, 5vw, 50px); border: 1px solid rgba(255,255,255,.7); border-radius: 28px; background: rgba(255,255,255,.98); box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.setup-card { width: min(100%, 780px); }
.auth-brand, .brand, .account-card { display: flex; align-items: center; gap: 12px; }
.auth-brand { margin-bottom: 38px; }
.auth-brand strong, .auth-brand small, .brand strong, .brand small, .account-card strong, .account-card small { display: block; }
.auth-brand small, .brand small, .account-card small { color: var(--muted); font-size: .76rem; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(145deg, #7e6cf5, #4c3dc8); box-shadow: 0 10px 24px rgba(101,84,232,.3); font-weight: 900; }
.privacy-note { margin: 22px 0 0; font-size: .78rem; line-height: 1.6; text-align: center; }

.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: #3c455d; font-size: .8rem; font-weight: 700; }
label small { color: var(--muted); font-weight: 500; line-height: 1.45; }
input, select, textarea { width: 100%; border: 1px solid #dfe2ea; border-radius: 11px; background: #fbfbfd; color: var(--ink); padding: 12px 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(101,84,232,.13); }
textarea { resize: vertical; }
fieldset { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
legend { padding: 0 8px; font-weight: 800; }
.primary, .secondary, .ghost { display: inline-flex; justify-content: center; align-items: center; border-radius: 11px; padding: 11px 15px; text-decoration: none; font-weight: 800; }
.primary { border: 1px solid var(--violet); color: white; background: var(--violet); box-shadow: 0 8px 22px rgba(101,84,232,.2); }
.primary:hover { background: var(--violet-dark); }
.secondary { border: 1px solid var(--line); color: var(--ink); background: white; }
.ghost { border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.86); background: transparent; }
.wide { width: 100%; }
.alert { margin-bottom: 18px; padding: 13px 15px; border-radius: 12px; font-size: .86rem; font-weight: 700; }
.alert.success { color: #0f6957; background: #e9f8f3; border: 1px solid #bee9dd; }
.alert.danger { color: #98303d; background: #fff0f2; border: 1px solid #f2c7cd; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; padding: 30px 22px; color: white; background: var(--navy); }
.brand { text-decoration: none; }
.brand small, .account-card small { color: rgba(255,255,255,.52); }
.sidebar nav { display: grid; gap: 7px; }
.sidebar .nav-label { color: rgba(255,255,255,.38); }
.nav-link { padding: 11px 13px; border-radius: 10px; color: rgba(255,255,255,.65); text-decoration: none; font-size: .86rem; font-weight: 700; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.1); }
.account-card { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.account-card > div { min-width: 0; }
.account-card strong, .account-card small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #30256e; background: #dcd7ff; font-size: .73rem; font-weight: 900; }
.access-card { padding: 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(255,255,255,.06); }
.access-card p { margin: 7px 0 0; color: rgba(255,255,255,.58); font-size: .78rem; line-height: 1.55; }

.workspace { min-width: 0; padding: clamp(24px, 4vw, 52px); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.page-head h1 { margin-bottom: .35rem; font-size: clamp(2rem, 4vw, 3.25rem); }
.page-head p { margin-bottom: 0; }
.secure-pill, .badge { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; font-weight: 800; }
.secure-pill { padding: 9px 13px; color: #0c6d59; background: #e5f7f1; font-size: .72rem; }
.secure-pill::before { content: ""; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #19a782; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metrics article { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: var(--shadow); }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: .76rem; }
.metrics strong { display: block; margin: 11px 0 8px; font-size: 1.8rem; letter-spacing: -.045em; }
.panel { min-width: 0; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); }
.panel.compact { padding: 22px; }
.panel.sticky { align-self: start; position: sticky; top: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.panel-head h2, .panel-head p { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(320px, .8fr); gap: 20px; align-items: start; }
.two-col.balanced { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
.employee-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 20px; align-items: start; }
.side-stack { display: grid; gap: 20px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th { padding: 11px 10px; color: var(--muted); font-size: .67rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); }
td { padding: 15px 10px; border-bottom: 1px solid #f0f1f5; vertical-align: middle; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.badge { padding: 5px 9px; color: #5645c8; background: #eeebff; font-size: .67rem; }
.inline-form { display: flex; align-items: center; gap: 6px; }
.inline-form select { min-width: 115px; padding: 7px; font-size: .74rem; }
.inline-form button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: .7rem; font-weight: 800; }

.steps { display: grid; gap: 17px; margin: 18px 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 35px 1fr; gap: 10px; align-items: start; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.steps b { color: var(--violet); }
.employee-list, .post-list { display: grid; gap: 12px; }
.employee-list article { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.employee-list strong, .employee-list span, .employee-list small { display: block; }
.employee-list span { margin: 3px 0; color: var(--muted); font-size: .8rem; }
.employee-list small { color: var(--muted); font-size: .7rem; }
.post-list article { padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.post-list article p { color: #525b70; line-height: 1.65; }
.post-list article small { color: var(--muted); }
.code-box { overflow-x: auto; margin: 22px 0; padding: 14px; border-radius: 11px; color: #e5e1ff; background: #171d30; font: .78rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.check-list { display: grid; gap: 10px; padding-left: 20px; color: var(--muted); line-height: 1.5; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .two-col, .two-col.balanced, .employee-grid { grid-template-columns: 1fr; }
  .panel.sticky { position: static; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 18px; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar .nav-label { grid-column: 1 / -1; }
  .account-card { margin-top: 0; }
  .workspace { padding: 24px 16px 40px; }
  .page-head { display: block; }
  .secure-pill { margin-top: 15px; }
  .form-grid, .metrics { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .panel { border-radius: 16px; }
}

