/* =========================
   Display – Global Vars
   ========================= */
* { box-sizing: border-box; }

:root{
  /* colors */
  --bg: #fde9db;              /* light peach fallback if image missing */
  --text: #0f172a;
  --heading:#0b1220;

  --pill-head:#2d303a;
  --pill-ok:#69b772;          /* calling/active row */
  --pill-wait:#ffffff;
  --pill-wait-border:#ef4444;

  /* shadows */
  --shadow: 0 6px 30px rgba(0,0,0,.07);
}

html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color:var(--text);
}

/* =========================
   Background (full image)
   ========================= */
.display-bg{
  /* put background.jpg in the same folder as display.php/style.css */
  background: var(--bg) url('background.jpg') center/cover no-repeat fixed;
}

/* =========================
   Header
   ========================= */
.display-header{
  text-align:center;
  padding: 28px 16px 10px;
}
.display-logo{
  height: clamp(50px, 10vh, 90px);
  margin: 0 auto 8px;
  display:block;
}
.display-header h1{
  margin:0;
  font-size: clamp(22px, 2.6vw, 44px);
  font-weight: 800;
  color: var(--heading);
  letter-spacing:.5px;
  text-shadow: 0 1px 0 #fff8;
}

/* =========================
   Table wrapper
   ========================= */
.display-wrap{
  display:flex;
  justify-content:center;
  padding: clamp(8px, 2vh, 28px) 14px 48px;
}

/* =========================
   Table (CSS grid)
   ========================= */
.display-table{
  width:min(1200px, 96vw);
  display:grid;
  grid-auto-rows:minmax(60px, auto);
  gap:14px;
  margin-top: clamp(6px, 2vh, 18px);  /* spacing under header */
}

/* Header row: Ticket / Desk / Service */
.display-row.display-head{
  display:grid;
  grid-template-columns: 1fr .7fr 1.3fr;
  gap:14px;
}
.display-head .col{
  background:var(--pill-head);
  color:#fff;
  border-radius:22px;
  padding:18px clamp(14px, 2vw, 26px);
  font-size: clamp(18px, 2vw, 28px);
  font-weight:700;
  text-align:center;
}

/* Data rows */
.display-row{
  display:grid;
  grid-template-columns: 1fr .7fr 1.3fr;
  gap:14px;
  align-items:stretch;
}

/* Pills (cells) */
.col{
  border-radius:28px;
  padding: clamp(14px, 2.2vw, 28px);
  text-align:center;
  font-weight:800;
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
}

/* States */
.is-calling .col{
  background: var(--pill-ok);
  color:#fff;
}
.is-served .col{
  background:#eceff1;
  color:#0a1a2b;
}
.is-waiting .col{
  background: var(--pill-wait);
  border: 4px solid var(--pill-wait-border);
  color: var(--pill-wait-border);
}

/* Default sizes */
.col-ticket{ font-size: clamp(22px, 3.2vw, 44px); }
.col-desk  { font-size: clamp(22px, 3.2vw, 38px); }
.col-service{ font-size: clamp(22px, 3.2vw, 38px); }

/* =========================
   SERVICE COLUMN — BIGGER & BOLD
   (OPD / Emergency text etc.)
   ========================= */

/* Header row ka Service pill normal, tidy */
.display-head .col-service{
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight:700;
}

/* Data rows – real target (class based) */
.display-row .col-service{
  font-size: clamp(28px, 4vw, 56px) !important;
  font-weight: 900 !important;
  color: #111 !important;
  letter-spacing: .2px;
}

/* Fallback: agar markup me class .col-service nahi lagi,
   to teesre cell ko target karo */
.display-row > div:nth-child(3){
  font-size: clamp(28px, 4vw, 56px) !important;
  font-weight: 900 !important;
  color: #111 !important;
  letter-spacing: .2px;
}

/* =========================
   Small screens
   ========================= */
@media (max-width: 700px){
  /* 3 columns -> 1 column stack */
  .display-row,
  .display-row.display-head{
    grid-template-columns: 1fr;
  }

  /* Service font thoda chhota so it fits */
  .display-row .col-service,
  .display-row > div:nth-child(3){
    font-size: clamp(22px, 6vw, 36px) !important;
  }
/* ===== Ticket page (cards) ===== */
.ticket-page { background:#fff; }

.ticket-header{
  text-align:center;
  margin: 18px 0 6px;
}
.ticket-logo{ height:56px; opacity:.9; }
.ticket-header h1{
  margin:8px 0 0;
  font-size: clamp(18px, 2.2vw, 24px);
  color:#2b2f3a;
  font-weight:600;
}

.ticket-container{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  padding: 18px;
  max-width: 1100px;
  margin: 0 auto;
}
.ticket-card{
  background:#fff;
  border-radius:14px;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  padding:18px;
  text-align:center;
  transition: transform .2s ease;
}
.ticket-card:hover{ transform: translateY(-4px); }
.ticket-card h3{ margin: 0 0 6px; font-size: 20px; font-weight:700; }
.ticket-card .muted{ color:#77839a; margin:0 0 4px; }
.ticket-card .waiting{ margin: 2px 0 10px; color:#2d303a; font-weight:600; }
.ticket-card .btn{
  margin-top:10px; padding:10px 16px; border-radius:8px;
  background:#2d303a; color:#fff; border:none; cursor:pointer; font-weight:700;
}
.ticket-card .btn:hover{ background:#3b3f4c; }
.ticket-card .view-link{ display:inline-block; margin-top:8px; color:#3b6cf4; }

/* ===== Modal / Popup ===== */
.tm-overlay{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  background:rgba(0,0,0,.62); z-index:9999;
}
.tm-overlay.show{ display:flex; }
.tm-card{
  width:min(680px, 92vw);
  background:#fff;
  border-radius:10px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  padding:22px 24px;
  position:relative;
  font-family:system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}
.tm-close{
  position:absolute; right:14px; top:10px;
  background:transparent; border:none; font-size:28px; line-height:1; cursor:pointer;
  color:#c33;
}
.tm-top{
  display:grid; grid-template-columns:1fr 110px 1fr; align-items:center; gap:12px;
}
.tm-logo{ width:86px; margin:0 auto; display:block; }
.tm-stat{ text-align:center; }
.tm-stat-h{ color:#77839a; font-size:14px; }
.tm-stat-v{ font-size:18px; font-weight:700; color:#1e2a39; }

.tm-mid{ text-align:center; margin:18px 0 8px; }
.tm-mid-h{ color:#77839a; margin-bottom:8px; }
.tm-ticket{
  font-size: clamp(38px, 9vw, 82px);
  font-weight: 800; color:#ff6b6b; letter-spacing:1px;
  border-top:1px solid #e6e6e6; border-bottom:1px solid #e6e6e6;
  padding:14px 0; margin: 10px 0;
}
.tm-dept{ color:#333; font-size:18px; margin-top:6px; font-weight:600; }

.tm-actions{ display:flex; gap:8px; justify-content:center; margin-top:12px; }
.tm-actions .btn{
  padding:10px 16px; border:none; border-radius:8px; background:#2d303a; color:#fff; font-weight:700; cursor:pointer;
}
.btn-light{ background:#e9eef5; color:#1e2a39; }
.tm-actions .btn:hover{ filter:brightness(.95); }

/* print: show only ticket */
@media print{
  body *{ visibility:hidden !important; }
  .tm-card, .tm-card *{ visibility:visible !important; }
  .tm-card{ position:fixed; inset: 10mm; box-shadow:none; }