/* Resume Format Design System - Clean Light UI (No Gradients, No Dark Mode) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Valley+Sans:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --success: #16A34A;
  --warning: #EA580C;
  --danger: #DC2626;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --bg-main: #FFFFFF;
  --bg-surface: #F9FAFB;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 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);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  font-family: 'Valley Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p, input, button, select, textarea, label {
  font-family: 'Valley Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Typography - Montserrat strictly for all headings and titles */
h1, h2, h3, h4, h5, h6,
h1 *, h2 *, h3 *, h4 *, h5 *, h6 *,
.font-heading, .font-heading *,
.title, .title *,
.hero-title, .hero-title *,
.card-title, .card-title *,
.nav-brand, .nav-brand *,
.sidebar-brand, .sidebar-brand *,
th, th * {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  line-height: 1.2;
}

/* Navigation Active State Identification */
.nav-active,
.nav-link.active {
  background-color: #EFF6FF !important;
  color: #1D4ED8 !important;
  font-weight: 700 !important;
  border: 1px solid #BFDBFE !important;
  border-radius: 8px !important;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Layout Utilities */
.rf-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.rf-container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons - Enhanced Heights & Tactile States */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
}

.btn:hover {
  transform: translateY(-1.5px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 1px 3px 0 rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #FFFFFF;
  box-shadow: 0 6px 20px -2px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: #1E293B;
  border-color: #CBD5E1;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background-color: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.08);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-danger {
  background-color: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}

.btn-danger:hover {
  background-color: #B91C1C;
  border-color: #B91C1C;
  color: #FFFFFF;
  box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.25);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 13.5px;
  border-radius: 8px;
  gap: 6px;
}

.btn-lg {
  min-height: 56px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  gap: 12px;
}

.btn-xl {
  min-height: 62px;
  padding: 18px 36px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 14px;
  gap: 12px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background-color: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Cards - Premium Eye-Catching Card Design */
.card {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  padding: 24px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

.card-hover:hover {
  transform: translateY(-4px);
  border-color: #93C5FD;
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.08), 0 8px 10px -6px rgba(37, 99, 235, 0.04);
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: #93C5FD;
  box-shadow: 0 10px 20px -3px rgba(37, 99, 235, 0.08);
}

.card-header {
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background-color: #DCFCE7;
  color: var(--success);
}

.badge-warning {
  background-color: #FFEDD5;
  color: var(--warning);
}

.badge-danger {
  background-color: #FEE2E2;
  color: var(--danger);
}

.badge-neutral {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Alert Boxes */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.alert-error {
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.alert-info {
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.table th {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: var(--bg-surface);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border);
  height: 72px;
  display: flex;
  align-items: center;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Footer - Darker Blue Theme */
.footer {
  background-color: #0F1E36;
  border-top: 1px solid #1E2E4A;
  padding: 64px 0 32px;
  margin-top: 0;
  color: #FFFFFF;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #E2E8F0;
  margin-bottom: 16px;
  font-family: 'Montserrat', sans-serif !important;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  color: #CBD5E1;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col ul a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid #1E2E4A;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #94A3B8;
}

/* Dashboard Shell */
.dash-shell {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-surface);
}

.dash-sidebar {
  width: 260px;
  background-color: #FFFFFF;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
}

.dash-main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dash-topbar {
  height: 68px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.dash-content {
  padding: 32px;
  flex: 1;
}

.sidebar-brand {
  height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  gap: 8px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.sidebar-item:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.sidebar-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* Builder Layout (3 Columns) */
.builder-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: #FFFFFF;
}

.builder-header {
  height: 60px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 20;
}

.builder-body {
  display: grid;
  grid-template-columns: 280px 480px 1fr;
  flex: 1;
  overflow: hidden;
}

.builder-panel-left {
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px;
}

.builder-panel-center {
  background-color: #FFFFFF;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px;
}

.builder-panel-right {
  background-color: #E2E8F0;
  overflow-y: auto;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* A4 Resume Preview Container */
.resume-preview-container {
  transform-origin: top center;
  transition: transform 0.2s ease;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  background: #FFFFFF;
  width: 210mm;
  min-height: 297mm;
  margin-bottom: 40px;
}

/* Drag Handles & Reordering */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
}

.drag-handle:active {
  cursor: grabbing;
}

.sortable-ghost {
  opacity: 0.4;
  background-color: var(--primary-light) !important;
}

/* Accordion */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-header {
  padding: 16px 20px;
  background-color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.accordion-body {
  padding: 0 20px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  display: none;
}

.accordion-item.open .accordion-body {
  display: block;
}

.accordion-item.open .accordion-header {
  color: var(--primary);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .builder-body {
    grid-template-columns: 240px 380px 1fr;
  }
}

@media (max-width: 768px) {
  .dash-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .dash-sidebar.open {
    transform: translateX(0);
  }
  .dash-main {
    margin-left: 0;
  }
  .nav-links {
    display: none;
  }
  .builder-body {
    display: flex;
    flex-direction: column;
  }
  .builder-mobile-tabs {
    display: flex;
  }
}

/* ==========================================================================
   Artwork & Design Gallery System (No Gradients, Strictly Clean Light UI)
   ========================================================================== */

.blueprint-grid {
  background-image: radial-gradient(#E2E8F0 1.2px, transparent 1.2px);
  background-size: 24px 24px;
}

.artwork-stage {
  perspective: 1200px;
}

.artwork-canvas {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
              0 20px 25px -5px rgba(15, 23, 42, 0.08), 
              0 35px 50px -15px rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.artwork-canvas:hover {
  transform: translateY(-8px) scale(1.008);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.16), 
              0 0 0 1.5px rgba(37, 99, 235, 0.2);
}

.artwork-frame {
  aspect-ratio: 1 / 1.414;
  background: #FAFBFD;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.artwork-frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -8px rgba(15, 23, 42, 0.12), 
              0 0 0 1px rgba(37, 99, 235, 0.18);
  border-color: #CBD5E1;
}

.floating-annotation {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 
              0 4px 6px -2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.floating-annotation:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -5px rgba(15, 23, 42, 0.14);
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal-left {
  transform: translateX(-32px);
}

.scroll-reveal-right {
  transform: translateX(32px);
}

.scroll-reveal-zoom {
  transform: scale(0.95);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger Delays */
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Interactive Quick Preview Modal */
.gallery-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-modal-content {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 900px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid #E2E8F0;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-modal-backdrop.is-open .gallery-modal-content {
  transform: scale(1);
}

