/* ============================================================
   LunarSMM Theme
   Base: Tailwind v4 CDN + daisyUI (loaded in layout.twig)
   This file: Bootstrap overrides + custom utilities
   ============================================================ */

/* ─── Dark Theme Tokens ──────────────────────────────────── */
:root {
  --brand: #0070ff;
  --brand-light: #3b9eff;
  --brand-dark: #005acc;
  --surface-0: #000000;
  --surface-1: #0a0a0a;
  --surface-2: #141414;
  --surface-3: #1a1a1a;
  --border: #27272a;
  --border-light: #3f3f46;
  --text-1: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #71717a;
}

/* ─── Base ────────────────────────────────────────────────── */
* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
html { scroll-behavior: smooth; }
body {
  background: var(--surface-0);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(0, 112, 255, 0.3);
  color: var(--text-1);
}

*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── Bootstrap Reset ────────────────────────────────────── */
/* PP loads Bootstrap navbar — we hide it since layout.twig has our own */
body > .navbar { display: none !important; }

.container, .container-fluid {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

.row {
  display: flex !important;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 !important;
}
.row::before, .row::after { display: none !important; }

[class*="col-"] {
  float: none !important;
  padding: 0 !important;
  flex: 1 1 100%;
  min-width: 0;
}
@media (min-width: 768px) {
  .col-md-2 { flex: 0 0 16.67%; max-width: 16.67%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-md-5 { flex: 0 0 41.67%; max-width: 41.67%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-7 { flex: 0 0 58.33%; max-width: 58.33%; }
  .col-md-8 { flex: 0 0 66.67%; max-width: 66.67%; }
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
  .col-md-10 { flex: 0 0 83.33%; max-width: 83.33%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-offset-1 { margin-left: 8.33%; }
  .col-md-offset-2 { margin-left: 16.67%; }
  .col-md-offset-3 { margin-left: 25%; }
}

/* ─── Form Controls ──────────────────────────────────────── */
.form-control {
  all: unset;
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 112, 255, 0.15);
  outline: none;
}
.form-control::placeholder { color: var(--text-3); }
.form-group { margin-bottom: 1rem; }
.control-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 0.375rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-default, .btn-secondary { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.btn-default:hover, .btn-secondary:hover { background: var(--surface-3); color: var(--text-1); }
.btn-success { background: #22c55e; color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-info { background: #3b82f6; color: #fff; }
.btn-info:hover { background: #2563eb; }
.btn-warning { background: #f59e0b; color: #000; }
.btn-warning:hover { background: #d97706; }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid;
}
.alert-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.2); color: #22c55e; }
.alert-danger { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); color: #ef4444; }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); color: #f59e0b; }
.alert-info { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); color: #3b82f6; }
.alert .close {
  float: right; background: none; border: none; color: inherit;
  opacity: 0.6; cursor: pointer; font-size: 1.25rem; line-height: 1;
}
.alert .close:hover { opacity: 1; }

/* ─── Tables ─────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table > thead > tr > th {
  padding: 0.75rem 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table > tbody > tr > td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-2);
  border-bottom: 1px solid rgba(39,39,42,0.5);
  vertical-align: middle;
}
.table > tbody > tr:hover > td { background: rgba(26,26,31,0.5); }
.table > tbody > tr:last-child > td { border-bottom: none; }

/* ─── Wells & Panels ────────────────────────────────────── */
.well {
  all: unset;
  display: block;
  padding: 1.5rem;
  background: var(--surface-1);
  border-radius: 1rem;
  border: 1px solid var(--border);
}
.panel { background: var(--surface-1); border: 1px solid var(--border); border-radius: 1rem; margin-bottom: 1rem; }
.panel-heading { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.panel-body { padding: 1.5rem; }

/* ─── Modals ─────────────────────────────────────────────── */
.modal-content {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.modal-header { border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; }
.modal-header .close { color: var(--text-3); opacity: 1; text-shadow: none; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--border); padding: 1rem 1.5rem; }
.modal-title { font-size: 1rem; font-weight: 600; color: var(--text-1); }
.modal-backdrop { background: rgba(0,0,0,0.7); }

/* ─── Dropdowns ──────────────────────────────────────────── */
.dropdown-menu {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.25rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.dropdown-menu > li > a {
  display: block; padding: 0.5rem 0.75rem; color: var(--text-2);
  font-size: 0.8125rem; border-radius: 0.5rem; text-decoration: none; transition: all 0.15s ease;
}
.dropdown-menu > li > a:hover { background: var(--surface-2); color: var(--text-1); }

/* ─── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; gap: 0.25rem; list-style: none; padding: 0; margin: 0; }
.pagination > li > a, .pagination > li > span {
  display: flex; align-items: center; justify-content: center;
  min-width: 2rem; height: 2rem; padding: 0 0.5rem; border-radius: 0.5rem;
  font-size: 0.75rem; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); text-decoration: none; transition: all 0.15s ease;
}
.pagination > li > a:hover { background: var(--surface-3); color: var(--text-1); }
.pagination > .active > a, .pagination > .active > span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination > .disabled > a, .pagination > .disabled > span { opacity: 0.3; pointer-events: none; }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.125rem 0.5rem; border-radius: 9999px;
  font-size: 0.6875rem; font-weight: 600;
  background: rgba(99,102,241,0.15); color: var(--brand-light);
}

/* ─── Status Colors ──────────────────────────────────────── */
.status-completed, .status-active { color: #22c55e; }
.status-pending, .status-processing, .status-in_progress { color: #f59e0b; }
.status-cancelled, .status-error, .status-fail { color: #ef4444; }
.status-partial { color: #3b82f6; }

/* ─── Forgot Password ───────────────────────────────────── */
.forgot-password {
  display: inline-block; font-size: 0.75rem; color: var(--brand);
  margin-top: 0.375rem; text-decoration: none;
}
.forgot-password:hover { color: var(--brand-light); }

/* ─── Utilities ──────────────────────────────────────────── */
.hidden { display: none !important; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.pull-right { float: right; }
