/* Сейф Ломбард — Залоговый билет (общие стили для всех pledge-ticket-*.html)
   Ранее ~580 строк дублировались в каждой странице; теперь один файл.
   Статус договора задаётся модификатором на .screen__content:
     t-status--active | t-status--urgent | t-status--overdue | t-status--closed | t-status--archived */

/* === ЦВЕТ СТАТУСА ДОГОВОРА === */
.screen__content,
.t-status--active {
  --t-color: var(--color-success);
  --t-color-bg: var(--color-success-bg);
  --t-status-bg: var(--color-success-bg);
  --t-status-text: var(--color-success);
}

.t-status--urgent {
  --t-color: var(--color-warning);
  --t-color-bg: var(--color-warning-bg);
  --t-status-bg: var(--color-warning);
  --t-status-text: var(--color-ink);
}

.t-status--overdue {
  --t-color: var(--color-error);
  --t-color-bg: var(--color-error-bg);
  --t-status-bg: var(--color-error);
  --t-status-text: var(--color-bg);
}

.t-status--closed {
  --t-color: var(--color-success);
  --t-color-bg: var(--color-success-bg);
  --t-status-bg: var(--color-bg-tertiary);
  --t-status-text: var(--color-text-secondary);
}

.t-status--archived {
  --t-color: var(--color-text-muted);
  --t-color-bg: var(--color-bg-tertiary);
  --t-status-bg: var(--color-bg-tertiary);
  --t-status-text: var(--color-text-secondary);
}

/* закрытый / архивный билет — иконка вместо кольца дней */
.t-hero__ring--icon {
  background: var(--t-color-bg);
  border-radius: 50%;
}

/* специфичность выше, чем у .t-hero__ring svg (80px), иначе иконка растягивается на всё кольцо */
.t-hero__ring.t-hero__ring--icon svg {
  position: static;
  width: 40px;
  height: 40px;
  color: var(--t-color);
}

/* === HERO CARD === */
.t-hero {
  margin: 8px 20px 0;
  padding: 20px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  position: relative;
  overflow: hidden;
}

.t-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.t-hero__id {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.t-hero__badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  background: var(--t-status-bg);
  color: var(--t-status-text);
}

.t-hero__center {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.t-hero__ring {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.t-hero__ring svg {
  position: absolute;
  inset: 0;
  width: 80px;
  height: 80px;
}

.t-hero__ring circle {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}

.t-hero__ring .ring-bg {
  stroke: var(--color-border);
}

.t-hero__ring .ring-fill {
  stroke: var(--t-color);
  transform: rotate(-90deg);
  transform-origin: center;
}

.t-hero__days-num {
  font-size: 23px;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  position: relative;
  z-index: 1;
}

.t-hero__days-label {
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: 2px;
}

.t-hero__days-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.t-hero__amount {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.t-hero__amount-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.t-hero__progress {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.t-hero__progress-fill {
  height: 100%;
  background: var(--t-color);
  border-radius: 2px;
}

.t-hero__progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.t-hero__progress-text b {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

/* === УВЕДОМЛЕНИЕ В ЦВЕТ СТАТУСА === */
.t-notice {
  margin: 16px 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--t-color-bg);
  border-radius: var(--radius-md);
}

.t-notice__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--t-color);
}

.t-notice__icon svg { width: 20px; height: 20px; }

.t-notice__text {
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

/* === CTA BUTTONS === */
.t-cta {
  padding: 16px 20px 0;
  display: flex;
  gap: 10px;
}

.t-cta .btn {
  flex: 1;
}

.t-cta .btn--urgent {
  background: var(--color-error);
  color: var(--color-bg);
}

.t-cta .btn--urgent:hover { background: var(--color-error-hover); }

/* === SECTION CARDS === */
.t-section {
  margin: 16px 20px 0;
}

.t-section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.t-card {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.t-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.t-row:last-child {
  border-bottom: none;
}

.t-row__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.t-row__value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: right;
}

.t-row--total {
  background: var(--color-bg-secondary);
  padding: 14px 16px;
}

.t-row--total .t-row__label {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.t-row--total .t-row__value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

/* === PLEDGE ITEMS (предметы залога) === */
.t-items {
  margin: 16px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.t-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
}

.t-item__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-light);
  border-radius: 12px;
  flex-shrink: 0;
}

.t-item__icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent-hover);
}

.t-item__info {
  flex: 1;
  min-width: 0;
}

.t-item__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.t-item__name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-top: 1px;
}

.t-item__specs {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: 1px;
}

.t-items__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 13px 16px;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.t-items__total-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.t-items__total-value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

/* === BRANCH === */
.t-branch {
  margin: 16px 20px 0;
}

.t-branch__card {
  padding: 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
}

.t-branch__name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 10px;
}

.t-branch__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.t-branch__row:last-of-type {
  margin-bottom: 0;
}

.t-branch__row svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.t-branch__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.t-branch__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.t-branch__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 12px;
  background: var(--color-bg-secondary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  font-family: inherit;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}

.t-branch__btn:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.t-branch__btn svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-secondary);
}

/* === ACTIONS LIST === */
.t-actions {
  margin: 16px 20px 0;
}

.t-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  margin-bottom: 8px;
}

.t-action:hover {
  border-color: var(--color-accent);
}

.t-action__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border-radius: 10px;
  flex-shrink: 0;
}

.t-action__icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
}

.t-action__content {
  flex: 1;
}

.t-action__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

.t-action__sub {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.t-action__chevron svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

.t-spacer { height: 32px; }
