:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --navy: #102d55;
  --navy-deep: #0a2344;
  --blue: #2f7fd6;
  --ink: #17324d;
  --muted: #6a7f95;
  --line: #d8e3ee;
  --surface: #ffffff;
  --page: #edf3f8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background: var(--page);
}

button,
input {
  font: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand__mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #58a7ff, #1c65bd);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%);
  font-size: 19px;
}

.brand__word {
  font-size: 16px;
}

.auth-body {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 10% 10%, rgb(64 134 210 / 18%), transparent 30%),
    linear-gradient(145deg, #edf3f8, #f8fafc);
}

.auth-shell {
  width: min(100%, 900px);
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  border: 1px solid rgb(119 148 177 / 25%);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgb(22 50 77 / 16%);
}

.auth-hero {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgb(75 159 255 / 36%), transparent 28%),
    linear-gradient(155deg, var(--navy), var(--navy-deep));
}

.auth-hero h1 {
  max-width: 420px;
  margin: 8px 0 14px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.auth-hero p {
  max-width: 390px;
  margin: 0;
  color: #d6e8fb;
  font-size: 17px;
  line-height: 1.5;
}

.auth-hero .eyebrow {
  color: #82beff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.auth-card {
  align-self: center;
  padding: 42px;
}

.auth-step {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  letter-spacing: -0.025em;
}

.auth-hint {
  margin: 9px 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.field > span:first-child {
  color: #38526c;
  font-size: 13px;
  font-weight: 750;
}

.field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cbd9e6;
  border-radius: 13px;
  outline: none;
  background: #f9fbfd;
  color: var(--ink);
  padding: 0 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input:focus {
  border-color: #438cd8;
  background: #fff;
  box-shadow: 0 0 0 4px rgb(47 127 214 / 12%);
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 82px;
}

[data-pin-input] {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .32em;
}

.password-control button {
  position: absolute;
  top: 50%;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 8px;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.password-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.form-error {
  margin: 16px 0 2px;
  border: 1px solid #f1c6cc;
  border-radius: 11px;
  background: #fff3f4;
  color: #a42a3a;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #347fd1, #1c65b9);
  box-shadow: 0 9px 22px rgb(34 111 193 / 24%);
  color: #fff;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.auth-back {
  display: block;
  margin-top: 15px;
  color: var(--blue);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}

.schedule-body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 12px;
  background:
    radial-gradient(circle at 50% 0, rgb(46 125 211 / 12%), transparent 28%),
    var(--page);
}

.schedule-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgb(119 148 177 / 25%);
  border-radius: 26px;
  background: #f8fafc;
  box-shadow: 0 24px 70px rgb(18 49 80 / 18%);
}

.schedule-header {
  padding: 20px;
  border-radius: 0 0 28px 28px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgb(89 169 255 / 30%), transparent 28%),
    linear-gradient(145deg, #153966, var(--navy-deep));
}

.schedule-topline,
.month-nav,
.calendar-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand--compact .brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 17px;
}

.brand--compact .brand__word {
  font-size: 14px;
}

.logout-button {
  min-height: 34px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 10px;
  background: rgb(255 255 255 / 9%);
  color: #e9f4ff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.employee-block {
  padding: 27px 2px 22px;
}

.employee-block p {
  margin: 0 0 5px;
  color: #8fc6ff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.employee-block h1 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(20px, 6vw, 27px);
  line-height: 1.15;
  white-space: nowrap;
}

.month-nav {
  gap: 10px;
}

.month-nav a {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 14px;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
}

.month-nav strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 20px;
  white-space: nowrap;
}

.calendar-card {
  padding: 18px 7px 14px;
}

.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.weekdays {
  margin-bottom: 7px;
}

.weekdays span {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.weekdays span:nth-child(6),
.weekdays span:nth-child(7) {
  color: #b34d5b;
}

.day-card {
  position: relative;
  min-width: 0;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--shift-color, #dbe5ee) 70%, #8fa5b8);
  border-radius: 12px;
  background: var(--shift-color, #fff);
  color: var(--shift-text, var(--ink));
  padding: 7px 5px 6px;
  box-shadow: 0 2px 5px rgb(30 61 91 / 5%);
}

.day-card__number {
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
}

.day-card__label {
  max-width: 100%;
  margin: auto 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(9px, 2.7vw, 12px);
  line-height: 1.05;
  white-space: nowrap;
}

.day-card small {
  opacity: 0.83;
  font-size: 9px;
  font-weight: 800;
}

.day-card--empty {
  background: #fff;
  color: #6f8498;
}

.day-card--outside {
  border-color: #e2e9f0;
  background: #f3f6f9;
  color: #b0bdc9;
  box-shadow: none;
}

.day-card--today {
  outline: 2px solid #1b68bc;
  outline-offset: -2px;
}

.calendar-total {
  gap: 12px;
  margin: 14px 4px 0;
  border-top: 1px solid var(--line);
  padding: 13px 4px 1px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-total strong {
  color: var(--ink);
  font-size: 16px;
}

.message-card {
  width: min(100%, 420px);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(18 49 80 / 16%);
  padding: 36px;
  text-align: center;
}

.message-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 17px;
  background: #fff0d8;
  color: #a45c00;
  font-size: 28px;
  font-weight: 900;
}

.message-card h1 {
  margin: 0;
  font-size: 25px;
}

.message-card p {
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 700px) {
  .auth-body {
    display: block;
    padding: 0;
    background: #fff;
  }

  .auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-hero {
    min-height: 250px;
    padding: max(22px, env(safe-area-inset-top)) 22px 30px;
    border-radius: 0 0 28px 28px;
  }

  .auth-hero h1 {
    margin-bottom: 8px;
    font-size: 38px;
  }

  .auth-hero p {
    font-size: 14px;
  }

  .auth-card {
    padding: 28px 22px max(28px, env(safe-area-inset-bottom));
  }

  .auth-card h2 {
    font-size: 28px;
  }

  .schedule-body {
    padding: 0;
    background: #f8fafc;
  }

  .schedule-shell {
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .schedule-header {
    padding: max(16px, env(safe-area-inset-top)) 14px 18px;
  }

  .calendar-card {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .calendar-grid,
  .weekdays {
    gap: 2px;
  }

  .day-card {
    min-height: 69px;
    border-radius: 9px;
    padding: 6px 3px;
  }

  .day-card__number {
    font-size: 13px;
  }
}
