/* Club of Athens - Dashboard & Admin Complete CSS System */
/* Independent CSS for dashboard and admin pages */
/* Version: 20250828-1801 */

/* ===== CSS VARIABLES ===== */
:root {
  /* Colors */
  --deep-navy: #0e1e34;
  --primary-navy: #1a2b47;
  --golden-bronze: #d7a96f;
  --accent-gold: #f0dfc5;
  --gradient-gold-metallic: linear-gradient(135deg, #d7a96f 0%, #f0dfc5 50%, #d7a96f 100%);
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 15px;
  
  /* Typography */
  --font-primary: 'Lato', sans-serif;
  --font-heading: 'Cinzel', serif;
  --font-subheading: 'Merriweather Sans', sans-serif;
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dashboard-page {
  background: var(--deep-navy);
  color: white;
  min-height: 100vh;
  font-family: var(--font-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
  background-image: url('../images/background/home.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 30, 52, 0.85);
  z-index: 1;
}

.dashboard-header .container {
  position: relative;
  z-index: 2;
}

/* ===== DASHBOARD NAVIGATION ===== */
.dashboard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 12px;
}

.logo-img {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: var(--golden-bronze);
  font-weight: 600;
}

/* ===== MOBILE MENU TOGGLE ===== */
.dashboard-mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1000;
  position: relative;
}

.dashboard-mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.dashboard-mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.dashboard-mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.dashboard-mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* ===== DASHBOARD ACTIONS ===== */
.dashboard-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--golden-bronze);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-navy);
  font-weight: bold;
  font-size: 1.2rem;
}

/* ===== BUTTON STYLING ===== */
.btn-admin,
.btn-logout {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-admin:hover,
.btn-logout:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(215, 169, 111, 0.6);
  color: rgba(215, 169, 111, 0.9);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: normal;
}

.btn-secondary:hover {
  background: rgba(215, 169, 111, 0.1);
  color: var(--golden-bronze);
  text-decoration: none;
}

/* ===== WELCOME SECTION ===== */
.welcome-section {
  text-align: center;
  margin-bottom: 2rem;
}

.welcome-section h1 {
  font-family: 'Merriweather Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  font-size: 2.5rem;
  color: var(--golden-bronze);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.member-badge {
  display: inline-block;
  background: var(--gradient-gold-metallic);
  color: var(--deep-navy);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  margin-top: 1rem;
  border: 2px solid rgba(215, 169, 111, 0.3);
}

/* ===== CARD SYSTEM ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.dashboard-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(14, 30, 52, 0.4), 0 0 40px rgba(215, 169, 111, 0.2);
  background: linear-gradient(135deg, 
    rgba(14, 30, 52, 0.9) 0%, 
    rgba(14, 30, 52, 0.8) 100%);
  border-color: rgba(215, 169, 111, 0.6);
}

.card-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--gradient-gold-metallic);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  font-size: 2rem;
  color: var(--deep-navy);
  border: 3px solid rgba(215, 169, 111, 0.3);
  transition: all 0.3s ease;
  text-align: center;
}

.dashboard-card:hover .card-icon {
  border-color: var(--golden-bronze);
  box-shadow: 0 0 20px rgba(215, 169, 111, 0.4);
  transform: scale(1.05);
}

.card-title {
  color: var(--golden-bronze);
  margin-bottom: var(--space-4);
  font-size: 1.375rem;
  font-family: var(--font-subheading);
  font-weight: 600;
}

.card-description {
  color: var(--golden-bronze);
  opacity: 0.9;
  line-height: 1.4;
  flex-grow: 1;
  margin-bottom: var(--space-6);
}

.card-status {
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-top: auto;
}

.status-active {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.4);
}

.status-pending {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.4);
}

.status-coming-soon {
  background: rgba(108, 117, 125, 0.2);
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.4);
}

/* ===== TABLE STYLING ===== */
.admin-table-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(215, 169, 111, 0.3);
}

.admin-table th {
  background: rgba(215, 169, 111, 0.1);
  font-weight: bold;
  color: var(--golden-bronze);
  border-bottom: 2px solid rgba(215, 169, 111, 0.3);
}

.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.member-type {
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.type-free {
  background: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

.type-monthly {
  background: rgba(0, 123, 255, 0.2);
  color: #007bff;
}

.type-yearly {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.type-admin {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* iPad and Tablet Styles */
@media (max-width: 1024px) {
  .dashboard-mobile-menu-toggle {
    display: flex;
  }
  
  .dashboard-header {
    padding: 1.5rem 0;
  }
  
  .dashboard-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .dashboard-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .dashboard-actions.mobile-hidden {
    display: none;
  }
  
  .dashboard-actions.mobile-visible {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(14, 30, 52, 0.98);
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  
  .user-info {
    order: 1;
    flex: 1;
  }
  
  .btn-admin,
  .btn-logout {
    order: 2;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .dashboard-card {
    padding: 1.5rem;
  }
  
  .card-icon {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }
  
  .card-title {
    font-size: 1.2rem;
  }
  
  .admin-table {
    font-size: 0.9rem;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* Mobile Menu Toggle Styles */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  position: relative;
  z-index: 1001;
}

/* Hide mobile menu items on desktop */
.mobile-menu-item {
  display: none !important;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--golden-bronze);
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== PAGE SPECIFIC STYLES ===== */
.settings-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 0;
}

.resources-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

.settings-form, .resource-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--golden-bronze);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--golden-bronze);
  box-shadow: 0 0 10px rgba(215, 169, 111, 0.3);
}

.message {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: none;
}

.message.success {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.4);
  color: #4ade80;
}

.message.error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #f87171;
}

/* Resources page specific styles */
.resource-section h2 {
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.resource-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.resource-item h3 {
  color: rgba(215, 169, 111, 0.9);
  margin-bottom: 1.5rem;
}

.resource-item p {
  margin-bottom: 1.5rem;
  opacity: 0.8;
  color: rgba(255, 255, 255, 0.8);
}

.initiative-link {
  display: inline-flex;
  align-items: center;
  color: var(--golden-bronze);
  text-decoration: none;
  margin-top: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.initiative-link:hover {
  color: #c5975a;
  transform: translateX(5px);
}

.initiative-link i {
  margin-left: 0.5rem;
}

/* Mobile Phone Styles */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 1rem 0;
  }
  
  .resource-list {
    grid-template-columns: 1fr;
  }
  
  .resource-section, .settings-form {
    padding: 1.5rem;
  }
  
  /* Admin dashboard mobile fixes */
  .container {
    padding: 0 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .dashboard-card {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .stat-number {
    font-size: 2rem;
    word-break: break-word;
  }
  
  /* Mobile Member Management - Replace table with card layout */
  .admin-table-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
  }
  
  .admin-table-container h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
  }
  
  .admin-table-container p {
    margin-bottom: 2rem;
    opacity: 0.8;
  }
  
  /* Mobile table styling - allow tables to be visible */
  .admin-table {
    display: table;
    width: 100%;
    font-size: 0.8rem;
    overflow-x: auto;
  }
  
  .dashboard-nav {
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Logo size on mobile to match main site */
  .logo-img {
    height: 35px;
    width: 35px;
  }
  
  .logo-text {
    font-size: 1.3rem;
  }
  
  /* Hide ALL dashboard actions on mobile except when menu is open */
  .dashboard-actions {
    display: none;
  }
  
  .dashboard-actions.mobile-visible {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(14, 30, 52, 0.98);
    border-top: 1px solid rgba(215, 169, 111, 0.3);
    padding: 1rem;
    z-index: 1000;
  }
  
  /* Hide ALL regular dashboard elements on mobile */
  .user-info,
  .btn-admin,
  .btn-logout {
    display: none !important;
  }
  
  /* ONLY show mobile menu items when mobile menu is visible */
  .mobile-menu-item {
    width: 100%;
    text-align: left;
    padding: 1rem;
    color: var(--golden-bronze);
    text-decoration: none;
    border-bottom: 1px solid rgba(215, 169, 111, 0.2);
    transition: all 0.3s ease;
    display: none;
  }
  
  .mobile-menu-item i {
    margin-right: 0.75rem; /* Increased spacing between icon and text */
    width: 18px; /* Fixed width for better alignment */
  }
  
  .dashboard-actions.mobile-visible .mobile-menu-item {
    display: block !important;
  }
  
  /* Admin mobile menu item only shows for admin users */
  #mobileAdminButton {
    display: none !important;
  }
  
  #mobileAdminButton[data-show="true"] {
    display: none !important;
  }
  
  .dashboard-actions.mobile-visible #mobileAdminButton[data-show="true"] {
    display: block !important;
  }
  
  .mobile-menu-item:hover {
    color: var(--accent-gold);
    background: rgba(215, 169, 111, 0.1);
  }
  
  .mobile-menu-item:last-child {
    border-bottom: none;
  }
  
  .container .dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }
  
  .dashboard-card {
    padding: 1.5rem;
  }
  
  .card-icon {
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .card-description {
    font-size: 0.9rem;
  }
  
  .welcome-section h1 {
    font-size: 2rem;
    font-family: 'Merriweather Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
  }
  
  .welcome-section p {
    font-size: 1rem;
  }
  
  .admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .admin-table {
    font-size: 0.8rem;
    min-width: 600px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.5rem 0.25rem;
    white-space: nowrap;
  }
}


/* Links */
a {
  color: var(--golden-bronze);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-gold);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: var(--space-4);
}

.mt-2 {
  margin-top: var(--space-4);
}