:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #2f2731;
  --muted: #5f5563;
  --border: #f2d7e6;
  --primary: #ec4899;
  --primary-soft: #ffe4f1;
  --danger: #ef4444;
  --danger-soft: #ffe3ea;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 22px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100svh; padding: 16px 14px 92px; max-width: 980px; margin: 0 auto; }
.header { display:flex; justify-content:space-between; gap: 12px; align-items:center; margin-bottom: 14px; }
.header h1 { margin:0; font-size: 22px; line-height: 1.15; }
.header .sub { color:var(--muted); font-size:13px; margin-top:4px; }
.card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:16px; box-shadow: 0 8px 20px rgba(236,72,153,.06); margin-bottom:12px; }
.center-card { min-height: 80svh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:var(--muted); }
.center-card h1 { color:var(--text); margin: 16px 0 6px; }
.spinner { width:54px; height:54px; border-radius:50%; border:7px solid #f9c9df; border-top-color:var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-alert { width:72px; height:72px; border-radius:22px; background:var(--danger-soft); color:var(--danger); display:flex; align-items:center; justify-content:center; font-size:38px; font-weight:800; margin-bottom:12px; }
.btn { border:0; border-radius:18px; background:var(--primary); color:white; padding:14px 18px; font-weight:750; min-height:48px; }
.btn.secondary { background:var(--primary-soft); color:var(--primary); }
.btn.danger { background:var(--danger); }
.btn.ghost { background:transparent; color:var(--text); border:1px solid var(--border); }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.grid { display:grid; gap:10px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.input, textarea, select { width:100%; max-width:100%; min-width:0; display:block; border:1px solid var(--border); border-radius:16px; background:white; padding:13px 14px; outline:none; }
textarea { min-height:90px; resize:vertical; }
.label { font-size:13px; color:var(--muted); margin-bottom:6px; display:block; }
.tabs { position:fixed; bottom:0; left:0; right:0; display:flex; justify-content:center; background:rgba(255,255,255,.92); backdrop-filter: blur(18px); border-top:1px solid var(--border); padding:8px 8px max(8px, env(safe-area-inset-bottom)); z-index:20; }
.tab-wrap { display:flex; gap:8px; overflow:auto; max-width:980px; width:100%; }
.tab { flex:1 0 auto; border:0; border-radius:14px; padding:10px 12px; color:var(--muted); background:transparent; font-weight:700; }
.tab.active { background:var(--primary); color:white; box-shadow: 0 8px 20px rgba(236,72,153,.22); }
.kpi { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.kpi .box { background:#fff8fc; border:1px solid var(--border); border-radius:18px; padding:14px; }
.kpi .num { font-size:24px; font-weight:800; }
.kpi .name { color:var(--muted); font-size:13px; margin-top:3px; }
.session { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; padding:12px 0; border-bottom:1px solid var(--border); }
.session:last-child { border-bottom:0; }
.session .title { font-weight:800; }
.session .meta { color:var(--muted); font-size:13px; margin-top:4px; line-height:1.4; }
.badge { display:inline-flex; align-items:center; border-radius:999px; padding:4px 9px; font-size:12px; font-weight:800; background:#ffe4f1; color:var(--primary); }
.badge.live { background:#d1fae5; color:#0f766e; }
.badge.pending { background:#fef3c7; color:#92400e; }
.badge.disabled { background:#fee2e2; color:#991b1b; }
.timeline { overflow-x:auto; padding-bottom:6px; }
.timeline-row { display:grid; grid-template-columns: 110px 1fr; gap:10px; align-items:center; margin:10px 0; }
.timeline-name { font-weight:800; font-size:13px; }
.timeline-track { position:relative; height:36px; background:#fff1f7; border-radius:12px; min-width:720px; overflow:hidden; }
.timeline-bar { position:absolute; top:5px; height:26px; border-radius:9px; background:var(--primary); color:white; font-size:11px; display:flex; align-items:center; padding:0 8px; white-space:nowrap; overflow:hidden; }
.timeline-bar.live { background:#16a34a; }
.hours { display:grid; grid-template-columns:repeat(7,1fr); min-width:720px; color:var(--muted); font-size:11px; padding-left:120px; }
.table { width:100%; border-collapse:collapse; font-size:14px; }
.table th, .table td { text-align:left; padding:10px 8px; border-bottom:1px solid var(--border); vertical-align:top; }
.actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.actions.row-actions { flex-wrap:nowrap; align-items:center; justify-content:flex-end; }
.actions.row-actions .btn { min-width:86px; white-space:nowrap; }
.session.manage-session { align-items:center; }
.session.manage-session .meta { line-height:1.5; }
.modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.42); z-index:40; display:flex; align-items:flex-end; }
.modal { background:white; width:100%; max-width:760px; margin:0 auto; border-radius:24px 24px 0 0; padding:18px; max-height:86svh; overflow:auto; }
.modal h2 { margin:0 0 12px; }
.small { font-size:12px; color:var(--muted); }
.hidden { display:none !important; }
@media (min-width: 720px) { .modal-backdrop { align-items:center; } .modal { border-radius:24px; } .kpi { grid-template-columns:repeat(4,1fr); } }


/* Mobile date inputs: keep native iOS date controls inside the card and centered */
.card { overflow: hidden; }
.field-card { display:flex; flex-direction:column; gap:8px; }
.input-date,
.input-month,
input[type="date"],
input[type="month"],
input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 14px 16px;
  text-align: center;
  line-height: 1.2;
}
.input-date::-webkit-date-and-time-value,
.input-month::-webkit-datetime-edit,
input[type="date"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-datetime-edit { text-align: center; }

/* v2.1.1 clearer 24-hour timeline */
.timeline-card { overflow: hidden; }
.timeline-head { display:flex; flex-direction:column; gap:4px; margin-bottom:12px; }
.timeline-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}
.timeline-canvas {
  min-width: 1120px;
  width: 1120px;
}
.timeline-scale,
.timeline-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 10px;
  align-items: center;
}
.timeline-scale { margin-bottom: 8px; }
.timeline-name-spacer { height: 1px; }
.timeline-scale-track {
  position: relative;
  height: 28px;
  color: var(--muted);
  font-size: 12px;
}
.timeline-scale-track span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.timeline-scale-track span:first-child { transform: translateX(0); }
.timeline-scale-track span:last-child { transform: translateX(-100%); }
.timeline-row { margin: 10px 0; }
.timeline-name {
  font-weight: 850;
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.timeline-track {
  position: relative;
  height: 46px;
  background: #fff1f7;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
}
.hour-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(100,116,139,.22);
}
.hour-guide:nth-child(odd) { background: rgba(100,116,139,.12); }
.timeline-bar {
  top: 8px;
  height: 30px;
  min-width: 28px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(236,72,153,.22);
}
@media (max-width: 520px) {
  .timeline-canvas { min-width: 980px; width: 980px; }
  .timeline-scale, .timeline-row { grid-template-columns: 92px 1fr; gap: 8px; }
  .timeline-name { font-size: 13px; }
  .timeline-scale-track { font-size: 11px; }
}

.profile-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.profile-info > div {
  background: #fff8fc;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}
.profile-info strong {
  display: block;
  margin-top: 4px;
}


/* v2.2.2: clean white background with Kitty pink key headings */
body { background: #ffffff; }
.app-shell { background: #ffffff; }
.card h2,
.section-title,
.key-title {
  color: var(--primary);
}
.card h2 {
  letter-spacing: -0.02em;
}
.header h1 {
  color: var(--primary);
}
.card {
  box-shadow: 0 8px 18px rgba(236,72,153,.035);
}


/* v2.2.3 modal actions: center Save/Cancel side-by-side for easier tapping */
.modal-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.modal-actions .btn {
  flex: 1 1 0;
  max-width: 180px;
  min-width: 120px;
  text-align: center;
}
@media (max-width: 420px) {
  .modal-actions .btn {
    max-width: none;
    min-width: 0;
  }
}
