/* Global Styles - Basis */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Light Mode Styles */
body.light-mode {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #0f172a;
}

body.light-mode .header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .sidebar {
  background: rgba(255, 255, 255, 0.95);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .sidebar-menu-link {
  color: #334155;
}

body.light-mode .sidebar-menu-link:hover,
body.light-mode .sidebar-menu-link.active {
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
}

body.light-mode .card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

body.light-mode .control-btn {
  background: rgba(241, 245, 249, 0.9);
  border-color: #cbd5e1;
}

body.light-mode .control-btn:hover {
  background: rgba(226, 232, 240, 1);
  border-color: #0ea5e9;
}

body.light-mode .menu-toggle span {
  background: #0f172a;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
  color: #0f172a;
}

body.light-mode p,
body.light-mode span,
body.light-mode a {
  color: #334155;
}

body.light-mode input,
body.light-mode textarea,
body.light-mode select {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

body.light-mode .btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
}

body.light-mode .btn-secondary {
  background: transparent;
  color: #0ea5e9;
  border: 2px solid #0ea5e9;
}

body.light-mode .sidebar-overlay {
  background: rgba(0, 0, 0, 0.3);
}

body.light-mode .sidebar-section-title {
  color: #64748b;
}

body.light-mode .badge-count {
  background: #ef4444;
  color: white;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #0ea5e9;
  border: 2px solid #0ea5e9;
}

.btn-secondary:hover {
  background: #0ea5e9;
  color: white;
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
}

/* Cards */
.card {
  background: rgba(30, 41, 59, 0.8);
  border-radius: 12px;
  padding: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #e2e8f0;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  color: white;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  background: rgba(15, 23, 42, 0.8);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Alert Messages */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #86efac;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #fcd34d;
}

/* Loading Spinner */
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid #0ea5e9;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
}
