/* Elestia MVP Theme - Gold, Sage Green, White */
:root {
  /* Primary Colors */
  --color-gold: #D4AF37;
  --color-gold-light: #E6C158;
  --color-gold-dark: #B8951B;
  --color-sage: #8A9A5B;
  --color-sage-light: #9CAA6E;
  --color-sage-dark: #78884E;
  --color-white: #FFFFFF;
  --color-off-white: #F8F9FA;
  
  /* Neutral Colors */
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;
  
  /* Semantic Colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--color-off-white) 0%, #FFFFFF 100%);
  color: var(--color-gray-800);
  min-height: 100vh;
  line-height: 1.6;
}

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-gray-900);
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-sage) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  color: var(--color-gray-900);
}

h3 {
  font-size: 1.5rem;
  color: var(--color-gray-800);
}

p {
  margin-bottom: 1rem;
}

/* ====== HEADER ====== */
header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--color-sage-dark) 0%, var(--color-sage) 100%);
}

.site-logo {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--color-white);
  padding: 8px;
  box-shadow: var(--shadow-md);
}

#hero-name {
  font-size: 2rem;
  color: var(--color-white);
  text-shadow: none;
  animation: none;
}

/* ====== NAVIGATION ====== */
.nav-bar {
  background: var(--color-white);
  padding: 0.75rem 2rem;
}

.nav-list {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--color-gray-700);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-list a:hover {
  color: var(--color-gold);
  background: var(--color-gray-50);
}

.nav-list a.active {
  color: var(--color-gold);
  background: var(--color-gray-50);
}

.nav-list a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--color-gold);
  border-radius: var(--radius-full);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-gray-700);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dropdown-menu a:hover {
  background: var(--color-gray-50);
  color: var(--color-gold);
}

/* Dynamic dropdown items from navigation.js */
.dropdown-menu .dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-gray-700) !important;
  text-decoration: none;
  font-weight: 500;
  background: transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dropdown-menu .dropdown-item:hover {
  background: var(--color-gray-50);
  color: var(--color-gold) !important;
}

.dropdown-menu .dropdown-divider {
  margin: 0.5rem 0;
  border: 0;
  border-top: 1px solid var(--color-gray-200);
}

/* ====== MAIN CONTENT ====== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.fade-in {
  animation: fadeIn var(--transition-slow);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  color: var(--color-white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-gold-dark) 0%, var(--color-gold) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-sage);
  color: var(--color-white);
}

.btn-secondary:hover {
  background: var(--color-sage-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-gray-300);
  color: var(--color-gray-700);
}

.btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.btn-danger {
  background: var(--color-error);
  color: var(--color-white);
}

.btn-success {
  background: var(--color-success);
  color: var(--color-white);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ====== CARDS ====== */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-200);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  color: var(--color-gray-900);
  margin: 0;
}

/* ====== FORMS ====== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-gray-700);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-fast);
  background: var(--color-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control::placeholder {
  color: var(--color-gray-400);
}

/* Floating labels */
.floating-group {
  position: relative;
}

.floating-group input,
.floating-group select {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.floating-group label {
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-size: 0.875rem;
  color: var(--color-gray-500);
  transition: all var(--transition-fast);
  pointer-events: none;
}

.floating-group input:focus + label,
.floating-group input:not(:placeholder-shown) + label,
.floating-group select:focus + label,
.floating-group select:valid + label {
  top: -0.5rem;
  font-size: 0.75rem;
  color: var(--color-gold);
  background: var(--color-white);
  padding: 0 0.25rem;
}

/* ====== TABLES ====== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
}

thead {
  background: var(--color-gray-50);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-gray-700);
  border-bottom: 1px solid var(--color-gray-200);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-gray-200);
}

tr:hover {
  background: var(--color-gray-50);
}

/* ====== BADGES ====== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(212, 175, 55, 0.1);
  color: var(--color-gold);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.badge-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

/* ====== ALERTS ====== */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border-left: 4px solid transparent;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: var(--color-success);
  color: var(--color-success);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: var(--color-warning);
  color: var(--color-warning);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: var(--color-error);
  color: var(--color-error);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--color-info);
  color: var(--color-info);
}

/* ====== MODALS ====== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(-20px);
  transition: transform var(--transition-normal);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.modal-title {
  margin: 0;
  color: var(--color-gray-900);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-gray-500);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-error);
}

/* ====== STAT CARDS ====== */
.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--color-gold);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0.5rem 0;
}

.stat-card .stat-label {
  color: var(--color-gray-600);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .stat-change {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.stat-card .stat-change.positive {
  color: var(--color-success);
}

.stat-card .stat-change.negative {
  color: var(--color-error);
}

/* ====== GRID SYSTEM ====== */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

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

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .nav-list {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .logo-title {
    padding: 1rem;
  }
  
  main {
    padding: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

/* ====== ANIMATIONS ====== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ====== SPECIAL ELEMENTS ====== */
.separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  color: var(--color-gray-400);
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--color-gray-300);
}

.separator span {
  padding: 0 1rem;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-gray-300);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Add to the existing theme.css file */

/* ====== MOBILE NAVIGATION ====== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--color-gray-700);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

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

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

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 768px) {
  /* Mobile menu button */
  .mobile-menu-btn {
    display: flex;
  }

  /* Navigation list */
  .nav-list {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    transition: left var(--transition-normal);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-list.show {
    left: 0;
  }

  .nav-list li {
    width: 100%;
    margin: 0;
  }

  .nav-list a {
    display: block;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
  }

  .nav-list a.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-gold);
  }

  /* Dropdown on mobile */
  .dropdown {
    position: relative;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
  }

  .dropdown-menu.show {
    max-height: 500px;
  }

  .dropdown-menu li {
    margin: 0;
  }

  .dropdown-menu a {
    padding-left: 2rem;
    background: transparent;
  }

  .dropdown-menu .dropdown-item {
    padding: 0.75rem 1.5rem 0.75rem 2rem;
    color: var(--color-gray-700) !important;
  }

  /* Header adjustments */
  .logo-title {
    padding: 1rem;
  }

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

  #hero-name {
    font-size: 1.5rem;
  }

  /* Main content */
  main {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Card layouts */
  .dashboard-stats,
  .quick-actions-grid,
  .users-grid,
  .admin-sections {
    grid-template-columns: 1fr;
  }

  /* Tables */
  .table-container {
    font-size: 0.875rem;
  }

  .transactions-table th,
  .transactions-table td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
  }

  /* Forms */
  .form-control {
    padding: 0.75rem;
  }

  /* Modals */
  .modal-content {
    width: 95%;
    padding: 1.5rem;
    margin: 1rem auto;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  /* Hide marquee on mobile */
  marquee {
    display: none;
  }

  /* Chatbot */
  #chatbot-window {
    width: 90%;
    right: 5%;
    bottom: 80px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .logo-title {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .user-actions {
    grid-template-columns: 1fr;
  }

  .transaction-type-selector {
    flex-direction: column;
  }

  .action-btn {
    padding: 0.875rem;
    font-size: 0.875rem;
  }
}

/* Tablet devices */
@media (min-width: 769px) and (max-width: 1024px) {
  .admin-container,
  .dashboard-container {
    padding: 1.5rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .users-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-list {
    gap: 1rem;
  }
}

/* Prevent horizontal scrolling */
body {
  overflow-x: hidden;
}

/* Touch-friendly elements */
button,
.btn,
input[type="submit"],
.nav-list a {
  min-height: 44px;
  min-width: 44px;
}

/* Improve form input on mobile */
input,
select,
textarea {
  font-size: 16px; /* Prevents zoom on iOS */
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading states for mobile */
.loading-spinner {
  width: 30px;
  height: 30px;
}

.empty-state-icon {
  font-size: 2.5rem;
}
