/* E-Cast Voting System - Professional Theme with Dark/Light Mode */

/* System Health Page Styles */
.health-card {
    border-left: 4px solid var(--primary-color, #3b82f6);
    transition: all 0.3s ease;
}

.health-card.health-success {
    border-left-color: var(--success-color, #10b981);
}

.health-card.health-warning {
    border-left-color: var(--warning-color, #f59e0b);
}

.health-card.health-error {
    border-left-color: var(--danger-color, #ef4444);
}

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

.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    flex: 1;
}

.info-value {
    font-weight: 500;
    color: var(--text-primary, #1f2937);
    text-align: right;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: var(--bg-secondary, #f8fafc);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-buttons .btn {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
}

.action-buttons .btn i {
    margin-right: 8px;
    width: 16px;
}

/* Dark mode adjustments for health page */
[data-theme="dark"] .info-value {
    background: var(--bg-tertiary, #374151);
    color: var(--text-primary, #f9fafb);
}

[data-theme="dark"] .health-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Enhanced Modal Styles for Vote Packages */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 20px 0;
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: var(--card-bg, #ffffff);
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color, #e5e7eb);
    opacity: 1 !important;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px 12px 0 0;
    opacity: 1 !important;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary, #1f2937);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--card-bg, #ffffff);
    opacity: 1 !important;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 0 0 12px 12px;
    opacity: 1 !important;
}

/* Enhanced Form Styles in Modal */
.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.modal .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 8px;
    background-color: var(--input-bg, var(--bg-primary, #ffffff));
    color: var(--text-primary, #1f2937);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    line-height: 1.5;
    opacity: 1 !important;
}

/* Dark mode specific styles for modal form controls */
[data-theme="dark"] .modal .form-control {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .modal .form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

[data-theme="dark"] .modal .form-control:focus {
    border-color: #3b82f6;
    background-color: #374151;
}

/* Dark mode styles for modal components */
[data-theme="dark"] .modal-content {
    background-color: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .modal-header {
    background-color: #111827;
    border-bottom-color: #374151;
}

[data-theme="dark"] .modal-header h3 {
    color: #f9fafb;
}

[data-theme="dark"] .modal-body {
    background-color: #1f2937;
}

[data-theme="dark"] .modal-footer {
    background-color: #111827;
    border-top-color: #374151;
}

[data-theme="dark"] .modal .form-group label {
    color: #f9fafb;
}

[data-theme="dark"] .modal .form-text {
    color: #9ca3af;
}

[data-theme="dark"] .modal-close {
    color: #9ca3af;
}

[data-theme="dark"] .modal-close:hover {
    color: #f9fafb;
    background-color: #374151;
}

/* Dark mode styles for select dropdowns and textareas */
[data-theme="dark"] .modal select.form-control {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .modal select.form-control option {
    background-color: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .modal textarea.form-control {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .modal textarea.form-control::placeholder {
    color: #9ca3af;
}

.modal .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.modal .form-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}

.modal textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.modal select.form-control {
    cursor: pointer;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}

.alert i {
    font-size: 1rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .modal {
        padding: 10px 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    .modal .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Enhanced Responsive Sidebar Styles */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Mobile Sidebar Enhancements */
@media (max-width: 768px) {
  .sidebar {
    position: fixed !important;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .sidebar.mobile-show {
    left: 0;
  }
  
  /* Ensure sidebar toggle is visible on mobile */
  .sidebar-toggle {
    display: flex !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    transition: none;
  }
  
  body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  
  /* Mobile header adjustments */
  .header {
    padding-left: 1rem;
    position: relative;
    z-index: 997;
  }
  
  .sidebar-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
  }
  
  /* Submenu adjustments for mobile */
  .sidebar .nav-submenu {
    max-height: none;
    transition: max-height 0.3s ease;
  }
  
  .sidebar .nav-submenu.show {
    max-height: 500px;
  }
  
  /* Mobile sidebar content adjustments */
  .sidebar .nav-link {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .sidebar .nav-submenu .nav-link {
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
  }
  
  .sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
  }
}

/* Desktop Sidebar Collapsed State */
@media (min-width: 769px) {
  .sidebar.collapsed {
    width: 70px;
    transition: width 0.3s ease;
  }
  
  .sidebar.collapsed .nav-text,
  .sidebar.collapsed .nav-submenu,
  .sidebar.collapsed .submenu-icon {
    display: none;
  }
  
  .sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
  }
  
  .sidebar.collapsed .nav-icon {
    margin-right: 0;
  }
  
  .main-content.expanded {
    margin-left: 70px;
    width: calc(100% - 70px);
    transition: margin-left 0.3s ease, width 0.3s ease;
  }
  
  /* Tooltip for collapsed sidebar */
  .sidebar.collapsed .nav-link {
    position: relative;
  }
  
  .sidebar.collapsed .nav-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    font-size: 0.875rem;
  }
}

/* Smooth transitions for all sidebar states */
.sidebar {
  transition: all 0.3s ease;
}

.main-content {
  transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Enhanced mobile menu button */
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.sidebar-toggle:hover {
  background-color: var(--bg-tertiary);
}

/* Mobile-first responsive design */
@media (max-width: 480px) {
  .sidebar {
    width: 100vw;
  }
  
  .sidebar.mobile-show {
    left: 0;
  }
  
  /* Adjust header for small screens */
  .header {
    padding: 0.75rem 1rem;
  }
  
  .header-left .page-title {
    font-size: 1.1rem;
    margin-left: 0.5rem;
  }
  
  /* Improve touch targets */
  .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}

/* Tablet adjustments */
@media (min-width: 481px) and (max-width: 768px) {
  .sidebar {
    width: 280px;
  }
}
:root {
  /* Light Mode Colors */
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #059669;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --info-color: #0891b2;
  
  /* Light Mode Background & Text */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  /* Borders & Shadows */
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-bg: var(--bg-primary);
  --sidebar-text: var(--text-primary);
  --sidebar-hover: var(--bg-tertiary);
}

[data-theme="dark"] {
  /* Dark Mode Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  /* Dark Mode Borders & Shadows */
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  
  /* Dark Sidebar */
  --sidebar-bg: var(--bg-secondary);
  --sidebar-text: var(--text-primary);
  --sidebar-hover: var(--bg-tertiary);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.3s ease;
  z-index: 1000;
}

.sidebar.collapsed {
  width: 70px;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: all 0.3s ease;
}

.main-content.expanded {
  margin-left: 70px;
}

/* Header */
.header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background-color: var(--bg-tertiary);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle:hover {
  background-color: var(--bg-tertiary);
}

/* Sidebar Styles */
.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.sidebar-logo i {
  font-size: 1.5rem;
}

.sidebar.collapsed .sidebar-logo span {
  display: none;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
  margin: 0 0.5rem;
}

.nav-link:hover {
  background-color: var(--sidebar-hover);
  color: var(--primary-color);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.nav-link i {
  font-size: 1.125rem;
  width: 1.25rem;
  text-align: center;
}

.sidebar.collapsed .nav-link span {
  display: none;
}

/* Submenu */
.nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav-submenu.show {
  max-height: 300px;
}

.nav-submenu .nav-link {
  padding-left: 3rem;
  font-size: 0.875rem;
}

.sidebar.collapsed .nav-submenu {
  display: none;
}

/* Content Area */
.content {
  padding: 1.5rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Cards */
.card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.5rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
}

.stat-card.success {
  background: linear-gradient(135deg, var(--success-color), #047857);
}

.stat-card.warning {
  background: linear-gradient(135deg, var(--warning-color), #b45309);
}

.stat-card.danger {
  background: linear-gradient(135deg, var(--danger-color), #b91c1c);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

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

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background-color: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

.table tbody tr:hover {
  background-color: var(--bg-tertiary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
}

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

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

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

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--bg-tertiary);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

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

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background-color: #e0f2fe;
  color: #0c4a6e;
}

[data-theme="dark"] .badge-success {
  background-color: #166534;
  color: #dcfce7;
}

[data-theme="dark"] .badge-warning {
  background-color: #92400e;
  color: #fef3c7;
}

[data-theme="dark"] .badge-danger {
  background-color: #991b1b;
  color: #fee2e2;
}

[data-theme="dark"] .badge-info {
  background-color: #0c4a6e;
  color: #e0f2fe;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* ===== PUBLIC VOTER DASHBOARD STYLES ===== */

/* Voter Header & Navigation */
.voter-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 70px;
}

.voter-header .navbar {
    padding: 0.75rem 0;
    width: 100%;
}

.voter-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 3rem;
    min-height: 60px;
    flex-wrap: nowrap;
}

.voter-header .navbar-brand {
    flex-shrink: 0;
    order: 1;
    margin-right: auto;
}

.voter-header .brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.voter-header .brand-link:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.voter-header .brand-link i {
    font-size: 1.75rem;
    color: #fbbf24;
}

.voter-header .navbar-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    flex: 0 0 auto;
    justify-content: flex-start;
    margin: 0;
    order: 2;
    flex-wrap: nowrap;
}

.voter-header .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: 1rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: fit-content;
}

.voter-header .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.voter-header .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.voter-header .nav-link i {
    font-size: 1.1rem;
}

.voter-header .navbar-actions {
    flex-shrink: 0;
    order: 3;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.voter-header .theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: fit-content;
    white-space: nowrap;
}

/* Light mode theme toggle visibility fix */
[data-theme="light"] .voter-header .theme-toggle {
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

[data-theme="light"] .voter-header .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

.voter-header .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Desktop Navigation - Force Horizontal Layout */
@media (min-width: 769px) {
    .voter-header .container {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }
    
    .voter-header .navbar-menu {
        flex-direction: row !important;
        width: auto !important;
        order: unset !important;
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .voter-header {
        min-height: 80px;
    }
    
    .voter-header .container {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .voter-header .navbar-menu {
        order: 3;
        width: 100%;
        justify-content: space-evenly;
        gap: 0.25rem;
        margin: 0;
        padding: 0.5rem 0;
    }
    
    .voter-header .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        border-radius: 0.5rem;
        flex-direction: column;
        gap: 0.25rem;
        min-width: auto;
        text-align: center;
    }
    
    .voter-header .nav-link span {
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    .voter-header .nav-link i {
        font-size: 1.2rem;
    }
    
    .voter-header .theme-toggle {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .voter-header .theme-toggle span {
        font-size: 0.75rem;
    }
}
.nominees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.nominee-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nominee-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.nominee-image {
    width: 100%;
    height: 200px;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.nominee-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nominee-card:hover .nominee-image img {
    transform: scale(1.05);
}

.nominee-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    color: white;
}

.nominee-placeholder i {
    font-size: 3rem;
    opacity: 0.8;
}

.nominee-info {
    text-align: center;
}

.nominee-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.nominee-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.nominee-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.vote-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.vote-btn:active {
    transform: translateY(0);
}

/* Category Sections */
.category-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.category-title i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.category-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.category-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.category-stats .stat i {
    color: var(--primary-color);
}

/* No Content States */
.no-categories,
.no-nominees {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.no-categories-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.6;
}

.no-categories h3,
.no-nominees h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Event Details Section */
.event-details-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

/* Light mode specific styles for event details */
[data-theme="light"] .event-details-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .event-title {
    color: var(--text-primary) !important;
}

[data-theme="light"] .event-description {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

[data-theme="light"] .meta-item {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

[data-theme="light"] .meta-item i {
    color: var(--primary-color) !important;
}

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

.event-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.event-info {
    flex: 1;
}

.event-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.event-title i {
    color: #fbbf24;
    font-size: 2rem;
}

.event-description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.event-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
}

.meta-item i {
    color: #fbbf24;
}

.event-actions {
    flex-shrink: 0;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
}

/* Light mode button outline visibility fix */
[data-theme="light"] .btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

[data-theme="light"] .btn-outline:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nominees-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nominee-card {
        padding: 1rem;
    }
    
    .nominee-image {
        height: 160px;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .category-stats {
        gap: 1rem;
    }
    
    .event-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-title {
        font-size: 2rem;
    }
    
    .event-meta {
        gap: 1rem;
    }
}

/* Dark Mode Adjustments for Voter Dashboard */
[data-theme="dark"] .voter-header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .event-details-section {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

[data-theme="dark"] .nominee-placeholder {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

[data-theme="dark"] .vote-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
}

/* Admin Header Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.dropdown-toggle:after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.dropdown.show .dropdown-toggle:after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    margin-top: 8px;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* Dark Theme Dropdown Styles */
[data-theme="dark"] .dropdown-toggle {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

[data-theme="dark"] .dropdown-toggle:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .dropdown-menu {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .dropdown-item {
    color: #e5e7eb;
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

[data-theme="dark"] .dropdown-divider {
    background: rgba(255, 255, 255, 0.1);
}
