:root {
  --bg: #fff0f7;
  --panel: #ffffff;
  --ink: #241f26;
  --muted: #74666e;
  --line: #f5b6d4;
  --green: #e82083;
  --green-dark: #ae145b;
  --blue: #ae145b;
  --amber: #f48cbe;
  --mint: #1f9f88;
  --red: #b42318;
  --soft: #fff5fa;
  --shadow: 0 10px 28px rgba(174, 20, 91, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

input, select, textarea {
  font-size: 16px;
  min-width: 0;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

:focus-visible {
  outline: 3px solid #ae145b;
  outline-offset: 3px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--bg);
}

.login-card,
.work-panel {
  background: var(--panel);
}

.login-card {
  width: min(390px, 100%);
  padding: 34px 26px 28px;
  text-align: center;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-align: left;
}

.brand-lockup-login {
  justify-content: center;
  margin: 0 auto 22px;
}

.brand-mark {
  width: 64px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: #fff url("referencia-logo.png") -20px -14px / 448px 448px no-repeat;
  color: var(--green-dark);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgba(185, 45, 74, 0.14);
}

.brand-lockup strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}

.brand-lockup span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  line-height: 1.2;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 2rem;
}

.login-card h1 {
  margin: 0 0 24px;
  color: #61666b;
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.05rem;
}

.login-form,
.form-grid {
  display: grid;
  gap: 12px;
}

.login-form {
  margin-top: 0;
}

.login-form input {
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid #f5a0c8;
  border-radius: 2px;
  background: #fff5fa;
  color: #5e6670;
  text-align: center;
  font-size: 1rem;
}

.login-form input::placeholder {
  color: #9aa0a6;
}

.login-form button {
  justify-self: center;
  min-height: 38px;
  margin-top: 4px;
  padding: 0 22px;
  border-radius: 2px;
  background: var(--green);
  font-size: 1rem;
  letter-spacing: 0;
}

.login-form button:hover {
  background: var(--green-dark);
}

.forgot-text {
  margin: 18px 0 0;
  color: #707780;
  font-size: 0.96rem;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

input,
select,
button {
  min-height: 46px;
  border-radius: 6px;
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

textarea {
  font: inherit;
  border-radius: 6px;
  resize: vertical;
  min-height: 88px;
}

.student-details-form {
  margin: 18px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

button {
  border: 0;
  padding: 0 16px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

.dark-button {
  background: var(--blue);
}

.dark-button:hover {
  background: #ae145b;
}

.light-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green-dark);
}

.light-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

.light-button:hover {
  background: #fff0f7;
}

.danger-button {
  border: 1px solid #fecaca;
  background: #fff;
  color: var(--red);
}

.danger-button:hover {
  background: #fee2e2;
}

.filled-danger {
  background: var(--red);
  color: #fff;
}

.filled-danger:hover {
  background: #8f1f16;
}

.message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.message.ok {
  color: var(--green-dark);
}

.message.error {
  color: var(--red);
}

.topbar {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.clock {
  min-width: 86px;
  text-align: right;
  color: var(--green-dark);
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 18px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.backup-panel {
  width: min(1180px, 100%);
  margin: -4px auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.backup-panel[hidden] {
  display: none;
}

.backup-line {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.backup-line:last-child {
  border-bottom: 0;
}

.backup-title {
  cursor: default;
}

.backup-title strong,
.backup-action span {
  font-size: 1rem;
}

.backup-title span,
.backup-action small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.backup-action:hover {
  background: #fff2f8;
  color: var(--green-dark);
}

.dashboard-hub {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.hub-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.hub-button {
  min-height: 82px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  box-shadow: var(--shadow);
  text-align: center;
}

.hub-button strong {
  font-size: 1rem;
}

.hub-button span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.hub-button:hover,
.hub-button.active {
  background: #fff2f8;
  color: var(--green-dark);
}

.hub-button.active span {
  color: var(--green-dark);
}

.hub-button.fee-expired {
  border-color: #f0b4ad;
  color: var(--red);
}

.hub-button.fee-expired:hover,
.hub-button.fee-expired.active {
  background: #fff1f2;
  color: var(--red);
}

.hub-button.fee-soon {
  border-color: #f3bad7;
  color: #a34b77;
}

.hub-button.fee-soon:hover,
.hub-button.fee-soon.active {
  background: #fff5fa;
  color: #8d245b;
}

.hub-button.plan-full {
  border-color: #c99de0;
  color: #7d2f9e;
}

.hub-button.plan-full:hover,
.hub-button.plan-full.active {
  border-color: #8b3caf;
  background: #fbf2ff;
  color: #74268f;
}

.full-plan-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px;
  border: 1px solid #eab4d3;
  border-radius: 6px;
  background: #fff5fa;
  color: var(--blue);
  font-weight: 800;
}

.full-plan-option input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--green);
}

.dashboard-workspace[data-section="register"] .register-panel,
.dashboard-workspace[data-section="employees"] .employee-panel,
.dashboard-workspace[data-section="expired"] .employee-panel,
.dashboard-workspace[data-section="due-soon"] .employee-panel,
.dashboard-workspace[data-section="full"] .employee-panel {
  grid-column: 1 / -1;
  grid-row: auto;
}

.dashboard-workspace[data-section="register"] .employee-panel,
.dashboard-workspace[data-section="register"] .detail-panel,
.dashboard-workspace[data-section="employees"] .register-panel,
.dashboard-workspace[data-section="expired"] .register-panel,
.dashboard-workspace[data-section="due-soon"] .register-panel,
.dashboard-workspace[data-section="full"] .register-panel {
  display: none;
}

.work-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.register-panel {
  border-top: 6px solid var(--amber);
}

.mark-panel {
  border-top: 6px solid var(--green);
}

.employee-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.detail-panel {
  grid-column: 1 / -1;
}

.fingerprint-option,
.photo-picker {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 46px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.fingerprint-option input {
  width: 20px;
  min-height: 20px;
}

.photo-picker {
  display: grid;
}

.photo-picker input {
  min-height: 42px;
  padding: 8px;
}

.photo-help {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.photo-preview {
  width: 84px;
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(48, 34, 54, 0.16);
}

.mark-grid {
  grid-template-columns: 1fr 1fr;
  align-items: end;
}

.mark-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mark-actions button {
  min-height: 64px;
  font-size: 1.25rem;
}

.employee-list {
  display: grid;
  gap: 10px;
}

.search-box {
  margin-bottom: 12px;
}

.search-box input {
  padding-left: 38px;
  background:
    linear-gradient(transparent, transparent),
    #fff;
  background-image:
    radial-gradient(circle at 15px 18px, transparent 5px, var(--muted) 6px, transparent 7px),
    linear-gradient(45deg, transparent 0 21px, var(--muted) 22px 24px, transparent 25px);
  background-repeat: no-repeat;
}

.employee-actions,
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-toggle {
  align-self: end;
  min-height: 38px;
  padding: 8px 12px;
  background: #fff2f8;
  color: var(--blue);
  font-weight: 900;
}

.detail-expandable[hidden] { display: none; }

.checks-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.student-checks-panel[hidden] { display: none; }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checks-table-wrap { overflow-x: auto; margin-top: 14px; }
.checks-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 0.86rem; }
.check-import-image { display: block; width: 100%; max-height: 260px; object-fit: contain; margin: 10px 0 16px; border: 1px solid var(--line); background: #fff; }
.checks-table th, .checks-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.checks-table th { color: var(--blue); background: #fff2f8; }
.table-action { min-height: 30px; padding: 4px 8px; background: transparent; color: var(--blue); font-weight: 800; }
.danger-text { color: var(--red); }

.modal-card.check-import-dialog { width: min(1080px, 100%); max-height: calc(100dvh - 36px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.import-heading { display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.import-heading h2 { font-size: 1.25rem; margin: 0; }
.import-heading p { margin: 4px 0 0; }
.import-close { width: 40px; height: 40px; flex-shrink: 0; padding: 0; font-size: 1.5rem; }
.import-content { overflow-y: auto; padding: 18px 20px; min-height: 0; overscroll-behavior: contain; }
.import-source { margin-bottom: 20px; }
.import-file-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.import-file-label { font-size: 14px; display: grid; gap: 6px; min-width: 0; max-width: 100%; }
.import-file-label input { max-width: 100%; background: white; }
#ocrPreview { display: block; width: 100%; max-height: 280px; object-fit: contain; border: 1px solid var(--line); }
#ocrProgress { width: 100%; accent-color: var(--green); }
.import-record { margin: 14px 0; border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.import-record > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.import-record > header > label { display: inline-flex; align-items: center; gap: 8px; }
.import-record input[type="checkbox"], .import-confirm input { width: 18px; height: 18px; min-height: 0; accent-color: var(--green); vertical-align: middle; }
.import-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.import-fields label { display: grid; align-content: start; gap: 5px; min-width: 0; font-size: 14px; }
.import-fields input, .import-fields textarea { width: 100%; min-width: 0; font-size: 16px; }
.import-fields:disabled { opacity: 0.5; }
.import-uncertain input { border: 2px solid #b77400; background: #fffaf0; }
.import-uncertain small, .import-review-label { color: #875300; font-size: 13px; }
.import-notes { grid-column: 1 / -1; }
.import-confirm { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 10px 0; }
.import-source-text { margin-top: 10px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.import-source-text summary { cursor: pointer; }
.import-footer { padding: 12px 20px 16px; border-top: 1px solid var(--line); background: #fff; }
.import-footer .message { overflow-wrap: anywhere; }
.import-footer .message:empty { display: none; }
.import-footer button { font-size: 1rem; }
.import-footer .modal-actions { justify-content: flex-end; }
@media (max-width: 600px) {
  .modal-card.check-import-dialog { max-height: calc(100dvh - 20px); }
  .import-heading, .import-content, .import-footer { padding: 12px; }
  .import-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-record { padding: 10px; }
  .import-heading h2 { font-size: 1.1rem; }
}

.fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 14px;
  padding: 9px 15px;
  border: 1px solid rgba(190, 19, 101, 0.28);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.fullscreen-button:hover {
  background: #fff2f8;
}

.employee-actions {
  margin-top: -5px;
  padding: 0 0 8px 14px;
}

.employee-actions button,
.detail-actions button {
  min-height: 38px;
}

.whatsapp-bubble {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #73c79b;
  border-radius: 999px;
  background: #eefaf2;
  color: #176b3a;
  font-weight: 800;
  text-decoration: none;
}

.whatsapp-bubble:hover {
  background: #dcf5e5;
}

.whatsapp-bubble.disabled {
  border-color: var(--line);
  background: #f7f7f7;
  color: var(--muted);
  cursor: not-allowed;
}

.employee-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 7px solid var(--green);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.employee-card:hover,
.employee-card.active {
  background: #fff2f8;
  border-left-color: var(--blue);
}

.avatar {
  width: 52px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  object-fit: cover;
}

.avatar-large {
  width: 86px;
  font-size: 1.35rem;
}

.avatar-kiosk {
  width: 92px;
  margin: 0 auto 10px;
  font-size: 1.55rem;
}

.employee-card-name {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.employee-card small,
.detail-muted,
.mark-line {
  color: var(--muted);
}

.employee-password {
  display: block;
  margin-top: 5px;
  color: var(--green-dark);
  font-weight: 800;
}

.detail-password {
  margin: 8px 0 0;
}

.detail-actions {
  margin-top: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fce0ee;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 800;
}

.status-pill.out,
.status-pill.empty {
  background: #f3f3f5;
  color: var(--muted);
}

.fee-pill {
  display: flex;
  width: max-content;
  max-width: 170px;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  margin-top: 6px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8f7f4;
  color: #127a68;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.fee-pill.today {
  background: #fff1c7;
  color: #855a00;
}

.fee-pill.due-soon {
  background: #fff1c7;
  color: #855a00;
}

.fee-pill.expired {
  background: #fee2e2;
  color: var(--red);
}

.fee-pill.missing {
  background: #f0edf2;
  color: var(--muted);
}

.detail-fee {
  display: grid;
  gap: 2px;
  min-width: 148px;
  min-height: 48px;
  border-radius: 8px;
}

.detail-fee small {
  font-size: 0.72rem;
}

.kiosk-body {
  min-height: 100vh;
  background: var(--bg);
}

.kiosk-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
}

.kiosk-card {
  width: min(1000px, 100%);
  min-height: min(620px, calc(100vh - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-content: center;
  gap: 28px;
  padding: 28px;
  border: 1px solid rgba(232, 32, 131, 0.38);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 60px rgba(174, 20, 91, 0.10);
}

.kiosk-logo {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 8px;
  position: relative;
  min-height: 160px;
  align-content: center;
}

.kiosk-logo strong {
  color: var(--green);
  font-size: 2.25rem;
  line-height: 0.95;
  letter-spacing: 0;
  text-align: center;
}

.kiosk-logo span {
  color: var(--green-dark);
  font-size: 1.2rem;
  text-transform: uppercase;
}

.kiosk-brand-mark {
  width: 92px;
  background: #fff url("referencia-logo.png") -29px -20px / 644px 644px no-repeat;
  color: #fff;
}

.kiosk-form {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  gap: 12px;
}

.kiosk-form label {
  color: var(--green-dark);
  text-align: center;
}

.kiosk-form input {
  min-height: 62px;
  border: 1px solid var(--line);
  background: #fff;
  color: #171412;
  text-align: center;
  font-size: 1.3rem;
}

.kiosk-form button {
  min-height: 58px;
  background: var(--green);
  font-size: 1.25rem;
}

.kiosk-result {
  grid-column: 1;
  grid-row: 3;
  min-height: 118px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
  color: var(--green-dark);
}

.kiosk-result h1 {
  color: var(--green);
  font-size: 2.4rem;
}

.kiosk-result p {
  margin: 0;
}

.kiosk-result.ok {
  border-color: var(--line);
  color: var(--green-dark);
}

.kiosk-result.error,
.kiosk-result.expired {
  border-color: rgba(248, 113, 113, 0.72);
  background: #fff1f2;
  color: var(--red);
}

.kiosk-result.expired h1,
.fee-warning {
  color: var(--red);
}

.fee-warning {
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 900;
}

.fee-ok {
  margin-top: 8px;
  color: #127a68;
  font-weight: 900;
}

.result-label {
  color: var(--green-dark);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
}

.kiosk-profile {
  grid-column: 2;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.kiosk-footer {
  grid-column: 1 / -1;
  grid-row: 4;
  text-align: center;
}

.kiosk-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.kiosk-footer a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.quota-expired .kiosk-footer a {
  color: #fff;
}

.kiosk-profile .avatar-kiosk,
.kiosk-profile-placeholder {
  width: min(280px, 100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fce0ee;
  color: var(--green-dark);
  font-size: 3rem;
  font-weight: 800;
}

.quota-expired,
.quota-expired .kiosk-screen {
  background: #b91c1c;
}

.quota-expired .kiosk-card {
  background: #dc2626;
  border-color: #fca5a5;
  color: #fff;
}

.quota-expired .kiosk-result,
.quota-expired .kiosk-form button {
  background: #991b1b;
  border-color: #fca5a5;
  color: #fff;
}

.quota-expired .kiosk-logo strong,
.quota-expired .kiosk-logo span,
.quota-expired .kiosk-form label,
.quota-expired .kiosk-result h1,
.quota-expired .fee-warning,
.quota-expired .result-label {
  color: #fff;
}

.quota-expired .fee-warning {
  font-size: 1.6rem;
}

@media (max-width: 600px) {
  .kiosk-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    gap: 18px;
  }

  .kiosk-profile {
    grid-column: 1;
    grid-row: 3;
  }

  .kiosk-result {
    grid-row: 4;
  }

  .kiosk-footer {
    grid-row: 5;
  }

  .kiosk-profile .avatar-kiosk,
  .kiosk-profile-placeholder {
    width: 150px;
  }

  .kiosk-logo strong {
    font-size: 1.75rem;
  }
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(32, 38, 45, 0.5);
  overscroll-behavior: contain;
}

.modal-card {
  width: min(430px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(32, 38, 45, 0.24);
}

.modal-card h2 {
  margin-bottom: 8px;
}

.modal-card p {
  margin: 8px 0;
}

.modal-card.check-entry-dialog {
  width: min(720px, 100%);
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 821px) {
  body.modal-open.check-entry-active {
    overflow: auto;
    overscroll-behavior: auto;
  }

  .modal-layer.check-entry-open {
    place-items: stretch end;
    padding: 18px;
    background: transparent;
    pointer-events: none;
  }

  .modal-layer.check-entry-open .check-entry-dialog {
    width: min(560px, 48vw);
    height: calc(100dvh - 36px);
    max-height: none;
    pointer-events: auto;
  }
}

.check-entry-dialog .check-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.check-entry-dialog .check-entry-actions {
  flex: 0 0 auto;
  padding: 12px 0 2px;
  background: #fff;
}

.modal-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-actions button {
  min-height: 42px;
}

.danger-modal {
  border-color: #fecaca;
}

.empty-detail p {
  margin: 10px 0 0;
  color: var(--muted);
}

.detail-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.days-list {
  display: grid;
  gap: 10px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.summary-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff2f8;
}

.summary-grid strong {
  display: block;
  color: var(--green-dark);
  font-size: 1.25rem;
}

.summary-grid span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.timesheet-panel {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timesheet-head {
  margin-bottom: 12px;
}

.timesheet-controls {
  display: grid;
  grid-template-columns: 150px 150px 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.timesheet-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.timesheet-summary {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(2, minmax(135px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 6px;
  background: #fff2f8;
}

.timesheet-summary div {
  padding: 8px;
  border: 1px solid #efb4d0;
  border-radius: 6px;
  background: #ffffff;
}

.timesheet-summary strong {
  display: block;
  color: var(--green-dark);
  font-size: 1.1rem;
}

.timesheet-summary span {
  color: var(--muted);
  font-weight: 800;
}

.timesheet-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.timesheet-table th,
.timesheet-table td {
  border: 1px solid var(--line);
  padding: 6px;
  text-align: center;
}

.timesheet-table th {
  background: #fce0ee;
  color: var(--blue);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.timesheet-table input {
  min-height: 34px;
  padding: 6px;
  border: 0;
  border-radius: 4px;
  background: #fff9fc;
  text-align: center;
}

.timesheet-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.timesheet-table .effective-mark-row td {
  background: #fce0ee;
}

.timesheet-table .effective-mark-row input {
  background: #fff9fc;
}

.timesheet-table input.empty-time::placeholder {
  color: #88818a;
  opacity: 1;
}

.timesheet-table td:first-child input {
  max-width: 48px;
  font-weight: 800;
}

.timesheet-table td:last-child input {
  min-width: 180px;
  text-align: left;
}

.day-block {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: var(--soft);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.day-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.intervals,
.marks {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.intervals h3,
.marks h3 {
  margin-top: 4px;
  color: var(--blue);
  font-size: 0.92rem;
}

.interval-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.interval-row strong {
  color: var(--green-dark);
}

.interval-row small {
  color: var(--muted);
  font-weight: 800;
}

.mark-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 5px;
  font-size: 0.92rem;
}

@media (max-width: 820px) {
  .topbar,
  .top-actions,
  .detail-title {
    align-items: flex-start;
  }

  .topbar,
  .workspace,
  .mark-grid,
  .mark-actions,
  .employee-card,
  .employee-actions,
  .summary-grid,
  .timesheet-summary,
  .timesheet-controls,
  .interval-row,
  .day-head {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .workspace {
    padding: 0 12px 18px;
  }

  .backup-panel {
    width: calc(100% - 24px);
  }

  .hub-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  h1 {
    font-size: 1.55rem;
  }
}

.work-panel, .employee-card, .detail-title > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-title {
  flex-wrap: wrap;
}

.detail-actions, .employee-actions {
  flex-wrap: wrap;
}

.topbar {
  flex-wrap: wrap;
  background: #fff;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

@media (max-width: 820px) {
  .employee-panel, .detail-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .top-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .top-actions .clock {
    grid-column: 1 / -1;
    text-align: left;
  }

  .top-actions .light-link {
    justify-content: center;
    text-align: center;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-actions, .detail-actions {
    display: flex;
    gap: 8px;
  }

  .employee-actions button, .employee-actions .whatsapp-bubble, .detail-actions button {
    flex: 1 1 140px;
    padding: 10px;
  }

  .detail-title > div {
    flex: 1 1 200px;
  }

  .work-panel {
    padding: 14px;
  }

  .brand-lockup strong {
    font-size: 1.1rem;
  }
}

@media (max-width: 380px) {
  .top-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand-lockup {
    flex-wrap: wrap;
  }

  .hub-actions {
    grid-template-columns: 1fr;
  }

}
