/* Тот же цветовой язык, что в kiosk.css/display.css, но однократная портретная
   раскладка под телефон, а не полноэкранный ландшафтный терминал. */
:root {
  --mt-bg: #f8fafc;
  --mt-card-bg: #ffffff;
  --mt-card-border: #e2e8f0;
  --mt-text-primary: #0f172a;
  --mt-text-secondary: #475569;
  --mt-primary: #2563eb;
  --mt-primary-hover: #1d4ed8;
  --mt-success: #059669;
  --mt-warning: #d97706;
  --mt-danger: #dc2626;
  --mt-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Без этого правила .mt-screen { display: block } ниже (авторский стиль) перебивает
   встроенное браузерное [hidden] { display: none } (стиль user-agent'а всегда слабее
   авторского независимо от специфичности/порядка) -- экраны показывались все разом
   друг на друге. Тот же приём, что уже в display.css/kiosk.css. */
[hidden] {
  display: none !important;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--mt-bg);
  color: var(--mt-text-primary);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mt-header {
  background: var(--mt-card-bg);
  border-bottom: 1px solid var(--mt-card-border);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.mt-brand {
  font-weight: 700;
  font-size: 1.05rem;
}

.mt-branch-name {
  color: var(--mt-text-secondary);
  font-size: 0.85rem;
  margin-top: 2px;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.mt-screen {
  display: block;
}

.mt-title {
  font-size: 1.15rem;
  margin-bottom: 14px;
}

.mt-back-btn {
  background: none;
  border: none;
  color: var(--mt-primary);
  font-size: 0.95rem;
  padding: 8px 0;
  margin-bottom: 6px;
  cursor: pointer;
}

.mt-product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mt-product-card {
  background: var(--mt-card-bg);
  border: 1px solid var(--mt-card-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--mt-shadow);
  -webkit-tap-highlight-color: transparent;
}

.mt-product-card:active {
  transform: scale(0.98);
}

.mt-product-name {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.mt-product-arrow {
  color: var(--mt-text-secondary);
}

.mt-loading-text,
.mt-error-text {
  text-align: center;
  color: var(--mt-text-secondary);
  margin-top: 40px;
}

.mt-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}

.mt-btn-primary {
  background: var(--mt-primary);
  color: #fff;
}

.mt-btn-primary:active {
  background: var(--mt-primary-hover);
}

.mt-btn-secondary {
  background: var(--mt-card-bg);
  color: var(--mt-primary);
  border: 1px solid var(--mt-card-border);
}

/* Экран билета */
#mt-ticket-screen {
  text-align: center;
}

.mt-ticket-label {
  color: var(--mt-text-secondary);
  font-size: 0.9rem;
}

.mt-ticket-number {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 6px 0 14px;
  letter-spacing: 0.02em;
}

.mt-status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.mt-status-badge.mt-status-called {
  background: #fef3c7;
  color: #92400e;
}

.mt-status-badge.mt-status-done {
  background: #dcfce7;
  color: #166534;
}

.mt-status-badge.mt-status-gone {
  background: #fee2e2;
  color: #991b1b;
}

.mt-ticket-details {
  background: var(--mt-card-bg);
  border: 1px solid var(--mt-card-border);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
}

.mt-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
}

.mt-detail-row:not(:last-child) {
  border-bottom: 1px solid var(--mt-card-border);
}

.mt-detail-row span:first-child {
  color: var(--mt-text-secondary);
}

.mt-hint {
  color: var(--mt-text-secondary);
  font-size: 0.85rem;
  margin-top: 16px;
}
