/* ============================================================
   AI CV STUDIO — CV TEMPLATES STYLESHEET
   Supports A4 Page Layout, Print Styling, and 5 Template Themes:
   1. Ashfaque Professional (with 8 Target Industry Theme Accents)
   2. ATS Classic (Parse-friendly, high contrast)
   3. Executive Leadership (Royal navy & gold serif)
   4. Modern Slate (Clean 2-column sidebar)
   5. Tech Monospace (Developer & systems focused)
   ============================================================ */

/* CSS Variables for CV Themes */
:root {
  --midnight: #0a1628;
  --navy: #0f2a4a;
  --royal: #1a3a6b;
  --gold: #c9a227;
  --gold-soft: #e6c667;
  --champagne: #f4e8c1;
  --ai: #7c3aed;
  --ai-soft: #f3e8ff;
  --ai-border: #d8b4fe;
  --text: #1a1f2e;
  --muted: #64748b;
  --line: #e6e2d8;
  --paper: #fdfcfa;
  --bg: #eef1f5;
  --theme-accent: var(--royal);
  --theme-header-bg: linear-gradient(135deg, #0a1628 0%, #1e1b4b 45%, #4c1d95 100%);
}

/* Industry Specific Themes for Ashfaque Template */
.theme-logistics { --theme-accent: #1a3a6b; --theme-header-bg: linear-gradient(135deg, #0a1628 0%, #1e1b4b 45%, #4c1d95 100%); }
.theme-construction { --theme-accent: #b45309; --theme-header-bg: linear-gradient(135deg, #1c1917 0%, #451a03 50%, #78350f 100%); }
.theme-audit { --theme-accent: #0f766e; --theme-header-bg: linear-gradient(135deg, #042f2e 0%, #0d9488 60%, #115e59 100%); }
.theme-realestate { --theme-accent: #854d0e; --theme-header-bg: linear-gradient(135deg, #18181b 0%, #713f12 50%, #a16207 100%); }
.theme-hospitality { --theme-accent: #be123c; --theme-header-bg: linear-gradient(135deg, #1e1b4b 0%, #881337 60%, #9f1239 100%); }
.theme-government { --theme-accent: #1e3a8a; --theme-header-bg: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1e40af 100%); }
.theme-fintech { --theme-accent: #0369a1; --theme-header-bg: linear-gradient(135deg, #082f49 0%, #0c4a6e 50%, #0284c7 100%); }
.theme-ai { --theme-accent: #6d28d9; --theme-header-bg: linear-gradient(135deg, #2e1065 0%, #581c87 50%, #7e22ce 100%); }

/* SVG Icons */
.cv-container .ico {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.cv-container .ico-sm { width: 11px; height: 11px; stroke-width: 2.2; }

/* A4 Page Layout */
.cv-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Calibri, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 10px 30px rgba(10,22,40,0.12);
  position: relative;
  box-sizing: border-box;
}

/* ============================================================
   1. ASHFAQUE PROFESSIONAL TEMPLATE
   ============================================================ */
.template-ashfaque header {
  background: var(--theme-header-bg);
  color: #fff;
  padding: 16mm 15mm 10mm;
  position: relative;
  overflow: hidden;
}
.template-ashfaque header::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(201,162,39,0.35), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.template-ashfaque .header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
}
.template-ashfaque .photo-wrap {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  flex-shrink: 0;
  overflow: hidden;
}
.template-ashfaque .photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.template-ashfaque .header-text { flex: 1; }
.template-ashfaque .eyebrow {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.template-ashfaque h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 4px;
  color: #ffffff;
}
.template-ashfaque .tagline {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.template-ashfaque .tagline .sep {
  width: 4px; height: 4px; background: var(--gold); border-radius: 50%; display: inline-block;
}
.template-ashfaque .contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 11px;
  color: #e2e8f0;
  font-family: "SF Mono", "Consolas", monospace;
}
.template-ashfaque .contact-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.template-ashfaque .contact-row .ico { color: var(--gold-soft); }

.template-ashfaque main {
  padding: 10mm 15mm 12mm;
}
.template-ashfaque h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--midnight);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 4px;
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.template-ashfaque h2:first-of-type { margin-top: 0; }
.template-ashfaque h2 .ico { color: var(--theme-accent); }

.template-ashfaque .principles {
  background: #fdfcfa;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12px;
  line-height: 1.6;
}
.template-ashfaque .principles .label {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--royal);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.template-ashfaque .job {
  margin-bottom: 14px;
  page-break-inside: avoid;
}
.template-ashfaque .job-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}
.template-ashfaque .job-role {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--midnight);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.template-ashfaque .job-role .ico { color: var(--theme-accent); width: 13px; height: 13px; }
.template-ashfaque .job-date {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 9.5px;
  letter-spacing: 1px;
  color: var(--royal);
  background: var(--champagne);
  padding: 2px 8px;
  border-radius: 14px;
  white-space: nowrap;
  font-weight: 600;
}
.template-ashfaque .job-company {
  font-size: 11.5px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.template-ashfaque ul.bullets { list-style: none; padding: 0; margin: 0; }
.template-ashfaque ul.bullets li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.55;
}
.template-ashfaque ul.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}
.template-ashfaque ul.bullets li strong { color: var(--midnight); font-weight: 700; }

.template-ashfaque .systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.template-ashfaque .sys-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 11.5px;
}
.template-ashfaque .sys-card .label {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--royal);
  font-weight: 700;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.template-ashfaque .skills-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-bottom: 10px; }
.template-ashfaque .skills-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.template-ashfaque .skills-table tr:last-child td { border-bottom: none; }
.template-ashfaque .skills-table td:first-child {
  width: 150px;
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 10px;
  color: var(--midnight);
  font-weight: 700;
  padding-right: 12px;
}

.template-ashfaque .edu-grid { display: flex; flex-direction: column; gap: 6px; }
.template-ashfaque .edu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fdfcfa;
  border-left: 3px solid var(--gold);
}
.template-ashfaque .edu-degree { font-weight: 700; color: var(--midnight); font-size: 12px; }
.template-ashfaque .edu-school { font-family: "SF Mono", monospace; font-size: 10px; color: var(--muted); }

.template-ashfaque .personal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  font-size: 11.5px;
}
.template-ashfaque .personal-grid div { display: flex; gap: 8px; align-items: center; }
.template-ashfaque .personal-grid .key {
  font-family: "SF Mono", monospace;
  font-size: 10px;
  color: var(--royal);
  min-width: 95px;
  text-transform: uppercase;
  font-weight: 700;
}

.template-ashfaque footer {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: "SF Mono", monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 1.5px;
}

/* ============================================================
   2. ATS CLASSIC TEMPLATE (Single Column, Ultra Clean)
   ============================================================ */
.template-ats {
  padding: 15mm 18mm;
  color: #111827;
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 12px;
  line-height: 1.5;
}
.template-ats header {
  text-align: center;
  border-bottom: 2px solid #111827;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.template-ats h1 {
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  color: #000;
}
.template-ats .title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.template-ats .contact-bar {
  font-size: 10.5px;
  color: #4b5563;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.template-ats h2 {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #374151;
  padding-bottom: 2px;
  margin: 14px 0 8px;
  color: #000;
}
.template-ats .job { margin-bottom: 12px; }
.template-ats .job-row { display: flex; justify-content: space-between; font-weight: bold; }
.template-ats .job-company { font-style: italic; color: #4b5563; margin-bottom: 4px; }
.template-ats ul { margin: 4px 0 0 18px; padding: 0; }
.template-ats ul li { margin-bottom: 3px; }

/* ============================================================
   3. EXECUTIVE LEADERSHIP TEMPLATE
   ============================================================ */
.template-executive header {
  background: #0f172a;
  color: #f8fafc;
  padding: 16mm 15mm 12mm;
  border-bottom: 4px solid #c9a227;
}
.template-executive h1 {
  font-family: "Georgia", serif;
  font-size: 28px;
  color: #ffffff;
  margin-bottom: 4px;
}
.template-executive .tagline {
  font-size: 13px;
  color: #cbd5e1;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.template-executive main { padding: 12mm 15mm; }
.template-executive h2 {
  font-family: "Georgia", serif;
  font-size: 15px;
  color: #0f172a;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
  margin: 18px 0 10px;
}

/* ============================================================
   4. MODERN SLATE TEMPLATE (2-Column)
   ============================================================ */
.template-modern {
  display: flex;
  min-height: 297mm;
}
.template-modern .sidebar {
  width: 32%;
  background: #0f172a;
  color: #f8fafc;
  padding: 14mm 10mm;
}
.template-modern .main-col {
  width: 68%;
  padding: 14mm 12mm;
  background: #ffffff;
}
.template-modern .sidebar h1 { font-size: 22px; color: #fff; margin-bottom: 4px; }
.template-modern .sidebar .title { font-size: 12px; color: #94a3b8; margin-bottom: 16px; }
.template-modern .sidebar-sec { margin-bottom: 20px; }
.template-modern .sidebar-sec h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #38bdf8;
  border-bottom: 1px solid #334155; padding-bottom: 4px; margin-bottom: 8px;
}
.template-modern .main-col h2 {
  font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: #0f172a;
  border-bottom: 2px solid #38bdf8; padding-bottom: 3px; margin: 16px 0 10px;
}

/* ============================================================
   5. TECH MONOSPACE TEMPLATE
   ============================================================ */
.template-tech {
  padding: 14mm 15mm;
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 11.5px;
  background: #f8fafc;
  color: #0f172a;
}
.template-tech header {
  background: #0f172a;
  color: #38bdf8;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.template-tech h1 { font-size: 22px; color: #fff; }
.template-tech h2 {
  font-size: 12px; text-transform: uppercase; color: #0284c7;
  border-bottom: 1px dashed #cbd5e1; padding-bottom: 3px; margin: 14px 0 8px;
}
.template-tech .skill-pill {
  display: inline-block; padding: 2px 6px; background: #e0f2fe; color: #0369a1;
  border-radius: 4px; font-size: 10px; margin: 2px;
}

/* ============================================================
   PRINT MEDIA STYLES
   ============================================================ */
@media print {
  body {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .app-shell, .sidebar-nav, .top-header, .builder-panel-left, .builder-panel-right, .control-bar, .no-print {
    display: none !important;
  }
  .cv-page {
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    page-break-after: always;
  }
  .job, .sys-card, .edu, .principles {
    page-break-inside: avoid;
  }
  h2 { page-break-after: avoid; }
}
