/* TT Paattu: a night-at-the-cinema look. Deep aubergine, marigold and rose. */
:root {
  --bg: #120a18;
  --bg-2: #1c1124;
  --card: #241631;
  --card-2: #2d1c3d;
  --line: #3f2a52;
  --text: #f6ecdf;
  --muted: #b7a4c2;
  --gold: #f5a524;
  --gold-2: #ffcb6b;
  --rose: #e8457c;
  --green: #3ccf8e;
  --red: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --head: "Baloo Thambi 2", "Noto Sans Tamil", system-ui, sans-serif;
  --body: "Inter", "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(232, 69, 124, 0.22), transparent 70%),
    radial-gradient(900px 400px at 100% 0, rgba(245, 165, 36, 0.12), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 var(--body);
  min-height: 100vh;
}
a { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0 0 0.4em; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 0.8em; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.hidden { display: none !important; }

/* Header */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--head); font-size: 1.4rem; font-weight: 700; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--gold), var(--rose), var(--gold));
  display: grid; place-items: center; color: var(--bg); font-size: 1.2rem; box-shadow: 0 0 18px rgba(245, 165, 36, 0.45);
}
.brand small { display: block; font: 500 0.72rem/1 var(--body); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* Hero */
.hero { padding: 28px 0 18px; }
.eyebrow { color: var(--gold); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; margin-bottom: 6px; }
.hero .tamil { font-family: var(--head); color: var(--gold-2); font-size: 1.2rem; }
.marquee {
  background: linear-gradient(135deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: 20px; padding: 26px 22px; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.marquee::before {
  content: ""; position: absolute; inset: 8px; border-radius: 14px; pointer-events: none;
  border: 2px dotted rgba(255, 203, 107, 0.35);
}
.theme-tag { display: inline-block; background: rgba(232, 69, 124, 0.18); color: #ff9dbd; border: 1px solid rgba(232, 69, 124, 0.45); padding: 3px 12px; border-radius: 99px; font-weight: 600; font-size: 0.9rem; margin-bottom: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 14px; color: var(--muted); }
.facts b { color: var(--text); font-weight: 600; }

/* Cards and lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; box-shadow: var(--shadow); }
.card h2 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 14px; }
.session-list { display: grid; gap: 12px; }
.session-item {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--text);
  transition: transform 0.15s, border-color 0.15s;
}
.session-item:hover { transform: translateY(-2px); border-color: var(--gold); }
.datebox { text-align: center; background: var(--bg-2); border-radius: 10px; padding: 8px 4px; border: 1px solid var(--line); }
.datebox .m { color: var(--rose); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.datebox .d { font-family: var(--head); font-size: 1.8rem; line-height: 1; }
.datebox .w { color: var(--muted); font-size: 0.75rem; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 600; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.open { color: var(--green); border-color: rgba(60, 207, 142, 0.4); }
.pill.gold { color: var(--gold-2); border-color: rgba(245, 165, 36, 0.45); }
.pill.rose { color: #ff9dbd; border-color: rgba(232, 69, 124, 0.45); }
.pill.red { color: var(--red); border-color: rgba(255, 107, 107, 0.4); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat .n { font-family: var(--head); font-size: 1.8rem; color: var(--gold-2); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }

.lineup { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lineup li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lineup .num { font-family: var(--head); color: var(--muted); font-size: 1.1rem; text-align: center; }
.lineup .t { font-weight: 600; }
.lineup .f { color: var(--muted); font-size: 0.88rem; }
.lineup li.done { opacity: 0.55; }
.kind { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 6px; }
.kind.solo { background: rgba(245, 165, 36, 0.16); color: var(--gold-2); }
.kind.duet { background: rgba(232, 69, 124, 0.18); color: #ff9dbd; }
.kind.group { background: rgba(120, 140, 255, 0.18); color: #b3bfff; }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.95rem; }
.field { margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"],
input[type="time"], input[type="password"], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: inherit; font-size: 16px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label {
  display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); cursor: pointer; font-weight: 600;
}
.choice input { accent-color: var(--gold); width: 18px; height: 18px; }
.choice label:has(input:checked) { border-color: var(--gold); background: rgba(245, 165, 36, 0.1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.song-editor { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: rgba(0, 0, 0, 0.15); }
.song-editor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.join-list { display: grid; gap: 8px; }
.join-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--bg-2); border-radius: 10px; border: 1px solid var(--line); }
.join-item input { margin-top: 4px; }

/* Buttons */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  font: 600 0.95rem var(--body); text-decoration: none; transition: transform 0.1s, background 0.15s;
}
button:hover, .btn:hover { background: #3a2650; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--gold), #f07b2c); color: #1a0f05; border: none; }
.btn-primary:hover { background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.btn-rose { background: var(--rose); border: none; color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(255, 107, 107, 0.4); }
.btn-sm { padding: 6px 10px; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.msg { padding: 12px 14px; border-radius: 10px; margin: 10px 0; }
.msg.error { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.4); color: #ffc2c2; }
.msg.ok { background: rgba(60, 207, 142, 0.12); border: 1px solid rgba(60, 207, 142, 0.4); color: #b6f5d8; }
.msg.info { background: rgba(245, 165, 36, 0.1); border: 1px solid rgba(245, 165, 36, 0.4); color: var(--gold-2); }

.pay-box { background: linear-gradient(135deg, rgba(108, 30, 214, 0.25), rgba(232, 69, 124, 0.15)); border: 1px solid rgba(160, 110, 255, 0.45); border-radius: 14px; padding: 16px; }
.pay-box .amt { font-family: var(--head); font-size: 2rem; color: var(--gold-2); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }

footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 40px 16px; }

/* Admin tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 10px 0 16px; }
.tabs button { border: none; background: none; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 14px; color: var(--muted); }
.tabs button.active { color: var(--gold-2); border-bottom-color: var(--gold); }
dialog { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: min(560px, calc(100vw - 32px)); max-height: 90vh; }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.member-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }

/* Date & time picker (admin) */
.dtp { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); overflow: hidden; }
.dtp-summary { padding: 12px 14px; font-weight: 600; color: var(--gold-2); border-bottom: 1px solid var(--line); background: rgba(245, 165, 36, 0.06); }
.dtp-summary.empty { color: var(--muted); }
.dtp-body { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 20px; padding: 14px; }
.dtp-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head button { font-size: 1.2rem; padding: 2px 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-wd { font-size: 0.72rem; color: var(--muted); padding: 4px 0; font-weight: 600; }
.cal-grid button { padding: 0; aspect-ratio: 1; min-height: 34px; border-radius: 50%; border: 1px solid transparent; background: none; font-weight: 500; font-size: 0.9rem; }
.cal-grid button:hover { background: var(--card-2); }
.cal-grid button.past { color: #6f5d7c; }
.cal-grid button.today { border-color: var(--rose); }
.cal-grid button.sel { background: linear-gradient(135deg, var(--gold), #f07b2c); color: #1a0f05; font-weight: 700; }
.tsel { display: flex; align-items: center; gap: 6px; }
.tsel select { width: auto; padding: 9px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { padding: 5px 11px; border-radius: 99px; font-size: 0.82rem; font-weight: 600; background: var(--bg); }
.chip.on { background: rgba(245, 165, 36, 0.18); border-color: var(--gold); color: var(--gold-2); }
.datepop { position: relative; }
.cal-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 300px; max-width: calc(100vw - 48px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .dtp-body { grid-template-columns: 1fr; }
}

/* Live stage screen */
.stage { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 3vh 4vw; gap: 3vh; }
.stage-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.4rem); }
.now { display: grid; place-items: center; text-align: center; }
.now .label { color: var(--rose); letter-spacing: 0.3em; text-transform: uppercase; font-weight: 700; font-size: clamp(1rem, 2vw, 1.6rem); }
.now .song { font-family: var(--head); font-size: clamp(2.6rem, 8vw, 7rem); line-height: 1.05; margin: 2vh 0 1vh; color: var(--gold-2); text-shadow: 0 0 40px rgba(245, 165, 36, 0.4); }
.now .film { font-size: clamp(1.2rem, 2.6vw, 2.2rem); color: var(--muted); }
.now .singers { font-family: var(--head); font-size: clamp(1.8rem, 4.5vw, 4rem); margin-top: 2vh; }
.next-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2vw; }
.next-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 2vh 1.5vw; font-size: clamp(1rem, 1.6vw, 1.5rem); }
.next-card .t { font-family: var(--head); color: var(--text); font-size: 1.3em; }

@media (max-width: 640px) {
  .row, .row3, .choice { grid-template-columns: 1fr; }
  .session-item { grid-template-columns: 64px 1fr; }
  .session-item > :last-child { grid-column: 1 / -1; }
  .card { padding: 16px; }
  .member-row { grid-template-columns: 1fr; }
  .lineup li > .actions { grid-column: 2 / -1; justify-content: flex-start !important; }
}
