/* Karam Al Arab — кабинет партнёра (дополнения к karam-theme.css) */

.theme-client .login-footer-link {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
}

.theme-client .login-footer-link a {
  color: var(--text-muted);
  text-decoration: none;
}

.theme-client .login-footer-link a:hover {
  color: var(--copper);
}

.theme-client .partner-chip {
  background: var(--copper-dim);
  border: 1px solid var(--border);
}

.theme-client .partner-chip code {
  color: var(--copper-light);
}

.theme-client .delivery-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(20, 50, 198, 0.05);
}

.theme-client .delivery-card:hover {
  border-color: rgba(23, 105, 255, 0.35);
  box-shadow: 0 8px 24px rgba(23, 105, 255, 0.1);
}

.theme-client .delivery-card-header {
  border-bottom: 1px solid #f1f5f9;
}

.theme-client .delivery-id {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: #1432c6;
  letter-spacing: 0.02em;
}

.theme-client .delivery-stage.stage-done {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.theme-client .delivery-stage.stage-active {
  background: rgba(23, 105, 255, 0.12);
  color: #1432c6;
}

.theme-client .delivery-stage.stage-pending {
  background: #f1f5f9;
  color: var(--text-muted);
}

.theme-client .delivery-stage-custom {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(23, 105, 255, 0.08);
  border: 1px solid rgba(23, 105, 255, 0.18);
  color: #1432c6;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.theme-client .delivery-card-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.theme-client .delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.theme-client .pdf-btn--invoice {
  margin-left: 0;
  color: #0f5c4c;
  border-color: #b7e0d4;
  background: #eefaf6;
  font-weight: 600;
}

.theme-client .pdf-btn--invoice:hover {
  background: #dff5ed;
  border-color: #7dcfb8;
}

/* Степпер этапов */
.theme-client .stage-track {
  position: relative;
  margin-top: 1.25rem;
  padding-top: 0.25rem;
}

.theme-client .stage-track__rail {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 18px;
  height: 3px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  z-index: 0;
}

.theme-client .stage-track__fill {
  height: 100%;
  background: linear-gradient(90deg, #1769ff, #5b9bff);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-client .stage-track__steps {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.theme-client .stage-track__step {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.theme-client .stage-track__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  background: #fff;
  border: 2px solid #cbd5e1;
  color: #94a3b8;
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.theme-client .stage-track__label {
  font-size: 0.68rem;
  line-height: 1.25;
  color: #94a3b8;
  font-weight: 500;
  max-width: 100%;
  word-break: break-word;
}

.theme-client .stage-track__step.is-done .stage-track__dot {
  background: #1769ff;
  border-color: #1769ff;
  color: #fff;
}

.theme-client .stage-track__step.is-done .stage-track__label {
  color: #64748b;
}

.theme-client .stage-track__step.is-current .stage-track__dot {
  background: #fff;
  border-color: #1769ff;
  color: #1432c6;
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.15);
}

.theme-client .stage-track__step.is-current .stage-track__label {
  color: #1432c6;
  font-weight: 600;
}

.theme-client .pdf-btn {
  color: #1432c6;
  border-color: #dbe4f0;
  background: #fff;
}

.theme-client .pdf-btn:hover {
  background: rgba(23, 105, 255, 0.08);
  border-color: rgba(23, 105, 255, 0.35);
}

.theme-client .source-tags {
  display: none;
}

/* Mobile */
.is-mobile.theme-client .portal-header-left .brand-logo img {
  height: 28px;
  max-width: 160px;
}

.is-mobile.theme-client .portal-sub {
  display: none;
}

.is-mobile.theme-client .partner-chip {
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
}

.is-mobile.theme-client .delivery-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.is-mobile.theme-client .delivery-card-body {
  padding: 1rem;
}

.is-mobile.theme-client .delivery-meta {
  gap: 10px 14px;
}

.is-mobile.theme-client .stage-track__rail {
  left: 8%;
  right: 8%;
  top: 15px;
}

.is-mobile.theme-client .stage-track__dot {
  width: 30px;
  height: 30px;
  font-size: 0.72rem;
}

.is-mobile.theme-client .stage-track__label {
  font-size: 0.58rem;
}

@media (max-width: 768px) {
  .theme-client .delivery-grid {
    grid-template-columns: 1fr;
  }

  .theme-client .portal-header {
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top));
    flex-wrap: wrap;
    gap: 8px;
  }

  .theme-client .portal-main {
    padding: 12px 12px calc(20px + env(safe-area-inset-bottom));
  }

  .theme-client .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .theme-client .stat-card {
    padding: 0.85rem 0.9rem;
  }

  .theme-client .stat-card .value {
    font-size: 1.45rem;
  }

  .theme-client .section-head h2 {
    font-size: 1.1rem;
  }

  .theme-client .section-head p {
    font-size: 0.75rem;
  }
}

@media (min-width: 769px) {
  .theme-client .btn-icon#logoutBtn::after {
    content: ' Выйти';
    font-size: 0.8rem;
  }

  .theme-client .btn-icon {
    min-width: auto;
    padding: 0.65rem 1rem;
    gap: 0.35rem;
  }
}

.theme-client .client-delivery-tabs {
  margin: 0.25rem 0 1rem;
}


.theme-client .section-sub {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.theme-client .done-collapse {
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.theme-client .done-collapse__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
}

.theme-client .done-collapse__title {
  font-weight: 600;
  flex: 1;
}

.theme-client .done-collapse__meta {
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--copper-dim);
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.theme-client .done-collapse__chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.theme-client .done-collapse__toggle.is-open .done-collapse__chevron {
  transform: rotate(180deg);
}

.theme-client .done-collapse__body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

.theme-client .delivery-card--done {
  opacity: 0.92;
}
