/* Nails Salon Admin — sidebar + chủ đề hồng / rose / vàng đồng */

:root {
  --rose-deep: #831843;
  --rose-plum: #4c1d35;
  --rose-dark: #9d174d;
  --rose: #e11d48;
  --rose-soft: #fda4af;
  --rose-light: #ffe4e9;
  --blush: #fff1f3;
  --cream: #fffbf9;
  --gold: #d4a574;
  --gold-deep: #b45309;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --white: #ffffff;
  --sidebar-w: 258px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 4px 24px rgba(190, 24, 93, 0.08);
  --shadow-card: 0 8px 32px rgba(131, 24, 67, 0.12);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(165deg, var(--blush) 0%, var(--cream) 45%, #fff 100%);
}

/* ——— Login ——— */
/**
 * Thuộc tính HTML `hidden` phải thắng `.login-wrap { display: flex }` — nếu không,
 * Safari/Chrome có thể vẫn hiển thị form dù JS đã set loginSection.hidden = true
 * (dashboard đã bật nhưng bị che bởi lớp login).
 */
#loginSection[hidden],
.login-wrap[hidden] {
  display: none !important;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(225, 29, 72, 0.15), transparent 55%),
    linear-gradient(165deg, var(--blush), var(--cream));
}

.card-nails {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 36px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(225, 29, 72, 0.12);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.login-logo {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(225, 29, 72, 0.25));
}

.login-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--rose-deep), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-tagline {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.login-hint {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.login-api-hint {
  margin: 0 0 18px;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--rose-deep);
  background: var(--rose-light);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(225, 29, 72, 0.15);
}

.login-api-hint a {
  color: var(--rose-deep);
  font-weight: 600;
}

/* DE / EN — deutschbeauty.chu-nail.com */
.lang-switch-host {
  flex-shrink: 0;
}

.lang-switch-host[hidden] {
  display: none !important;
}

.lang-switch-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.main-header .lang-switch-row {
  margin-bottom: 0;
  align-self: flex-start;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(225, 29, 72, 0.25);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.lang-switch button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--ink-soft);
}

.lang-switch button.is-active {
  background: linear-gradient(135deg, var(--rose-deep), var(--rose));
  color: #fff;
}

.field-nails {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-nails span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field-nails input {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(225, 29, 72, 0.2);
  background: var(--cream);
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-nails input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.btn-nails {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}

.btn-nails.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.35);
}

.btn-nails.primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4);
}

.btn-nails.outline {
  background: var(--white);
  border-color: rgba(225, 29, 72, 0.35);
  color: var(--rose-deep);
}

.btn-nails.outline:hover {
  background: var(--rose-light);
}

.btn-block-nails {
  width: 100%;
  padding: 13px;
  margin-top: 6px;
}

.btn-nails:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-error {
  color: #b91c1c;
  margin-top: 14px;
  font-size: 0.9rem;
}

/* ——— Dashboard shell ——— */
#dashboardSection[hidden],
.dashboard-app[hidden] {
  display: none !important;
}

.dashboard-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.alert-nails {
  margin: 0;
  padding: 12px 20px;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(225, 29, 72, 0.2);
}

.alert-nails:not([hidden]) {
  display: block;
  background: linear-gradient(90deg, #ecfdf5, #d1fae5);
  color: #065f46;
}

.alert-nails.error {
  background: linear-gradient(90deg, #fef2f2, #fee2e2);
  color: #991b1b;
}

.alert-nails.success {
  background: linear-gradient(90deg, #ecfdf5, #d1fae5);
  color: #047857;
}

.admin-frame {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #5c1f3d 0%, var(--rose-plum) 48%, #2d1220 100%);
  color: #fce7f3;
  box-shadow: 6px 0 32px rgba(76, 29, 53, 0.35);
  border-right: 1px solid rgba(212, 165, 116, 0.25);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  font-size: 2rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-brand-text strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.sidebar-brand-text span {
  font-size: 0.72rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #fce7f3;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.55), rgba(225, 29, 72, 0.2));
  box-shadow: inset 4px 0 0 var(--gold);
  color: var(--white);
}

.sidebar-ic {
  font-size: 1.25rem;
  width: 28px;
  text-align: center;
  opacity: 0.95;
}

.sidebar-txt {
  flex: 1;
}

.sidebar-footer {
  padding: 14px 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logout {
  color: #fecdd3;
  opacity: 0.95;
}

.sidebar-logout:hover {
  background: rgba(127, 29, 29, 0.35);
  color: #fff;
}

/* Main column */
.main-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 22%);
}

.main-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 16px;
  border-bottom: 1px solid rgba(225, 29, 72, 0.08);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
}

.main-kicker {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rose);
  font-weight: 700;
}

.main-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.main-lead {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 42ch;
  line-height: 1.5;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--white);
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 72, 0.15);
  box-shadow: var(--shadow-soft);
}

.user-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), var(--gold-deep));
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.user-pill-inner {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.user-pill-inner span:first-child {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.user-pill-inner span:last-child {
  font-size: 0.78rem;
  color: var(--ink-soft);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 28px;
}

@media (max-width: 1100px) {
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .stat-strip {
    grid-template-columns: 1fr;
  }
}

.stat-pill {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid rgba(225, 29, 72, 0.12);
  box-shadow: var(--shadow-soft);
}

.stat-pill-accent {
  border-color: rgba(212, 165, 116, 0.45);
  background: linear-gradient(135deg, #fffdfb, #fff7ed);
}

.stat-pill-gold {
  border-color: rgba(180, 83, 9, 0.25);
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.stat-pill-rose {
  border-color: rgba(225, 29, 72, 0.22);
  background: linear-gradient(135deg, var(--rose-light), var(--white));
}

.stat-pill-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-pill-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.main-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 28px 40px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.tab-panel.active {
  display: flex;
}

.panel-nails {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px 26px;
  border: 1px solid rgba(225, 29, 72, 0.1);
  box-shadow: var(--shadow-soft);
}

.panel-table {
  padding-bottom: 20px;
}

.panel-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--rose-deep);
  letter-spacing: -0.02em;
}

.panel-desc {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.panel-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head-row .panel-title {
  margin-bottom: 4px;
}

.panel-head-row .panel-desc {
  margin-bottom: 0;
}

.form-nails-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
}

.form-nails-row .field-nails {
  flex: 1 1 160px;
  margin-bottom: 0;
}

.form-actions-nails {
  flex: 0 0 auto;
}

.form-msg-nails {
  margin-top: 14px !important;
  font-size: 0.9rem;
}

.form-msg-nails.error-text {
  color: #b91c1c;
}

.detail-nails {
  margin: 0;
  display: grid;
  gap: 0;
}

.detail-nails .detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(225, 29, 72, 0.08);
}

.detail-nails .detail-row:last-child {
  border-bottom: none;
}

.detail-nails dt {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.detail-nails dd {
  margin: 0;
  font-size: 0.95rem;
}

.table-shell {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(225, 29, 72, 0.12);
  background: var(--cream);
}

.table-nails {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table-nails th,
.table-nails td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(225, 29, 72, 0.08);
}

.table-nails th {
  background: linear-gradient(180deg, var(--rose-light), #fff);
  color: var(--rose-deep);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table-nails tbody tr:hover td {
  background: rgba(253, 164, 175, 0.08);
}

.table-nails tr:last-child td {
  border-bottom: none;
}

.table-meta-nails {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.col-num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.table-loading {
  padding: 20px;
  text-align: center;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-active {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #6ee7b7;
}

.badge-inactive,
.badge-blocked {
  background: #f5f5f4;
  color: #78716c;
  border: 1px solid #e7e5e4;
}

.badge-other {
  background: var(--rose-light);
  color: var(--rose-deep);
  border: 1px solid #fda4af;
}

.panel-revenue-card .form-revenue-nails {
  align-items: flex-end;
}

.revenue-box {
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  font-size: 1rem;
  line-height: 1.65;
}

.revenue-box strong {
  color: #047857;
  font-size: 1.2rem;
}

/* Mobile: sidebar on top */
@media (max-width: 900px) {
  .admin-frame {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    box-shadow: 0 4px 24px rgba(76, 29, 53, 0.25);
  }

  .sidebar-brand {
    flex: 1;
    min-width: 180px;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 2;
    padding: 10px;
    gap: 8px;
  }

  .sidebar-link {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .sidebar-ic {
    font-size: 1.1rem;
  }

  .sidebar-footer {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px;
  }

  .sidebar-logout {
    width: 100%;
    justify-content: center;
  }

  .main-header {
    padding: 18px 18px 14px;
  }

  .stat-strip {
    padding: 12px 18px;
  }

  .main-scroll {
    padding: 10px 18px 32px;
  }

  .cal-grid {
    grid-template-rows: repeat(6, minmax(52px, auto));
  }

  .cal-cell-num {
    font-size: 0.75rem;
  }
}

/* ——— Lịch hẹn: toggle + calendar (đồng bộ Flutter) ——— */

.code-inline {
  font-family: ui-monospace, monospace;
  font-size: 0.82em;
  background: var(--rose-light);
  padding: 2px 6px;
  border-radius: 6px;
}

.appt-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 14px 0 18px;
}

.appt-toggle-btn {
  border: 1px solid rgba(225, 29, 72, 0.28);
  background: var(--white);
  color: var(--rose-deep);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.appt-toggle-btn:hover {
  border-color: var(--rose);
  box-shadow: 0 2px 12px rgba(225, 29, 72, 0.12);
}

.appt-toggle-btn.active {
  background: linear-gradient(135deg, var(--rose-deep), var(--rose));
  color: var(--white);
  border-color: transparent;
}

.appt-cat-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}

.appt-cat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rose-plum);
  margin-right: 4px;
}

.appt-cat-btn {
  border: 1px dashed rgba(225, 29, 72, 0.35);
  background: var(--white);
  color: var(--rose-deep);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.appt-cat-btn:hover {
  border-color: var(--rose);
  border-style: solid;
}

.appt-cat-btn.active {
  background: var(--rose-light);
  border-style: solid;
  border-color: var(--rose);
}

.cal-filter-hint {
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: #57534e;
  line-height: 1.45;
}

.appt-subpanel {
  animation: fadeInPanel 0.2s ease;
}

.appt-subpanel[hidden] {
  display: none !important;
}

@keyframes fadeInPanel {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

.cal-month-label {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--rose-plum);
  letter-spacing: -0.02em;
}

.cal-nav {
  min-width: 44px;
  padding: 8px 12px !important;
  font-size: 1.25rem;
  line-height: 1;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  background: rgba(253, 164, 175, 0.15);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(225, 29, 72, 0.12);
}

.cal-cell {
  min-height: 72px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.cal-cell:hover {
  border-color: rgba(225, 29, 72, 0.35);
  box-shadow: var(--shadow-soft);
}

.cal-cell.cal-other-month {
  opacity: 0.38;
  background: rgba(255, 255, 255, 0.55);
}

.cal-cell.cal-has-appt::after {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  margin-top: auto;
  background: linear-gradient(90deg, var(--rose-soft), var(--gold));
}

.cal-cell.cal-today {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.2);
}

.cal-cell-num {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
}

.cal-cell-mini {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--rose-dark);
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}

.cal-meta {
  margin-top: 12px !important;
}

.cal-day-detail {
  margin-top: 14px;
  margin-bottom: 8px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid rgba(225, 29, 72, 0.14);
  box-shadow: var(--shadow-soft);
}

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

.cal-day-detail-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  color: var(--rose-deep);
}

.cal-day-close {
  flex-shrink: 0;
  padding: 8px 14px !important;
  font-size: 0.82rem !important;
}

/* ——— Lưới ngày (timeline giống app Flutter: 9h–19h, bước 20 phút) ——— */

.cal-day-grid-wrap {
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(225, 29, 72, 0.14);
  background: linear-gradient(180deg, #fffdfb 0%, var(--white) 40%);
}

.cal-day-list-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.cal-day-timeline-head {
  display: flex;
  align-items: stretch;
  min-width: 260px;
  border-bottom: 1px solid rgba(225, 29, 72, 0.12);
  background: rgba(254, 205, 211, 0.35);
}

.cal-day-corner {
  width: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--rose-plum);
  border-right: 1px solid rgba(225, 29, 72, 0.12);
}

.cal-day-staff-head {
  flex: 1;
  min-width: 88px;
  padding: 8px 6px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--rose-deep);
  border-right: 1px solid rgba(225, 29, 72, 0.08);
}

.cal-day-staff-head:last-child {
  border-right: none;
}

.cal-day-timeline-body {
  display: flex;
  align-items: stretch;
  min-width: 260px;
}

.cal-day-time-rail {
  width: 52px;
  flex-shrink: 0;
  border-right: 1px solid rgba(225, 29, 72, 0.12);
  background: rgba(255, 255, 255, 0.65);
}

.cal-day-time-slot {
  height: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink-soft);
  box-sizing: border-box;
  border-bottom: 1px dashed rgba(225, 29, 72, 0.1);
}

.cal-day-staff-cols {
  display: flex;
  flex: 1;
  gap: 0;
}

.cal-day-staff-col {
  flex: 1;
  min-width: 88px;
  position: relative;
  border-right: 1px solid rgba(225, 29, 72, 0.08);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 27px,
    rgba(225, 29, 72, 0.07) 27px,
    rgba(225, 29, 72, 0.07) 28px
  );
}

.cal-day-staff-col:last-child {
  border-right: none;
}

.cal-day-appt-block {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 8px;
  padding: 4px 5px;
  font-size: 0.68rem;
  line-height: 1.28;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(76, 29, 53, 0.22);
  color: #fff;
  font-weight: 700;
  z-index: 2;
  cursor: default;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.cal-day-appt-block .cal-day-appt-time {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  opacity: 0.95;
}

.cal-day-appt-block .cal-day-appt-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  opacity: 0.92;
  margin-top: 2px;
}

.cal-day-appt-hand {
  background: linear-gradient(145deg, #fb7185, #e11d48);
}

.cal-day-appt-foot {
  background: linear-gradient(145deg, #fb923c, #ea580c);
}

.cal-day-appt-lash {
  background: linear-gradient(145deg, #818cf8, #4f46e5);
}

.cal-day-appt-unk {
  background: linear-gradient(145deg, #9ca3af, #6b7280);
}

.cal-day-grid-legend {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.cal-day-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cal-day-li {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--rose-soft);
  background: var(--blush);
  font-size: 0.9rem;
}

.cal-day-li.cal-cat-hand {
  border-left-color: #fda4af;
}

.cal-day-li.cal-cat-foot {
  border-left-color: #a7f3d0;
}

.cal-day-li.cal-cat-lash {
  border-left-color: #c4b5fd;
}

.cal-day-li strong {
  color: var(--rose-plum);
}

.cal-slot {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.cal-day-closed-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.cal-cell.cal-closed-weekday {
  background: rgba(243, 232, 255, 0.65);
  opacity: 0.92;
}

.cal-cell.cal-closed-weekday .cal-cell-num {
  color: #7c3aed;
}

.cal-day-slot-hit {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  touch-action: manipulation;
  cursor: grab;
  box-sizing: border-box;
}

.cal-day-slot-hit:active {
  background: rgba(225, 29, 72, 0.08);
}

.cal-day-slot-locked {
  background: repeating-linear-gradient(
    -45deg,
    rgba(120, 113, 108, 0.22),
    rgba(120, 113, 108, 0.22) 6px,
    rgba(255, 255, 255, 0.35) 6px,
    rgba(255, 255, 255, 0.35) 12px
  );
}

.cal-appt-li-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cal-appt-li-main {
  flex: 1;
  min-width: 200px;
}

.cal-appt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn-nails.tiny {
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: 999px;
}

.table-tel-link {
  color: var(--rose-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hint-soft {
  font-size: 0.78rem;
  color: #78716c;
  max-width: 220px;
  line-height: 1.35;
}

.cal-appt-cancel,
.table-appt-cancel {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.45) !important;
}

.cal-day-li-cancelled {
  opacity: 0.88;
  border-style: dashed;
  background: rgba(245, 245, 244, 0.95);
}

/* ——— Quét QR & stamp ——— */
.qr-stamp-flow {
  max-width: 640px;
}

.qr-stamp-step {
  margin-bottom: 24px;
}

.qr-step-title {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--rose-plum);
}

.qr-staff-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qr-staff-btn {
  min-width: 120px;
}

.qr-selected-line {
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.qr-stamp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.qr-manual-json {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--blush);
  border: 1px solid rgba(225, 29, 72, 0.12);
}

.qr-manual-json summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--rose-dark);
}

.qr-video {
  display: block;
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-sm);
  background: #111;
  margin-bottom: 10px;
}

.qr-scan-status {
  min-height: 1.5em;
}

.stamp-qr-mount {
  display: inline-block;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(225, 29, 72, 0.15);
  margin-bottom: 14px;
}

.stamp-qr-mount img {
  display: block;
}

.stamp-json-pre {
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #e7e5e4;
  overflow-x: auto;
  max-height: 220px;
  margin: 0 0 16px;
}
