/* ===== Base ===== */
:root {
  --bg-pattern-size: 300px auto;
  --container-blue: #37578f;
  --brand-blue: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --surface: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 6px rgba(0,0,0,.75);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, Arial, sans-serif;
  color: var(--text);
  background-image: url('../images/Educational_Icons_Pattern_1.png');
  background-repeat: repeat;
  background-size: var(--bg-pattern-size);
  background-color: #ffffff;
}

/* ===== Layout ===== */
.container {
  max-width: 860px;
  margin: 24px auto;
  padding: 1.5rem;
  background-color: var(--container-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #ffffff;
  overflow: visible;
}

.container form { background: transparent; }

/* ===== Title (general) ===== */
.container h1 {
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  margin-bottom: 1.5rem;
  text-align: center;
}

.container > p { text-align: center; color: #ffffff; }

/* ===== Title inside white box ===== */
.title-box {
  background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
  padding: 20px 28px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  text-align: center;
  margin-bottom: 28px;
  border: 2px solid rgba(55, 87, 143, 0.15);
}
.title-box h1 {
  text-transform: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--container-blue);
  margin: 0;
  letter-spacing: 0.5px;
}

/* ===== Typography & Controls ===== */
label {
  display: block;                   /* ensures stacked label + control when needed */
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #f8fafc;
  margin-top: 22px;
  margin-bottom: 10px;
}

/* spacing for textarea sections */
label textarea { margin-top: 6px; }
textarea { margin-bottom: 20px; }

.container > form > label {
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 26px;
  margin-bottom: 12px;
}

/* ===== Groups (Specialists + Bathroom containers) ===== */
/* Desktop/base: row with wrapping (side-by-side items) */
.group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  margin-bottom: 16px;
}
.group label {
  display: flex;                    /* keep label text + control aligned */
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 1.125rem;
}

/* ===== Inputs / textareas / selects ===== */
input[type="text"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface) !important;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: var(--text);
  outline: none;
  font-size: 1.125rem;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.75);
  transition: box-shadow .15s ease, border-color .15s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 6px 14px rgba(0,0,0,0.55), 0 0 0 3px rgba(37, 99, 235, .25);
}

/* ===== Grid ===== */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== Buttons ===== */
button {
  margin-top: 24px;
  padding: 12px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--brand-blue);
  color: #37578f;
  cursor: pointer;
  font-weight: 600;
}
button:hover { filter: brightness(0.95); }
button:active { transform: translateY(1px); }

/* blue-container button style */
.container button {
  background: #ffffff;
  color: var(--container-blue);
  font-weight: 600;
  border: 2px solid var(--container-blue);
  border-radius: 6px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.75);
}
.container button:hover {
  background: var(--container-blue);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.75);
}

/* ===== Status boxes ===== */
.success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #ffffff;
  padding: 10px;
  border-radius: 6px;
  margin: 14px 0;
}
.readonly {
  background: rgba(255, 255, 255, 0.15);
  border: 1px dashed rgba(255, 255, 255, 0.4);
  padding: 8px;
  border-radius: 6px;
  color: #ffffff;
}

/* ===== Checkboxes ===== */
.group input[type="checkbox"] {
  transform: scale(1.35);
  transform-origin: left center;
  margin-right: 4px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.75);
}
.group input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(37,99,235,.55);
  outline-offset: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.45);
}

/* ===== Bathroom metrics ===== */
.metric {
  display: flex;            /* label text + input inline */
  align-items: center;
  gap: 10px;
}
.metric span {
  font-size: 1.125rem;
  font-weight: 600;
}
.bathroom-field {
  font-size: 1.2rem;
  padding: 8px 10px;
  width: 50px;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.75);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.bathroom-field:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 6px 14px rgba(0,0,0,0.75), 0 0 0 3px rgba(37, 99, 235, .25);
}

/* ===== Admin tables ===== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { min-width: 880px; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  body {
    font-size: 16px;
    padding: 8px;
    background-size: 200px auto;
    min-height: 100dvh;
  }

  .container {
    width: 100%;
    max-width: 95%;
    margin: clamp(12px, 3vh, 24px) auto;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 1px 5px rgba(0,0,0,.12);
  }

  .two { grid-template-columns: 1fr; gap: 10px; }

  /* Stack Specialists + Bathroom vertically on small screens */
  .group {
    flex-direction: column;
    gap: 12px;
  }

  input[type="text"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px;
    padding: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.35);  /* lighter on mobile */
  }

  button {
    width: 100%;
    font-size: 18px;
    padding: 14px;
  }

  .group.compact { gap: 12px; }

  .bathroom-field {
    width: 48px;
    font-size: 1.125rem;
    padding: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.35);
  }

  /* Date row tweaks if used */
  .date-row { margin: 16px 0; }
  .date-row label { font-size: 1rem; }
  .date-row input[type="date"] {
    width: 140px;
    font-size: 1.1rem;
    padding: 6px 10px;
    text-align: center;
  }
}
