/* ============================================================
   BIZTOOL - MAIN STYLESHEET
   All-in-One Utility Tools Platform
   ============================================================ */

/* ── GOOGLE FONTS (loaded in header) ── */

/* ── CSS CUSTOM PROPERTIES ── */
:root {
  /* Brand Colors - Professional Indigo/Blue */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --premium: #d97706;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;

  /* Neutral Colors - Crisp Light Theme */
  --bg: #f8fafc;
  --bg-2: #ffffff;
  --bg-3: #f1f5f9;
  --bg-4: #e2e8f0;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;

  /* Text - High Contrast */
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  /* Subtle Clean Gradients */
  --grad-primary: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --grad-premium: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --grad-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);

  /* Spacing */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Elegant Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);

  /* Transitions */
  --tx: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --tx-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Poppins', sans-serif;
}

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--tx);
}

a:hover {
  color: var(--primary);
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ── CONTAINER ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── ────────────────────────── ── */
/* ── ANNOUNCEMENT BAR          ── */
/* ── ────────────────────────── ── */
.announcement-bar {
  background: linear-gradient(90deg, var(--primary-dark), var(--secondary));
  text-align: center;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
}

.btn-upgrade-mini {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff !important;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--tx);
}

.btn-upgrade-mini:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ── ────────────────────────── ── */
/* ── SITE HEADER               ── */
/* ── ────────────────────────── ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.6rem;
}

.logo-text .accent {
  color: var(--primary-light);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  color: var(--text-muted) !important;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--tx);
}

.nav-link:hover {
  color: var(--text) !important;
  background: var(--bg-3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--tx);
}

/* ── ────────────────────────── ── */
/* ── BUTTONS                   ── */
/* ── ────────────────────────── ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: var(--tx);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-4);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-3);
  color: var(--text);
}

.btn-premium {
  background: var(--grad-premium);
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 16px;
}

.btn-premium:hover {
  transform: translateY(-1px);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── ────────────────────────── ── */
/* ── CARDS                     ── */
/* ── ────────────────────────── ── */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--tx);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── TOOL CARD ── */
.tool-card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--tx-slow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(6, 182, 212, 0.1));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.tool-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.3;
}

.tool-desc {
  font-size: 0.80rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tool-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-tag {
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary-light);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
}

.tool-tag.pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #fc8181;
}

.tool-tag.free {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

/* ── ────────────────────────── ── */
/* ── HERO SECTION               ── */
/* ── ────────────────────────── ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.3);
  color: var(--primary-light);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #0f172a 30%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── ────────────────────────── ── */
/* ── SECTION HEADINGS          ── */
/* ── ────────────────────────── ── */
.section {
  padding: 64px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary-light);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ── ────────────────────────── ── */
/* ── TOOL GRID                 ── */
/* ── ────────────────────────── ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.tools-grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── ────────────────────────── ── */
/* ── TOOL PAGE LAYOUT          ── */
/* ── ────────────────────────── ── */
.tool-page {
  padding: 40px 0;
}

.tool-page-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.tool-main {
  min-width: 0;
}

.tool-sidebar {
  position: sticky;
  top: 80px;
}

.tool-header {
  margin-bottom: 28px;
}

.tool-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--primary-light);
}

.breadcrumb span {
  color: var(--text-dim);
}

/* ── ────────────────────────── ── */
/* ── FORMS                     ── */
/* ── ────────────────────────── ── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: var(--tx);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--bg-4);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-control::placeholder {
  color: var(--text-dim);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control option {
  background: var(--bg-3);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── ────────────────────────── ── */
/* ── TABLES                    ── */
/* ── ────────────────────────── ── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--bg-3);
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

tbody tr:hover {
  background: var(--bg-3);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ── ────────────────────────── ── */
/* ── TEMPLATE SELECTOR         ── */
/* ── ────────────────────────── ── */
.template-selector {
  margin-bottom: 28px;
}

.template-selector h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.template-item {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--tx);
  position: relative;
}

.template-item:hover {
  border-color: var(--primary);
}

.template-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.template-preview {
  height: 90px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.template-name {
  padding: 6px 8px;
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-muted);
}

.template-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--grad-premium);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

/* ── ────────────────────────── ── */
/* ── DOCUMENT PREVIEW          ── */
/* ── ────────────────────────── ── */
.doc-preview-wrapper {
  background: #fff;
  color: #1a1a1a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: 24px;
}

.preview-actions {
  display: flex;
  gap: 10px;
  padding: 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── ────────────────────────── ── */
/* ── INVOICE TEMPLATES         ── */
/* ── ────────────────────────── ── */
.invoice-doc {
  padding: 40px 48px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fff;
  min-height: 900px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
}

.invoice-company h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1e1b4b;
}

.invoice-company p {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.6;
}

.invoice-title-block {
  text-align: right;
}

.invoice-title-block h1 {
  font-size: 28px;
  font-weight: 700;
  color: #4f46e5;
}

.invoice-title-block p {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

.invoice-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.invoice-meta-box {
  background: #f9fafb;
  border-radius: 8px;
  padding: 16px;
}

.invoice-meta-box h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.invoice-meta-box p {
  font-size: 12px;
  color: #374151;
  line-height: 1.7;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.invoice-table th {
  background: #4f46e5;
  color: #fff;
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.invoice-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
}

.invoice-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.invoice-totals {
  width: 280px;
  margin-left: auto;
  margin-top: 12px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.totals-row.grand-total {
  font-weight: 700;
  font-size: 14px;
  background: #4f46e5;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  border: none;
  margin-top: 8px;
}

.invoice-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.invoice-notes {
  font-size: 11px;
  color: #6b7280;
}

.invoice-sign {
  text-align: right;
  font-size: 11px;
  color: #6b7280;
}

/* ── TEMPLATE VARIANTS ── */
.tpl-modern-dark .invoice-doc {
  background: #0f172a;
  color: #e2e8f0;
}

.tpl-modern-dark .invoice-table th {
  background: #06b6d4;
}

.tpl-modern-dark .totals-row.grand-total {
  background: #06b6d4;
}

.tpl-corporate-grey .invoice-table th {
  background: #374151;
}

.tpl-corporate-grey .totals-row.grand-total {
  background: #374151;
}

.tpl-bold-green .invoice-table th {
  background: #059669;
}

.tpl-bold-green .totals-row.grand-total {
  background: #059669;
}

.tpl-executive-red .invoice-table th {
  background: #dc2626;
}

.tpl-executive-red .totals-row.grand-total {
  background: #dc2626;
}

.tpl-premium-gold .invoice-table th {
  background: #b45309;
}

.tpl-premium-gold .totals-row.grand-total {
  background: #b45309;
}

/* ── ────────────────────────── ── */
/* ── DASHBOARD                 ── */
/* ── ────────────────────────── ── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 64px);
  gap: 0;
}

.dash-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 28px 16px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--tx);
  margin-bottom: 4px;
}

.dash-nav-item:hover,
.dash-nav-item.active {
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary-light);
}

.dash-nav-item span {
  font-size: 1.1rem;
}

.dash-content {
  padding: 32px;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card-num {
  font-size: 2rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── ────────────────────────── ── */
/* ── CALCULATOR TOOLS          ── */
/* ── ────────────────────────── ── */
.calculator-card {
  max-width: 560px;
  margin: 40px auto;
}

.calc-result {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
  text-align: center;
}

.calc-result .result-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.calc-result .result-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary-light);
  margin: 8px 0;
}

.amortization {
  margin-top: 24px;
  max-height: 400px;
  overflow-y: auto;
}

/* ── ────────────────────────── ── */
/* ── AD CONTAINERS             ── */
/* ── ────────────────────────── ── */
.ad-container {
  overflow: hidden;
  text-align: center;
}

.ad-header {
  padding: 8px 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  min-height: 90px;
}

.ad-sidebar {
  min-height: 280px;
  border-radius: var(--radius);
}

.ad-content {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: 100px;
  margin: 24px 0;
}

/* ── ────────────────────────── ── */
/* ── ALERTS / BADGES           ── */
/* ── ────────────────────────── ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.alert-info {
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.3);
  color: #a5b4fc;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-primary {
  background: rgba(79, 70, 229, 0.2);
  color: var(--primary-light);
}

.badge-premium {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent);
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* ── AVATAR ── */
.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-initial {
  width: 28px;
  height: 28px;
  background: var(--grad-primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

/* ── ────────────────────────── ── */
/* ── FOOTER                    ── */
/* ── ────────────────────────── ── */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-col ul li a:hover {
  color: var(--primary-light);
}

.social-links {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.social-links a {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
}

.social-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-disclaimer {
  margin-top: 6px;
}

.footer-disclaimer a {
  color: var(--primary-light);
}

/* ── ────────────────────────── ── */
/* ── UTILITIES                 ── */
/* ── ────────────────────────── ── */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 0.85rem;
}

.text-xs {
  font-size: 0.75rem;
}

.font-bold {
  font-weight: 700;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.mb-4 {
  margin-bottom: 32px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 16px;
}

.gap-1 {
  gap: 8px;
}

.w-full {
  width: 100%;
}

.hidden {
  display: none !important;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── ────────────────────────── ── */
/* ── RESPONSIVE                ── */
/* ── ────────────────────────── ── */
@media (max-width: 1024px) {
  .tool-page-inner {
    grid-template-columns: 1fr;
  }

  .tool-sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-2);
    padding: 24px;
    z-index: 99;
    overflow-y: auto;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .invoice-doc {
    padding: 24px;
  }

  .invoice-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

/* ── PRINT ── */
@media print {

  .site-header,
  .site-footer,
  .tool-sidebar,
  .ad-container,
  .preview-actions,
  .announcement-bar {
    display: none !important;
  }

  .doc-preview-wrapper {
    box-shadow: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in-delay-1 {
  animation-delay: 0.1s;
}

.fade-in-delay-2 {
  animation-delay: 0.2s;
}

.fade-in-delay-3 {
  animation-delay: 0.3s;
}

/* ── PREMIUM LOCK ── */
.premium-lock {
  position: relative;
  overflow: hidden;
}

.premium-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 26, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}

.lock-icon {
  font-size: 2rem;
}

.lock-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}