/* ========================================
   STYLES.CSS - Centralized Stylesheet
   Based on LoginPage.jpg and main.jpg
   ======================================== */

:root {
  /* Color Palette - Per Requirements */
  --bg-global: #0C2B47;
  --color-men: #007dff;
  --color-women: #bd66cc;
  --color-juniors: #16af11;
  --color-midweek: #b000ff;
  --color-menu-btn: #1565C0;
  --color-menu-btn-hover: #0d47a1;
  --color-border-active: #000000;
  
  /* Login Button - Orange from image */
  --color-login-btn: #FF5722;
  --color-login-btn-hover: #E64A19;
  
  /* Neutral Colors */
  --white: #ffffff;
  --light-gray: #f7fafc;
  --light-bg: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #4a5568;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --border-gray: #ddd;
  
  /* Status Colors */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ========================================
   GLOBAL RESET
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--white);
}

/* ========================================
   LOGIN PAGE LAYOUT
   ======================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-page.admin {
  background: linear-gradient(135deg, #FEE2E2 0%, #FCE7F3 100%);
}

.login-page.player {
  background: linear-gradient(135deg, #DBEAFE 0%, #E0E7FF 100%);
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 60px 80px;
  max-width: 500px;
  width: 100%;
  text-align: center;
}

/* Icon Badge */
.icon-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.icon-badge.admin {
  background: #FEE2E2;
  color: #DC2626;
}

.icon-badge.player {
  background: #DBEAFE;
  color: #2563EB;
}

/* Login Headers */
.login-card h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-card .subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 40px;
}

/* Form Styles */
.form-group {
  margin-bottom: 24px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  transition: all 0.3s;
  background: var(--white);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-login-btn);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.form-group input::placeholder {
  color: #9ca3af;
}

/* Login Button */
.login-button {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  background: var(--color-login-btn);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
}

.login-button:hover {
  background: var(--color-login-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.login-button:active {
  transform: translateY(0);
}

/* Login Links */
.login-links {
  margin-top: 24px;
  text-align: center;
}

.login-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
  display: inline-block;
}

.login-links a:hover {
  color: var(--text-primary);
}

.login-links .divider {
  margin: 16px 0;
  color: var(--medium-gray);
  font-size: 12px;
}

/* Message Alerts */
.message {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  text-align: left;
}

.message.success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success);
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--error);
}

.message.info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

/* ========================================
   DASHBOARD LAYOUT (from main.jpg)
   ======================================== */
.dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--light-bg);
}

/* Sidebar Navigation */
.sidebar {
  width: 264px;
  background: var(--white);
  border-right: 1px solid var(--border-gray);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-gray);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-nav {
  padding: 16px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--dark-gray);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-item:hover {
  background: var(--light-gray);
}

.sidebar-item.active {
  background: var(--light-gray);
  color: var(--text-primary);
  font-weight: 600;
  border-left: 4px solid var(--color-menu-btn);
}

.sidebar-item svg,
.sidebar-item .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Main Content Area */
.main-content {
  margin-left: 264px;
  flex: 1;
  padding: 32px;
  width: calc(100% - 264px);
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Content Card */
.content-card {
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.content-card h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* ========================================
   BUTTONS
   ======================================== */
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  background: var(--color-menu-btn);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.menu-button:hover {
  background: var(--color-menu-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.menu-button.secondary {
  background: var(--text-secondary);
}

.menu-button.secondary:hover {
  background: var(--dark-gray);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

/* ========================================
   TABLES
   ======================================== */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background: var(--light-gray);
}

th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-gray);
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  background: var(--medium-gray);
}

td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-gray);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--light-gray);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .login-card {
    padding: 40px 30px;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer {
    position: static;
    margin-top: 40px;
    text-align: center;
  }
}

@media print {
  .footer,
  .sidebar {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
  }
}
