/* Стили страницы tablo_dashboard. Общие токены — в variables.css */
    /* ===== Оригинальная дизайн-система (тёмная, бирюзовые акценты, стекло) ===== */

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

    html, body {
      height: 100vh;
      overflow: hidden;
    }

    body {
      background-color: var(--primary);
      color: var(--light);
    }

    /* ── Макет ── */
    .halyk-layout {
      display: flex;
      flex-direction: column;
      height: 100vh;
    }

    /* ── Шапка ── */
    .halyk-header {
      flex-shrink: 0;
      background: transparent;
      padding: 0.8rem 0;
    }

    .header-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 1.5rem;
    }

    .header-left, .header-right { display: flex; align-items: center; gap: 1.2rem; }

    .header-logo {
      height: 58px;
      width: auto;
      padding: 5px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 0.5rem;
    }

    .branch-badge {
      background: rgba(255, 255, 255, 0.1);
      color: var(--light);
      padding: 0.5rem 1.2rem;
      border-radius: 1rem;
      font-size: clamp(1.1rem, 2vw, 1.2rem);
      font-weight: 700;
      border: none;
      letter-spacing: 0.5px;
    }

    .datetime-block {
      display: flex;
      flex-direction: row;
      align-items: baseline;
      gap: 0.7rem;
      white-space: nowrap;
      background: rgba(255, 255, 255, 0.1);
      padding: 0.4rem 1.1rem;
      border-radius: 1rem;
    }

    #time-display {
      font-size: clamp(1.8rem, 2.6vw, 2.8rem);
      font-weight: 700;
      color: var(--light);
      line-height: 1.1;
    }

    #date-display { font-size: clamp(0.9rem, 1.1vw, 1.15rem); color: var(--secondary); }

    /* ── Контент ── */
    .content-wrapper {
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(220px, 32%) 1fr;
      gap: 1rem;
      padding: 0 1.5rem 1rem;
      overflow: hidden;
      transition: grid-template-columns 0.4s ease;
    }

    .content-wrapper.mode-tickets-only { grid-template-columns: 1fr; }
    .content-wrapper.mode-tickets-only .media-section { display: none; }

    /* ── Секция талонов (стеклянная панель) ── */
    .tickets-section {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 1rem;
    }

    .section-header {
      display: flex;
      justify-content: space-between;
      background: var(--secondary);
      padding: 0.8rem 1.5rem;
      border-bottom: 2px solid rgba(255, 255, 255, 0.2);
      flex-shrink: 0;
    }

    .col-title {
      font-size: clamp(1rem, 2.2vw, 1.5rem);
      text-transform: uppercase;
      color: #fff;
      font-weight: 700;
      letter-spacing: 0.5px;
    }

    .tickets-grid {
      flex: 1;
      min-height: 0;
      /* Полосы прокрутки нет даже при переполнении — талоны распределяются
         по высоте и при необходимости обрезаются. */
      overflow: hidden;
      padding: 0.6rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .ticket-container {
      /* Компактные по высоте карточки; не растягиваются на всю секцию. */
      flex: 0 0 auto;
      overflow: hidden;
      background: rgba(45, 55, 65, 0.7);
      border-radius: 0.5rem;
      padding: 0.35rem 1.3rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-left: 5px solid var(--secondary);
      transition: all 0.3s ease;
    }

    .ticket-number {
      font-size: clamp(2.9rem, 5vw, 3.5rem);
      font-weight: 800;
      color: #fff;
      line-height: 1;
    }

    .ticket-window {
      font-size: clamp(2.9rem, 5vw, 3.5rem);
      font-weight: 700;
      color: var(--secondary);
      line-height: 1;
    }

    .ticket-arrow i { font-size: 1.3rem; color: rgba(255, 255, 255, 0.3); }

    /* ── Цвета талонов по статусу ── */
    /* Вызван / обслуживается — зелёный */
    .ticket-container.t-active {
      background: rgba(46, 204, 113, 0.52);
      border-left-color: #2ecc71;
    }
    /* Ожидает в очереди — светлый */
    .ticket-container.t-waiting {
      background: rgba(236, 240, 241, 0.24);
      border-left-color: rgba(236, 240, 241, 0.7);
    }
    /* Отложен — жёлтый */
    .ticket-container.t-delayed {
      background: rgba(243, 156, 18, 0.20);
      border-left-color: var(--warning);
    }
    /* Не подошёл / отказ — серый */
    .ticket-container.t-inactive {
      background: rgba(149, 165, 166, 0.18);
      border-left-color: #95a5a6;
      opacity: 0.85;
    }
    .ticket-container.t-inactive .ticket-number,
    .ticket-container.t-inactive .ticket-window { color: rgba(255, 255, 255, 0.65); }

    /* Подсветка текущего (только что вызванного) талона */
    .ticket-container.ticket-inservice {
      border-left-width: 10px;
      animation: flashActive 1.6s ease-in-out infinite;
    }
    .ticket-container.ticket-inservice .ticket-window { color: #fff; }

    @keyframes flashActive {
      0%, 100% { box-shadow: 0 0 0 rgba(46, 204, 113, 0); }
      50% { box-shadow: 0 0 25px rgba(46, 204, 113, 0.5); }
    }

    @keyframes ticketIn {
      from { opacity: 0; transform: translateY(-12px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .ticket-container.new-ticket { animation: ticketIn 0.5s ease; }

    .empty-state {
      display: none;
      flex: 1;
      text-align: center;
      color: rgba(255, 255, 255, 0.6);
      font-size: 1.3rem;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 15px;
    }
    .empty-state i { font-size: 3rem; opacity: 0.6; color: var(--secondary); }

    /* ── Секция медиа / текущий вызов ── */
    .media-section {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      gap: 1rem;
    }

    .current-call-card {
      background: rgba(26, 188, 156, 0.15);
      border: 1px solid rgba(26, 188, 156, 0.45);
      color: var(--light);
      border-radius: 1rem;
      padding: 1rem 1.4rem;
      display: none;
      flex-direction: row;
      align-items: center;
      gap: 1.2rem;
      flex-shrink: 0;
      animation: slideDown 0.4s ease;
    }

    @keyframes slideDown {
      from { opacity: 0; transform: translateY(-18px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .card-label {
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-weight: 700;
      border-right: 1px solid rgba(255, 255, 255, 0.25);
      padding-right: 1.2rem;
    }

    .current-call-body { display: flex; align-items: center; gap: 1.2rem; flex: 1; justify-content: center; }
    .call-number { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; line-height: 1; color: #fff; }
    .call-arrow { font-size: 1.5rem; opacity: 0.7; color: var(--secondary); }
    .call-window-block { display: flex; align-items: center; gap: 0.6rem; }
    .window-label { text-transform: uppercase; letter-spacing: 0.05em; }
    .call-window { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; line-height: 1; color: var(--secondary); }

    .media-content {
      display: none;
      flex: 1;
      border-radius: 1rem;
      overflow: hidden;
      position: relative;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .media-content.active { display: block; }

    .video-wrapper { width: 100%; height: 100%; position: relative; }
    .video-element { width: 100%; height: 100%; object-fit: contain; background: rgba(0, 0, 0, 0.3); }

    .video-overlay-controls {
      position: absolute;
      bottom: 14px;
      right: 14px;
      background: rgba(0, 0, 0, 0.6);
      width: 38px;
      height: 38px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      cursor: pointer;
      transition: background 0.3s;
      z-index: 3;
    }
    .video-overlay-controls:hover { background: rgba(26, 188, 156, 0.8); }

    .video-loading {
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(0, 0, 0, 0.7);
      color: #fff;
      padding: 10px 20px;
      border-radius: 5px;
      display: none;
      z-index: 2;
    }

    /* ── Объявление (всплывающий оверлей) ── */
    .announcement-overlay {
      position: fixed;
      inset: 0;
      background: rgba(44, 62, 80, 0.85);
      backdrop-filter: blur(6px);
      z-index: 9999;
      display: none;
      justify-content: center;
      align-items: center;
    }
    .announcement-overlay.active { display: flex; animation: fadeIn 0.3s; }

    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes popIn { to { transform: scale(1); } }

    .announcement-modal {
      background: var(--primary);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 1.2rem;
      width: 640px;
      max-width: 90%;
      text-align: center;
      overflow: hidden;
      box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
      transform: scale(0.9);
      animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

    .announcement-modal .ann-header { background: var(--secondary); color: #fff; padding: 1.6rem; }
    .announcement-title { font-size: 1.9rem; font-weight: 700; color: #fff; }
    .announcement-modal .ann-body { padding: 2.4rem; }

    .modal-ticket { font-size: 6rem; font-weight: 900; color: var(--secondary); line-height: 1; }
    .modal-divider { font-size: 1.2rem; color: var(--light); opacity: 0.85; margin: 1.4rem 0; }
    .modal-window {
      font-size: 4rem;
      font-weight: 800;
      color: #fff;
      display: inline-block;
      border: 3px solid var(--secondary);
      padding: 0.3rem 2.2rem;
      border-radius: 0.8rem;
    }

    /* ── Бегущая строка ── */
    .marque {
      flex-shrink: 0;
      height: 50px;
      background: rgba(26, 188, 156, 0.25);
      color: var(--light);
      border-top: 1px solid rgba(255, 255, 255, 0.25);
      display: flex;
      align-items: center;
      overflow: hidden;
      -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
      mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    }

    .marquee-content {
      display: inline-block;
      white-space: nowrap;
      animation: marquee 60s linear infinite;
      font-size: 1.05rem;
      font-weight: 500;
      padding-left: 100%;
      text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    }
    .marquee-content span { display: inline-block; padding-right: 80px; }
    .marquee-content strong { color: var(--secondary); font-weight: 700; }
    .marquee-content i { margin-right: 8px; color: var(--secondary); }

    @keyframes marquee {
      0% { transform: translateX(0); }
      100% { transform: translateX(-100%); }
    }

    /* ── Тост-уведомления ── */
    .notification {
      position: fixed;
      bottom: -100px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(26, 188, 156, 0.95);
      color: #fff;
      padding: 0.9rem 1.8rem;
      border-radius: 10px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
      transition: bottom 0.5s ease;
      z-index: 10002;
      font-weight: 600;
    }
    .notification.show { bottom: 70px; }
    .notification.warning { background: rgba(243, 156, 18, 0.95); }
    .notification.danger { background: rgba(231, 76, 60, 0.95); }

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