/* ═══════════════════════════════════════════════════════════════
   CustomInvoice.xyz  –  Global Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ──────────────────────────────────────────── */
:root {
  --primary:        #2563eb;
  --primary-dark:   #1d4ed8;
  --primary-light:  #dbeafe;
  --secondary:      #0ea5e9;
  --accent:         #7c3aed;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --dark:           #0f172a;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --border:         #e2e8f0;
  --bg:             #f8fafc;
  --card:           #ffffff;
  --radius:         8px;
  --shadow:         0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:      0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --font:           'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ─── Site Nav ───────────────────────────────────────────────── */
.site-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.site-nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .15s;
}
.nav-links a:hover { background: var(--bg); color: var(--primary); text-decoration: none; }
.nav-links .btn-nav {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
}
.nav-links .btn-nav:hover { background: var(--primary-dark); color: #fff; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--primary);  color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success  { background: var(--success);  color: #fff; }
.btn-success:hover  { filter: brightness(1.08); }
.btn-danger   { background: var(--danger);   color: #fff; }
.btn-danger:hover   { filter: brightness(1.08); }
.btn-warning  { background: var(--warning);  color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Landing Hero ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
  color: #fff;
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  max-width: 720px;
  margin: 0 auto 20px;
}
.hero h1 span { color: #60a5fa; }
.hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,.75);
  max-width: 560px;
  margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-hero {
  background: #fff;
  color: var(--primary-dark);
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-hero:hover { background: var(--primary-light); text-decoration: none; }
.btn-hero-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.4);
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); text-decoration: none; }

/* ─── Sections ───────────────────────────────────────────────── */
.section { padding: 80px 24px; }
.section-alt { background: #fff; }
.container { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* ─── Template Grid ──────────────────────────────────────────── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.template-card {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all .2s;
  background: #fff;
}
.template-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.template-card .thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.template-card .card-info { padding: 14px 16px; border-top: 1px solid var(--border); }
.template-card .card-info h3 { font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.template-card .card-info p { font-size: .78rem; color: var(--text-muted); }

/* ─── Features Grid ──────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: box-shadow .2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: .875rem; color: var(--text-muted); line-height: 1.7; }

/* ─── CTA Banner ─────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: #fff;
  text-align: center;
  padding: 80px 24px;
  border-radius: 16px;
  margin: 0 24px;
}
.cta-banner h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cta-banner p  { color: rgba(255,255,255,.8); margin-bottom: 32px; font-size: 1.05rem; }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 28px 24px;
  font-size: .85rem;
  margin-top: 60px;
}
.site-footer a { color: rgba(255,255,255,.8); }

/* ─── Toast Notifications ────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  min-width: 280px;
  max-width: 380px;
  background: var(--dark);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toastIn .3s ease;
  font-size: .875rem;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); color: #000; }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; margin-bottom: 2px; }
@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.3rem; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

/* ─── Utility ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top:  4px; } .mt-2 { margin-top:  8px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.font-bold { font-weight: 700; }
.text-sm { font-size: .875rem; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 60px 20px 50px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .section { padding: 50px 16px; }
  .nav-links a:not(.btn-nav) { display: none; }
  .cta-banner { margin: 0 0; border-radius: 0; }
}

.nav-links {
  overflow-x: auto;
  white-space: nowrap;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
