


.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

/* --- Force light form controls everywhere --- */
:root { color-scheme: light; }

/* Lock screen */
.lock-screen {
  position: fixed; inset: 0; z-index: 5000;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #f5e9ff, #e6d9ff, #d9e6ff);
}
.lock-card {
  width: min(520px, 92%);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 38px rgba(0,0,0,.12);
  text-align: center;
}
.lock-actions { display: flex; gap: .6rem; justify-content: center; margin-top: .75rem; }
button.secondary { background: #e9d5ff; color: #3b1d7a; }
.lock-msg { margin-top: .5rem; color: #8b0000; font-weight: 600; }

/* Base */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  background: linear-gradient(180deg, #ffe6ff, #e6d9ff, #d9e6ff);
  color: #333;
  text-align: center;
}

header {
  background: linear-gradient(90deg, #c084fc, #a78bfa, #fbc8d4);
  padding: 1.2rem;
  color: white;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

h1 { font-size: 2rem; margin-bottom: 0.3rem; }
button { cursor: pointer; }

.admin-badge {
  background: #fbc8d4;
  color: #3b1e54;
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: bold;
  margin-left: 10px;
}

.hidden { display: none; }

/* Toolbar */
.toolbar { margin: 1rem auto; display: grid; gap: .75rem; justify-content: center; }
.pills { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.pill {
  border: none; border-radius: 1000px; padding: .45rem .9rem;
  background: #e9d5ff; font-weight: 600;
}
.pill.active { background: #c084fc; color: #fff; }

/* Filters / Search / Buttons */
.filters, .search-bar {
  margin: .5rem auto;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

select, input, button {
  padding: 0.6rem;
  border-radius: 8px;
  border: none;
}

/* Primary buttons */
button {
  background-color: #c084fc;
  color: white;
  font-weight: 600;
  transition: 0.2s;
}
button:hover { background-color: #a855f7; }

/* ---------- FORM CONTROLS (fix black inputs) ---------- */
input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
  background: #ffffff;            /* force white */
  color: #111111;
  border: 1px solid #e5e7eb;      /* subtle border */
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  outline: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  width: 100%;
  box-sizing: border-box;
}

input::placeholder,
textarea::placeholder { color: #6b7280; }

input:focus,
textarea:focus,
select:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167,139,250,0.25);
}

/* Make modal inputs full width */
.modal .modal-content input,
.modal .modal-content select,
.modal .modal-content textarea {
  width: 100%;
}

/* Table */
.table-container {
  margin: 1rem auto;
  width: 90%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }
th {
  background: #c084fc;
  color: white;
  padding: 0.8rem;
  text-align: left;
}
td {
  padding: 0.8rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

/* Overdue row highlight */
tr.overdue td { background: #fff1f2; }

/* Actions cell */
.actions-cell { display: flex; gap: .4rem; }
.toggle-btn {
  border: none; background: #ede9fe; color: #4c1d95;
  padding: .25rem .5rem; border-radius: 6px; font-weight: 700;
}
.toggle-btn.open { background: #c7b7ff; color: #1e0e62; }

/* Chart */
.chart-container {
  width: 70%;
  margin: 2rem auto;
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Counters */
.track-count { font-weight: 600; color: #6b21a8; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
}
.modal-content {
  background: white;
  margin: 5% auto;
  padding: 20px;
  width: min(720px, 92%);
  border-radius: 12px;
  text-align: left;
}
.close {
  float: right;
  font-size: 22px;
  cursor: pointer;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.save-btn {
  margin-top: 10px;
  background: #8b5cf6;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
}

/* Email modal buttons row */
.row-btns {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}
/* Modal visibility */
.modal.hidden { display: none; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.modal-content {
  width: min(720px, 92vw);
  background: #fff; border-radius: 12px; padding: 20px; position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.modal-content label { display:block; font-weight:600; margin:.6rem 0 .25rem; }
.modal-content input {
  width: 100%; padding: .65rem .75rem; border: 1px solid #ddd; border-radius: 8px;
  background:#fff; color:#111; outline: none;
}
.modal-content input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167,139,250,.25); }
.row { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.8rem; }
button.primary { background:#7c3aed; color:#fff; }
button.primary:hover { background:#6d28d9; }
.close { position:absolute; right:12px; top:10px; font-size:22px; background:transparent; border:0; cursor:pointer; }
.hint { opacity:.7; margin-top:.5rem; }
