/* 
  Lion's Gym Admin - Core Styles
  Theme: Black, Red, Yellow
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: #050507;
  color: #f4f4f4;
}

body {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  flex: 1;
  display: flex;
}

.view {
  flex: 1;
}

.hidden {
  display: none !important;
}

.active-view {
  display: block;
}

/* Auth */

.auth-card {
  margin: auto;
  background: radial-gradient(circle at top left, #b71c1c 0, #050507 45%);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-title {
  text-align: center;
  font-size: 1.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  color: #ffeb3b;
}

.subtitle {
  text-align: center;
  margin-bottom: 2rem;
  color: #e0e0e0;
  font-size: 0.95rem;
}

/* Layout */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  background: #111216;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lion-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffeb3b;
  font-size: 0.95rem;
}

.top-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.admin-email {
  font-size: 0.85rem;
  color: #b0bec5;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-email {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  color: #90a4ae;
  word-break: break-all;
}

.layout {
  display: block;
  min-height: calc(100vh - 56px);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem 0.5rem;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mobile-stack {
  justify-content: flex-start;
}

.nav-link {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eceff1;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.nav-link:hover {
  background: rgba(244, 67, 54, 0.18);
}

.nav-link.active {
  background: linear-gradient(90deg, #f44336, #ffeb3b);
  color: #111;
  font-weight: 600;
  transform: translateY(-1px);
}

.content {
  flex: 1;
  padding: 1.5rem 1.75rem 2rem;
  overflow-y: auto;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.section-header h2,
.section-header h3 {
  margin: 0;
}

/* Cards */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: linear-gradient(145deg, #15171d, #101116);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}

.stat-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #b0bec5;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffeb3b;
}

/* Forms */

form {
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.form-group label {
  font-size: 0.85rem;
  color: #cfd8dc;
  margin-bottom: 0.25rem;
}

input,
select {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.55rem 0.85rem;
  background: rgba(0, 0, 0, 0.4);
  color: #eceff1;
  outline: none;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
}

input::placeholder {
  color: #78909c;
}

input:focus,
select:focus {
  border-color: #f44336;
  box-shadow: 0 0 0 1px rgba(244, 67, 54, 0.6);
  background: rgba(0, 0, 0, 0.8);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.error-text {
  color: #ef5350;
  font-size: 0.85rem;
  min-height: 1.1rem;
}

/* Buttons */

.btn {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform 0.08s ease, box-shadow 0.1s ease,
    background 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.primary-btn {
  background: linear-gradient(135deg, #f44336, #ffeb3b);
  color: #111;
  box-shadow: 0 10px 25px rgba(244, 67, 54, 0.6);
}

.primary-btn:hover {
  box-shadow: 0 14px 30px rgba(244, 67, 54, 0.8);
}

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #eceff1;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.full-width {
  width: 100%;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

/* Tables */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 4, 7, 0.95);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
}

thead {
  background: rgba(10, 10, 14, 0.95);
}

th,
td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-size: 0.85rem;
}

th {
  font-weight: 600;
  color: #b0bec5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
  background: rgba(244, 67, 54, 0.08);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-active {
  background: rgba(76, 175, 80, 0.15);
  color: #a5d6a7;
}

.badge-inactive {
  background: rgba(244, 67, 54, 0.18);
  color: #ef9a9a;
}

.empty-row {
  text-align: center;
  color: #78909c;
}

/* Modals */

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 15;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  position: relative;
  background: #111318;
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1.1rem;
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.modal-content.large {
  max-width: 760px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  border: none;
  background: transparent;
  color: #eceff1;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Member Profile */

.member-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 1.2rem;
}

.member-summary {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.member-summary h4 {
  margin: 0 0 0.6rem 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.summary-label {
  color: #b0bec5;
}

.summary-value {
  color: #eceff1;
}

.member-payments {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.member-payments h4 {
  margin: 0 0 0.6rem 0;
}

/* Utilities */

h1,
h2,
h3,
h4 {
  color: #ffffff;
}

@media (max-width: 900px) {
  .layout {
    display: block;
  }

  .nav-row {
    padding: 0.8rem 1rem 0.4rem;
    justify-content: flex-start;
  }

  .nav-link {
    flex: 1 1 140px;
    justify-content: center;
  }

  .mobile-stack {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .mobile-stack .btn {
    width: auto;
  }

  .content {
    padding: 1rem;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .auth-card {
    margin: 1.5rem;
    padding: 1.75rem 1.4rem;
  }

  .app-title {
    font-size: 1.6rem;
  }

  .member-profile {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  th,
  td {
    font-size: 0.8rem;
    white-space: normal;
    word-break: break-word;
  }

  table {
    min-width: 100%;
  }

  .table-wrapper {
    overflow-x: auto;
  }
}


