:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #102f49;
  background: #dcefff;
  --blue: #083f66;
  --blue-soft: #dcefff;
  --green: #25d366;
  --green-dark: #087564;
  --line: #bed8e9;
  --danger: #b52d43;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  min-height: 100dvh;
  padding: clamp(18px,5vw,52px) 16px;
  background:
    radial-gradient(circle at 12% 18%, rgba(37,211,102,.15), transparent 24%),
    radial-gradient(circle at 88% 84%, rgba(8,63,102,.13), transparent 28%),
    linear-gradient(145deg,#d5ebff 0%,#edf8ff 48%,#def5eb 100%);
}

button, input, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

.attendance-shell { width: min(520px,100%); margin: 0 auto; }
.attendance-header { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; padding: 0 5px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: #f8faf3; overflow: hidden; box-shadow: 0 8px 20px rgba(8,63,102,.18); }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.eyebrow { margin: 0 0 3px; color: var(--green-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.attendance-header h1 { margin: 0; color: var(--blue); font-size: 28px; letter-spacing: -.02em; }

.panel { padding: clamp(22px,5vw,34px); border: 1px solid rgba(174,207,228,.85); border-radius: 25px; background: rgba(255,255,255,.93); box-shadow: 0 22px 60px rgba(8,63,102,.16), inset 0 1px 0 white; backdrop-filter: blur(12px); }
.panel-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 24px; }
.panel-heading h2 { margin: 1px 0 5px; font-size: 24px; }
.panel-heading p { margin: 0; color: #5d778c; font-size: 13px; font-style: italic; line-height: 1.5; }
.step-badge { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: 12px; font-weight: 800; }

.stack-form { display: grid; gap: 10px; }
.stack-form label { color: #25455f; font-size: 11px; font-weight: 800; }
.stack-form input { width: 100%; height: 52px; padding: 0 15px; border: 1px solid #acc9dc; border-radius: 14px; outline: none; color: #102f49; background: #f9fcff; font-size: 16px; }
.stack-form input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(37,211,102,.13); }
.otp-input { text-align: center; letter-spacing: .32em; font-size: 23px !important; }
.primary-button, .present-button { min-height: 50px; border: 0; border-radius: 15px; cursor: pointer; color: #063c34; background: linear-gradient(145deg,#48e986,var(--green)); box-shadow: 0 8px 18px rgba(18,140,80,.23), inset 0 1px 0 rgba(255,255,255,.55); font-weight: 800; transition: transform .16s ease, box-shadow .16s ease; }
.primary-button:hover, .present-button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(18,140,80,.28); }
.primary-button:disabled, .present-button:disabled { opacity: .58; cursor: wait; transform: none; }
.text-button { padding: 7px; border: 0; background: transparent; color: var(--green-dark); cursor: pointer; font-size: 11px; font-weight: 800; }
.code-message { margin: 0 0 3px; color: #5d778c; font-size: 12px; font-style: italic; line-height: 1.5; }
.form-error { min-height: 18px; margin: 10px 0 0; color: var(--danger); font-size: 11px; line-height: 1.4; }

.user-row { display: flex; align-items: center; gap: 11px; padding-bottom: 17px; border-bottom: 1px solid #d7e5ee; }
.user-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; color: #063c34; background: #c9f7d3; font-size: 14px; font-weight: 800; }
.user-details { flex: 1; min-width: 0; }
.user-details small, .user-details strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-details small { margin-bottom: 3px; color: #6c8395; font-size: 9px; font-style: italic; }
.user-details strong { font-size: 14px; }

.date-card { margin: 22px 0 18px; text-align: center; }
.date-card p { margin: 0 0 3px; color: #607b8f; font-size: 12px; font-weight: 700; }
.date-card strong { color: var(--blue); font-size: clamp(34px,9vw,46px); letter-spacing: -.04em; }
.attendance-status { padding: 16px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 17px; background: #f2f9ff; }
.status-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; color: #5f7b90; background: #dfedf6; font-size: 21px; font-weight: 800; }
.attendance-status strong { display: block; font-size: 14px; }
.attendance-status p { margin: 4px 0 0; color: #60798b; font-size: 11px; line-height: 1.45; }
.attendance-status.present { border-color: #a8dfb4; background: #e7fbed; }
.attendance-status.present .status-icon { color: #063c34; background: var(--green); }
.attendance-status.absent { border-color: #e7bd92; background: #fff4e8; }
.attendance-status.absent .status-icon { color: #7a3515; background: #ffd4ad; }
.comments-field { margin-top: 16px; }
.comments-field label { display: block; margin-bottom: 7px; color: #25455f; font-size: 11px; font-weight: 800; }
.comments-field label span { display: block; margin-top: 3px; color: #73899a; font-size: 8px; font-style: italic; font-weight: 400; }
.comments-field textarea { width: 100%; min-height: 78px; padding: 11px 13px; resize: vertical; border: 1px solid #acc9dc; border-radius: 14px; outline: none; color: #102f49; background: #f9fcff; font-size: 12px; line-height: 1.45; }
.comments-field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(37,211,102,.13); }
.present-button { width: 100%; min-height: 58px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 16px; }
.present-button span { font-size: 21px; }
.absence-action { margin-top: 12px; text-align: center; }
.absence-button { min-height: 30px; padding: 0 12px; border: 1px solid #d9a5ad; border-radius: 9px; cursor: pointer; color: #983348; background: transparent; font-size: 9px; font-weight: 800; }
.absence-button:hover { background: #fff0f2; }
.absence-button:disabled { opacity: .55; cursor: wait; }
.absence-action small { margin-top: 4px; display: block; color: #8a9299; font-size: 7px; font-style: italic; }
.recorded-comment { margin-top: 14px; padding: 13px 14px; border: 1px solid #d5e3ec; border-radius: 14px; background: #fbfdff; }
.recorded-comment small { color: #6f8799; font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.recorded-comment p { margin: 5px 0 0; color: #35546b; font-size: 11px; line-height: 1.45; white-space: pre-wrap; }

.location-card { margin-top: 17px; padding: 15px; border: 1px solid #c8dfed; border-radius: 17px; background: #f7fbff; }
.location-label { margin: 0 0 11px; color: #587286; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.coordinates { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.coordinates .area-cell { grid-column: 1 / -1; }
.coordinates span { padding: 11px; border-radius: 12px; background: white; box-shadow: 0 3px 10px rgba(8,63,102,.06); }
.coordinates small, .coordinates strong { display: block; }
.coordinates small { margin-bottom: 4px; color: #6f8799; font-size: 8px; text-transform: uppercase; }
.coordinates strong { color: var(--blue); font-size: 13px; font-variant-numeric: tabular-nums; }
.coordinates .area-cell strong { letter-spacing: .04em; }
.location-card > p:last-child { margin: 10px 2px 0; color: #6a8395; font-size: 9px; font-style: italic; }
.device-card { margin-top: 12px; padding: 13px 14px; display: flex; align-items: center; gap: 11px; border: 1px solid #c8dfed; border-radius: 15px; background: #f5faff; }
.device-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #dcefff; }
.device-card small, .device-card strong { display: block; }
.device-card small { margin-bottom: 3px; color: #6f8799; font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.device-card strong { color: var(--blue); font-size: 12px; font-variant-numeric: tabular-nums; }
.device-card p { margin: 4px 0 0; color: #60798b; font-size: 9px; line-height: 1.4; }
.device-card.shared { border-color: #e9a7b2; background: #fff1f3; }
.device-card.shared .device-icon { color: #8e283b; background: #f8ccd3; }
.device-card.shared p { color: #9b2d40; font-weight: 800; }
.privacy-note { margin: 16px 4px 0; color: #72899a; font-size: 9px; font-style: italic; line-height: 1.55; text-align: center; }

.toast { position: fixed; right: 18px; bottom: 18px; max-width: 340px; padding: 12px 15px; border-radius: 13px; color: white; background: var(--blue); box-shadow: 0 12px 35px rgba(8,63,102,.25); font-size: 12px; }

@media (max-width: 520px) {
  body { padding: 17px 11px; }
  .attendance-header { margin-bottom: 13px; }
  .panel { border-radius: 21px; }
  .coordinates { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { transition-duration: .01ms !important; }
}
