@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Presta Brand Colors */
  --presta-blue: #205867;   
  --presta-teal: #57B2B4;   
  --presta-gray: #A6A8AB;   
  --presta-dark: #112F38;   
  --presta-light: #EAF2F3;  
  --presta-yellow: #F4B942; 
  
  /* Supporting Colors */
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--gray-900);
  background: #f3f4f6;
  line-height: 1.6;
  font-size: 14px;
  margin-left: 280px; 
}

/* STICKY SIDEBAR TOC */
.sidebar-toc {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, var(--presta-dark) 0%, var(--presta-blue) 100%);
  padding: 30px 20px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 4px 0 12px rgba(0,0,0,0.1);
}

.sidebar-logo { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid rgba(255,255,255,0.1); }
.sidebar-logo h2 { color: white; font-size: 28px; margin: 0; letter-spacing: 1px; }
.sidebar-logo p { color: var(--presta-teal); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; margin: 0; font-weight: 600; }
.sidebar-title { color: white; font-size: 11px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; font-weight: 700; opacity: 0.7; }

.toc-link {
  display: flex; align-items: center; padding: 10px 15px; color: rgba(255,255,255,0.7);
  text-decoration: none; border-radius: 8px; margin-bottom: 6px; transition: all 0.3s ease; font-size: 13px; cursor: pointer;
}
.toc-link:hover { background: rgba(255,255,255,0.1); color: white; transform: translateX(5px); }
.toc-link.active { background: var(--presta-teal); color: white; font-weight: 600; box-shadow: 0 4px 10px rgba(87, 178, 180, 0.3); }

.toc-num {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  background: rgba(255,255,255,0.15); border-radius: 50%; margin-right: 12px; font-weight: 700; font-size: 11px; flex-shrink: 0; transition: all 0.3s ease;
}
.toc-link.active .toc-num { background: white; color: var(--presta-teal); }

/* MAIN CONTENT */
.page { 
  max-width: 1100px; margin: 0 auto; padding: 40px 60px 80px 60px; background: white;
  position: relative; min-height: 100vh; box-shadow: 0 0 20px rgba(0,0,0,0.05);
}
.section-container { padding-top: 60px; margin-top: -20px; }

/* COVER PAGE */
.cover {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: linear-gradient(135deg, var(--presta-dark) 0%, var(--presta-blue) 50%, var(--presta-teal) 100%);
  color: white; text-align: center; padding: 60px 40px; page-break-after: always; position: relative; overflow: hidden;
}
.cover::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(90deg, var(--presta-blue) 0%, var(--presta-teal) 50%, var(--presta-gray) 100%);
}
.cover-logo-container { margin-bottom: 50px; }
.cover-logo-container h1 { color: white; font-size: 56px; margin-bottom: 5px; letter-spacing: 1px; }
.cover-tagline { font-size: 16px; font-weight: 500; letter-spacing: 3px; color: var(--presta-light); text-transform: uppercase; }
.cover-badge { display: inline-block; background: var(--presta-teal); color: white; padding: 8px 24px; border-radius: 25px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 25px; }
.cover-title { font-size: 42px; font-weight: 800; margin-bottom: 15px; line-height: 1.2; letter-spacing: -1px; }
.cover-subtitle { font-size: 20px; color: rgba(255,255,255,0.9); margin-bottom: 50px; font-weight: 400; }
.cover-divider { width: 100px; height: 4px; background: var(--presta-teal); margin: 30px auto; border-radius: 2px; }
.cover-meta { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 2; }

/* PRINT BUTTON */
.print-btn {
  position: fixed; top: 20px; right: 40px; background: var(--presta-teal); color: white; border: none;
  padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px;
  box-shadow: 0 4px 12px rgba(87, 178, 180, 0.3); transition: all 0.3s ease; z-index: 999;
}
.print-btn:hover { background: var(--presta-blue); transform: translateY(-2px); }

/* CONFIDENTIAL BANNER */
.confidential { background: var(--danger); color: white; text-align: center; padding: 8px; font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; }
.brand-line { height: 6px; background: linear-gradient(90deg, var(--presta-blue) 0%, var(--presta-teal) 50%, var(--presta-gray) 100%); margin: 40px 0 30px 0; border-radius: 3px; }

/* TYPOGRAPHY & HEADERS */
.section-num { display: inline-block; background: var(--presta-teal); color: white; width: 36px; height: 36px; border-radius: 50%; text-align: center; line-height: 36px; font-weight: 700; font-size: 15px; margin-right: 12px; vertical-align: middle; }
h1 { font-size: 28px; font-weight: 700; color: var(--presta-dark); padding-bottom: 15px; margin: 20px 0 25px 0; position: relative; }
h1::after { content: ''; position: absolute; bottom: 0; left: 0; width: 80px; height: 4px; background: var(--presta-teal); border-radius: 2px; }
h2 { font-size: 20px; font-weight: 600; color: var(--presta-blue); margin: 30px 0 15px 0; }
h3 { font-size: 16px; font-weight: 600; color: var(--presta-dark); margin: 20px 0 10px 0; }
p { margin-bottom: 12px; color: var(--gray-700); }

/* TABLES */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 24px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 600px; }
thead th { background: var(--presta-blue); color: white; padding: 12px 14px; text-align: right; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
thead th:first-child { text-align: left; }
tbody td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--gray-200); }
tbody td:first-child { text-align: left; font-weight: 500; color: var(--presta-dark); }
tbody tr:hover { background: var(--presta-light); }
.row-total { background: var(--presta-light) !important; font-weight: 700 !important; }
.row-total td { border-top: 2px solid var(--presta-teal); font-weight: 700; }
.row-header td { background: var(--gray-100); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--presta-blue); text-align: left; }
.row-subtotal td { background: #fafafa; font-style: italic; font-weight: 600; border-top: 1px solid var(--gray-300); }
.negative { color: var(--danger); }
.positive { color: var(--success); }

/* KPI CARDS */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0; }
.kpi-card { background: white; border: 1px solid var(--gray-200); border-radius: 12px; padding: 24px; text-align: center; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.kpi-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(32, 88, 103, 0.15); border-color: var(--presta-teal); }
.kpi-card.highlight { background: linear-gradient(135deg, var(--presta-blue), var(--presta-teal)); color: white; border: none; }
.kpi-card.highlight .kpi-label { color: rgba(255,255,255,0.9); }
.kpi-card.success { border-color: var(--success); border-width: 2px; background: #f0fdf4; }
.kpi-card.danger { border-color: var(--danger); border-width: 2px; background: #fef2f2; }
.kpi-card.warning { border-color: var(--warning); border-width: 2px; background: #fffbeb; }
.kpi-value { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); font-weight: 600; }

/* PROGRESS BARS */
.progress-wrapper { margin: 15px 0; }
.progress-header { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--presta-dark); }
.progress-container { width: 100%; height: 10px; background: var(--gray-200); border-radius: 5px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--presta-teal); border-radius: 5px; transition: width 0.5s ease; }
.progress-bar.blue { background: var(--presta-blue); }
.progress-bar.yellow { background: var(--warning); }

/* CALLOUT BOXES */
.callout { border-left: 5px solid var(--presta-teal); background: var(--presta-light); padding: 18px 24px; border-radius: 0 10px 10px 0; margin: 20px 0; }
.callout.warning { border-color: var(--warning); background: #fffbeb; }
.callout.danger { border-color: var(--danger); background: #fef2f2; }
.callout.success { border-color: var(--success); background: #f0fdf4; }
.callout-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--presta-dark); }

/* BADGES */
.badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.badge-red { background: #fef2f2; color: var(--danger); border: 1px solid #fca5a5; }
.badge-green { background: #f0fdf4; color: var(--success); border: 1px solid #86efac; }
.badge-yellow { background: #fffbeb; color: var(--warning); border: 1px solid #fcd34d; }
.badge-blue { background: var(--presta-light); color: var(--presta-blue); border: 1px solid var(--presta-teal); }
.badge-gray { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300); }

ul, ol { margin: 8px 0 16px 24px; color: var(--gray-700); }
li { margin-bottom: 8px; font-size: 14px; }
.page-break { page-break-before: always; margin-top: 50px; border-top: 1px dashed var(--gray-200); padding-top: 20px; }


/* OKR DEPARTMENT CARDS */
.okr-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: all 0.3s ease;
}
.okr-card:hover {
  border-color: var(--presta-teal);
  box-shadow: 0 8px 20px rgba(32, 88, 103, 0.08);
}
.okr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 15px;
}
.okr-title-area h3 {
  margin: 0 0 10px 0;
  color: var(--presta-blue);
}
.okr-title-area h3 span {
  color: var(--gray-500);
  font-weight: 500;
  font-size: 14px;
}

/* PROFILE ICONS */
.team-leads {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.lead-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
}
.profile-icon {
  width: 28px;
  height: 28px;
  background: var(--presta-teal);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.lead-profile span {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
}

/* OKR PROGRESS OVERRIDE */
.okr-progress {
  width: 100%;
  max-width: 250px;
  background: var(--gray-50);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}
.okr-progress .progress-wrapper { margin: 0; }
.okr-content p { font-size: 13px; margin-bottom: 12px; }
.okr-content ul { margin-top: 0; }
.okr-content li { font-size: 13px; margin-bottom: 6px; padding-left: 5px; }

@media (max-width: 768px) {
  .okr-header { flex-direction: column; }
  .okr-progress { max-width: 100%; }
}


/* MOBILE RESPONSIVE FIXES */
@media (max-width: 992px) {
  body { margin-left: 0; }
  .sidebar-toc { position: relative; width: 100%; height: auto; padding: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .sidebar-logo { width: 100%; border-bottom: none; margin-bottom: 10px; padding-bottom: 0; }
  .sidebar-title { display: none; }
  .toc-link { margin-bottom: 0; padding: 8px 12px; font-size: 12px; background: rgba(255,255,255,0.05); }
  .toc-link span:not(.toc-num) { display: none; } 
  .toc-num { margin-right: 0; }
  .page { padding: 30px 20px; }
  .cover { padding: 40px 20px; }
  .print-btn { display: block; top: auto; bottom: 20px; right: 20px; padding: 10px 16px; font-size: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); } 
}

@media print {
  .print-btn, .sidebar-toc { display: none; }
  body { margin-left: 0; background: white; }
  .page { padding: 0; box-shadow: none; }
  .cover { min-height: auto; padding: 40px; }
  .table-responsive { overflow: visible; box-shadow: none; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
