/* Kelvika Proof Studio - Стили по канону Зелёного коридора и брендинга Кельвики */

:root {
  --y: #FECE15;
  --y-hover: #e5b910;
  --dark: #1a1a1a;
  --dark-light: #2c2c2c;
  --text-muted: #6b6b6b;
  --border: #e0ded6;
  --bg-page: #f4f3ed;
  --bg-card: #ffffff;
  --green: #02a95b;
  --green-hover: #028e4d;
  --red: #d32f2f;
  --cyan: #31b0d5;
  --cyan-hover: #269abc;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ======================================================== ШАПКА */
.ps-header {
  height: 64px;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 3px solid var(--y);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ps-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--y);
  color: var(--dark);
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.ps-brand-text {
  display: flex;
  flex-direction: column;
}

.ps-brand-text strong {
  font-size: 16px;
  letter-spacing: 0.05em;
}

.ps-brand-text span {
  font-size: 11px;
  color: #a8a8a8;
}

/* Пошаговая навигация */
.ps-steps-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-step-btn {
  background: transparent;
  border: none;
  color: #999;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.ps-step-btn:hover {
  color: #fff;
  background: var(--dark-light);
}

.ps-step-btn.active {
  color: #fff;
  background: var(--dark-light);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--y);
}

.ps-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ps-step-btn.active .ps-step-num {
  background: var(--y);
  color: var(--dark);
}

.ps-step-arrow {
  color: #555;
  font-size: 12px;
}

/* Кнопки общие */
.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-primary { background: var(--y); color: var(--dark); }
.btn-primary:hover { background: var(--y-hover); }

.btn-secondary { background: #e5e3dc; color: #333; }
.btn-secondary:hover { background: #dcdad0; }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-hover); }

.btn-info { background: var(--cyan); color: #fff; }
.btn-info:hover { background: var(--cyan-hover); }

.btn-outline { background: transparent; border-color: var(--border); color: #444; }
.btn-outline:hover { background: #f0eee6; }

.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ======================================================== ГЛАВНАЯ ОБЛАСТЬ */
.ps-main {
  flex: 1;
  padding: 24px 32px;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}

.ps-view {
  display: none;
}

.ps-view.active {
  display: block;
}

/* ======================================================== ШАГ 1: КАТАЛОГ */
.ps-catalog-hero {
  margin-bottom: 24px;
  text-align: center;
}

.ps-catalog-hero h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

.ps-catalog-hero p {
  color: var(--text-muted);
  font-size: 15px;
}

.ps-category-pills {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.ps-pill {
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ps-pill:hover {
  border-color: var(--y);
  background: #fffdf5;
}

.ps-pill.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

.ps-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.ps-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.ps-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--y);
}

.ps-card-badge {
  align-self: flex-start;
  background: #f0eee6;
  color: #555;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.ps-product-card h3 {
  font-size: 17px;
  line-height: 1.3;
}

.ps-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.ps-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #777;
  border-top: 1px solid #f0eee6;
  padding-top: 10px;
  margin-top: 6px;
}

/* ======================================================== ШАГ 2: PREFLIGHT */
.ps-step2-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

.ps-step2-left {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.ps-order-title {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 12px;
}

.ps-order-details {
  font-size: 14.5px;
  line-height: 1.5;
  color: #333;
  margin-bottom: 24px;
}

/* Большая зелёная кнопка загрузки */
.btn-upload-big {
  background: var(--green);
  color: #fff;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 12px rgba(2, 169, 91, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-upload-big:hover {
  background: var(--green-hover);
}

.ps-upload-icon {
  font-size: 22px;
  font-weight: 900;
}

.ps-upload-formats-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.ps-file-status-card {
  margin-top: 18px;
  background: #f7faf8;
  border: 1px solid #c8e6d9;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ps-file-name {
  font-weight: 600;
  font-size: 13.5px;
  display: block;
}

.ps-file-size {
  font-size: 12px;
  color: #777;
}

.btn-remove-file {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
}
.btn-remove-file:hover { color: var(--red); }

.ps-tech-rules {
  margin-top: 24px;
  background: #faf9f5;
  border: 1px solid #ede9dc;
  border-radius: 8px;
  padding: 14px;
  font-size: 12.5px;
}

.ps-tech-rules h4 {
  font-size: 13px;
  margin-bottom: 8px;
}

.ps-tech-rules ul {
  padding-left: 18px;
  line-height: 1.5;
  color: #444;
}

.ps-step2-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

/* Правая часть шага 2: список страниц */
.ps-step2-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-pages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.ps-pages-header h3 {
  font-size: 18px;
}

.ps-pages-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ps-empty-pages-notice {
  background: #fff;
  border: 2px dashed #d5d3c8;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

/* Карточка страницы в списке Preflight (как на скриншоте 2!) */
.ps-page-item {
  background: #fff;
  border: 1px solid #c2e2cf;
  border-radius: 10px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 80px 220px 1fr;
  gap: 20px;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}

.ps-page-num-title {
  font-weight: 700;
  font-size: 14px;
  color: #333;
}

.ps-page-thumb-box {
  width: 200px;
  height: 120px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.ps-page-thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ps-page-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ps-check-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

.ps-check-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.ps-warning-bullet {
  font-size: 12px;
  color: #777;
  padding-left: 6px;
}

/* ======================================================== ШАГ 3: УТВЕРЖДЕНИЕ МАКЕТА */
.ps-step3-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.ps-step3-title-center {
  text-align: center;
}

.ps-step3-title-center h2 {
  font-size: 20px;
  margin-bottom: 2px;
}

.ps-step3-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.ps-step3-workspace {
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1200px) {
  .ps-step3-workspace {
    grid-template-columns: 1fr;
  }
}

/* Левая колонка с предупреждением (скриншот 3) */
.ps-warning-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-warning-box {
  border-left: 4px solid var(--red);
  background: #fff;
  padding: 16px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.ps-warning-title {
  color: var(--red);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}

.ps-warning-box p {
  font-size: 12.5px;
  line-height: 1.45;
  color: #333;
  margin-bottom: 6px;
}

.ps-view-mode-toggle {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.ps-toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.btn-group-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-toggle-mode.active {
  background: var(--dark);
  color: #fff;
}

/* Центральная область просмотра */
.ps-viewer-column {
  background: #ecebe4;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  min-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.ps-mockup-stage {
  margin: auto;
  transition: transform 0.15s ease;
  transform-origin: center top;
}

.ps-product-rendered {
  display: flex;
  justify-content: center;
}

/* Правая панель спецификации (скриншот 3) */
.ps-sidebar-column {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.ps-spec-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0eee6;
}

.ps-spec-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.ps-spec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 13.5px;
}

.ps-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f8f7f2;
}

.ps-spec-k {
  color: var(--text-muted);
  font-size: 12.5px;
}

.ps-spec-v {
  font-weight: 600;
  text-align: right;
}

.ps-mini-select, .ps-mini-input {
  font: inherit;
  font-size: 12.5px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.ps-export-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #f0eee6;
  padding-top: 16px;
}

/* ======================================================== ТОСТ */
.ps-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 9999;
}

.ps-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.ps-toast-icon {
  color: var(--y);
  font-weight: 900;
}
