/* JM Software Theme System */

/* Global theme transition */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dark Theme Styles */
.theme-dark {
  --bg-primary: linear-gradient(135deg, #030216 0%, #071033 50%, #02020a 100%);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.06);
  --text-primary: #f1f5f9;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.4);
}

.theme-dark .glass {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
}

.theme-dark .neon-text {
  background: linear-gradient(90deg, #22d3ee, #a78bfa, #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.theme-dark .neon-button {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3), 0 0 40px rgba(167, 139, 250, 0.2);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.theme-dark .neon-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.theme-dark .neon-button:hover::before {
  left: 100%;
}

.theme-dark .neon-button:hover {
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.5), 0 0 60px rgba(167, 139, 250, 0.3), 0 0 80px rgba(251, 113, 133, 0.2);
  border-color: rgba(34, 211, 238, 0.6);
}

/* Light Theme Styles */
.theme-light {
  --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  --bg-glass: rgba(255, 255, 255, 0.8);
  --border-glass: rgba(0, 0, 0, 0.1);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
}

.theme-light .glass {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.theme-light .neon-text {
  background: linear-gradient(90deg, #0891b2, #7c3aed, #e11d48);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.theme-light .neon-button {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(8, 145, 178, 0.3), 0 0 40px rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(8, 145, 178, 0.3);
}

.theme-light .neon-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
  transition: left 0.5s;
}

.theme-light .neon-button:hover::before {
  left: 100%;
}

.theme-light .neon-button:hover {
  box-shadow: 0 0 30px rgba(8, 145, 178, 0.5), 0 0 60px rgba(124, 58, 237, 0.3), 0 0 80px rgba(225, 29, 72, 0.2);
  border-color: rgba(8, 145, 178, 0.6);
}

/* Theme Toggle Button */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-dark .theme-toggle {
  background: linear-gradient(135deg, #1e293b, #334155);
}

.theme-light .theme-toggle {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.theme-dark .theme-toggle::before {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  transform: translateX(0);
}

.theme-light .theme-toggle::before {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  transform: translateX(30px);
}

/* Form Elements */
.theme-dark input, .theme-dark textarea, .theme-dark select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.theme-dark input::placeholder, .theme-dark textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.theme-light input, .theme-light textarea, .theme-light select {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
}

.theme-light input::placeholder, .theme-light textarea::placeholder {
  color: #6b7280;
}

/* Tables */
.theme-dark table {
  color: #ffffff;
}

.theme-dark th {
  color: rgba(255, 255, 255, 0.6);
}

.theme-dark td {
  border-color: rgba(255, 255, 255, 0.1);
}

.theme-light table {
  color: #1f2937;
}

.theme-light th {
  color: #6b7280;
}

.theme-light td {
  border-color: #e5e7eb;
}

/* Cards and Panels */
.theme-dark .card, .theme-dark .panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.theme-light .card, .theme-light .panel {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.theme-dark .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-dark .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.theme-light .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #1f2937;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Navigation */
.theme-dark .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.theme-dark .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.theme-light .nav-link {
  color: #4b5563;
}

.theme-light .nav-link:hover {
  color: #1f2937;
  background: rgba(0, 0, 0, 0.05);
}

/* Alerts and Messages */
.theme-dark .alert {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.theme-light .alert {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

/* Global Text Colors */
.theme-dark {
  color: #f1f5f9;
}

.theme-light {
  color: #1e293b;
}

/* Headings */
.theme-dark h1, .theme-dark h2, .theme-dark h3, .theme-dark h4, .theme-dark h5, .theme-dark h6 {
  color: #ffffff;
}

.theme-light h1, .theme-light h2, .theme-light h3, .theme-light h4, .theme-light h5, .theme-light h6 {
  color: #1f2937;
}

/* Paragraphs and Text */
.theme-dark p, .theme-dark span, .theme-dark div {
  color: inherit;
}

.theme-light p, .theme-light span, .theme-light div {
  color: inherit;
}

/* Links */
.theme-dark a {
  color: #60a5fa;
}

.theme-dark a:hover {
  color: #93c5fd;
}

.theme-light a {
  color: #2563eb;
}

.theme-light a:hover {
  color: #1d4ed8;
}

/* Status Badges */
.theme-dark .badge {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.theme-light .badge {
  background: rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

/* Tabs */
.theme-dark .tab {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

.theme-dark .tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-dark .tab.active {
  background: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.theme-light .tab {
  background: rgba(0, 0, 0, 0.05);
  color: #6b7280;
}

.theme-light .tab:hover {
  background: rgba(0, 0, 0, 0.1);
}

.theme-light .tab.active {
  background: rgba(8, 145, 178, 0.1);
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.3);
}

/* Dropdown Menus */
.theme-dark .dropdown {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.theme-light .dropdown {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #1f2937;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Pagination */
.theme-dark .pagination a {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-dark .pagination a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.theme-light .pagination a {
  background: #ffffff;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.theme-light .pagination a:hover {
  background: #f9fafb;
  color: #1f2937;
}

/* Search and Filter Components */
.theme-dark .search-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.theme-dark .search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.theme-light .search-input {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
}

.theme-light .search-input::placeholder {
  color: #6b7280;
}

/* Modal and Overlay */
.theme-dark .modal {
  background: rgba(0, 0, 0, 0.8);
}

.theme-dark .modal-content {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-light .modal {
  background: rgba(0, 0, 0, 0.5);
}

.theme-light .modal-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
