/* ============================================================
   Стенд макеті: Ақылды көзілдірік
   Exact physical proportions (1px = 1mm):
   - Top banner: 1000 × 230 mm
   - Left panel: 300 × 1200 mm
   - Center panel: 600 × 1200 mm
   - Right panel: 300 × 1200 mm
   ============================================================ */

:root {
  --teal-deep: #0b6477;
  --teal-mid: #1693a7;
  --teal-bright: #26b4c3;
  --teal-border: #6ec4d0;
  --teal-soft: #eef9fb;
  --teal-tint: #e2f5f8;
  --dim-color: #467e8e;
  --ink: #172430;
  --ink-muted: #384a5a;
  --ui-bg: #eef2f6;
  --ui-surface: #ffffff;
  --ui-border: #d7e1ea;
}

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

html,
body {
  min-height: 100%;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--ui-bg);
  -webkit-font-smoothing: antialiased;
}

/* ==================== Studio Toolbar ==================== */
.studio-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ui-surface);
  border-bottom: 1px solid var(--ui-border);
  box-shadow: 0 2px 10px rgba(15, 40, 56, 0.06);
}

.studio-bar__row {
  max-width: 1480px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal-bright));
  flex-shrink: 0;
}

.studio-brand__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.studio-brand__sub {
  font-size: 11.5px;
  color: #5b6e7f;
  margin-top: 2px;
}

.studio-views {
  display: flex;
  align-items: center;
  background: #f2f6f9;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--ui-border);
  gap: 2px;
  flex-wrap: wrap;
}

.view-btn {
  border: none;
  background: transparent;
  color: #465a6b;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.view-btn:hover {
  color: var(--teal-deep);
}

.view-btn.is-active {
  background: #ffffff;
  color: var(--teal-deep);
  box-shadow: 0 1px 3px rgba(11, 100, 119, 0.14);
}

.studio-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #364c5c;
  background: #f5f9fb;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-chip input {
  accent-color: var(--teal-mid);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal-mid));
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(11, 100, 119, 0.25);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #095566, #138294);
}

.btn--secondary {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: var(--teal-border);
}

.btn--secondary:hover {
  background: var(--teal-tint);
}

.btn--ghost {
  background: #ffffff;
  color: #2f4354;
  border-color: var(--ui-border);
}

.btn--ghost:hover {
  background: #f5f8fa;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 265px;
  background: #ffffff;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(11, 45, 62, 0.16);
  padding: 6px;
  display: none;
  z-index: 60;
}

.dropdown.is-open .dropdown__menu {
  display: block;
}

.dropdown__label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7f90;
  padding: 6px 10px 4px;
}

.dropdown__item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.dropdown__item:hover {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.dropdown__sep {
  height: 1px;
  background: var(--ui-border);
  margin: 5px 6px;
}

/* Optional Meta Row */
.studio-bar__meta {
  max-width: 1480px;
  margin: 0 auto;
  padding: 7px 18px 9px;
  border-top: 1px solid #edf2f6;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-hint {
  font-size: 12px;
  color: #5b6e7f;
}

.meta-input {
  flex: 1 1 200px;
  max-width: 280px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--ui-border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: #f9fbfc;
}

.meta-input:focus {
  outline: none;
  border-color: var(--teal-mid);
  background: #ffffff;
}

.zoom-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.zoom-btn {
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border: 1px solid var(--ui-border);
  background: #ffffff;
  color: #2f4354;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.zoom-btn:hover {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.zoom-btn--fit {
  font-size: 11.5px;
}

.zoom-val {
  min-width: 44px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #465a6b;
}

/* ==================== Stage & Scaling ==================== */
.stage {
  padding: 24px 16px 48px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
}

.stage-scaler {
  position: relative;
  transform-origin: top left;
}

/* ==================== Exact Stand Sheet (1px = 1mm) ====================
   Full layout coordinates (matching IMG_9527.png):
   Canvas: 1690 × 1665
   - Left margin for 1200mm callout: 110px
   - Top margin for 1000mm callout: 85px
   - Top Banner (1000×230): left = 370, top = 85
   - Panels row top = 85 + 230 + 95 = 410
   - Left Panel (300×1200):   left = 110,  top = 410
   - Center Panel (600×1200): left = 570,  top = 410  (gap 160)
   - Right Panel (300×1200):  left = 1330, top = 410  (gap 160)
   ======================================================================= */
.stand-sheet {
  position: relative;
  width: 1690px;
  height: 1665px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(15, 42, 58, 0.12);
  transform-origin: top left;
}

/* Hide dims mode */
.stand-sheet.hide-dims .dim {
  display: none;
}

/* Single-panel focused view modes */
.stand-sheet[data-view="header"] {
  width: 1080px;
  height: 310px;
}
.stand-sheet[data-view="header"] .stand-panel,
.stand-sheet[data-view="header"] .dim {
  display: none;
}
.stand-sheet[data-view="header"] .panel-header {
  left: 40px;
  top: 40px;
}

.stand-sheet[data-view="left"] {
  width: 380px;
  height: 1280px;
}
.stand-sheet[data-view="left"] .panel-header,
.stand-sheet[data-view="left"] .stand-panel--center,
.stand-sheet[data-view="left"] .stand-panel--right,
.stand-sheet[data-view="left"] .dim {
  display: none;
}
.stand-sheet[data-view="left"] .stand-panel--left {
  left: 40px;
  top: 40px;
}

.stand-sheet[data-view="center"] {
  width: 680px;
  height: 1280px;
}
.stand-sheet[data-view="center"] .panel-header,
.stand-sheet[data-view="center"] .stand-panel--left,
.stand-sheet[data-view="center"] .stand-panel--right,
.stand-sheet[data-view="center"] .dim {
  display: none;
}
.stand-sheet[data-view="center"] .stand-panel--center {
  left: 40px;
  top: 40px;
}

.stand-sheet[data-view="right"] {
  width: 380px;
  height: 1280px;
}
.stand-sheet[data-view="right"] .panel-header,
.stand-sheet[data-view="right"] .stand-panel--left,
.stand-sheet[data-view="right"] .stand-panel--center,
.stand-sheet[data-view="right"] .dim {
  display: none;
}
.stand-sheet[data-view="right"] .stand-panel--right {
  left: 40px;
  top: 40px;
}

/* ==================== Dimension Callouts (like IMG_9527.png) ==================== */
.dim {
  position: absolute;
  color: var(--dim-color);
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.dim__line {
  flex: 1;
  height: 1.5px;
  background: #87aeb9;
  position: relative;
}

.dim__label {
  padding: 0 12px;
  font-size: 24px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.dim__label--lg {
  font-size: 32px;
}

/* Horizontal dimension ticks */
.dim--top-banner,
.dim--left-w,
.dim--center-w,
.dim--right-w {
  height: 36px;
}

.dim--top-banner::before,
.dim--top-banner::after,
.dim--left-w::before,
.dim--left-w::after,
.dim--center-w::before,
.dim--center-w::after,
.dim--right-w::before,
.dim--right-w::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 1.5px;
  height: 30px;
  background: #87aeb9;
}

.dim--top-banner::before,
.dim--left-w::before,
.dim--center-w::before,
.dim--right-w::before {
  left: 0;
}

.dim--top-banner::after,
.dim--left-w::after,
.dim--center-w::after,
.dim--right-w::after {
  right: 0;
}

.dim--top-banner {
  left: 370px;
  top: 32px;
  width: 1000px;
}

.dim--left-w {
  left: 110px;
  top: 356px;
  width: 300px;
}

.dim--center-w {
  left: 570px;
  top: 352px;
  width: 600px;
}

.dim--right-w {
  left: 1330px;
  top: 356px;
  width: 300px;
}

/* Vertical dimensions */
.dim--header-height,
.dim--panels-height {
  flex-direction: column;
  width: 44px;
}

.dim__line-v {
  flex: 1;
  width: 1.5px;
  background: #87aeb9;
}

.dim__label-v {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 10px 0;
  font-size: 22px;
  white-space: nowrap;
}

.dim__label-v--lg {
  font-size: 32px;
  padding: 16px 0;
}

.dim--header-height::before,
.dim--header-height::after,
.dim--panels-height::before,
.dim--panels-height::after {
  content: "";
  position: absolute;
  left: 21px;
  height: 1.5px;
  width: 32px;
  background: #87aeb9;
}

.dim--header-height::before,
.dim--panels-height::before {
  top: 0;
}

.dim--header-height::after,
.dim--panels-height::after {
  bottom: 0;
}

.dim--header-height {
  left: 312px;
  top: 85px;
  height: 230px;
}

.dim--panels-height {
  left: 52px;
  top: 410px;
  height: 1200px;
}

/* ==================== 1. Top Header Banner (1000 × 230) ==================== */
.panel-header {
  position: absolute;
  left: 370px;
  top: 85px;
  width: 1000px;
  height: 230px;
  background: linear-gradient(125deg, #0b6477 0%, #1590a5 52%, #29b5c4 100%);
  border: 1.5px solid #095262;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.banner-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 22px 54px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.banner-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #e9fbfe;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.banner-title {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: 0.015em;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(6, 52, 64, 0.24);
  max-width: 890px;
}

.banner-author {
  position: absolute;
  right: 30px;
  bottom: 14px;
  text-align: right;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  line-height: 1.35;
}

.banner-author__school {
  font-weight: 500;
}

.banner-author__name {
  font-weight: 700;
}

/* ==================== 2-4. Vertical Panels ==================== */
.stand-panel {
  position: absolute;
  top: 410px;
  height: 1200px;
  background: #ffffff;
  border: 1px solid #c9d8e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stand-panel--left {
  left: 110px;
  width: 300px;
}

.stand-panel--center {
  left: 570px;
  width: 600px;
}

.stand-panel--right {
  left: 1330px;
  width: 300px;
}

.panel-trim {
  height: 16px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #0b6477 0%, #1798ac 55%, #27b5c4 100%);
}

.panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 100% 0%, rgba(38, 180, 195, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(11, 100, 119, 0.04) 0%, transparent 45%),
    #ffffff;
}

.panel-body--narrow {
  padding: 20px 14px;
  justify-content: space-between;
  gap: 16px;
}

.panel-body--wide {
  padding: 16px 18px;
  justify-content: space-between;
  gap: 14px;
}

/* ==================== Left & Right Panel Cards ==================== */
.stand-card {
  display: flex;
  flex-direction: column;
}

.card-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 11px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(90deg, #0e7085 0%, #1fa0b3 100%);
  color: #ffffff;
  margin-left: 8px;
  box-shadow: 0 2px 5px rgba(11, 100, 119, 0.16);
}

.card-pill--accent {
  background: linear-gradient(90deg, #0a5263 0%, #158496 100%);
}

.card-pill__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.card-pill h3 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.card-box {
  background: #ffffff;
  border: 1.5px solid var(--teal-border);
  border-top: 2.5px solid var(--teal-mid);
  border-radius: 8px;
  padding: 15px 14px;
  box-shadow: 0 3px 10px rgba(14, 112, 133, 0.05);
}

.card-box--tinted {
  background: linear-gradient(180deg, #f3fafc 0%, #ffffff 100%);
}

.card-box--conclusion {
  background: linear-gradient(180deg, #eaf7fa 0%, #f7fcfd 100%);
  border-color: #4db1c0;
}

.card-box p {
  font-size: 13.4px;
  line-height: 1.58;
  color: var(--ink);
  text-align: justify;
  hyphens: auto;
}

/* Results Bullet List */
.card-box--results {
  padding: 12px 11px;
}

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

.result-list li {
  position: relative;
  padding: 9px 10px 9px 26px;
  background: #f4fafb;
  border-left: 3px solid var(--teal-mid);
  border-radius: 0 6px 6px 0;
  font-size: 12.7px;
  line-height: 1.48;
  color: var(--ink);
}

.result-list li::before {
  content: "✓";
  position: absolute;
  left: 8px;
  top: 9px;
  font-weight: 800;
  font-size: 12px;
  color: var(--teal-deep);
}

/* ==================== Center Panel Sections ==================== */
.center-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #0b6477 0%, #199cb0 55%, #27b4c3 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(11, 100, 119, 0.16);
}

.section-bar__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.section-bar h3 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 12.8px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-align: center;
}

.diagram-card {
  background: #ffffff;
  border: 1.5px solid var(--teal-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(14, 112, 133, 0.05);
}

.center-section--diagram-top .diagram-card {
  height: 394px;
}

.center-section--diagram-bottom .diagram-card {
  height: 374px;
}

.diagram-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Objectives 2×2 Grid */
.tasks-card {
  background: #ffffff;
  border: 1.5px solid var(--teal-border);
  border-radius: 8px;
  padding: 11px;
  box-shadow: 0 3px 10px rgba(14, 112, 133, 0.05);
}

.tasks-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #f3fafc;
  border: 1px solid #d2ecf0;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 11.7px;
  line-height: 1.44;
  color: var(--ink);
}

.task-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal-bright));
  color: #ffffff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0d3a46;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(7, 30, 38, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== Print Styles ==================== */
@media print {
  @page {
    margin: 6mm;
  }
  body {
    background: #ffffff !important;
  }
  .no-print {
    display: none !important;
  }
  .stage {
    padding: 0 !important;
    overflow: visible !important;
    display: block !important;
  }
  .stage-scaler {
    width: auto !important;
    height: auto !important;
  }
  .stand-sheet {
    box-shadow: none !important;
    border-radius: 0 !important;
    transform-origin: top left !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* ==================== Responsive Toolbar ==================== */
@media (max-width: 720px) {
  .studio-bar__row {
    padding: 10px 12px;
  }
  .studio-bar__meta {
    padding: 8px 12px;
  }
  .zoom-controls {
    margin-left: 0;
  }
  .stage {
    padding: 12px 8px 32px;
  }
}
