@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --card: #1c1c1c;
  --border: #2a2a2a;
  --grad-start: #f0524f;
  --grad-mid: #e8408a;
  --grad-end: #9b59d0;
  --accent: #e8408a;
  --accent2: #9b59d0;
  --warn: #f0524f;
  --text: #f0f0f0;
  --muted: #666676;
  --success: #2ecc71;
  --error: #f0524f;
  --gradient: linear-gradient(135deg, var(--grad-start), var(--grad-mid), var(--grad-end));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 340px;
  background: var(--gradient);
  z-index: 0;
  border-radius: 0 0 40px 40px;
  opacity: 0.9;
}

/* ── WRAPPER ── */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* ── HEADER ── */
header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeDown 0.7s ease;
}

.logo-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #ffffff;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.25);
}

h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  color: #ffffff;
}

h1 span { color: rgba(255,255,255,0.7); }

.datetime-bar {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  flex-wrap: wrap;
}

.datetime-bar .live { color: #ffffff; font-weight: 600; }

.dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  margin-right: 6px;
  vertical-align: middle;
}

/* ── TIME BANNER ── */
.time-banner {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  margin-top: 20px;
  animation: fadeUp 0.7s ease 0.1s both;
}

.time-pill {
  flex: 1;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--grad-start);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all 0.2s;
}

.time-pill:last-child {
  border-left: 4px solid var(--grad-end);
}

.time-pill.active {
  background: var(--surface);
  border-color: var(--border);
  border-left-color: var(--accent);
}

.time-pill:last-child.active {
  border-left-color: var(--grad-end);
}

.time-pill.inactive { opacity: 0.4; }

.pill-icon  { font-size: 22px; }
.pill-label { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px; color: var(--text); }
.pill-time  { color: var(--muted); font-size: 11px; margin-top: 2px; }
.pill-status { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); }
.time-pill.active .pill-status { color: var(--accent); }
.time-pill:last-child.active .pill-status { color: var(--grad-end); }

/* ── SUNDAY BANNER ── */
#sunday-banner { border-radius: 16px !important; margin-bottom: 20px; }

/* ── MAIN CARD ── */
.main-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
  animation: fadeUp 0.7s ease 0.2s both;
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

/* ── FORM ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

select, input {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  transition: all 0.2s;
  width: 100%;
  outline: none;
  -webkit-appearance: none;
}

select:focus, input:focus {
  border-color: var(--accent);
  background: #222222;
  box-shadow: 0 0 0 4px rgba(232,64,138,0.12);
}

input:read-only {
  background: linear-gradient(135deg, rgba(240,82,79,0.06), rgba(155,89,208,0.08));
  border-color: rgba(232,64,138,0.3);
  color: var(--accent2);
  font-weight: 500;
}

select option { background: var(--surface); color: var(--text); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 14px;
}

.location-wrap { position: relative; }
.location-wrap input { padding-right: 48px; }

.loc-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  transition: transform 0.2s;
}
.loc-btn:hover { transform: translateY(-50%) scale(1.25); }

.loc-status { font-size: 11px; color: var(--muted); margin-top: 5px; }
.loc-status.done  { color: var(--success); font-weight: 600; }
.loc-status.error { color: var(--error);   font-weight: 600; }

/* ── ACTION BUTTONS ── */
.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.btn {
  padding: 15px 20px;
  border-radius: 14px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
}

.btn-in {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid));
  box-shadow: 0 4px 20px rgba(240,82,79,0.4);
}

.btn-out {
  background: linear-gradient(135deg, var(--grad-mid), var(--grad-end));
  box-shadow: 0 4px 20px rgba(155,89,208,0.4);
}

.btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232,64,138,0.5);
}

.btn:not(:disabled):active { transform: translateY(0); }
.btn:disabled { opacity: 0.25; cursor: not-allowed; box-shadow: none; }

/* ── SHEET CARD ── */
.sheet-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  margin-top: 20px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sheet-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.date-badge {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.sheet-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.sheet-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--border);
}

.sheet-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(42,42,42,0.8);
  color: var(--text);
}

.sheet-table tr:last-child td { border-bottom: none; }
.sheet-table tr:hover td { background: rgba(232,64,138,0.04); }

.time-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.time-chip.in  { background: rgba(240,82,79,0.15);  color: #f47f7d; }
.time-chip.out { background: rgba(155,89,208,0.15); color: #b87ee8; }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot.present { background: var(--success); }
.status-dot.partial  { background: var(--warn); }
.status-dot.absent   { background: var(--border); }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--gradient);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 14px;
  display: none;
  z-index: 1000;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(232,64,138,0.4);
}

/* ── ANIMATIONS ── */
@keyframes pulse    { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes fadeDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px);  } to { opacity:1; transform:translateY(0); } }

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  body::before { height: 260px; border-radius: 0 0 28px 28px; }

  .wrapper { padding: 28px 14px 48px; }

  header { margin-bottom: 28px; }

  h1 { font-size: 30px; }

  .time-banner { flex-direction: column; gap: 10px; }

  .time-pill { padding: 14px 16px; }

  .main-card  { padding: 22px 16px; border-radius: 18px; }
  .sheet-card { padding: 22px 16px; border-radius: 18px; }

  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-group.full { grid-column: 1; }

  .action-row { grid-template-columns: 1fr; gap: 12px; }

  .sheet-table { font-size: 12px; }
  .sheet-table th,
  .sheet-table td { padding: 10px 8px; }

  .toast { bottom: 16px; right: 14px; left: 14px; text-align: center; }
}

header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeDown 0.7s ease;
  position: relative; /* ← add this */
}

@media (max-width: 400px) {
  h1 { font-size: 24px; }
  .datetime-bar { flex-direction: column; gap: 4px; align-items: center; }
  .main-card { padding: 18px 14px; }
}


  @media (min-width: 769px) {
    #logo-wrap {
      top: -10px;
      right: 0px;
    }
  }


    #logo-wrap {
    display: none; /* hidden on desktop */
  }

  @media (max-width: 768px) {
    #logo-wrap {
      display: block;
      position: absolute;
      top: 5px;
      right: 10px;
      z-index: 10;
    }
  }