/* Палитра/типографика — как на сайте «Трюфель» (молочная гамма виджета,
   см. widget/booking-widget.css :root --bw-*). */
:root {
  --bw-bg-main: #f5efdb;
  --bw-bg-chip: #efe7d3;
  --bw-text-main: #4a4136;
  --bw-text-muted: #7f7466;
  --bw-accent: #ff7a4a;
  --bw-radius-card: 16px;
  --bw-radius-button: 28px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #eee3c6;
  color: var(--bw-text-main);
  font-family: "Inter", "Arial", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 48px;
}

.tva-logo {
  margin: 12px 0 24px;
}

.tva-logo img {
  display: block;
  height: 34px;
  width: auto;
}

.tva-card {
  width: 100%;
  max-width: 460px;
  background: var(--bw-bg-main);
  border-radius: var(--bw-radius-card);
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.tva-card h1 {
  font-size: 22px;
  margin: 0 0 6px;
  font-weight: 700;
}

.tva-sub {
  color: var(--bw-text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.tva-field {
  margin-bottom: 16px;
}

.tva-field label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--bw-text-muted);
}

.tva-field input[type="text"],
.tva-field input[type="password"],
.tva-field input[type="number"],
.tva-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9cdaf;
  border-radius: 12px;
  background: #fffdf6;
  color: var(--bw-text-main);
  font-size: 16px;
  font-family: inherit;
}

.tva-field input[type="file"] {
  width: 100%;
  font-size: 14px;
  color: var(--bw-text-main);
}

.tva-btn {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--bw-radius-button);
  background: var(--bw-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.tva-btn:hover {
  opacity: 0.92;
}

.tva-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.tva-error {
  background: #fbe3da;
  color: #9a3412;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.tva-status {
  margin-top: 18px;
  font-size: 15px;
  min-height: 22px;
}

.tva-status.is-busy {
  color: var(--bw-text-muted);
}

.tva-status.is-ok {
  color: #15803d;
  font-weight: 600;
}

.tva-status.is-err {
  color: #9a3412;
  font-weight: 600;
}

.tva-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #d9cdaf;
  border-top-color: var(--bw-accent);
  border-radius: 50%;
  animation: tva-spin 0.8s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

@keyframes tva-spin {
  to {
    transform: rotate(360deg);
  }
}

.tva-hint {
  color: var(--bw-text-muted);
  font-size: 12px;
  margin-top: 8px;
}

.tva-topbar {
  width: 100%;
  max-width: 860px;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.tva-logout {
  background: none;
  border: none;
  color: var(--bw-text-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* --- Таблица специалистов (ADMIN-3, Round A) ------------------------------ */

.tva-card--wide {
  max-width: 860px;
}

/* Амбер-вариант плашки (degraded: backend недоступен) — мягче красной ошибки. */
.tva-error--warn {
  background: #fdf0d5;
  color: #92400e;
}

.tva-table {
  margin-top: 6px;
}

.tva-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e7dcc0;
}

.tva-row--head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bw-text-muted);
  border-bottom: 1px solid #d9cdaf;
  padding: 6px 0;
}

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

.tva-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bw-bg-chip);
  display: block;
}

.tva-avatar--empty {
  display: inline-block;
}

.tva-col-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tva-name {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tva-spec {
  font-size: 13px;
  color: var(--bw-text-muted);
}

.tva-warn {
  color: #b45309;
  cursor: help;
  font-size: 15px;
  line-height: 1;
}

.tva-col-status {
  justify-self: start;
}

.tva-col-action {
  justify-self: end;
}

.tva-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.tva-badge--ok {
  background: #dce7d8;
  color: #15803d;
}

.tva-badge--none {
  background: var(--bw-bg-chip);
  color: var(--bw-text-muted);
}

.tva-btn--row {
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
}

.tva-empty {
  padding: 18px 0;
  color: var(--bw-text-muted);
  font-size: 14px;
  text-align: center;
}

.tva-manual {
  margin-top: 18px;
}

.tva-manual summary {
  cursor: pointer;
  color: var(--bw-accent);
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  padding: 6px 0;
}

.tva-manual summary::-webkit-details-marker {
  display: none;
}

.tva-manual-form {
  margin-top: 12px;
}

@media (max-width: 600px) {
  .tva-row {
    grid-template-columns: 48px 1fr auto;
    grid-template-areas:
      "photo name name"
      "photo status action";
    row-gap: 6px;
    column-gap: 12px;
  }
  .tva-row--head {
    display: none;
  }
  .tva-col-photo {
    grid-area: photo;
  }
  .tva-col-name {
    grid-area: name;
  }
  .tva-col-status {
    grid-area: status;
    align-self: center;
  }
  .tva-col-action {
    grid-area: action;
    align-self: center;
    justify-self: end;
  }
}

/* --- Модалка загрузки видео (ADMIN-3, Round B) ----------------------------
   Зеркалит паттерн виджета .bw-overlay/.bw-popup/.bw-close. */

.tva-modal {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 16, 0.55);
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.tva-modal[hidden] {
  display: none;
}

.tva-modal-card {
  width: min(100%, 480px);
  max-height: 94vh;
  overflow: auto;
  scrollbar-width: none;
  position: relative;
  background: var(--bw-bg-main);
  border-radius: var(--bw-radius-card);
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tva-modal-card::-webkit-scrollbar {
  display: none;
}

.tva-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--bw-text-main);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.tva-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-right: 36px;
}

.tva-modal-section {
  margin-bottom: 16px;
}

.tva-modal-label {
  font-size: 13px;
  color: var(--bw-text-muted);
  margin-bottom: 6px;
}

.tva-modal-video {
  width: 100%;
  max-height: 220px;
  border-radius: 12px;
  background: #000;
  display: block;
}

.tva-preview-name {
  font-size: 13px;
  color: var(--bw-text-muted);
  margin-top: 6px;
  word-break: break-all;
}

.tva-dropzone {
  border: 2px dashed #d9cdaf;
  border-radius: 12px;
  background: #fffdf6;
  padding: 22px 16px;
  margin-bottom: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tva-dropzone:hover,
.tva-dropzone:focus {
  border-color: var(--bw-accent);
  outline: none;
}

.tva-dropzone.is-dragover {
  border-color: var(--bw-accent);
  background: #fff7ef;
}

.tva-dropzone-icon {
  font-size: 26px;
  line-height: 1;
  color: var(--bw-accent);
  margin-bottom: 8px;
}

.tva-dropzone-text {
  font-size: 14px;
  color: var(--bw-text-main);
}

.tva-dropzone-link {
  color: var(--bw-accent);
  font-weight: 600;
  text-decoration: underline;
}

.tva-progress {
  margin: 14px 0;
}

.tva-progress[hidden] {
  display: none;
}

.tva-progress-label {
  font-size: 14px;
  color: var(--bw-text-muted);
  margin-bottom: 6px;
}

.tva-progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bw-bg-chip);
  overflow: hidden;
}

.tva-progress-bar {
  height: 100%;
  width: 0;
  background: var(--bw-accent);
  transition: width 0.3s ease;
}
