/* ============================================
   Pause People - Shared Styles
   Design tokens + common component patterns
   ============================================ */

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Design Tokens */
:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(222.2, 84%, 4.9%);

  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(222.2, 84%, 4.9%);

  --popover: hsl(0, 0%, 100%);
  --popover-foreground: hsl(222.2, 84%, 4.9%);

  --primary: hsl(222.2, 47.4%, 11.2%);
  --primary-foreground: hsl(210, 40%, 98%);

  --secondary: hsl(210, 40%, 96.1%);
  --secondary-foreground: hsl(222.2, 47.4%, 11.2%);

  --muted: hsl(210, 40%, 96.1%);
  --muted-foreground: hsl(215.4, 16.3%, 46.9%);

  --accent: hsl(210, 40%, 96.1%);
  --accent-foreground: hsl(222.2, 47.4%, 11.2%);

  --destructive: hsl(0, 84.2%, 60.2%);
  --destructive-foreground: hsl(210, 40%, 98%);

  --border: hsl(214.3, 31.8%, 91.4%);
  --input: hsl(214.3, 31.8%, 91.4%);
  --ring: hsl(222.2, 84%, 4.9%);

  --radius: 0.5rem;

  /* Sidebar */
  --sidebar-background: hsl(0, 0%, 98%);
  --sidebar-foreground: hsl(240, 5.3%, 26.1%);
  --sidebar-primary: hsl(240, 5.9%, 10%);
  --sidebar-primary-foreground: hsl(0, 0%, 98%);
  --sidebar-accent: hsl(240, 4.8%, 95.9%);
  --sidebar-accent-foreground: hsl(240, 5.9%, 10%);
  --sidebar-border: hsl(220, 13%, 91%);

  /* Custom */
  --form-bg: #E8E8E8;
  --muted-30: hsla(210, 40%, 96.1%, 0.3);
  --muted-40: hsla(210, 40%, 96.1%, 0.4);
  --muted-20: hsla(210, 40%, 96.1%, 0.2);
  --muted-fg-30: hsla(215.4, 16.3%, 46.9%, 0.3);
  --muted-fg-40: hsla(215.4, 16.3%, 46.9%, 0.4);
  --muted-fg-60: hsla(215.4, 16.3%, 46.9%, 0.6);
  --border-50: hsla(214.3, 31.8%, 91.4%, 0.5);
  --fg-80: hsla(222.2, 84%, 4.9%, 0.8);
  --fg-90: hsla(222.2, 84%, 4.9%, 0.9);
  --muted-fg-20: hsla(215.4, 16.3%, 46.9%, 0.2);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
.text-foreground { color: var(--foreground); }
.text-background { color: var(--background); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }

.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-light { font-weight: 300; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.15; }

/* ============================================
   Layout Utilities
   ============================================ */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.overflow-hidden { overflow: hidden; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

/* Spacing */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-6 { margin-top: 1.5rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; }
.max-w-md { max-width: 28rem; }
.max-w-xs { max-width: 20rem; }
.max-w-2xl { max-width: 42rem; }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background-color: var(--foreground);
  color: var(--background);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
}
.btn-secondary:hover { background-color: var(--muted); }

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
}
.btn-outline:hover { background-color: var(--muted); }

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}
.btn-ghost:hover { background-color: var(--muted); }

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
}

.btn-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
}
.btn-destructive:hover { opacity: 0.9; }

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 0.2s;
}
.btn-icon:hover { background-color: var(--muted); color: var(--foreground); }

/* ============================================
   Form Inputs
   ============================================ */
.input {
  width: 100%;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: none;
  background-color: var(--muted-30);
  color: var(--foreground);
  font-size: 0.875rem;
  outline: none;
  transition: box-shadow 0.2s;
}
.input:focus {
  box-shadow: 0 0 0 2px var(--ring);
}
.input::placeholder {
  color: var(--muted-foreground);
}

.textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: none;
  background-color: var(--muted-30);
  color: var(--foreground);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: box-shadow 0.2s;
}
.textarea:focus {
  box-shadow: 0 0 0 2px var(--ring);
}

.select-wrapper {
  position: relative;
  width: 100%;
}
.select {
  width: 100%;
  height: 2.5rem;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: none;
  background-color: var(--muted-30);
  color: var(--foreground);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
}
.select:focus {
  box-shadow: 0 0 0 2px var(--ring);
}

/* ============================================
   Cards
   ============================================ */
.card {
  background-color: var(--card);
  border: 1px solid var(--border-50);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ============================================
   Form Field Block (label + input wrapper)
   ============================================ */
.form-field-block {
  background-color: var(--muted-20);
  border-radius: 1rem;
  padding: 1rem;
}
.form-field-block .field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.form-field-block .field-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ============================================
   Top Navigation (shared across customer pages)
   ============================================ */
.top-nav {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-nav .brand {
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--foreground);
  line-height: 1.1;
  text-decoration: none;
}
.top-nav .nav-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-pill {
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid var(--muted-fg-30);
  color: var(--muted-foreground);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.nav-pill:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}
.nav-pill.active {
  background-color: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}
.company-logo-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  border: 1px solid var(--muted-fg-30);
  display: flex;
  align-items: center;
  justify-content: center;
}
.company-logo-circle span {
  font-size: 0.5rem;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.2;
}

/* ============================================
   Step Tabs (form wizard navigation)
   ============================================ */
.step-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}
.step-tabs .tabs-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.step-tab {
  padding: 0.48rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.2s;
  border: 1px solid rgba(203, 213, 225, 0.95);
  color: #7b8190;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.step-tab:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}
.step-tab.active {
  background-color: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}
.step-tab.completed {
  border-color: rgba(203, 213, 225, 0.95);
  color: #6b7280;
}
.step-tab .completed-dot {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 9999px;
  border: 1px solid rgba(107, 114, 128, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  flex-shrink: 0;
}
.step-tab .completed-dot .inner-dot {
  width: 0.45rem;
  height: 0.24rem;
  border-left: 1.8px solid #4b5563;
  border-bottom: 1.8px solid #4b5563;
  transform: rotate(-45deg) translateY(-0.02rem);
  border-radius: 0.05rem;
}
.step-tab:not(.active):not(.completed)::after {
  content: '';
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.step-tab.disabled {
  opacity: 0.9;
  cursor: not-allowed;
  pointer-events: none;
}
.step-tab.disabled::after {
  opacity: 0.75;
}

/* ============================================
   Card Header (progress + title)
   ============================================ */
.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.card-header-row .progress-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.card-header-row .progress-circle {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: var(--foreground);
}

/* ============================================
   Collapsible Sections
   ============================================ */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.collapsible-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.collapsible-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  gap: 0;
}
.collapsible-content.expanded {
  max-height: 2000px;
  opacity: 1;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-default {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}
.badge-success {
  background-color: hsl(142, 76%, 36%);
  color: white;
}
.badge-warning {
  background-color: hsl(38, 92%, 50%);
  color: white;
}
.badge-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

/* ============================================
   Modal / Dialog Overlay
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background-color: var(--background);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 32rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* ============================================
   Tabs
   ============================================ */
.tabs-container {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.tab-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--foreground); }
.tab-btn.active {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
}

/* ============================================
   Admin Sidebar
   ============================================ */
.admin-sidebar {
  width: 14rem;
  min-height: 100vh;
  background-color: var(--background);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
}
.admin-sidebar .sidebar-brand {
  padding: 0 1.5rem;
  margin-bottom: 2rem;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--foreground);
  line-height: 1.1;
  text-decoration: none;
}
.admin-sidebar .sidebar-label {
  padding: 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  border-radius: 0.5rem;
}
.sidebar-nav-item:hover {
  background-color: var(--muted);
  color: var(--foreground);
}
.sidebar-nav-item.active {
  background-color: var(--foreground);
  color: var(--background);
}
.sidebar-nav-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.sidebar-nav-item .badge-count {
  margin-left: auto;
  background-color: var(--foreground);
  color: var(--background);
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  font-weight: 600;
}
.sidebar-nav-item.active .badge-count {
  background-color: var(--background);
  color: var(--foreground);
}

/* ============================================
   Checkbox (custom)
   ============================================ */
.custom-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--foreground);
  border-radius: 0.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}
.custom-checkbox.checked {
  background-color: var(--foreground);
}
.custom-checkbox.checked::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--background);
  border-radius: 1px;
}

/* ============================================
   Forest Background (shared)
   ============================================ */
.forest-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.forest-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%);
}
.page-wrapper.has-extended-forest {
  --forest-top-height: max(24rem, min(54rem, calc(100vw * 0.6515)));
}
.page-wrapper.has-extended-forest .forest-bg::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: var(--forest-top-height);
  bottom: 0;
  background-image: url('../images/forest-background.png');
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% auto;
  opacity: 1;
  filter: grayscale(100%);
}
.page-wrapper.has-extended-forest .forest-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(148, 156, 160, 0.34);
}
.page-wrapper.has-extended-forest .forest-bg > div {
  position: absolute !important;
  inset: 0 0 auto 0;
}
.page-wrapper.has-extended-forest .forest-bg img {
  width: 100%;
  height: var(--forest-top-height);
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(100%);
}
.page-wrapper.has-extended-forest .forest-bg .overlay {
  display: none;
}
.forest-bg .overlay {
  position: absolute;
  inset: 0;
  background-color: var(--muted-40);
}

/* ============================================
   Separator
   ============================================ */
.separator {
  height: 1px;
  background-color: var(--border);
  width: 100%;
}

/* ============================================
   Scroll Area
   ============================================ */
.scroll-y {
  overflow-y: auto;
}
.scroll-y::-webkit-scrollbar {
  width: 6px;
}
.scroll-y::-webkit-scrollbar-track {
  background: transparent;
}
.scroll-y::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 3px;
}

/* ============================================
   Help Icon (inline SVG pattern)
   ============================================ */
.help-icon {
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.help-icon-lg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

/* ============================================
   Responsive Helpers
   ============================================ */
@media (min-width: 1024px) {
  .lg-flex { display: flex; }
  .lg-hidden { display: none; }
  .lg-w-half { width: 50%; }
}

/* ============================================
   SVG Icons (shared inline patterns)
   ============================================ */
.icon { display: inline-block; vertical-align: middle; }
.icon svg { display: block; }


