:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --brand-light: #818cf8;
  --accent: #f97316;
  --ink: #0f172a;
  --muted: #64748b;
  --bg-soft: #f8fafc;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--bg-soft);
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Poppins', sans-serif;
}

/* ===== Navbar ===== */
.app-navbar {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 2px 20px rgba(79,70,229,.25);
}
.app-navbar .navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
}
.app-navbar .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
}
.app-navbar .nav-link:hover { color: #fff !important; }

.btn-brand {
  background: var(--accent);
  color: #fff !important;
  border: none;
  font-weight: 600;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(249,115,22,.35); color:#fff; }

.btn-primary-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.btn-primary-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color:#fff; }

.btn-outline-brand {
  border: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 600;
  background: transparent;
}
.btn-outline-brand:hover { background: var(--brand); color: #fff; }

/* ===== Hero ===== */
.hero {
  background: radial-gradient(circle at top right, #6366f1 0%, #4338ca 45%, #312e81 100%);
  color: #fff;
  padding: 5.5rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="2" cy="2" r="1.4" fill="white" opacity="0.15"/></svg>');
  opacity: .3;
}
.hero h1 { font-weight: 800; font-size: 2.8rem; }
.hero .lead { color: rgba(255,255,255,.85); font-size: 1.15rem; }

/* ===== Cards ===== */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(15,23,42,.06);
}
.template-card {
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}
.template-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(15,23,42,.14);
}
.template-thumb {
  height: 190px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  position: relative;
}
.template-thumb small { display:block; font-size: .8rem; font-weight: 400; opacity: .85; margin-top: .3rem; }

.category-card {
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  background: #fff;
  box-shadow: 0 6px 24px rgba(15,23,42,.06);
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.category-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(15,23,42,.14); color: var(--ink); }
.category-card .icon-wrap {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}

/* Category color themes */
.thumb-roofing { background: linear-gradient(135deg,#78350f,#c2410c); }
.thumb-drywall { background: linear-gradient(135deg,#334155,#64748b); }
.thumb-contractor { background: linear-gradient(135deg,#1e3a8a,#2563eb); }
.thumb-ac { background: linear-gradient(135deg,#0e7490,#06b6d4); }
.thumb-landscaping { background: linear-gradient(135deg,#166534,#22c55e); }

/* ===== Dashboard / panel ===== */
.stat-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
}
.stat-card h3 { font-weight: 800; font-size: 1.9rem; margin-bottom: .1rem; }
.stat-card .icon { font-size: 1.8rem; opacity: .85; }
.stat-1 { background: linear-gradient(135deg,#4f46e5,#818cf8); }
.stat-2 { background: linear-gradient(135deg,#0891b2,#22d3ee); }
.stat-3 { background: linear-gradient(135deg,#c2410c,#fb923c); }
.stat-4 { background: linear-gradient(135deg,#15803d,#4ade80); }

.sidebar {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 6px 24px rgba(15,23,42,.06);
}
.sidebar .nav-link {
  color: var(--ink);
  border-radius: 10px;
  padding: .65rem .9rem;
  font-weight: 500;
  margin-bottom: .25rem;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
  background: var(--brand);
  color: #fff;
}
.sidebar .nav-link i { width: 20px; }

.panel-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 6px 24px rgba(15,23,42,.06);
}

/* ===== Auth pages ===== */
.auth-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}
.auth-card {
  max-width: 460px;
  width: 100%;
  border-radius: 20px;
  padding: 2.5rem;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15,23,42,.12);
}

/* ===== Footer ===== */
.app-footer { background: var(--ink); }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.cat-pill { background: rgba(255,255,255,.1); color: #fff; font-weight: 500; padding: .5rem .9rem; }

/* ===== Payment method selector ===== */
.pay-option {
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all .15s ease;
}
.pay-option.active { border-color: var(--brand); background: #eef2ff; }
.pay-option img, .pay-option i { font-size: 1.8rem; }

/* ===== Misc ===== */
.badge-soft-brand { background:#eef2ff; color: var(--brand); font-weight:600; }
.section-title { font-weight: 800; }
.table thead { background: #f1f5f9; }
.ticket-msg { background:#f8fafc; border-radius:12px; padding:1rem; }

@media (max-width: 768px) {
  .hero h1 { font-size: 2.1rem; }
  .hero { padding: 3.5rem 0 4rem; }
}
