/* ================================================================
 * Printago Portal v2 — Customer-facing CSS
 * Veřejné stránky (token-based access, /t/<token>/*)
 * Brand: Printago fialová #521cdf
 * ================================================================ */

:root {
  --pg-primary:        #521cdf;
  --pg-primary-hover:  #4418b8;
  --pg-primary-soft:   #eee7ff;
  --pg-success:        #16a34a;
  --pg-success-soft:   #dcfce7;
  --pg-warn:           #f08c00;
  --pg-warn-soft:      #fff4e0;
  --pg-danger:         #dc2626;
  --pg-danger-soft:    #fee2e2;
  --pg-text:           #111827;
  --pg-muted:          #6b7280;
  --pg-border:         #e5e7eb;
  --pg-bg:             #f0f1f4;
  --pg-surface:        #ffffff;
}

* { box-sizing: border-box; }

body.customer-body {
  margin: 0;
  background: var(--pg-bg);
  color: var(--pg-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ================================================================
 * Layout
 * ================================================================ */
.cp-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}
.cp-header {
  background: #fff;
  border-bottom: 1px solid #ece2ff;       /* jemně fialové vodítko místo šedé */
  box-shadow: 0 1px 0 rgba(82, 28, 223, 0.04);
  padding: 14px 0;
}
.cp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cp-brand-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.cp-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cp-brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: opacity .15s ease;
}
.cp-brand-logo-link:hover { opacity: 0.85; }
.cp-brand-logo {
  height: 30px;
  width: auto;
  display: block;
}
@media (max-width: 575.98px) {
  .cp-brand-logo { height: 24px; }
  .cp-brand { gap: 8px; }
}
/* „Zákaznický portál" pill — stejný styl jako e-shop pill vpravo,
   aby působily jako sourodá dvojice navigačních chipů. */
.cp-brand-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 5px 12px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: all .15s ease;
}
.cp-brand-sub:hover {
  background: #faf7ff;
  border-color: #d6c9ff;
  color: var(--pg-primary-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px -2px rgba(82, 28, 223, 0.15);
}
@media (max-width: 575.98px) {
  .cp-brand-sub { font-size: 11px; padding: 4px 10px; }
}

/* E-shop ad pill — vpravo v headeru, mírně decentnější než portal pill,
   aby si je uživatel nepletl. Šipka ↗ naznačí externí přechod. */
.cp-brand-ad {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: all .15s ease;
}
.cp-brand-ad .bi { font-size: 14px; color: var(--pg-primary); }
.cp-brand-ad .cp-brand-ad-arrow { font-size: 11px; color: #9ca3af; }
.cp-brand-ad:hover {
  background: #faf7ff;
  border-color: #d6c9ff;
  color: var(--pg-primary-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px -2px rgba(82, 28, 223, 0.15);
}
.cp-brand-ad:hover .cp-brand-ad-arrow { color: var(--pg-primary); }
@media (max-width: 575.98px) {
  /* Na mobilu schovat label, nechat jen ikonu — šetří místo pro brand vlevo */
  .cp-brand-ad span { display: none; }
  .cp-brand-ad { padding: 5px 8px; }
}
.cp-main { flex: 1; padding: 32px 0; }
@media (max-width: 575.98px) { .cp-main { padding: 20px 0; } }

.cp-footer {
  background: #fff;
  border-top: 1px solid var(--pg-border);
  padding: 22px 0;
  margin-top: 32px;
}
.cp-footer-brand {
  margin: 0;
  font-size: 13px;
  color: var(--pg-muted);
  text-align: center;
}
.cp-footer-contact {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--pg-muted);
  text-align: center;
}
.cp-footer-contact a {
  color: var(--pg-primary);
  text-decoration: none;
  margin: 0 6px;
}
.cp-footer-contact a:hover { text-decoration: underline; }

/* ================================================================
 * Card / Surface
 * ================================================================ */
.cp-card {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(16, 20, 36, 0.04);
}
@media (max-width: 575.98px) {
  .cp-card { padding: 18px 16px; border-radius: 12px; }
}
.cp-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--pg-text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.cp-card-sub {
  margin: 0 0 18px;
  color: var(--pg-muted);
  font-size: 14px;
}

/* ================================================================
 * Hero panel (page header)
 * ================================================================ */
.cp-hero {
  background: linear-gradient(135deg, var(--pg-primary) 0%, var(--pg-primary-hover) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.cp-hero::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.10) 1.5px, transparent 2px);
  background-size: 16px 16px;
  pointer-events: none;
}
.cp-hero-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}
.cp-hero-sub {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}
.cp-hero-code {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

/* Hero variants */
.cp-hero.is-warn    { background: linear-gradient(135deg, #f08c00 0%, #d68000 100%); }
.cp-hero.is-success { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); }
.cp-hero.is-danger  { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }

/* ================================================================
 * Meta rows
 * ================================================================ */
.cp-meta { display: grid; gap: 10px; }
.cp-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--pg-text);
  min-width: 0;
}
.cp-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--pg-primary-soft);
  color: var(--pg-primary);
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}
.cp-meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pg-muted);
  margin-bottom: 1px;
}
.cp-meta-value {
  font-weight: 500;
  word-break: break-word;
}

/* ================================================================
 * Price comparison block
 * ================================================================ */
.cp-price-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 480px) {
  .cp-price-compare { grid-template-columns: 1fr; }
}
.cp-price-cell {
  padding: 16px 18px;
  border-radius: 11px;
  border: 1px solid var(--pg-border);
  background: var(--pg-surface);
}
.cp-price-cell-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pg-muted);
  margin-bottom: 6px;
}
.cp-price-cell-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--pg-text);
  letter-spacing: -0.01em;
}
.cp-price-cell.is-old {
  background: var(--pg-bg);
}
.cp-price-cell.is-old .cp-price-cell-amount { color: var(--pg-muted); }
.cp-price-cell.is-new {
  background: linear-gradient(135deg, var(--pg-primary-soft) 0%, #f5efff 100%);
  border-color: #d6c9ff;
  border-left: 4px solid var(--pg-primary);
}
.cp-price-cell.is-new .cp-price-cell-amount {
  color: var(--pg-primary-hover);
  font-size: 26px;
}
.cp-price-diff {
  font-size: 13px;
  color: var(--pg-muted);
  margin-top: 6px;
}
.cp-price-diff strong { color: var(--pg-danger); }

/* ================================================================
 * Reason block (quote-style)
 * ================================================================ */
.cp-reason {
  padding: 16px 18px;
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-left: 4px solid var(--pg-muted);
  border-radius: 10px;
  color: var(--pg-text);
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 18px;
}

/* ================================================================
 * Items table
 * ================================================================ */
.cp-items {
  border: 1px solid var(--pg-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}
.cp-items-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--pg-border);
}
.cp-items-row:last-child { border-bottom: 0; }
.cp-items-row.is-total {
  background: var(--pg-bg);
  font-weight: 600;
  font-size: 15px;
}
.cp-items-title {
  font-weight: 500;
  word-break: break-word;
}
.cp-items-desc {
  font-size: 12.5px;
  color: var(--pg-muted);
  margin-top: 2px;
}
.cp-items-amount {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ================================================================
 * Signature pad in customer page
 * ================================================================ */
.cp-sig-block {
  margin-bottom: 18px;
}
.cp-sig-block .signature-pad {
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cp-sig-block .signature-pad.is-active {
  border-style: solid;
  border-color: var(--pg-primary);
  box-shadow: 0 0 0 3px rgba(82, 28, 223, 0.12);
}
.cp-sig-block .signature-pad canvas {
  display: block;
  width: 100%;
  height: 220px;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}
@media (max-width: 575.98px) {
  .cp-sig-block .signature-pad canvas { height: 260px; }
}
.cp-sig-block .signature-pad-hint {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #cbd5e1;
  font-size: 15px;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
  transition: opacity .15s ease;
}
.cp-sig-block .signature-pad.has-content .signature-pad-hint { opacity: 0; }
.cp-sig-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--pg-muted);
}

/* Name input */
.cp-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pg-border);
  border-radius: 9px;
  background: #fafbfc;
  font-size: 15px;
  font-family: inherit;
  color: var(--pg-text);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.cp-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--pg-primary);
  box-shadow: 0 0 0 3px rgba(82, 28, 223, 0.15);
}
.cp-input-lg {
  padding: 16px 16px;
  font-size: 17px;
  border-radius: 11px;
}
.cp-btn-block { width: 100%; justify-content: center; }

/* Alerts (inline upozornění v cards) */
.cp-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.cp-alert .bi { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.cp-alert-warn    { background: #fff8e6; color: #92400e; border-color: #fde68a; }
.cp-alert-warn .bi { color: #d97706; }
.cp-alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.cp-alert-success .bi { color: #059669; }
.cp-alert-info    { background: #eef4ff; color: #1e3a8a; border-color: #bfdbfe; }
.cp-alert-info .bi { color: #1d4ed8; }
.cp-alert-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.cp-alert-error .bi { color: #dc2626; }

/* Inline status badge (pro list zakázek v /u/orders) */
.cp-status-badge {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
}
.cp-status-badge.status-scheduled     { background: #f1f3f5; color: #495057; }
.cp-status-badge.status-received      { background: #eee7ff; color: #4418b8; }
.cp-status-badge.status-diagnosis     { background: #dbeafe; color: #1e3a8a; }
.cp-status-badge.status-waiting_parts { background: #fff4e0; color: #92400e; }
.cp-status-badge.status-repair        { background: #eee7ff; color: #3b168f; }
.cp-status-badge.status-ready         { background: #dcfce7; color: #14532d; }
.cp-status-badge.status-handed_over   { background: #f1f3f5; color: #495057; }
.cp-status-badge.status-cancelled     { background: #fee2e2; color: #991b1b; }

.cp-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pg-muted);
  margin-bottom: 6px;
}

/* ================================================================
 * Buttons
 * ================================================================ */
.cp-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 575.98px) {
  .cp-actions { flex-direction: column-reverse; }
  .cp-actions .cp-btn { width: 100%; }
}
.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .12s, border-color .12s, box-shadow .12s, transform .08s;
  white-space: nowrap;
}
.cp-btn:active { transform: scale(0.98); }
.cp-btn:disabled, .cp-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.cp-btn-primary,
a.cp-btn-primary,
a.cp-btn-primary:hover {
  color: #fff;
}
.cp-btn-primary {
  background: var(--pg-primary);
  border-color: var(--pg-primary);
  box-shadow: 0 1px 2px rgba(82, 28, 223, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.cp-btn-primary:hover:not(:disabled) {
  background: var(--pg-primary-hover);
  border-color: var(--pg-primary-hover);
  box-shadow: 0 2px 6px rgba(82, 28, 223, 0.28);
}

.cp-btn-outline,
a.cp-btn-outline,
a.cp-btn-outline:hover {
  color: var(--pg-text);
}
.cp-btn-outline {
  background: #fff;
  border-color: var(--pg-border);
}
.cp-btn-outline:hover:not(:disabled) {
  background: var(--pg-bg);
  border-color: #d1d5db;
}

.cp-btn-danger-outline,
a.cp-btn-danger-outline {
  color: var(--pg-danger);
}
.cp-btn-danger-outline {
  background: #fff;
  border-color: #fecaca;
}
.cp-btn-danger-outline:hover:not(:disabled),
a.cp-btn-danger-outline:hover:not(:disabled) {
  background: var(--pg-danger);
  border-color: var(--pg-danger);
  color: #fff;
}

.cp-btn-link {
  background: transparent;
  border-color: transparent;
  color: var(--pg-muted);
  padding: 6px 8px;
  font-weight: 500;
  text-decoration: underline;
}
.cp-btn-link:hover:not(:disabled) { color: var(--pg-primary); }

/* ================================================================
 * Status banner (success / rejected / pending)
 * ================================================================ */
.cp-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.cp-status-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.cp-status-body { flex: 1; min-width: 0; }
.cp-status-title { font-weight: 600; font-size: 16px; margin: 0 0 2px; }
.cp-status-sub { font-size: 13.5px; color: var(--pg-muted); margin: 0; }

.cp-status.is-success {
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #bbf7d0;
}
.cp-status.is-success .cp-status-icon { background: var(--pg-success); color: #fff; }
.cp-status.is-success .cp-status-title { color: #14532d; }
.cp-status.is-success .cp-status-sub   { color: #166534; }

.cp-status.is-danger {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
}
.cp-status.is-danger .cp-status-icon { background: var(--pg-danger); color: #fff; }
.cp-status.is-danger .cp-status-title { color: #991b1b; }
.cp-status.is-danger .cp-status-sub   { color: #b91c1c; }

.cp-status.is-info {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
}
.cp-status.is-info .cp-status-icon { background: #2563eb; color: #fff; }
.cp-status.is-info .cp-status-title { color: #1e3a8a; }
.cp-status.is-info .cp-status-sub   { color: #1d4ed8; }

/* ================================================================
 * Reject modal (Bootstrap modal styling override)
 * ================================================================ */
.cp-reject-modal .modal-content {
  border: 0;
  border-radius: 14px;
}
.cp-reject-modal .modal-header { border-bottom-color: var(--pg-border); }
.cp-reject-modal .modal-footer { border-top-color: var(--pg-border); }
.cp-reject-modal textarea {
  width: 100%;
  border: 1px solid var(--pg-border);
  border-radius: 9px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14.5px;
  background: #fafbfc;
  transition: border-color .15s, box-shadow .15s;
  min-height: 100px;
}
.cp-reject-modal textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--pg-primary);
  box-shadow: 0 0 0 3px rgba(82, 28, 223, 0.15);
}

/* ================================================================
 * Customer portal — index page
 * (Hero, timeline, current status, price rows, contact)
 * ================================================================ */

/* --- Hero — vystřižený dokladový vzhled s purpurovým akcentem */
.cp-portal-hero {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
  border: 1px solid #ece2ff;
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(82, 28, 223, 0.04),
              0 8px 28px -16px rgba(82, 28, 223, 0.18);
  margin-bottom: 24px;
  overflow: hidden;
  text-align: center;
}
.cp-portal-hero-inner {
  padding: 26px 20px 22px;
}

.cp-portal-hero-greeting {
  font-size: 15px;
  color: var(--pg-text);
  margin-bottom: 18px;
  letter-spacing: -0.005em;
}
.cp-portal-hero-greeting strong {
  color: var(--pg-primary-hover);
  font-weight: 600;
}
.cp-portal-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pg-primary);
  margin-bottom: 8px;
}
.cp-portal-hero-title {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--pg-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Subtle 'printed receipt' feel */
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.cp-portal-hero-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--pg-text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ece2ff;
  border-radius: 999px;
  padding: 6px 14px;
}
.cp-portal-hero-sub .bi { font-size: 16px; color: var(--pg-primary); }

/* Action buttons (download PDF) */
.cp-portal-hero-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #ece2ff;
}
.cp-portal-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #d6c9ff;
  border-radius: 10px;
  color: var(--pg-primary-hover);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
}
.cp-portal-hero-btn:hover {
  background: #f5efff;
  border-color: var(--pg-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(82, 28, 223, 0.25);
}
.cp-portal-hero-btn .bi { font-size: 16px; }
.cp-portal-hero-btn-primary {
  background: var(--pg-primary);
  border-color: var(--pg-primary);
  color: #fff;
}
.cp-portal-hero-btn-primary:hover {
  background: var(--pg-primary-hover);
  border-color: var(--pg-primary-hover);
  color: #fff;
}

@media (max-width: 575.98px) {
  .cp-portal-hero { margin-bottom: 18px; border-radius: 14px; }
  .cp-portal-hero-inner { padding: 18px 14px 16px; }
  .cp-portal-hero-greeting { font-size: 14px; margin-bottom: 14px; }
  .cp-portal-hero-title { font-size: 26px; }
  .cp-portal-hero-sub   { font-size: 13px; padding: 5px 12px; }
  .cp-portal-hero-actions { margin-top: 14px; padding-top: 14px; }
  .cp-portal-hero-btn { font-size: 12.5px; padding: 7px 12px; }
}

/* --- Timeline (dominantní, vymazlená) */
.cp-timeline-wrap {
  background: #fff;
  border: 1px solid var(--pg-border);
  border-radius: 14px;
  padding: 28px 20px 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(16, 20, 36, 0.04);
}
.cp-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.cp-step {
  flex: 1;
  min-width: 0;
  text-align: center;
  position: relative;
  padding: 0 4px;
}

/* Spojovací linka mezi kroky (kreslená přes ::before na kroku) */
.cp-step-connector {
  position: absolute;
  top: 19px;             /* středu kruhu (40px/2 - 2px line/2 = 19) */
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--pg-border);
  z-index: 0;
}
.cp-step:last-child .cp-step-connector { display: none; }

/* Kruh */
.cp-step-node {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}
.cp-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pg-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--pg-muted);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

/* Stavy kroků */
.cp-step.is-done .cp-step-connector { background: var(--pg-primary); }
.cp-step.is-done .cp-step-circle {
  background: var(--pg-primary);
  border-color: var(--pg-primary);
  color: #fff;
}
.cp-step.is-current .cp-step-circle {
  background: #fff;
  border-color: var(--pg-primary);
  color: var(--pg-primary);
  border-width: 3px;
  width: 48px;
  height: 48px;
  font-size: 20px;
  box-shadow: 0 0 0 5px rgba(82, 28, 223, 0.15),
              0 4px 12px rgba(82, 28, 223, 0.2);
  animation: cp-step-pulse 2.4s ease-in-out infinite;
}
.cp-step.is-current .cp-step-connector { background: var(--pg-border); }
.cp-step.is-future .cp-step-circle {
  opacity: 0.85;
}

@keyframes cp-step-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(82, 28, 223, 0.15), 0 4px 12px rgba(82, 28, 223, 0.2); }
  50%      { box-shadow: 0 0 0 9px rgba(82, 28, 223, 0.08), 0 4px 16px rgba(82, 28, 223, 0.3); }
}

/* Info pod kruhem */
.cp-step-info {
  margin-top: 10px;
}
.cp-step-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pg-muted);
  line-height: 1.2;
}
.cp-step.is-done .cp-step-label,
.cp-step.is-current .cp-step-label { color: var(--pg-text); }
.cp-step.is-current .cp-step-label { color: var(--pg-primary-hover); }

.cp-step-date {
  margin-top: 2px;
  font-size: 11px;
  color: var(--pg-muted);
  font-variant-numeric: tabular-nums;
}

/* Mobile timeline → vertical */
@media (max-width: 720px) {
  .cp-timeline-wrap { padding: 16px 18px; }
  .cp-timeline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .cp-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
    padding: 0;
    width: 100%;
  }
  .cp-step-connector {
    top: 38px;
    bottom: -10px;
    left: 19px;          /* středu 40px kruhu */
    right: auto;
    width: 2px;
    height: auto;
  }
  .cp-step-node {
    display: block;
    flex-shrink: 0;
    margin-bottom: 18px;
  }
  .cp-step.is-current .cp-step-connector {
    top: 42px;           /* většího 48px kruhu */
    left: 23px;
  }
  .cp-step-info {
    margin-top: 8px;
    padding-bottom: 18px;
    flex: 1;
  }
  .cp-step:last-child .cp-step-info { padding-bottom: 0; }
}

/* --- Aktuální stav card */
.cp-current-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 24px;
  border-left-width: 4px;
  border-left-style: solid;
}
.cp-current-card.cp-tone-info {
  border-left-color: var(--pg-primary);
  background: linear-gradient(180deg, #fafbff 0%, #f5f0ff 100%);
}
.cp-current-card.cp-tone-warn {
  border-left-color: var(--pg-warn);
  background: linear-gradient(180deg, #fffdf7 0%, #fff4e0 100%);
}
.cp-current-card.cp-tone-success {
  border-left-color: var(--pg-success);
  background: linear-gradient(180deg, #f7fdf9 0%, #ecfdf3 100%);
}
.cp-current-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--pg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.cp-tone-info    .cp-current-icon { color: var(--pg-primary); border-color: #d6c9ff; }
.cp-tone-warn    .cp-current-icon { color: var(--pg-warn);    border-color: #fde8a8; }
.cp-tone-success .cp-current-icon { color: var(--pg-success); border-color: #bbf7d0; }
.cp-current-body { flex: 1; min-width: 0; }
.cp-current-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--pg-text);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.cp-current-message {
  font-size: 14.5px;
  color: var(--pg-muted);
  line-height: 1.55;
  margin: 0;
}
.cp-current-eta {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--pg-border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--pg-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cp-current-eta .bi { color: var(--pg-primary); }

@media (max-width: 575.98px) {
  .cp-current-card { gap: 14px; padding: 16px 18px; }
  .cp-current-icon { width: 40px; height: 40px; font-size: 18px; }
  .cp-current-title { font-size: 16px; }
}

/* --- Status banner s tlačítkem napravo (např. approval pending) */
.cp-clickable-status {
  align-items: center;
}
.cp-clickable-status .cp-btn { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .cp-clickable-status { flex-wrap: wrap; }
  .cp-clickable-status .cp-btn { width: 100%; margin-top: 8px; }
}

/* --- Meta rows enhanced — sub line */
.cp-meta-sub {
  font-size: 12.5px;
  color: var(--pg-muted);
  margin-top: 2px;
}
.cp-meta-sub code {
  background: var(--pg-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* --- Price rows */
.cp-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--pg-border);
  font-size: 14.5px;
}
.cp-price-row:last-child { border-bottom: 0; }
.cp-price-row-label { color: var(--pg-muted); }
.cp-price-row-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.cp-price-row-final {
  border-bottom: 0;
  margin-top: 6px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--pg-primary-soft) 0%, #f5efff 100%);
  border-radius: 10px;
  border-left: 4px solid var(--pg-primary);
}
.cp-price-row-final .cp-price-row-label {
  color: var(--pg-primary-hover);
  text-transform: uppercase;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.cp-price-row-final .cp-price-row-value {
  font-size: 20px;
  color: var(--pg-text);
}
.cp-price-approved {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pg-success);
  margin-left: 10px;
  vertical-align: middle;
}

/* --- Contact card */
.cp-contact-card { background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%); }
.cp-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 575.98px) {
  .cp-contact-grid { grid-template-columns: 1fr; }
}
.cp-contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--pg-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--pg-text);
  transition: all .15s ease;
  background: #fff;
}
.cp-contact-link:hover {
  border-color: var(--pg-primary);
  background: var(--pg-primary-soft);
  color: var(--pg-text);
  transform: translateY(-1px);
}
.cp-contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--pg-primary-soft);
  color: var(--pg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cp-contact-value {
  font-weight: 600;
  font-size: 15px;
  color: var(--pg-text);
  margin-top: 2px;
}

/* ================================================================
 * /u/ login page — 2-column layout s osobním touch + value props
 * ================================================================ */

.cp-login-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 768px) {
  .cp-login-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 32px;
  }
}

/* LEFT side — info card */
.cp-login-side {
  padding: 4px 4px 0;
}
.cp-login-title {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--pg-text);
  line-height: 1.1;
}
@media (max-width: 575.98px) {
  .cp-login-title { font-size: 24px; }
}
.cp-login-lead {
  margin: 0 0 22px;
  color: var(--pg-muted);
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 460px;
}

/* Tech intro — avatar + name + role */
.cp-tech-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #faf7ff 0%, #f5efff 100%);
  border: 1px solid #ece2ff;
  border-radius: 12px;
  margin-bottom: 16px;
}
.cp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pg-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -3px rgba(82, 28, 223, 0.35);
}
.cp-tech-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--pg-text);
  line-height: 1.2;
}
.cp-tech-role {
  font-size: 12.5px;
  color: var(--pg-muted);
  margin-top: 2px;
}

/* Device strip — co opravuju (vizuální device theme) */
.cp-device-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.cp-device-strip-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pg-muted);
  margin-right: 4px;
}
.cp-device-chip {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #ece2ff;
  color: var(--pg-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cp-device-chip:hover {
  transform: translateY(-2px);
  background: var(--pg-primary-soft);
  box-shadow: 0 4px 12px -4px rgba(82, 28, 223, 0.25);
}

/* Value props list */
.cp-value-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cp-value-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--pg-border);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cp-value-list li:hover {
  transform: translateY(-2px);
  border-color: #d6c9ff;
  box-shadow: 0 6px 20px -8px rgba(82, 28, 223, 0.2);
}
.cp-value-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--pg-primary-soft);
  color: var(--pg-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.cp-value-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--pg-text);
  line-height: 1.3;
  margin-bottom: 1px;
}
.cp-value-sub {
  font-size: 12.5px;
  color: var(--pg-muted);
  line-height: 1.4;
}

/* RIGHT side — login form + help */
.cp-login-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cp-login-card {
  padding: 22px;
}
.cp-help-card {
  padding: 14px 16px;
  background: #fafbfc;
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
}
.cp-help-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pg-text);
  margin-bottom: 6px;
}

/* Submit button loading state */
.cp-submit-btn { transition: opacity .15s ease; }
.cp-submit-btn.is-loading { opacity: 0.7; cursor: progress; }
.cp-submit-btn.is-loading .bi { animation: cp-spin 0.8s linear infinite; }
@keyframes cp-spin {
  to { transform: rotate(360deg); }
}

/* Decentní fade-in animace při loadu (ne diskotéka) */
.cp-fade-in {
  animation: cp-fade-in 0.45s ease-out backwards;
}
@keyframes cp-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tabs: E-mail / Telefon picker v login formuláři */
.cp-tabs {
  display: inline-flex;
  background: #f7f8fa;
  border: 1px solid var(--pg-border);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 12px;
  gap: 2px;
}
.cp-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pg-muted);
  cursor: pointer;
  transition: all .15s ease;
}
.cp-tab:hover { color: var(--pg-text); }
.cp-tab .bi { font-size: 13px; }
.cp-tab.is-active {
  background: #fff;
  color: var(--pg-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(82, 28, 223, 0.15);
}

/* Stacked layout — hero section + value props nad login formulářem */
.cp-login-section {
  margin-bottom: 24px;
}
.cp-login-section .cp-device-strip {
  margin-bottom: 0;
}
/* Když je cp-value-list standalone (ne v cp-login-side), přidat dolní margin */
.cp-login-section + .cp-value-list,
ul.cp-value-list { margin-bottom: 20px; }

@media (max-width: 575.98px) {
  .cp-login-section { margin-bottom: 18px; }
}

/* ================================================================
 * FOTKY ZAKÁZKY — zákaznický náhled
 * ================================================================ */
.cp-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .6rem;
}
.cp-photos a { display: block; line-height: 0; border-radius: 10px; overflow: hidden; }
.cp-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f1f2f5;
}
.cp-photo-note {
  display: block;
  padding: .3rem .1rem 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--pg-muted, #6b7280);
}

/* ================================================================
 * DOKUMENTY ZAKÁZKY — zákaznický náhled
 *
 * Ne mřížka jako fotky: jedno PDF vypadá jako druhé, rozhoduje název.
 * Řádky jsou schválně vysoké — otevírá se to hlavně palcem na mobilu.
 * ================================================================ */
.cp-files { display: flex; flex-direction: column; gap: .45rem; }

.cp-file {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .8rem;
  border: 1px solid var(--pg-border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cp-file:hover,
.cp-file:focus-visible {
  border-color: var(--pg-primary, #2563eb);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.cp-file > .bi:first-child { font-size: 22px; color: var(--pg-primary, #2563eb); flex: 0 0 auto; }

.cp-file-body { flex: 1 1 auto; min-width: 0; }
.cp-file-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cp-file-meta { display: block; font-size: 12px; color: var(--pg-muted, #6b7280); }
.cp-file-go { flex: 0 0 auto; font-size: 14px; color: var(--pg-muted, #6b7280); }

/* Omezený pohyb — viz admin.css. Zákaznický portál otevírají i lidé,
   kterým animace vadí, a nemají kde si ho přizpůsobit. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
