:root {
  --navy: #071a2e;
  --navy-2: #102d4c;
  --blue: #2077dc;
  --cyan: #33b7c5;
  --mint: #62d6b4;
  --ink: #142235;
  --muted: #64748b;
  --line: #dce5ef;
  --panel: rgba(255,255,255,.94);
  --danger: #c63c4d;
  --warning: #b66c09;
  --success: #167455;
  --shadow: 0 24px 70px rgba(7,26,46,.14);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #edf4f8; }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at 15% 0%, #d9eef4 0, transparent 38%), linear-gradient(135deg, #f7fafc, #e8f0f6); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.ambient { position: fixed; border-radius: 999px; filter: blur(1px); opacity: .34; pointer-events: none; }
.ambient-one { width: 380px; height: 380px; right: -140px; top: 80px; background: radial-gradient(circle, #54c7c8, transparent 66%); }
.ambient-two { width: 420px; height: 420px; left: -200px; bottom: -120px; background: radial-gradient(circle, #6aa8ec, transparent 68%); }
.shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 60px; }
.brandbar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 5px 12px rgba(7,26,46,.14)); }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-size: 20px; letter-spacing: -.03em; color: var(--navy); }
.brand small { color: var(--muted); margin-top: 5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; font-size: 10px; }
.auth-grid { min-height: 690px; display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border-radius: 28px; box-shadow: var(--shadow); background: var(--panel); border: 1px solid rgba(255,255,255,.8); }
.welcome-panel { padding: clamp(42px, 7vw, 82px); color: white; background: linear-gradient(145deg, rgba(7,26,46,.97), rgba(16,45,76,.96)), url("assets/optiforce-logo.png") center/55% no-repeat; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { color: var(--cyan); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; }
.welcome-panel h1 { max-width: 620px; font-size: clamp(38px, 5.4vw, 66px); line-height: .98; letter-spacing: -.055em; margin: 20px 0 22px; }
.welcome-panel > p { color: #c9d7e7; max-width: 590px; font-size: 17px; line-height: 1.7; }
.feature-list { margin-top: 42px; display: grid; gap: 20px; }
.feature-list > div { display: flex; gap: 16px; align-items: flex-start; }
.feature-list > div > span { width: 38px; height: 38px; border: 1px solid rgba(98,214,180,.45); color: var(--mint); border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 11px; }
.feature-list p { margin: 0; display: grid; gap: 4px; }
.feature-list strong { font-size: 15px; }
.feature-list small { color: #adc0d4; line-height: 1.45; }
.auth-card { padding: clamp(34px, 6vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 14px; background: #eef3f7; margin-bottom: 34px; }
.tab { border: 0; color: var(--muted); background: transparent; border-radius: 10px; padding: 11px; font-weight: 750; }
.tab.active { background: white; color: var(--navy); box-shadow: 0 4px 14px rgba(7,26,46,.08); }
.auth-form h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.035em; }
.auth-form > p { color: var(--muted); margin: 0 0 28px; line-height: 1.5; }
label { display: grid; gap: 8px; color: #344357; font-size: 13px; font-weight: 750; }
input, textarea { width: 100%; border: 1px solid var(--line); background: #fbfdff; border-radius: 12px; padding: 13px 14px; color: var(--ink); outline: none; transition: border .2s, box-shadow .2s; }
input:focus, textarea:focus { border-color: #6aa8ec; box-shadow: 0 0 0 4px rgba(32,119,220,.11); }
textarea { resize: vertical; }
.auth-form label + label { margin-top: 17px; }
.hint { display: block; color: var(--muted); margin: 8px 0 18px; }
.button { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; transition: transform .16s, opacity .16s, box-shadow .16s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button.primary { color: white; background: linear-gradient(135deg, var(--blue), #195fae); box-shadow: 0 10px 24px rgba(32,119,220,.23); }
.button.secondary { color: var(--navy); background: white; border: 1px solid var(--line); }
.button.ghost { color: var(--navy); background: rgba(255,255,255,.72); border: 1px solid rgba(7,26,46,.08); }
.button.danger { color: white; background: var(--danger); }
.button.wide { width: 100%; margin-top: 22px; }
.text-button { display: block; border: 0; background: none; color: var(--blue); font-weight: 750; margin: 17px auto 0; }
.app-view { display: grid; gap: 22px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-heading h1 { margin: 8px 0 5px; color: var(--navy); font-size: clamp(34px, 5vw, 52px); letter-spacing: -.055em; }
.page-heading p { color: var(--muted); margin: 0; }
.week-nav { display: flex; align-items: center; gap: 12px; padding: 9px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(7,26,46,.07); }
.week-nav > div { min-width: 150px; text-align: center; display: grid; gap: 3px; }
.week-nav small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 10px; color: var(--navy); background: #edf3f8; font-size: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.metric { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 10px 26px rgba(7,26,46,.055); }
.metric > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.metric strong { display: inline-block; color: var(--navy); font-size: 28px; letter-spacing: -.04em; margin: 8px 6px 0 0; }
.metric small { color: var(--muted); }
.status { font-size: 17px !important; padding: 7px 10px; border-radius: 999px; }
.status.draft { color: #53657a; background: #edf2f7; }
.status.pending { color: var(--warning); background: #fff3dd; }
.status.approved { color: var(--success); background: #dff7ee; }
.status.rejected { color: var(--danger); background: #fde8eb; }
.card { background: var(--panel); border: 1px solid rgba(255,255,255,.8); border-radius: 22px; box-shadow: 0 16px 45px rgba(7,26,46,.08); overflow: hidden; }
.card-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.card-heading h2 { color: var(--navy); margin: 0 0 4px; font-size: 21px; letter-spacing: -.025em; }
.card-heading p { color: var(--muted); margin: 0; font-size: 13px; }
.supervisor-field { width: min(310px, 100%); }
.day-list { display: grid; }
.day-row { display: grid; grid-template-columns: 140px 1.35fr 1fr 120px 120px 92px; gap: 12px; align-items: end; padding: 17px 26px; border-bottom: 1px solid #e8eef4; }
.day-row:last-child { border-bottom: 0; }
.day-name { align-self: center; display: grid; }
.day-name strong { color: var(--navy); }
.day-name small { color: var(--muted); margin-top: 3px; }
.day-row label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.day-row input { padding: 11px 12px; }
.save-day { height: 42px; padding: 9px 12px; }
.save-day.saved { color: var(--success); background: #e4f7f0; }
.timesheet-footer { border-top: 1px solid var(--line); background: #f8fbfd; padding: 24px 26px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.submit-area { text-align: right; }
.submit-area p { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.history-card { margin-top: 2px; }
.history-list { display: grid; }
.history-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; padding: 16px 26px; border-bottom: 1px solid var(--line); }
.history-item:last-child { border: 0; }
.history-item p { margin: 0; color: var(--navy); font-weight: 750; }
.history-item small { color: var(--muted); }
.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { border: 1px solid var(--line); background: rgba(255,255,255,.8); color: var(--muted); border-radius: 999px; padding: 9px 15px; font-weight: 800; }
.filter.active { color: white; background: var(--navy); border-color: var(--navy); }
.admin-list { display: grid; gap: 16px; }
.admin-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 14px 36px rgba(7,26,46,.07); }
.admin-summary { padding: 20px 22px; display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; align-items: center; gap: 16px; }
.admin-summary h3 { margin: 0 0 4px; color: var(--navy); }
.admin-summary p, .admin-summary small { margin: 0; color: var(--muted); }
.admin-summary strong { color: var(--navy); }
.admin-detail { border-top: 1px solid var(--line); padding: 18px 22px 22px; background: #f8fbfd; }
.admin-days { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-days th, .admin-days td { padding: 10px; text-align: left; border-bottom: 1px solid var(--line); }
.admin-days th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.admin-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--navy); color: white; border-radius: 12px; padding: 13px 18px; box-shadow: var(--shadow); transition: .24s ease; max-width: min(480px, calc(100% - 32px)); text-align: center; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8f2635; }
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .welcome-panel { min-height: 440px; }
  .summary-grid { grid-template-columns: repeat(2,1fr); }
  .day-row { grid-template-columns: 1fr 1fr; }
  .day-name { grid-column: 1 / -1; }
  .save-day { grid-column: 2; }
  .admin-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .brandbar { margin-bottom: 18px; }
  .welcome-panel { padding: 34px 26px; min-height: 420px; }
  .welcome-panel h1 { font-size: 42px; }
  .auth-card { padding: 34px 22px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .week-nav { justify-content: space-between; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { padding: 15px; }
  .card-heading { align-items: stretch; flex-direction: column; padding: 20px 16px; }
  .supervisor-field { width: 100%; }
  .day-row { padding: 18px 16px; grid-template-columns: 1fr 1fr; }
  .day-row label:nth-of-type(1), .day-row label:nth-of-type(2) { grid-column: 1 / -1; }
  .timesheet-footer { grid-template-columns: 1fr; padding: 20px 16px; }
  .submit-area { text-align: left; }
  .submit-area .button { width: 100%; }
  .history-item { grid-template-columns: 1fr auto; padding: 15px 16px; }
  .history-item small:last-child { grid-column: 1 / -1; }
  .admin-summary { grid-template-columns: 1fr; }
  .admin-actions { flex-direction: column; }
  .admin-actions .button { width: 100%; }
  .admin-detail { overflow-x: auto; }
}
