/* style.css - Rahmad Shop */
/* Developer: Rahmad Tenpoles */

:root {
  --primary: #0d6efd;
  --sidebar-width: 240px;
}

/* ==================== BASE ==================== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ==================== DARK MODE (DEFAULT) ==================== */
body.dark-theme {
  background-color: #0f172a;
  color: #e2e8f0;
}

body.dark-theme .card {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
}

body.dark-theme .card-header,
body.dark-theme .card-footer {
  background-color: #0f172a;
  border-color: #334155;
}

body.dark-theme .table {
  color: #cbd5e1;
  border-color: #334155;
}

body.dark-theme .table th {
  background-color: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

body.dark-theme .table td {
  border-color: #334155;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
  background-color: #1e293b;
  border-color: #6366f1;
  color: #e2e8f0;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

body.dark-theme .form-control::placeholder { color: #64748b; }
body.dark-theme .text-muted { color: #64748b !important; }
body.dark-theme .border { border-color: #334155 !important; }
body.dark-theme .bg-white { background-color: #1e293b !important; }
body.dark-theme .modal-content { background-color: #1e293b; border-color: #334155; }
body.dark-theme .modal-header { border-color: #334155; }
body.dark-theme .modal-footer { border-color: #334155; }
body.dark-theme .dropdown-menu {
  background-color: #1e293b;
  border-color: #334155;
}
body.dark-theme .dropdown-item { color: #e2e8f0; }
body.dark-theme .dropdown-item:hover { background-color: #334155; }
body.dark-theme .alert-info { background-color: #1e3a5f; border-color: #1d4ed8; color: #bfdbfe; }
body.dark-theme .alert-success { background-color: #14532d; border-color: #166534; color: #bbf7d0; }
body.dark-theme .alert-danger { background-color: #4c1d1d; border-color: #991b1b; color: #fecaca; }
body.dark-theme .alert-warning { background-color: #451a03; border-color: #92400e; color: #fde68a; }

/* ==================== LIGHT MODE ==================== */
body.light-theme {
  background-color: #f8fafc;
  color: #1e293b;
}

body.light-theme .card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
}

body.light-theme .table { color: #1e293b; }
body.light-theme .sidebar { background-color: #1e293b !important; }
body.light-theme .text-muted { color: #64748b !important; }

/* ==================== SIDEBAR ==================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease;
  background-color: #0f172a;
}

.sidebar .nav-link {
  border-radius: 0.375rem;
  margin-bottom: 2px;
  transition: background-color 0.15s ease;
}

.sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* ==================== UTILITIES ==================== */
.btn-primary {
  background-color: var(--primary);
  border: none;
}

#themeToggle {
  transition: all 0.2s;
}

#themeToggle:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Badge status */
.badge-pending { background-color: #d97706; }
.badge-success { background-color: #16a34a; }
.badge-failed  { background-color: #dc2626; }
.badge-cancelled { background-color: #6b7280; }
