/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Form Label ===== */
.form-label {
  display: block; text-align: left; margin-bottom: 15px;
  color: #475569; padding-left: 5px; font-weight: 500;
}

/* ===== Hero ===== */
.hero {
  background:
    linear-gradient(135deg, rgba(0,153,219,.9) 0%, rgba(0,104,181,.9) 50%, rgba(0,60,116,.9) 100%),
    url("img/bg.jpg");
  background-size: cover; background-position: center;
  text-align: center; padding: 60px 32px; color: #fff; margin-bottom: 34px;
}
.hero-content { max-width: 800px; margin: 0 auto; }
.intel-logo { max-width: 100px; margin-bottom: 25px; filter: brightness(0) invert(1); }
.hero h1 {
  font-size: 46px; font-weight: 700; line-height: 1.2;
  text-transform: uppercase; margin-bottom: 16px; letter-spacing: -.5px; color: #fff;
}
.hero-divider { width: 100px; height: 3px; margin: 26px auto; background-color: #00c7fd; }
.hero p { font-size: 22px; letter-spacing: 1px; font-weight: 300; color: #fff; }

/* ===== Container ===== */
.container {
  max-width: 700px; width: 90%; margin: 0 auto 20px; margin-top: 0;
  padding: 26px; background: #fff; border-radius: 16px;
  box-shadow: 0 5px 24px rgba(0, 60, 116, 0.07); text-align: center;
}

/* ===== Check-in Form ===== */
.check-in {
  width: 100%; margin: 0 auto; padding: 20px 20px 22px;
  background-color: #f8fafc; border-radius: 16px; text-align: center;
}
.form-group { display: flex; gap: 12px; width: 100%; align-items: stretch; } /* make button fit */

.input-wrapper { flex: 1; display: flex; gap: 10px; }

/* Inputs & Button */
input, select {
  padding: 16px 20px; border: 2px solid rgba(0,0,0,.08);
  border-radius: 12px; font-size: 17px; font-weight: 500;
  background: #fff; color: #2c3e50; transition: all .3s ease; outline: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
input { flex: 1; }
select { min-width: 160px; cursor: pointer; }
input:focus, select:focus { border-color: #0071c5; box-shadow: 0 0 0 4px rgba(0,113,197,.15); }

button {
  background-color: #0071c5; color: #fff; border: none; border-radius: 12px;
  padding: 0 24px; min-width: 160px; height: auto; /* fit card */
  font-size: 17px; font-weight: 600; cursor: pointer; transition: all .3s ease;
  box-shadow: 0 4px 12px rgba(0,113,197,.2);
  display: flex; align-items: center; justify-content: center;
}
button:hover { background-color: #005a9e; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,113,197,.3); }
.fas { margin-right: 8px; }
button .fas { font-size: 18px; margin-right: 10px; }

/* ===== Attendance Header & Tracker ===== */
.attendance-tracker { max-width: 700px; width: 90%; margin: 0 auto 40px; padding: 0 20px; text-align: center; }
.attendance-header { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 15px; font-size: 17px; color: #64748b; }
.attendance-header i { color: #0071c5; font-size: 20px; margin-right: 4px; }
#attendeeCount { color: #0071c5; font-size: 24px; font-weight: 700; margin: 0 2px; }

.progress-container {
  width: 100%; max-width: 500px; height: 16px; background-color: #e0e0e0;
  border-radius: 10px; overflow: hidden; margin: 8px auto; position: relative;
}
.progress-bar {
  width: 0%; height: 100%;
  background-image: linear-gradient(90deg, #0071c5, #00aeef);
  border-radius: 10px; transition: width .6s ease;
}

/* ===== Messages & Celebration ===== */
#greeting {
  font-weight: 500; font-size: 18px; padding: 16px 20px;
  border-radius: 8px; color: #003c71; margin-bottom: 15px; display: none;
  background-color: #e8f4fc;
}
#greeting.show { display: block; }

.celebration {
  display: none; margin: 12px 0 0; padding: 10px 14px;
  border-radius: 10px; background: #ecfff8; color: #005b52; font-weight: 600;
}
.celebration.on { display: block; }

/* ===== Team Stats ===== */
.team-stats { margin-top: 30px; padding-top: 30px; border-top: 2px solid #f1f5f9; }
.team-stats-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.btn-ghost {
  background: transparent; color: #0071c5; min-width: auto; padding: 8px 12px; height: 40px;
  border-radius: 10px; box-shadow: none; border: 1px solid rgba(0,113,197,.2);
}
.btn-ghost:hover { background: rgba(0,113,197,.06); transform: none; box-shadow: none; }

.teams-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }

.team-card {
  padding: 15px; border-radius: 12px; display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; border: 1px solid transparent;
}
.team-card:hover { border-color: rgba(0,0,0,.06); }
.team-card.water { background-color: #e8f7fc; }
.team-card.zero  { background-color: #ecfdf3; }
.team-card.power { background-color: #fff7ed; }
.team-card.leader { outline: 3px solid #00aeef; box-shadow: 0 0 0 4px rgba(0,174,239,.2); }

.team-name { font-size: 15px; font-weight: 500; color: #475569; }

/* Team count (visible on light cards) */
.team-count {
  color: #0f172a;    /* dark slate */
  font-weight: 700;
}

/* ===== Attendee list (collapsible) ===== */
#attendee-list { list-style: none; margin-top: 12px; }
[hidden] { display: none !important; }
.attendee-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; }
.attendee-name { font-weight: 600; }
.attendee-team { color: #64748b; font-size: 14px; }

/* ===== Footer ===== */
.footer { text-align: center; padding: 40px 20px; color: #94a3b8; font-size: 14px; }
.footer-link { color: #64748b; text-decoration: none; }
.footer-link:hover { color: #0071c5; text-decoration: underline; }

/* Shorten name input a bit on desktop so the button doesn't wrap */
@media (min-width: 769px) {
  #attendeeName {
    flex: 0 1 320px;
    max-width: 360px;
  }
  #teamSelect {
    flex: 0 0 180px;
  }
  #checkInBtn {
    min-width: 160px;
    padding: 0 24px;
    white-space: nowrap;
  }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .hero { padding: 35px 20px; }
  .hero h1 { font-size: 38px; }
  .container { padding: 32px; margin: 0 15px 30px; }
  .form-group { flex-direction: column; }
  input, button, select { width: 100%; }
  .btn-ghost { width: auto; }
  .teams-grid { grid-template-columns: 1fr; }
}