:root {
  --ink: #14162a;
  --muted: #6d7188;
  --line: #e6e8f0;
  --surface: #ffffff;
  --canvas: #f4f5f9;
  --purple: #5b5fef;
  --purple-dark: #4548cf;
  --navy: #13172b;
  --success: #0e9f8a;
  --shadow: 0 18px 50px rgba(26, 29, 60, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; font-size: 16px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.login-body { background: var(--navy); }
.app-body { background: var(--canvas); }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(440px, .95fr); }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(28px, 5vw, 72px); color: #fff; background: radial-gradient(circle at 15% 75%, rgba(91,95,239,.42), transparent 33%), linear-gradient(150deg, #171b35, #0d1020); }
.login-brand::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; bottom: -190px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 68px rgba(255,255,255,.025), 0 0 0 136px rgba(255,255,255,.02); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 1rem; letter-spacing: -.02em; }
.brand strong { font-weight: 500; color: var(--muted); }
.brand-on-dark strong { color: #b9bed3; }
.brand-mark { display: inline-flex; align-items: flex-end; width: 28px; height: 28px; gap: 3px; }
.brand-mark i { display: block; width: 7px; border-radius: 7px; background: var(--purple); transform: skewY(-18deg); }
.brand-mark i:nth-child(1) { height: 14px; }
.brand-mark i:nth-child(2) { height: 23px; }
.brand-mark i:nth-child(3) { height: 18px; background: #9b9efb; }
.login-copy { position: relative; z-index: 1; margin: auto 0; max-width: 580px; }
.eyebrow { margin: 0 0 10px; color: #aeb3c9; font-size: .75rem; line-height: 1.2; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.dark { color: var(--purple); }
.login-copy h1 { margin: 0; max-width: 690px; font-size: clamp(3.25rem, 6.8vw, 6.8rem); line-height: .92; letter-spacing: -.07em; font-weight: 760; }
.login-copy > p:last-child { max-width: 480px; margin: 28px 0 0; color: #bac0d2; font-size: 1.08rem; line-height: 1.7; }
.office-orbit { position: relative; z-index: 1; display: flex; gap: 12px; }
.office-orbit span { display: grid; place-items: center; min-width: 48px; height: 32px; padding: 0 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 99px; color: #dfe2f0; font-size: .72rem; font-weight: 700; }
.login-panel { display: grid; place-items: center; padding: 36px; background: #f7f8fb; }
.login-card { width: min(440px, 100%); display: grid; gap: 24px; }
.login-card h2 { margin: 0 0 8px; font-size: clamp(2.25rem, 4vw, 3.25rem); letter-spacing: -.055em; }
.muted { margin: 0; color: var(--muted); line-height: 1.6; }
label { display: grid; gap: 8px; font-size: .87rem; font-weight: 700; }
input, select { width: 100%; min-height: 52px; border: 1px solid #d8dbe7; border-radius: 12px; padding: 0 15px; color: var(--ink); background: #fff; outline: none; transition: border .18s, box-shadow .18s; }
input:focus, select:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(91,95,239,.12); }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 92px; }
.show-password { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); border: 0; padding: 8px; color: var(--purple); background: transparent; font-size: .78rem; font-weight: 750; cursor: pointer; }
.button { min-height: 52px; border: 0; border-radius: 12px; padding: 0 20px; font-weight: 750; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--purple); box-shadow: 0 10px 24px rgba(91,95,239,.22); }
.button.primary:hover { background: var(--purple-dark); }
.button.secondary { color: var(--ink); background: #eef0f5; }
.full { width: 100%; }
.session-note { margin: -8px 0 0; color: #8b8fa1; text-align: center; font-size: .78rem; line-height: 1.5; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: .88rem; line-height: 1.5; }
.alert.error { color: #8f2739; background: #fdecef; }

.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-name { font-size: .88rem; font-weight: 650; }
.link-button { border: 0; padding: 8px; color: var(--muted); background: transparent; font-size: .8rem; cursor: pointer; }
.link-button:hover { color: var(--ink); }
.avatar { width: 42px; height: 42px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--avatar); font-size: .76rem; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.avatar.small { width: 34px; height: 34px; font-size: .65rem; }
.workspace { position: relative; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 80px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.page-heading h1, .planner-header h1 { margin: 0; font-size: clamp(2.15rem, 4vw, 3.7rem); line-height: 1; letter-spacing: -.055em; }
.page-heading > p { max-width: 340px; margin: 0; color: var(--muted); line-height: 1.55; }
.office-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.office-card { min-height: 290px; display: flex; flex-direction: column; justify-content: space-between; padding: 26px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); text-decoration: none; box-shadow: 0 5px 16px rgba(29,32,65,.035); transition: transform .2s, box-shadow .2s, border-color .2s; }
.office-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent), #fff 55%); box-shadow: var(--shadow); }
.office-code { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--accent); font-size: .75rem; font-weight: 850; letter-spacing: .04em; }
.office-code.large { width: 72px; height: 72px; flex: 0 0 auto; border-radius: 20px; font-size: .92rem; }
.office-card-copy { display: grid; gap: 7px; }
.office-card-copy strong { min-height: 52px; font-size: 1.35rem; line-height: 1.25; letter-spacing: -.03em; }
.office-city { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.office-today { color: var(--muted); font-size: .85rem; }
.office-today b { color: var(--ink); }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; color: var(--muted); font-size: .82rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--purple); }
.planner-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.office-title { display: flex; align-items: center; gap: 20px; }
.date-picker { width: 190px; }
.date-picker span { color: var(--muted); font-size: .75rem; }
.date-picker input { min-height: 46px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin: 36px 0 20px; }
.day-chip { position: relative; min-height: 86px; display: grid; place-items: center; align-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: #fff; text-decoration: none; transition: border-color .18s, transform .18s; }
.day-chip:hover { transform: translateY(-2px); border-color: #bfc2d4; }
.day-chip > span { font-size: .7rem; text-transform: uppercase; }
.day-chip strong { color: var(--ink); font-size: 1.3rem; }
.day-chip small { position: absolute; bottom: 6px; font-size: .62rem; }
.day-chip.selected { border-color: var(--purple); color: #cfd0ff; background: var(--purple); box-shadow: 0 10px 20px rgba(91,95,239,.16); }
.day-chip.selected strong { color: #fff; }
.day-chip.today:not(.selected) { border-color: rgba(91,95,239,.4); }
.day-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 20px; align-items: start; }
.attendance-card, .action-card { border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 6px 20px rgba(29,32,65,.035); }
.attendance-card { min-height: 390px; padding: 28px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.card-header h2, .action-card h2 { margin: 0; font-size: 1.42rem; letter-spacing: -.035em; }
.count-pill { padding: 9px 12px; border-radius: 99px; color: var(--muted); background: #f2f3f7; font-size: .78rem; white-space: nowrap; }
.count-pill b { color: var(--ink); }
.people-list { display: grid; gap: 3px; margin: 18px 0 0; padding: 0; list-style: none; }
.person { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; min-height: 70px; padding: 10px 12px; border-radius: 12px; }
.person.me { background: #f6f6ff; }
.person > span:nth-child(2) { display: flex; align-items: baseline; gap: 8px; }
.person strong { font-size: .94rem; }
.person small { color: var(--purple); font-size: .7rem; font-weight: 750; }
.presence { color: var(--success); font-size: .76rem; font-weight: 700; }
.empty-state { min-height: 280px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state h3 { margin: 12px 0 6px; font-size: 1.08rem; }
.empty-state p { margin: 0; color: var(--muted); font-size: .88rem; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px dashed #c9ccda; border-radius: 50%; color: var(--purple); font-size: 2rem; }
.action-card { position: sticky; top: 20px; display: grid; gap: 32px; padding: 28px; }
.status-symbol { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 50%; color: var(--purple); background: #efefff; font-size: 1.45rem; font-weight: 650; }
.action-card.attending .status-symbol { color: var(--success); background: #e5f7f4; }
.action-card p { margin: 9px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.past-note { padding: 13px; border-radius: 10px; text-align: center; background: #f2f3f7; }
.week-overview { margin-top: 48px; }
.week-overview-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.week-overview-header h2 { margin: 0; font-size: 1.65rem; letter-spacing: -.04em; }
.week-navigation { display: flex; align-items: center; gap: 5px; }
.week-navigation a { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; text-decoration: none; font-size: 1.35rem; transition: border-color .18s, color .18s; }
.week-navigation a:hover { border-color: var(--purple); color: var(--purple); }
.week-navigation .week-today-link { padding: 0 13px; font-size: .76rem; font-weight: 750; }
.week-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.week-day-card { min-height: 190px; display: flex; flex-direction: column; gap: 17px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; color: var(--ink); background: #fff; text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; }
.week-day-card:hover { transform: translateY(-3px); border-color: #bfc2d4; box-shadow: 0 10px 28px rgba(29,32,65,.07); }
.week-day-card.today { border-color: color-mix(in srgb, var(--accent), #fff 48%); }
.week-day-card.selected { box-shadow: inset 0 3px 0 var(--accent); }
.week-day-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.week-day-heading > span { display: grid; gap: 3px; min-width: 0; }
.week-day-heading b { font-size: .87rem; }
.week-day-heading small { color: var(--muted); font-size: .7rem; }
.week-day-heading > strong { min-width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--ink); background: #f1f2f6; font-size: .78rem; }
.week-people { display: grid; gap: 11px; }
.avatar-stack { display: flex; min-height: 30px; padding-left: 3px; }
.avatar.tiny { width: 30px; height: 30px; margin-left: -4px; border: 2px solid #fff; font-size: .52rem; }
.week-names { display: grid; gap: 3px; color: #50546a; font-size: .72rem; line-height: 1.4; }
.week-names small { color: var(--muted); font-size: .67rem; }
.week-empty { color: #9a9dad; font-size: .75rem; }
.my-attendance { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--success); font-size: .7rem; font-weight: 750; }
.toast { position: fixed; z-index: 10; top: 92px; left: 50%; transform: translateX(-50%); border-radius: 99px; padding: 11px 18px; color: #fff; background: var(--navy); box-shadow: var(--shadow); font-size: .84rem; animation: toast-in .25s ease-out; }
.toast.leaving { opacity: 0; transform: translate(-50%, -8px); transition: opacity .4s, transform .4s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 38vh; padding: 28px; }
  .login-copy { margin: 54px 0; }
  .login-copy h1 { font-size: clamp(3rem, 12vw, 5.5rem); }
  .office-orbit { display: none; }
  .login-panel { min-height: 62vh; padding: 44px 24px; }
  .office-grid { grid-template-columns: 1fr; }
  .office-card { min-height: 220px; }
  .day-layout { grid-template-columns: 1fr; }
  .action-card { position: static; }
  .week-grid { grid-template-columns: repeat(5, minmax(190px, 1fr)); overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
  .week-day-card { scroll-snap-align: start; }
}

@media (max-width: 640px) {
  .topbar { height: 68px; padding: 0 16px; }
  .brand > span:last-child { display: none; }
  .user-name { display: none; }
  .workspace { width: min(100% - 28px, 1180px); padding: 34px 0 60px; }
  .page-heading, .planner-header { align-items: stretch; flex-direction: column; }
  .page-heading > p { font-size: .9rem; }
  .office-title { align-items: flex-start; }
  .office-code.large { width: 58px; height: 58px; border-radius: 16px; }
  .date-picker { width: 100%; }
  .week-strip { display: flex; overflow-x: auto; margin-inline: -14px; padding: 0 14px 8px; scroll-snap-type: x proximity; }
  .day-chip { min-width: 70px; scroll-snap-align: center; }
  .attendance-card, .action-card { padding: 20px; }
  .card-header { align-items: flex-start; }
  .card-header h2 { font-size: 1.18rem; }
  .person { grid-template-columns: auto 1fr; }
  .presence { grid-column: 2; margin-top: -12px; }
  .week-overview { margin-top: 38px; }
  .week-overview-header { align-items: flex-start; flex-direction: column; }
  .week-navigation { width: 100%; }
  .week-navigation .week-today-link { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

