/* ============================================================
   style.css — iFitness Centre Corporate Portal
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f4f8;
  color: #333;
  min-height: 100vh;
}

a { color: #1a3c5e; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Top navigation bar ─────────────────────────────────── */
.navbar {
  background: #1a3c5e;
  color: #fff;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.navbar .brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #fff;
}
.navbar .brand span { color: #7ec8e3; }
.navbar nav a {
  color: #cde;
  margin-left: 22px;
  font-size: 14px;
  transition: color .2s;
}
.navbar nav a:hover { color: #fff; text-decoration: none; }
.navbar nav a.logout { color: #f4a261; }

/* ── Page wrapper ───────────────────────────────────────── */
.page-wrap {
  max-width: 1100px;
  margin: 36px auto;
  padding: 0 20px;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  padding: 28px 32px;
  margin-bottom: 28px;
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a3c5e;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f0f7;
}

/* ── Stat boxes (dashboard) ─────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-box {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  border-left: 4px solid #1a3c5e;
}
.stat-box .num { font-size: 32px; font-weight: 700; color: #1a3c5e; }
.stat-box .lbl { font-size: 13px; color: #666; margin-top: 4px; }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead tr { background: #1a3c5e; color: #fff; }
thead th { padding: 11px 14px; text-align: left; font-weight: 600; white-space: nowrap; }
tbody tr { border-bottom: 1px solid #eef2f7; transition: background .15s; }
tbody tr:hover { background: #f5f8fc; }
tbody td { padding: 11px 14px; vertical-align: middle; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.badge-active   { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-pending  { background: #fff3cd; color: #856404; }
.badge-monthly  { background: #cce5ff; color: #004085; }
.badge-quarterly{ background: #d1ecf1; color: #0c5460; }
.badge-annual   { background: #e2d9f3; color: #4a235a; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  text-align: center;
  white-space: nowrap;
}
.btn:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }
.btn-primary  { background: #1a3c5e; color: #fff; }
.btn-success  { background: #27ae60; color: #fff; }
.btn-warning  { background: #f39c12; color: #fff; }
.btn-danger   { background: #e74c3c; color: #fff; }
.btn-sm       { padding: 5px 12px; font-size: 13px; }
.btn-outline  { background: transparent; border: 2px solid #1a3c5e; color: #1a3c5e; }

/* ── Forms ──────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid #cdd5df;
  border-radius: 5px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a3c5e;
  box-shadow: 0 0 0 3px rgba(26,60,94,.12);
}
.checkbox-group { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  color: #333;
}
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* ── Alerts / flash messages ─────────────────────────────── */
.alert {
  padding: 12px 18px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.alert-error   { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.alert-info    { background: #cce5ff; border: 1px solid #b8daff; color: #004085; }

/* ── Signup link box ────────────────────────────────────── */
.link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f4f8;
  border: 1px solid #cdd5df;
  border-radius: 6px;
  padding: 10px 14px;
}
.link-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #1a3c5e;
  font-family: monospace;
}
.link-box input:focus { outline: none; }

/* ── Login page ─────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a3c5e 0%, #2980b9 100%);
}
.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.login-card .logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-card .logo h1 { font-size: 22px; color: #1a3c5e; font-weight: 700; }
.login-card .logo p  { font-size: 13px; color: #888; margin-top: 4px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card .btn { width: 100%; padding: 11px; font-size: 15px; margin-top: 6px; }

/* ── Signup page (public) ───────────────────────────────── */
.signup-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a3c5e 0%, #2980b9 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.signup-header {
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
}
.signup-header h1 { font-size: 26px; font-weight: 700; }
.signup-header p  { font-size: 15px; opacity: .85; margin-top: 6px; }
.signup-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px 38px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.signup-card .card-title { font-size: 17px; }
.signup-card .btn { width: 100%; padding: 12px; font-size: 15px; margin-top: 8px; }

/* ── Thank you page ─────────────────────────────────────── */
.thankyou-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a3c5e 0%, #27ae60 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.thankyou-card {
  background: #fff;
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.thankyou-card .icon { font-size: 56px; margin-bottom: 16px; }
.thankyou-card h2   { color: #1a3c5e; font-size: 24px; margin-bottom: 12px; }
.thankyou-card p    { color: #555; font-size: 15px; line-height: 1.6; }

/* ── Client detail page ─────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 30px;
}
.detail-row { font-size: 14px; padding: 6px 0; border-bottom: 1px solid #f0f4f8; }
.detail-row span:first-child { color: #888; min-width: 160px; display: inline-block; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 680px) {
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .card { padding: 20px 18px; }
  .signup-card { padding: 28px 20px; }
  .login-card  { padding: 32px 24px; }
  .page-wrap   { margin: 20px auto; }
}

/* ── Dropdown navigation ─────────────────────────────────── */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-drop-btn {
  color: #cde;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-left: 22px;
  user-select: none;
  transition: color .2s;
}
.nav-drop-btn:hover { color: #fff; }
.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  min-width: 220px;
  z-index: 500;
  overflow: hidden;
}
.nav-drop-menu a {
  display: block;
  padding: 11px 18px;
  color: #333;
  font-size: 14px;
  border-bottom: 1px solid #f0f4f8;
  transition: background .15s;
  text-decoration: none;
}
.nav-drop-menu a:last-child { border-bottom: none; }
.nav-drop-menu a:hover { background: #f0f4f8; color: #1a3c5e; }
.nav-drop-divider {
  border-top: 1px solid #e8f0f7;
  margin: 4px 0;
}
.nav-dropdown:hover .nav-drop-menu { display: block; }

/* Keep dropdown open on click for mobile */
.nav-dropdown.open .nav-drop-menu { display: block; }

.nav-badge {
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Navbar logo ─────────────────────────────────────────── */
.navbar .brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.navbar .brand:hover { opacity: .9; }
