/* ═══════════════════════════════════════════════
   AUTH + DASHBOARD – Momentum Fitness
   ════════════════════════════════════════════ */

/* ── Auth pages (login, register, forgot) ─────── */
.auth-page {
  min-height: 100vh;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  display: block;
  margin: 0 auto 36px;
  height: 44px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
  margin-bottom: 32px;
}

.auth-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
  display: block;
}

.auth-input {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: var(--white) !important;
  border-radius: var(--radius) !important;
  padding: 12px 16px !important;
  font-size: 0.9rem !important;
  font-family: var(--font-main) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.auth-input:focus {
  background: rgba(255,255,255,0.08) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15) !important;
  outline: none !important;
}

.auth-input::placeholder { color: rgba(255,255,255,0.25) !important; }

.password-wrap { position: relative; }
.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  transition: color 0.2s;
}
.password-toggle:hover { color: rgba(255,255,255,0.7); }

.auth-forgot {
  font-size: 0.8rem;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  float: right;
  margin-top: -2px;
}
.auth-forgot:hover { color: var(--gold-light); }

.empty-state {
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 0;
  margin: 0;
}

.empty-state a {
  color: var(--gold);
  text-decoration: none;
}

.pw-requirements {
  margin-top: 10px;
  flex-direction: column;
  gap: 4px;
}

.pw-req {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}

.pw-req--valid   { color: #66bb6a; }
.pw-req--invalid { color: #ef9a9a; }

.auth-error {
  background: rgba(229, 57, 53, 0.12);
  border: 1px solid rgba(229, 57, 53, 0.35);
  color: #ef9a9a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: rgba(255,255,255,0.25);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.auth-footer-text {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin-top: 24px;
  margin-bottom: 0;
}

.auth-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
}
.auth-link:hover { color: var(--gold-light); }

.auth-check .form-check-input {
  background-color: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
}
.auth-check .form-check-input:checked {
  background-color: var(--gold);
  border-color: var(--gold);
}
.auth-check .form-check-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.auth-check .form-check-label a {
  color: var(--gold);
  text-decoration: none;
}

.auth-success-box {
  text-align: center;
  padding: 20px 0;
}
.auth-success-icon {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 16px;
}

/* ── Dashboard layout ──────────────────────────── */
body.dashboard-body {
  background: #f2f2f2;
  overflow-x: hidden;
}

.dashboard-navbar {
  background: var(--dark) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dashboard-navbar .container-fluid {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}
.dashboard-navbar .logo-light { display: block !important; }
.dashboard-navbar .logo-dark  { display: none  !important; }

.dashboard-sidebar {
  position: fixed;
  top: 72px;
  left: 0;
  bottom: 0;
  width: 260px;
  background: var(--dark-2);
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-user {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 12px;
  font-family: var(--font-main);
}

.sidebar-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 2px;
}

.sidebar-plan {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-nav {
  list-style: none;
  padding: 16px 0;
  margin: 0;
  flex: 1;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: var(--font-main);
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.sidebar-nav li a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.04);
}

.sidebar-nav li a.active {
  color: var(--white);
  background: rgba(201,168,76,0.08);
  border-left-color: var(--gold);
}

.sidebar-nav li a i {
  font-size: 1rem;
  width: 18px;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 24px;
}

.sidebar-logout a {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: var(--font-main);
  border-top: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.sidebar-logout a:hover { color: #ef5350; }

.dashboard-main {
  margin-left: 260px;
  margin-top: 72px;
  padding: 40px;
  min-height: calc(100vh - 72px);
}

.dash-section { display: none; }
.dash-section.active { display: block; }

.dash-welcome { margin-bottom: 32px; }
.dash-welcome h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 4px;
}
.dash-welcome p {
  color: #888;
  font-size: 0.88rem;
}

/* Cards */
.dash-card {
  background: var(--white);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.dash-card-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 16px;
}

/* Subscription card */
.sub-card {
  background: var(--dark);
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.sub-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(201,168,76,0.07);
  border-radius: 50%;
  pointer-events: none;
}

.sub-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.sub-name {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 4px;
}

.sub-detail {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

.sub-stats {
  display: flex;
  gap: 36px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sub-stat-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.sub-stat-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--white);
}

.sub-progress {
  margin-top: 16px;
}
.sub-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.sub-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
}

/* Reservation items */
.res-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.res-item:last-child { border-bottom: none; padding-bottom: 0; }

.res-date-box {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
  min-width: 52px;
  flex-shrink: 0;
}
.res-day {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1;
}
.res-month {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  margin-top: 2px;
}

.res-info { flex: 1; min-width: 0; }
.res-class {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 2px;
}
.res-time {
  font-size: 0.78rem;
  color: #aaa;
}

.res-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.res-badge.confirmed { background: rgba(76,175,80,0.1);  color: #388e3c; }
.res-badge.attended  { background: rgba(76,175,80,0.08); color: #4caf50; }
.res-badge.cancelled { background: rgba(239,83,80,0.08); color: #e57373; }
.res-badge.past      { background: #f0f0f0; color: #aaa; }
.res-item--cancelled { opacity: 0.55; }

.res-cancel {
  background: none;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-main);
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.res-cancel:hover { border-color: #e53935; color: #e53935; }

/* Profile form */
.profile-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
}

.profile-input {
  border: 1px solid #e0e0e0 !important;
  border-radius: var(--radius) !important;
  padding: 11px 16px !important;
  font-size: 0.9rem !important;
  font-family: var(--font-main) !important;
  color: var(--dark) !important;
  transition: border-color 0.2s !important;
}
.profile-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12) !important;
  outline: none !important;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-box {
  background: var(--white);
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.stat-box-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-box-label {
  font-size: 0.75rem;
  color: #aaa;
  font-weight: 600;
}

.stats-grid-plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stats-grid-plans .stat-box {
  padding: 10px 14px;
}
.stats-grid-plans .stat-box-value {
  font-size: 1.3rem;
  margin-bottom: 2px;
}
.stats-grid-plans .stat-box-label {
  font-size: 0.7rem;
}

/* Mobile */
.dash-mobile-nav {
  display: none;
  background: var(--dark-2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 8px 16px;
  overflow-x: auto;
  white-space: nowrap;
  gap: 4px;
}
.dash-mobile-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 20px;
  transition: all 0.2s;
}
.dash-mobile-nav a.active,
.dash-mobile-nav a:hover {
  background: rgba(201,168,76,0.12);
  color: var(--gold);
}

@media (max-width: 991px) {
  .dashboard-sidebar { display: none; }
  .dash-mobile-nav { display: flex; position: fixed; top: 56px; left: 0; right: 0; z-index: 1029; }
  .dashboard-main { margin-left: 0; margin-top: 0; padding: 24px; padding-top: 120px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .stats-grid-plans { grid-template-columns: repeat(2, 1fr); }
  .sub-stats { gap: 20px; }
  /* Fix Bootstrap row negative margins causing horizontal overflow */
  .dashboard-main .row { margin-left: 0; margin-right: 0; }
  /* Navbar: shrink logo on all tablet/mobile sizes */
  .dashboard-navbar .user-name      { display: none; }
  .dashboard-navbar .navbar-brand img { height: 28px !important; width: auto !important; }
}

@media (max-width: 767px) {
  .dashboard-main { padding: 16px; padding-top: 142px; }
  .auth-card { padding: 32px 24px; }
}

@media (max-width: 575px) {
  /* Auth card */
  .auth-card { padding: 28px 18px; }

  /* Subscription stats: stack vertically */
  .sub-stats { flex-direction: column; gap: 14px; }

  /* Reservation items: compress so badge+cancel don't overflow */
  .res-item { gap: 8px; padding: 12px 0; }
  .res-date-box { padding: 8px 10px; min-width: 44px; }
  .res-day   { font-size: 1.1rem; }
  .res-badge { font-size: 0.6rem; padding: 3px 7px; }
  .res-cancel { padding: 4px 8px; font-size: 0.68rem; }

  /* Section welcome header with button: stack vertically in orar section */
  #section-orar .dash-welcome { flex-direction: column; align-items: flex-start; gap: 8px; }
  #section-orar .btn-new-res  { width: 100%; justify-content: center; }

  /* Orar week tabs: equal width */
  .orar-week-tabs { gap: 6px; }
  .orar-week-tab  { flex: 1; text-align: center; font-size: 0.76rem; padding: 8px 6px; }

  /* Orar slot: smaller book button */
  .orar-slot { gap: 8px; padding: 10px 12px; }
  .orar-book-btn { padding: 6px 12px; font-size: 0.75rem; }
  .orar-slot-past, .orar-slot-booked { font-size: 0.7rem; }

  /* Quick actions: 3 per row on xs */
  .quick-actions { gap: 8px; }
  .qa-btn { min-width: 90px; padding: 14px 10px; font-size: 0.72rem; }
  .qa-btn i { font-size: 1.2rem; }

  /* Booking modal */
  .class-card { padding: 16px 8px; font-size: 0.78rem; }
  .class-card i { font-size: 1.3rem; }

  /* Navbar: icon-only logout button so badge fits on narrow phones */
  .dashboard-navbar .btn-logout-text { display: none; }
}

/* ── Pagination ── */
.pagination .page-link {
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  color: #888;
  border-color: #e8e8e8;
  border-radius: 6px !important;
  padding: 5px 11px;
}
.pagination .page-link:hover { color: var(--dark); background: #f5f5f5; border-color: #ddd; }
.pagination .page-item.active .page-link {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}
.pagination .page-item.disabled .page-link { color: #ccc; background: transparent; }

/* ── Role badge ── */
.nav-role-badge {
  background: rgba(201,168,76,0.15);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Stats grid 4 coloane (admin) ── */
.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stats-grid-4 > * { min-width: 0; overflow: hidden; }
.stats-grid-4 .stat-box-value { font-size: 1.5rem; word-break: break-word; }

.stat-box.dark {
  background: var(--dark);
}
.stat-box.dark .stat-box-value { color: var(--gold); }
.stat-box.dark .stat-box-label { color: rgba(255,255,255,0.45); }

/* ── Schedule item (instructor) ── */
.sched-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.sched-item:last-child { border-bottom: none; padding-bottom: 0; }

.sched-time-box {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  min-width: 68px;
  flex-shrink: 0;
}
.sched-hour {
  font-size: 1rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1;
}
.sched-min {
  font-size: 0.62rem;
  font-weight: 700;
  color: #aaa;
  margin-top: 2px;
}

.sched-info { flex: 1; min-width: 0; }
.sched-class {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 2px;
}
.sched-meta { font-size: 0.78rem; color: #aaa; }

.sched-cap { text-align: right; flex-shrink: 0; }
.sched-cap-text { font-size: 0.8rem; font-weight: 700; color: var(--dark); }
.sched-cap-bar {
  width: 80px;
  height: 4px;
  background: #ebebeb;
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}
.sched-cap-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
}
.sched-cap-fill.full { background: #e53935; }

/* ── Week mini-cards (instructor overview) ── */
.week-mini {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 14px 16px;
  height: 100%;
}
.week-mini-day {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #aaa;
  margin-bottom: 8px;
}
.week-mini-class {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 3px;
}
.week-mini-class span { font-weight: 400; color: #aaa; }
.week-mini-empty { font-size: 0.82rem; color: #ccc; font-style: italic; }

/* ── Participant item ── */
.part-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f0f0;
}
.part-item:last-child { border-bottom: none; padding-bottom: 0; }
.part-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--dark);
  flex-shrink: 0;
  font-family: var(--font-main);
}
.part-name { font-size: 0.88rem; font-weight: 700; color: var(--dark); }
.part-plan { font-size: 0.75rem; color: #aaa; margin-top: 1px; }

/* ── Plan badge ── */
.plan-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}
.plan-badge.promo  { background: rgba(201,168,76,0.12); color: #a07d00; }
.plan-badge.plus   { background: rgba(33,150,243,0.1);  color: #1565c0; }
.plan-badge.vip    { background: rgba(156,39,176,0.1);  color: #6a1b9a; }

/* ── Admin table ── */
.admin-table { width: 100%; font-size: 0.85rem; }
.admin-table th {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
  padding: 8px 14px;
  border-bottom: 2px solid #f0f0f0;
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f5f5f5;
  color: var(--dark);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }
.td-name { font-weight: 700; font-size: 0.88rem; }
.td-sub  { font-size: 0.8rem; color: #888; }
.status-active   { color: #388e3c; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; }
.status-expired  { color: #e53935; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; }

/* ── Instructor card (admin) ── */
.instructor-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  margin-bottom: 12px;
}
.instructor-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--dark);
  flex-shrink: 0;
  font-family: var(--font-main);
}
.instructor-info { flex: 1; }
.instructor-name { font-size: 0.95rem; font-weight: 800; color: var(--dark); }
.instructor-classes { font-size: 0.78rem; color: #aaa; margin-top: 3px; }
.instructor-stat { text-align: right; }
.instructor-stat-val { font-size: 1.3rem; font-weight: 900; color: var(--gold); line-height: 1; }
.instructor-stat-lbl { font-size: 0.65rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
