:root {
  color-scheme: light;
  --ink: #10233f;
  --muted: #66758a;
  --line: #dbe4eb;
  --paper: #f7f9fb;
  --white: #ffffff;
  --blue: #1f64e0;
  --green: #16845b;
  --gold: #af7515;
  --shadow: 0 24px 70px rgba(16, 35, 63, .12);
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: white; background: var(--ink); font-weight: 800; }
.brand strong, .brand small { display: block; letter-spacing: .08em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.eyebrow { color: var(--blue); letter-spacing: .16em; font-size: 12px; font-weight: 800; }
.login-page { background: radial-gradient(circle at 82% 12%, #d9ebff 0, transparent 30%), var(--paper); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; }
.login-card { width: min(100%, 470px); padding: 44px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.login-card .eyebrow { margin-top: 46px; }
h1 { margin: 10px 0 14px; font-size: clamp(34px, 6vw, 62px); line-height: 1.05; letter-spacing: -.045em; }
.login-card h1 { font-size: 38px; }
.lead, .privacy-note, .page-heading p, .hero > p, .dashboard-card p { color: var(--muted); line-height: 1.75; }
.login-card form { margin-top: 30px; }
label { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 750; }
.login-card label + label, #code-group { margin-top: 18px; }
input, select { width: 100%; min-height: 48px; border: 1px solid #cdd9e3; border-radius: 10px; padding: 11px 13px; color: var(--ink); background: var(--white); outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,100,224,.12); }
.primary-button, .secondary-button, .text-button { border-radius: 10px; font-weight: 750; }
.primary-button { width: 100%; min-height: 50px; border: 0; color: white; background: var(--ink); }
.primary-button:hover { background: #17355d; }
.secondary-button { min-height: 42px; padding: 0 18px; border: 1px solid #cbd6df; background: white; color: var(--ink); }
.text-button { display: block; margin: 14px auto 0; border: 0; background: transparent; color: var(--blue); }
.inline-button { display: inline-flex; width: auto; min-height: 44px; padding: 0 20px; align-items: center; justify-content: center; text-decoration: none; }
button:disabled { cursor: wait; opacity: .55; }
.form-message { min-height: 24px; margin: 16px 0 8px; color: var(--muted); font-size: 13px; }
.form-message.success { color: var(--green); }
.form-message.error { color: #b32929; }
.privacy-note { margin: 26px 0 0; font-size: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 14px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.site-header nav { display: flex; gap: 22px; font-size: 14px; font-weight: 700; }
.site-header nav a { text-decoration: none; }
.page-shell, .admin-shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 70px 0 90px; }
.hero { max-width: 820px; padding: 42px 0 72px; }
.hero > p { max-width: 680px; font-size: 18px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dashboard-card { min-height: 260px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.dashboard-card > span { color: var(--blue); font-weight: 800; }
.dashboard-card h2 { margin-top: 50px; }
.dashboard-card a { color: var(--blue); font-weight: 750; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.page-heading h1 { font-size: clamp(38px, 5vw, 58px); }
.employee-editor, .employee-row { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.employee-editor { padding: 26px; box-shadow: var(--shadow); }
.employee-summary { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto auto; align-items: center; gap: 18px; padding: 20px; }
.employee-summary strong, .employee-summary small { display: block; }
.employee-summary small { margin-top: 5px; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #eaf1f7; color: var(--blue); font-weight: 800; }
.role-badge, .status-dot { padding: 7px 10px; border-radius: 7px; font-size: 12px; font-weight: 800; }
.role-admin { color: var(--blue); background: #eaf2ff; }
.role-partner { color: #694fb8; background: #f0ecff; }
.role-employee { color: #526477; background: #edf2f5; }
.role-contractor { color: var(--gold); background: #fff5dc; }
.status-active { color: var(--green); background: #e8f7f0; }
.status-suspended { color: #6f7d8e; background: #edf1f4; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 22px; border-top: 1px solid var(--line); }
.employee-editor .form-grid { padding: 20px 0; border-top: 0; }
.form-actions { display: flex; gap: 10px; padding: 0 22px 22px; }
.employee-editor .form-actions { padding: 0; }
.error-page { display: grid; place-items: center; padding: 24px; }
.error-card { width: min(620px, 100%); padding: 50px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.error-card h1 { font-size: 42px; }
.error-card p { color: var(--muted); line-height: 1.7; }
@media (max-width: 850px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .employee-summary { grid-template-columns: auto 1fr auto; }
  .employee-summary .role-badge, .employee-summary .status-dot { grid-row: 2; }
}
@media (max-width: 560px) {
  .login-card { padding: 30px 22px; border-radius: 18px; }
  .site-header { align-items: flex-start; }
  .site-header nav { flex-direction: column; gap: 9px; text-align: right; }
  .page-shell, .admin-shell { padding-top: 38px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .employee-summary { grid-template-columns: auto 1fr; }
  .employee-summary .role-badge, .employee-summary .status-dot, .employee-summary .edit-toggle { grid-column: 2; }
  .error-card { padding: 34px 24px; }
}
