/* =======================================================
   TextBee Dashboard - Light Mode Theme
   ======================================================= */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --sidebar-bg: #ffffff;
  --sidebar-text: #475569;
  --sidebar-hover: #f1f5f9;
  --sidebar-active-bg: #eff6ff;
  --sidebar-active-text: #2563eb;
  --bg-main: #f8fafc;
  --card-border: #e2e8f0;
  --card-bg: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
}

/* -------------------------------------------------------
   Sidebar (Light Mode)
   ------------------------------------------------------- */
.sidebar {
  min-height: 100vh;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--card-border);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.02);
}

.sidebar .brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
  text-decoration: none;
  background-color: #ffffff;
}

.sidebar-logo {
  max-height: 38px;
  max-width: 140px;
  object-fit: contain;
}

.sidebar .nav-link {
  color: var(--sidebar-text);
  padding: 0.75rem 1.25rem;
  margin: 0.2rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease-in-out;
}

.sidebar .nav-link i {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

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

.sidebar .nav-link.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.sidebar .nav-link.active i {
  color: var(--primary-color);
}

.sidebar .sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 1.25rem 1.5rem 0.5rem;
  font-weight: 700;
}

/* -------------------------------------------------------
   Main Layout & Header
   ------------------------------------------------------- */
.main-content {
  padding: 2rem;
  width: 100%;
}

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

.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* -------------------------------------------------------
   Cards & Stats
   ------------------------------------------------------- */
.stat-card {
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.06);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-val {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* -------------------------------------------------------
   Tables & Data Cards
   ------------------------------------------------------- */
.card-table {
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.card-table .card-header {
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-dark);
}

.table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: none;
  border-bottom: 1px solid var(--card-border);
}

.table td {
  vertical-align: middle;
  font-size: 0.9rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
  background-color: #fafbfc;
}

/* -------------------------------------------------------
   Status Badges (Crisp Light Mode)
   ------------------------------------------------------- */
.badge-status {
  padding: 0.35em 0.75em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-delivered, .badge-active, .badge-online {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-sent, .badge-dispatched {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-pending {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.badge-failed, .badge-revoked, .badge-offline {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* -------------------------------------------------------
   Code Snippet Box (Clean Light Mode)
   ------------------------------------------------------- */
.code-box {
  background-color: #f8fafc;
  color: #0f172a;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  position: relative;
  overflow-x: auto;
  line-height: 1.6;
}

/* -------------------------------------------------------
   QR Code Container
   ------------------------------------------------------- */
.qr-container {
  display: inline-block;
  padding: 1rem;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* -------------------------------------------------------
   Auth Pages
   ------------------------------------------------------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 2.25rem;
}
