/* Стили демо платформы — только для platform.html */

/* ---- переключатель кабинетов ---- */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tab {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(227, 168, 87, 0.1);
}

.cab {
  display: none;
}

.cab.is-active {
  display: block;
}

.cab-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

/* ---- телефонная рамка (кабинет родителя) ---- */
.phone {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 18px 16px 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.phone::before {
  content: '';
  display: block;
  width: 90px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin: 0 auto 14px;
}

.phone .app-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--gold);
  margin-bottom: 14px;
}

.trip-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.trip-card .route {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.trip-card .meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.trip-card .qr-line {
  display: flex;
  gap: 14px;
  align-items: center;
}

.trip-card .qr-mini {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  box-sizing: border-box;
}

.trip-card .qr-mini svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trip-card .qr-info {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

.trip-card .qr-info b {
  color: var(--text);
}

/* ---- таймлайн статусов ---- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 2px 0 0 4px;
}

.timeline li {
  position: relative;
  padding: 0 0 16px 26px;
  font-size: 12.5px;
  color: var(--muted);
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}

.timeline li:last-child::before {
  display: none;
}

.timeline li::after {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg-deep);
  box-sizing: border-box;
}

.timeline li .t {
  float: right;
  font-size: 11px;
  color: var(--muted);
}

.timeline li.done {
  color: var(--text);
}

.timeline li.done::after {
  border-color: var(--green);
  background: var(--green);
}

.timeline li.done::before {
  background: var(--green);
}

.timeline li.current {
  color: var(--gold);
  font-weight: 700;
}

.timeline li.current::after {
  border-color: var(--gold);
  background: var(--gold);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(227, 168, 87, 0.5); }
  100% { box-shadow: 0 0 0 9px rgba(227, 168, 87, 0); }
}

/* ---- лента push-уведомлений ---- */
.push-feed {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.push-item {
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11.5px;
  animation: slidein 0.35s ease-out;
}

.push-item b {
  color: var(--gold);
}

.push-item .when {
  float: right;
  color: var(--muted);
  font-size: 10.5px;
}

@keyframes slidein {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---- правая колонка ---- */
.side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-panel {
  border-color: var(--gold-dim);
}

.btn {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border: none;
  border-radius: 11px;
  padding: 12px 20px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn.secondary {
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  font-size: 13px;
}

.contact:last-child {
  border-bottom: none;
}

.contact .who b {
  display: block;
  font-size: 13px;
}

.contact .who small {
  color: var(--muted);
  font-size: 11.5px;
}

/* ---- панели школы и перевозчика ---- */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}

.panel > h3 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 14px;
}

.panel .hint {
  font-size: 12.5px;
  color: var(--muted);
  margin: 12px 0 0;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.fill-bar {
  height: 8px;
  border-radius: 5px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  overflow: hidden;
  flex: 1;
  min-width: 140px;
}

.fill-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

@media (max-width: 900px) {
  .cab-grid {
    grid-template-columns: 1fr;
  }

  .phone {
    max-width: 400px;
    margin: 0 auto;
  }
}
