/* ============================================================
   Salary Slip Generator – style.css
   Premium salary slip generator design system
   ============================================================ */

/* ── Variables ── */
:root {
  --primary: #2563EB;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #7c3aed;
  --accent: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-md: 0 8px 32px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.14);

  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
  --transition: 0.2s ease;
}

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

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; transition: all var(--transition);
  border: 2px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.4); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-ghost { background: var(--bg-alt); color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--border-light); color: var(--text); }
.btn-nav { background: var(--primary); color: #fff; border-color: var(--primary); padding: 8px 18px; font-size: 13px; }
.btn-nav:hover { background: var(--primary-dark); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-xl { padding: 16px 36px; font-size: 17px; border-radius: var(--radius); }

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.nav-inner { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text); }
.brand strong { color: var(--primary); }
.brand-icon { width: 36px; height: 36px; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { padding: 7px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-muted); transition: all var(--transition); }
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; border-radius: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.mobile-menu { display: none; flex-direction: column; padding: 12px 24px 16px; gap: 4px; border-top: 1px solid var(--border); background: var(--bg); }
.mobile-menu a { padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 500; font-size: 15px; }
.mobile-menu a:hover { color: var(--primary); background: var(--primary-light); }
.mobile-menu.open { display: flex; }

/* ── Hero ── */
.hero { background: linear-gradient(135deg, #f0f7ff 0%, #ede9fe 40%, #f0fdf4 100%); padding: 80px 0 72px; overflow: hidden; }
.hero-inner { text-align: center; }
.hero-badge { display: inline-flex; align-items: center; background: white; border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 24px; box-shadow: var(--shadow-sm); letter-spacing: .02em; }
.hero-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; color: var(--text); margin-bottom: 20px; }
.hero-title span { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--text-muted); max-width: 600px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ── Sections ── */
.section { padding: 72px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: var(--text); margin-bottom: 10px; }
.section-header p { color: var(--text-muted); font-size: 1rem; }

/* ── Steps ── */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 28px; text-align: center; position: relative; transition: all var(--transition); box-shadow: var(--shadow-sm); }
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.step-num { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; width: 28px; height: 28px; border-radius: 999px; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-icon { font-size: 2.5rem; margin-bottom: 16px; }
.step-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.step-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ── Generator Section ── */
.generator-section { background: var(--bg-alt); }
.generator-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }

/* ── Form Panel ── */
.form-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }

.form-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: var(--bg-alt); border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; }
.toolbar-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.template-tabs { display: flex; gap: 4px; background: var(--border); border-radius: var(--radius-sm); padding: 3px; }
.tmpl-btn { padding: 5px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); transition: all var(--transition); }
.tmpl-btn.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }
.currency-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--text); background: white; outline: none; cursor: pointer; }
.currency-select:focus { border-color: var(--primary); }

.form-section { padding: 28px 24px; border-bottom: 1px solid var(--border-light); }
.form-section:last-of-type { border-bottom: none; }
.form-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.form-section-icon { font-size: 1.3rem; }
.form-section-header h3 { font-size: 1rem; font-weight: 700; color: var(--text); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group select { padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text); transition: all var(--transition); outline: none; background: var(--bg); }
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-group input::placeholder { color: var(--text-light); }

/* Logo Upload */
.logo-upload { border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px; cursor: pointer; text-align: center; transition: all var(--transition); }
.logo-upload:hover { border-color: var(--primary); background: var(--primary-light); }
.logo-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); }
.logo-placeholder svg { color: var(--text-light); }
.logo-placeholder span { font-size: 14px; font-weight: 500; }
.logo-placeholder small { font-size: 12px; color: var(--text-light); }

/* Comp Table */
.comp-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.comp-table-head { display: grid; grid-template-columns: 1fr 160px 40px; gap: 12px; padding: 10px 14px; background: var(--bg-alt); font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.comp-row { display: grid; grid-template-columns: 1fr 160px 40px; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border-light); transition: background var(--transition); }
.comp-row:hover { background: var(--bg-alt); }
.comp-name { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; font-size: 13.5px; color: var(--text); width: 100%; outline: none; transition: all var(--transition); background: var(--bg); }
.comp-name:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.amount-field { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: all var(--transition); background: var(--bg); }
.amount-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.currency-symbol { padding: 0 8px; font-size: 13px; color: var(--text-muted); font-weight: 600; background: var(--bg-alt); border-right: 1px solid var(--border); white-space: nowrap; align-self: stretch; display: flex; align-items: center; }
.comp-amount { border: none; padding: 7px 10px; font-size: 13.5px; color: var(--text); width: 100%; outline: none; background: transparent; }
.comp-amount::-webkit-inner-spin-button { opacity: 0; }
.del-btn { width: 30px; height: 30px; border-radius: var(--radius-sm); background: transparent; color: var(--text-light); font-size: 13px; transition: all var(--transition); display: flex; align-items: center; justify-content: center; }
.del-btn:hover { background: #fef2f2; color: var(--danger); }
.comp-total-row { display: grid; grid-template-columns: 1fr 160px 40px; gap: 12px; padding: 12px 14px; background: linear-gradient(135deg, #f0f7ff, #ede9fe10); border-top: 2px solid var(--border); }
.comp-total-row span:first-child { font-weight: 700; font-size: 13px; color: var(--text); }
.comp-total-row span:nth-child(2) { font-weight: 700; font-size: 14px; color: var(--success); display: flex; align-items: center; gap: 2px; }
.deduction-total-row span:nth-child(2) { color: var(--danger); }
.add-row-btn { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-sm); color: var(--primary); font-size: 13.5px; font-weight: 600; border: 1.5px dashed var(--primary); background: var(--primary-light); transition: all var(--transition); }
.add-row-btn:hover { background: var(--primary); color: white; border-style: solid; }
.add-deduction-btn { color: var(--danger); border-color: var(--danger); background: #fef2f2; }
.add-deduction-btn:hover { background: var(--danger); color: white; }

/* Net Summary */
.net-summary { margin: 0 24px 24px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.net-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: 14px; color: var(--text-muted); border-bottom: 1px solid var(--border-light); }
.net-row:last-child { border-bottom: none; }
.net-row span:last-child { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 4px; }
.deduction-net span:last-child { color: var(--danger); }
.net-pay-row { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white !important; }
.net-pay-row span { color: white !important; }
.net-pay-row span:last-child { font-size: 1.2rem; font-family: var(--font-display); }

/* Action Buttons */
.action-btns { display: flex; gap: 12px; padding: 24px; background: var(--bg-alt); border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ── Sidebar ── */
.summary-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 90px; }
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.sidebar-card h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.summary-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 14px; color: var(--text-muted); }
.summary-item strong { font-weight: 700; font-size: 15px; color: var(--text); }
.earn-color { color: var(--success) !important; }
.ded-color { color: var(--danger) !important; }
.net-item strong { font-size: 1.1rem; color: var(--primary) !important; }
.summary-divider { height: 1px; background: var(--border); margin: 6px 0; }
.tips-card ul { display: flex; flex-direction: column; gap: 10px; }
.tips-card li { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; padding-left: 12px; position: relative; }
.tips-card li::before { content: '•'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* ── Modal ── */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); justify-content: center; align-items: flex-start; padding: 20px; overflow-y: auto; animation: fadeIn .2s ease; }
.modal-overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 820px; margin: auto; animation: slideUp .25s ease; overflow: hidden; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.modal-header h2 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.modal-actions { display: flex; align-items: center; gap: 10px; }
.modal-close { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--text-muted); font-size: 14px; display: flex; align-items: center; justify-content: center; font-weight: 700; transition: all var(--transition); }
.modal-close:hover { background: #fef2f2; color: var(--danger); }
.modal-body { padding: 28px; overflow-y: auto; max-height: 80vh; background: #f1f5f9; }
#payslipPreviewContainer { background: white; border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden; }

/* ── SEO Content Section ── */
.content-section { background: white; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.content-block { }
.content-icon { font-size: 2.5rem; margin-bottom: 16px; }
.content-block h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.content-block p { color: var(--text-muted); font-size: 15px; line-height: 1.8; margin-bottom: 14px; }
.feature-list { display: flex; flex-direction: column; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }
.feature-check { background: var(--success); color: white; min-width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-top: 1px; flex-shrink: 0; }

/* ── FAQ ── */
.faq-section { background: var(--bg-alt); }
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all var(--transition); }
.faq-item.open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; font-size: 15px; font-weight: 600; color: var(--text); text-align: left; gap: 12px; transition: all var(--transition); }
.faq-question:hover { color: var(--primary); }
.faq-icon { transition: transform .25s ease; flex-shrink: 0; width: 20px; height: 20px; color: var(--text-muted); }
.faq-item.open .faq-icon { transform: rotate(180deg); color: var(--primary); }
.faq-answer { display: none; padding: 0 24px 20px; }
.faq-item.open .faq-answer { display: block; }
.faq-answer p { color: var(--text-muted); font-size: 14px; line-height: 1.8; }

/* ── Footer ── */
.footer { background: #0f172a; color: #94a3b8; padding: 64px 0 0; }
.footer-inner { display: flex; align-items: flex-start; gap: 48px; padding-bottom: 48px; }
.footer-brand { flex: 0 0 260px; }
.footer-brand .brand { color: white; margin-bottom: 16px; }
.footer-brand p { font-size: 13.5px; line-height: 1.7; color: #64748b; }
.footer-links { display: flex; flex: 1; gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.footer-col h5 { font-size: 13px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.footer-col a { font-size: 13.5px; color: #64748b; transition: color var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 20px 0; text-align: center; }
.footer-bottom p { font-size: 13px; color: #475569; }

/* ── Payslip Template Common ── */
.payslip-wrap { font-family: 'Inter', Arial, sans-serif; font-size: 13px; color: #1e293b; }

/* Template 1 – Classic */
.ps-classic { }
.ps-classic .ps-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 28px 32px; border-bottom: 3px solid #2563EB; background: #f8fafc; }
.ps-classic .ps-company h2 { font-size: 1.25rem; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.ps-classic .ps-company p { font-size: 12px; color: #64748b; line-height: 1.6; }
.ps-classic .ps-logo img { max-height: 64px; max-width: 160px; }
.ps-classic .ps-logo .no-logo { width: 64px; height: 64px; background: #2563EB; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 10px; font-weight: 700; text-align: center; }
.ps-classic .ps-title { text-align: center; padding: 12px; background: #2563EB; color: white; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ps-classic .ps-emp-table { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.ps-classic .ps-emp-cell { padding: 10px 32px; border-bottom: 1px solid #e2e8f0; }
.ps-classic .ps-emp-cell:nth-child(odd) { border-right: 1px solid #e2e8f0; }
.ps-classic .ps-emp-label { font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.ps-classic .ps-emp-value { font-size: 13px; font-weight: 600; color: #0f172a; }
.ps-classic .ps-earnings-section { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.ps-classic .ps-earn-col, .ps-classic .ps-ded-col { padding: 20px 32px; }
.ps-classic .ps-earn-col { border-right: 1px solid #e2e8f0; }
.ps-classic .ps-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 10px 0; border-bottom: 2px solid #e2e8f0; margin-bottom: 12px; }
.ps-classic .earn-col-title { color: #10b981; }
.ps-classic .ded-col-title { color: #ef4444; }
.ps-classic .ps-comp-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #f1f5f9; font-size: 12.5px; }
.ps-classic .ps-comp-label { color: #475569; }
.ps-classic .ps-comp-value { font-weight: 600; color: #0f172a; }
.ps-classic .ps-subtotal { display: flex; justify-content: space-between; padding: 10px 0; border-top: 2px solid #e2e8f0; margin-top: 8px; font-weight: 700; font-size: 13px; }
.ps-classic .ps-footer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.ps-classic .ps-gross-cell { padding: 14px 32px; border-right: 1px solid #e2e8f0; }
.ps-classic .ps-net-cell { padding: 14px 32px; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; }
.ps-classic .ps-foot-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .7; margin-bottom: 4px; }
.ps-classic .ps-foot-value { font-size: 1.2rem; font-weight: 800; }
.ps-classic .ps-words { padding: 12px 32px; background: #eff6ff; border-top: 1px solid #bfdbfe; font-size: 12px; color: #1e40af; font-style: italic; }
.ps-classic .ps-sign { display: grid; grid-template-columns: 1fr 1fr; padding: 28px 32px; gap: 20px; border-top: 1px solid #e2e8f0; }
.ps-classic .ps-sign-block { display: flex; flex-direction: column; gap: 8px; }
.ps-classic .ps-sign-line { border-top: 1px solid #cbd5e1; padding-top: 6px; font-size: 11px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ps-classic .ps-generated { text-align: center; padding: 10px; font-size: 11px; color: #94a3b8; background: #f8fafc; border-top: 1px solid #f1f5f9; }

/* Template 2 – Modern */
.ps-modern { }
.ps-modern .ps-header { padding: 32px; background: linear-gradient(135deg, #1e1b4b, #312e81); color: white; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.ps-modern .ps-company h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.ps-modern .ps-company p { font-size: 12px; opacity: .75; line-height: 1.6; }
.ps-modern .ps-logo img { max-height: 64px; max-width: 160px; border-radius: 8px; }
.ps-modern .ps-logo .no-logo { width: 64px; height: 64px; background: rgba(255,255,255,.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 10px; font-weight: 700; text-align: center; }
.ps-modern .ps-slip-badge { display: inline-flex; align-items: center; background: rgba(255,255,255,.15); border-radius: 999px; padding: 4px 14px; font-size: 12px; font-weight: 700; letter-spacing: .06em; margin-bottom: 12px; }
.ps-modern .ps-emp-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: #f8fafc; padding: 0; border-bottom: 1px solid #e2e8f0; }
.ps-modern .ps-emp-cell { padding: 14px 20px; border-right: 1px solid #e2e8f0; }
.ps-modern .ps-emp-cell:last-child { border-right: none; }
.ps-modern .ps-emp-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: 4px; }
.ps-modern .ps-emp-value { font-size: 13px; font-weight: 700; color: #0f172a; }
.ps-modern .ps-body { padding: 24px 28px; }
.ps-modern .ps-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ps-modern .ps-card { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.ps-modern .ps-card-head { padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.ps-modern .ps-earn-head { background: #ecfdf5; color: #059669; }
.ps-modern .ps-ded-head { background: #fef2f2; color: #dc2626; }
.ps-modern .ps-comp-row { display: flex; justify-content: space-between; padding: 8px 16px; font-size: 12.5px; border-top: 1px solid #f8fafc; }
.ps-modern .ps-comp-label { color: #64748b; }
.ps-modern .ps-comp-value { font-weight: 600; color: #0f172a; }
.ps-modern .ps-subtotal { display: flex; justify-content: space-between; padding: 10px 16px; background: #f8fafc; border-top: 2px solid #e2e8f0; font-weight: 700; font-size: 13px; color: #0f172a; }
.ps-modern .ps-net-bar { background: linear-gradient(135deg, #4f46e5, #7c3aed); border-radius: 10px; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; color: white; }
.ps-modern .ps-net-left { }
.ps-modern .ps-net-label { font-size: 12px; opacity: .8; margin-bottom: 4px; }
.ps-modern .ps-net-amount { font-size: 1.6rem; font-weight: 800; }
.ps-modern .ps-net-right { text-align: right; }
.ps-modern .ps-net-words { font-size: 11px; opacity: .75; font-style: italic; margin-top: 4px; }
.ps-modern .ps-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid #f1f5f9; color: #64748b; }
.ps-modern .ps-summary-row strong { color: #0f172a; }
.ps-modern .ps-sign { display: grid; grid-template-columns: 1fr 1fr; padding: 20px 28px; gap: 20px; border-top: 1px solid #e2e8f0; }
.ps-modern .ps-sign-block { display: flex; flex-direction: column; gap: 8px; }
.ps-modern .ps-sign-line { border-top: 1px solid #cbd5e1; padding-top: 6px; font-size: 11px; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ps-modern .ps-generated { text-align: center; padding: 10px; font-size: 11px; color: #94a3b8; background: #f8fafc; border-top: 1px solid #f1f5f9; }

/* ── Toast ── */
.toast { position: fixed; bottom: 28px; right: 28px; z-index: 300; background: #0f172a; color: white; padding: 12px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; transform: translateY(80px); opacity: 0; transition: all .3s ease; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #059669; }
.toast.error { background: var(--danger); }

/* ── Print ── */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body > *:not(.modal-overlay) { display: none !important; }
  .modal-overlay { display: block !important; position: static !important; background: none !important; padding: 0 !important; }
  .modal { box-shadow: none; border-radius: 0; max-width: 100%; }
  .modal-header { display: none !important; }
  .modal-body { max-height: none !important; padding: 0 !important; background: white !important; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .generator-layout { grid-template-columns: 1fr; }
  .summary-sidebar { display: grid; grid-template-columns: 1fr 1fr; position: static; }
  .footer-inner { flex-wrap: wrap; gap: 32px; }
  .footer-brand { flex: 0 0 100%; }
  .footer-links { flex-wrap: wrap; }
  .footer-col { flex: 0 0 calc(50% - 20px); }
}
@media (max-width: 768px) {
  .nav-links, .btn-nav { display: none; }
  .hamburger { display: flex; }
  .steps-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .content-grid { grid-template-columns: 1fr; gap: 32px; }
  .ps-modern .ps-emp-strip { grid-template-columns: 1fr 1fr; }
  .ps-modern .ps-cards { grid-template-columns: 1fr; }
  .ps-classic .ps-earnings-section { grid-template-columns: 1fr; }
  .ps-classic .ps-footer-row { grid-template-columns: 1fr; }
  .ps-classic .ps-earn-col, .ps-classic .ps-ded-col { padding: 16px 20px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-links { flex-direction: column; gap: 24px; }
  .footer-col { flex: unset; }
  .hero { padding: 52px 0 48px; }
  .section { padding: 48px 0; }
  .action-btns { flex-direction: column; }
  .action-btns .btn { width: 100%; justify-content: center; }
  .summary-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .modal-body { padding: 16px; }
  .comp-table-head, .comp-row { grid-template-columns: 1fr 120px 32px; }
  .form-toolbar { flex-direction: column; align-items: flex-start; }
  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }
}
