/* public/css/spotlight-ui.css */
/* Global UI theme for all app pages (dashboard, listings, profile, messages, etc.) */

:root {
  --bg: #050816;
  --bg-alt: #060b1b;
  --bg-soft: #0b1120;
  --card: rgba(15, 23, 42, 0.92);
  --card-2: rgba(15, 23, 42, 0.78);

  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.14);

  --text-main: #f9fafb;
  --text-muted: #9ca3af;

  --border-soft: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);

  --danger: #f97373;
  --warn: #fbbf24;
  --ok: #22c55e;

  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.35);

  --ring: 0 0 0 3px rgba(56, 189, 248, 0.28);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top, #0b1120 0, #020617 55%, #000 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: rgba(56, 189, 248, 0.45); }
a:hover { text-decoration-color: rgba(56, 189, 248, 0.85); }

img { max-width: 100%; display: block; }

.ps-page {
  padding: 18px 0 40px;
}

.ps-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Alias for views that use .wrap (home + footer partial) */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Cards (use this everywhere) */
.ps-card,
.listing-hero,
.listing-section {
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.14), transparent 55%),
    linear-gradient(145deg, var(--card), rgba(2, 6, 23, 0.96));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
}

.ps-card { padding: 16px; }

.ps-card + .ps-card,
.listing-section + .listing-section {
  margin-top: 14px;
}

.ps-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ps-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.ps-subtitle,
.ps-muted {
  color: var(--text-muted);
}

.ps-subtitle { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }

.ps-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.12);
  border: 0;
  margin: 12px 0;
}

/* Buttons (safe: doesn’t break Bootstrap, but complements it) */
.pe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.16s ease, border-color 0.16s ease;
}

.pe-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-0.5px);
}

.pe-btn:active { transform: translateY(0); }

.pe-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #06101a;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.28);
}
.pe-btn-primary:hover { box-shadow: 0 14px 40px rgba(56, 189, 248, 0.34); }

.pe-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.34);
}

.pe-danger {
  border-color: rgba(249, 115, 115, 0.45);
  background: rgba(249, 115, 115, 0.10);
}
.pe-danger:hover {
  border-color: rgba(249, 115, 115, 0.65);
  background: rgba(249, 115, 115, 0.16);
}

/* Form controls */
.ps-field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.ps-label {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.ps-input,
.ps-select,
.ps-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.55);
  color: var(--text-main);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.ps-textarea { min-height: 110px; resize: vertical; }

.ps-input:focus,
.ps-select:focus,
.ps-textarea:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: var(--ring);
  background: rgba(2, 6, 23, 0.72);
}

.ps-help {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pills / badges */
.ps-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.06);
  font-size: 12px;
  color: var(--text-muted);
}

.ps-pill-accent {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.12);
  color: rgba(56, 189, 248, 0.95);
}

.ps-kpi {
  display: grid;
  gap: 4px;
  padding: 12px 12px 11px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
}

.ps-kpi-label { font-size: 11px; color: var(--text-muted); }
.ps-kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }

/* Bootstrap modal compatibility (Apply modal uses .am-card) */
.am-card {
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: var(--text-main);
}

.am-card .modal-header,
.am-card .modal-footer {
  border-color: rgba(148, 163, 184, 0.12);
}

.am-card .modal-title {
  font-weight: 750;
  letter-spacing: -0.02em;
}

/* =========================================================
   Footer (matches home + app theme)
   ========================================================= */

.site-footer {
  margin-top: 26px;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.35),
    rgba(2, 6, 23, 0.75)
  );
  color: var(--text-muted);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.footer-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #f9fafb, #38bdf8 35%, #020617);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 0 22px rgba(56, 189, 248, 0.45);
}

.footer-name {
  font-size: 13px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.footer-link:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.22);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}
