﻿@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@700;800;900&display=swap');

/* Chart.js tooltips (dashboard) */
.chartjs-tooltip {
  font-family: "Cairo", sans-serif !important;
  font-weight: 700 !important;
}

:root {
  --bg: #f4f8ff;
  --bg2: #eaf0ff;
  --card: rgba(255, 255, 255, 0.88);
  --text: #162f51;
  --muted: #5f7798;
  --primary: #3f6fff;
  --primary2: #7652ff;
  --success: #18b779;
  --warning: #ffb227;
  --danger: #ef4e55;
  --line: #dbe6ff;
  --shadow: 0 20px 45px rgba(40, 89, 165, 0.16);
}

@media (prefers-color-scheme: dark) {
  body:not(.theme-light):not(.theme-dark) {
    --bg: #071320;
    --bg2: #0d1d2f;
    --card: rgba(16, 33, 52, 0.88);
    --text: #e8f1ff;
    --muted: #b2c4dc;
    --primary: #6a92ff;
    --primary2: #9177ff;
    --success: #48db98;
    --warning: #ffc95f;
    --danger: #ff8a8a;
    --line: #284058;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  }
}

body.theme-dark {
  --bg: #071320;
  --bg2: #0d1d2f;
  --card: rgba(16, 33, 52, 0.88);
  --text: #e8f1ff;
  --muted: #b2c4dc;
  --primary: #6a92ff;
  --primary2: #9177ff;
  --success: #48db98;
  --warning: #ffc95f;
  --danger: #ff8a8a;
  --line: #284058;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

body.theme-light {
  --bg: #eef4ff;
  --bg2: #e2ebfa;
  --card: #ffffff;
  --text: #0f2748;
  --muted: #4a6280;
  --primary: #2563eb;
  --primary2: #5b21b6;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --line: #c5d4ef;
  --shadow: 0 16px 40px rgba(19, 58, 137, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
  font-weight: 700;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(63, 111, 255, 0.25), transparent),
    radial-gradient(900px 420px at 10% -20%, rgba(118, 82, 255, 0.24), transparent),
    linear-gradient(180deg, var(--bg), var(--bg2));
  font-variant-numeric: lining-nums tabular-nums;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  margin: 10px 12px 0;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #142a4f 42%, #1c3f73 78%, #0f2748 100%);
  border: 1px solid rgba(120, 160, 255, 0.22);
  box-shadow: 0 20px 45px rgba(5, 15, 35, 0.45);
}

.top-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(280px 140px at 0% 0%, rgba(90, 140, 255, 0.18), transparent 70%),
    radial-gradient(240px 120px at 100% 100%, rgba(72, 190, 200, 0.14), transparent 72%);
  pointer-events: none;
}

.top-nav > * { position: relative; z-index: 1; }

.nav-brand-block { justify-self: start; }
.nav-links { justify-self: center; }
.user-box { justify-self: end; }

.nav-brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-logo {
  width: 54px;
  height: 54px;
  border-radius: 25%;
  object-fit: contain;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.nav-brand-text { min-width: 0; }

.nav-title {
  color: #fff;
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: .78rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}

.nav-links a {
  text-decoration: none;
  color: #f4f8ff;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .2s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: #1f4f95;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.nav-ico { font-size: 1rem; line-height: 1; }

.ico-kiosk-tablet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 0;
  color: inherit;
}

.ico-kiosk-tablet svg {
  display: block;
  width: 0.95em;
  height: 1.28em;
}

.nav-links .ico-kiosk-tablet svg {
  width: 0.92rem;
  height: 1.22rem;
}

.home-tile__icon .ico-kiosk-tablet svg {
  width: 2.35rem;
  height: 3.15rem;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

a.nav-brand-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

a.nav-brand-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 5px 12px 5px 8px;
  font-size: 0.85rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.user-chip__avatar {
  width: 30px;
  height: 30px;
  border-radius: 20px;
  object-fit: cover;
  border: none;
  flex-shrink: 0;
}

.user-chip__name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip--logout {
  padding-inline: 12px;
}

.user-chip--theme {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.theme-toggle__ico {
  font-size: 1.05rem;
  line-height: 1;
}

.user-chip__theme-label {
  display: none;
}

.user-chip__logout-ico {
  flex-shrink: 0;
  opacity: 0.95;
}

.container {
  width: min(1180px, 95%);
  margin: 18px auto 34px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  box-shadow: var(--shadow);
}

.slim { padding: 14px; }

/* â€”â€” Login (centered + animated bg) â€”â€” */
body:has(> .login-page) {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #0a1424;
  color: #e8f4ff;
  display: flex;
  flex-direction: column;
}

body:has(> .login-page) > .login-page {
  flex: 1 1 auto;
  min-height: 0;
}

body:has(> .login-page) > .app-site-footer {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  margin-top: auto;
  max-width: none;
  width: 100%;
  padding: 10px 16px 14px;
  background: transparent;
  border-top: none;
}

.login-page {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  width: 100%;
  background: #0a1424;
  isolation: isolate;
  overflow: hidden;
}

.login-page__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-page__aurora {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 20% 30%, rgba(63, 111, 255, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(0, 224, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 35% at 50% 50%, rgba(35, 248, 116, 0.08), transparent 50%);
  animation: loginAurora 14s ease-in-out infinite alternate;
}

@keyframes loginAurora {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, 3%) rotate(3deg); }
}

.login-page__particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.login-page__particles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 14px rgba(0, 224, 255, 0.45);
  animation: loginParticle 8s ease-in-out infinite;
}

.login-page__particles span:nth-child(1) { top: 12%; left: 18%; animation-delay: 0s; }
.login-page__particles span:nth-child(2) { top: 22%; right: 14%; animation-delay: 1.2s; }
.login-page__particles span:nth-child(3) { bottom: 30%; left: 10%; animation-delay: 2.1s; }
.login-page__particles span:nth-child(4) { bottom: 18%; right: 22%; animation-delay: 0.8s; }
.login-page__particles span:nth-child(5) { top: 48%; left: 42%; animation-delay: 1.8s; }
.login-page__particles span:nth-child(6) { top: 65%; right: 38%; animation-delay: 2.6s; }

@keyframes loginParticle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.45; }
  50% { transform: translateY(-18px) scale(1.2); opacity: 0.9; }
}

.login-panel--centered {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  padding: 28px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.login-panel__card {
  padding: 36px 34px 28px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(63, 111, 255, 0.2), transparent 50%),
    radial-gradient(ellipse 90% 60% at 0% 100%, rgba(0, 224, 255, 0.08), transparent 45%),
    linear-gradient(165deg, #0a1424 0%, #0d1f3a 48%, #091525 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  animation: loginCardIn 0.65s ease both;
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-panel__art {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.login-panel__logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 224, 255, 0.28);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.login-panel__head {
  text-align: center;
  margin-bottom: 24px;
}

.login-panel__eyebrow {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #7dd3fc;
}

.login-panel__title {
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 1.65rem);
  font-weight: 900;
  line-height: 1.35;
  color: #f0f7ff;
}

.login-page .login-form {
  display: grid;
  gap: 14px;
}

.login-page .login-field {
  display: grid;
  gap: 6px;
}

.login-page .login-field__label {
  font-size: 0.86rem;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.78);
}

.login-page .login-field input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #f0f7ff;
  font-weight: 700;
}

.login-page .login-field input:focus {
  outline: none;
  border-color: rgba(35, 248, 116, 0.5);
  box-shadow: 0 0 0 3px rgba(35, 248, 116, 0.15);
}

.login-page .login-field input::placeholder {
  color: rgba(226, 232, 240, 0.35);
}

.login-page .login-form__submit {
  width: 100%;
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(35, 248, 116, 0.35);
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #e8f1ff;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(35, 248, 116, 0.45) 0%, rgba(10, 22, 40, 0.9) 50%, rgba(0, 224, 255, 0.25) 100%);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.login-page .login-form__submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.login-page .login-form__error {
  margin: 0;
  min-height: 1.2em;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 800;
  color: #ff8a8a;
}

.login-page .login-demo {
  margin-top: 14px;
  font-size: 0.76rem;
  color: rgba(226, 232, 240, 0.5);
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
}

.login-page .login-demo summary {
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 520px) {
  .login-panel--centered { max-width: 100%; padding: 14px; }
  .login-panel__card { padding: 26px 20px 22px; }
  .login-panel__logo { width: 150px; height: 150px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-page__aurora,
  .login-page__particles span,
  .login-panel__card {
    animation: none;
  }
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

input, select {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #102845;
}

input:focus, select:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
  border-color: var(--primary);
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 10px 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s ease;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(120deg, var(--primary), var(--primary2)); color: #fff; }

.profile-form .btn.primary {
  background: linear-gradient(120deg, #23f874, #10b981);
  color: #071320;
}
.btn.success { background: linear-gradient(120deg, #16b66d, #11cf8f); color: #fff; }
.btn.warning { background: linear-gradient(120deg, #ffcb55, #ffb020); color: #1d2230; }
.btn.danger { background: linear-gradient(120deg, #f0536d, #ea3f49); color: #fff; }
.btn.secondary { background: linear-gradient(120deg, #8495ab, #66788f); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.big { font-size: 1.23rem; padding: 14px 24px; margin-inline-end: 8px; }

.btn.action-btn,
.btn.btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.btn.action-btn .btn-icon,
.btn.btn-toggle .btn-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.btn.btn-toggle {
  width: 100%;
  max-width: 420px;
  font-size: 1.1rem;
  padding: 14px 20px;
  border-radius: 16px;
}

.btn.btn-toggle.on {
  background: linear-gradient(120deg, #16b66d, #0ea371);
  color: #fff;
  box-shadow: 0 12px 28px rgba(14, 163, 113, 0.35);
}

.btn.btn-toggle.off {
  background: linear-gradient(120deg, #5a6578, #3f4d63);
  color: #fff;
  box-shadow: 0 10px 24px rgba(40, 50, 70, 0.3);
}

.btn.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
}

.operator-controls-block {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hint-cards {
  display: grid;
  gap: 10px;
  direction: rtl;
}

.hint-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  direction: rtl;
  text-align: right;
}

.hint-card.is-hidden {
  display: none;
}

.hint-card--status {
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

.hint-card--status.is-available {
  background: color-mix(in srgb, var(--success) 12%, var(--card));
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
}

.hint-card--queue {
  background: color-mix(in srgb, var(--success) 10%, var(--card));
  border-color: color-mix(in srgb, var(--success) 32%, var(--line));
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.16);
}

.hint-card-ico {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.9);
}

.hint-card-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.75;
  color: var(--text);
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
  flex: 1;
}

.hint-card-text strong {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary);
}

.hint-card--queue .hint-card-text strong {
  color: #133a89;
  text-shadow: none;
}

.hint-card--queue .hint-card-text strong {
  color: #e8f1ff;
  background: rgba(10, 22, 40, 0.35);
  border: 1px solid rgba(0, 224, 255, 0.18);
  padding: 2px 10px;
  border-radius: 999px;
  display: inline-block;
}

.hint-card--queue .ticket-num {
  color: #133a89;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(19, 58, 137, 0.22);
  box-shadow: 0 8px 18px rgba(19, 58, 137, 0.12);
}

.operator-actions-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.operator-actions-dock {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  direction: rtl;
}

.op-dock-btn {
  --accent: #3b82f6;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 224, 255, 0.12);
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.9) 0%, rgba(10, 22, 40, 0.86) 55%, rgba(16, 33, 52, 0.9) 100%);
  color: #e8f1ff;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  pointer-events: auto;
}

.op-dock-btn:disabled,
.op-dock-btn.is-busy {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.op-dock-btn.is-active {
  border-color: rgba(0, 224, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2), 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* ØªØ¯Ø±Ø¬Ø§Øª Ø®Ù„ÙÙŠØ© Ø®Ø§ØµØ© Ø¨ÙƒÙ„ Ø²Ø± */
.op-dock-btn.op-display { background: linear-gradient(135deg, rgb(0 136 255 / 46%) 0%, rgb(2 14 26) 55%, rgb(0 72 120 / 54%) 100%); }
.op-dock-btn.op-call { background: linear-gradient(135deg, rgb(0 224 255 / 46%) 0%, rgb(2 18 26) 55%, rgb(0 120 120 / 54%) 100%); }
.op-dock-btn.op-recall { background: linear-gradient(135deg, rgb(129 0 247 / 46%) 0%, rgb(19 2 26) 55%, rgb(85 0 120 / 54%) 100%); }
.op-dock-btn.op-skip { background: linear-gradient(135deg, rgb(255 0 0 / 46%) 0%, rgb(26 2 8) 55%, rgb(120 0 17 / 54%) 100%); }
.op-dock-btn.op-complete { background: linear-gradient(135deg, rgb(35 248 116 / 46%) 0%, rgb(2 26 14) 55%, rgb(0 120 55 / 54%) 100%); }
.op-dock-btn.op-transfer { background: linear-gradient(135deg, rgb(170 110 255 / 46%) 0%, rgb(14 2 26) 55%, rgb(85 0 120 / 54%) 100%); }

.op-dock-ico {
  width: 54px;
  height: 54px;
  font-size: 1.55rem;
}

.op-dock-label {
  font-size: 1.08rem;
}

.op-dock-btn::before {
  content: "";
  position: absolute;
  inset: -60% -35% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 224, 255, 0.16), transparent 70%);
  opacity: 0.9;
  transform: rotate(8deg);
  pointer-events: none;
}

.op-dock-btn:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(0, 224, 255, 0.22);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32);
}

.op-dock-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
  border-radius: 12px;
  background: rgba(0, 224, 255, 0.10);
  border: 1px solid rgba(0, 224, 255, 0.18);
  flex-shrink: 0;
  filter: saturate(1.1) brightness(1.05);
}

.op-ico-display { color: #60a5fa; }
.op-ico-call { color: #38bdf8; }
.op-ico-recall { color: #fbbf24; }
.op-ico-skip { color: #fb7185; }
.op-ico-complete { color: #34d399; }
.op-ico-transfer { color: #c4b5fd; }

.op-dock-label {
  font-size: 1rem;
  font-weight: 900;
  color: #00e0ff;
  text-align: right;
  direction: rtl;
  line-height: 1.25;
  white-space: nowrap;
}

.op-dock-btn.op-display { --accent: #2563eb; }
.op-dock-btn.op-call { --accent: #0ea5e9; }
.op-dock-btn.op-recall { --accent: #f59e0b; }
.op-dock-btn.op-skip { --accent: #ef4444; }
.op-dock-btn.op-complete { --accent: #10b981; }
.op-dock-btn.op-transfer { --accent: #8b5cf6; }

.operator-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  direction: rtl;
}

.operator-action-card {
  --accent: #3b82f6;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 86px;
  padding: 16px 14px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.operator-action-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.85;
}

.operator-action-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow:
    0 4px 8px rgba(15, 23, 42, 0.06),
    0 16px 36px rgba(15, 23, 42, 0.1);
}

.operator-action-card .action-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.45rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 11%, var(--card));
  color: color-mix(in srgb, var(--accent) 85%, #000);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}

.operator-action-card .action-label {
  direction: rtl;
}

.operator-action-card.op-display { --accent: #2563eb; }
.operator-action-card.op-call { --accent: #0ea5e9; }
.operator-action-card.op-recall { --accent: #f59e0b; }
.operator-action-card.op-skip { --accent: #ef4444; }
.operator-action-card.op-complete { --accent: #10b981; }
.operator-action-card.op-transfer { --accent: #8b5cf6; }

.operator-action-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 14px;
  min-height: 76px;
}

.operator-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 150px;
  min-width: 150px;
  padding: 16px 12px;
  border-radius: 16px;
  text-align: center;
  align-self: stretch;
}

.operator-pillar__label {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
  opacity: 0.9;
}

.operator-pillar__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  direction: rtl;
}

.operator-pillar--current {
  background: linear-gradient(168deg, #eff6ff 0%, #dbeafe 55%, #bfdbfe 100%);
  border: 1px solid #93c5fd;
  color: #1e3a5f;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.14);
}

.operator-pillar--current.has-ticket {
  background: linear-gradient(180deg, #d4ebff 0%, #9fd0ff 100%);
  border-color: #4a9ae6;
  color: #0a2d52;
  box-shadow: 0 12px 32px rgba(37, 99, 167, 0.32);
}

.operator-pillar--current.has-ticket .pillar-ticket {
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1.05;
  color: #062640;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.operator-pillar--current.has-ticket .pillar-window {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0d3d6e;
  opacity: 1;
}

.operator-pillar--current .pillar-ticket {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
}

.operator-pillar--current .pillar-window {
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.88;
}

.operator-panel .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.window-pill {
  background: color-mix(in srgb, var(--primary) 14%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .9rem;
}

.operator-upcoming-panel {
  margin-top: 0;
}

.operator-upcoming-head {
  align-items: baseline;
}

.operator-upcoming-next {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.9);
}

.operator-upcoming-next__num {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #67e8f9;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.operator-upcoming-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
}

.operator-upcoming-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.operator-upcoming-table tbody tr + tr {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.operator-upcoming-cell {
  padding: 10px 6px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #e2e8f0;
  border-inline-start: 1px solid rgba(148, 163, 184, 0.1);
  white-space: nowrap;
}

.operator-upcoming-cell:first-child {
  border-inline-start: none;
}

.operator-upcoming-cell--next {
  background: rgba(34, 211, 238, 0.14);
  color: #67e8f9;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35);
  position: relative;
}

.operator-upcoming-cell--next::after {
  content: "التالي";
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 800;
  color: rgba(103, 232, 249, 0.85);
  letter-spacing: 0.02em;
}

.operator-upcoming-cell--empty {
  background: transparent;
  border-color: transparent;
}

.operator-upcoming-empty {
  padding: 16px 12px;
  text-align: center;
  color: rgba(203, 213, 225, 0.75);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .operator-upcoming-cell {
    padding: 8px 4px;
    font-size: 0.82rem;
  }

  .operator-upcoming-cell--next::after {
    font-size: 0.55rem;
  }
}

.operator-top-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 150px;
  direction: ltr;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 14px;
}

.operator-top-row--generic {
  grid-template-columns: auto minmax(0, 1fr);
}

.operator-pillar-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
  direction: ltr;
}

.op-pillar-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 92px;
  max-width: 108px;
  padding: 12px 10px;
  border-radius: 16px;
  border: 2px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(134deg, rgb(91 137 249 / 46%) 0%, rgb(12 37 65) 55%, rgb(86 132 176 / 54%) 100%);
  color: #e8f4ff;
  font-family: inherit;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.op-pillar-side--recall .op-pillar-side__ico {
  font-size: 1.65rem;
}

.op-pillar-side__lines {
  display: grid;
  gap: 2px;
  font-size: 1.02rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
}

.op-pillar-side__ico {
  font-size: 1.45rem;
  line-height: 1;
}

.op-pillar-side:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.op-pillar-side:not(:disabled):hover {
  transform: translateY(-2px);
}

.operator-display-preview {
  margin-top: 0;
  padding: 12px 14px 14px;
}

.operator-display-preview.is-hidden {
  display: none !important;
  margin: 0;
  padding: 0;
  border: 0;
}

.operator-display-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.operator-display-preview__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.operator-display-preview__hint {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.operator-display-preview__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.operator-display-preview__actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.operator-display-preview__viewport {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b1628;
  min-height: 0;
  max-height: min(72vh, 640px);
  padding: 10px;
  box-sizing: border-box;
}

.operator-display-preview__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  align-items: stretch;
}

.operator-preview-window-card {
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.operator-preview-window-card--w1 {
  border-top: 3px solid #5b89f9;
}

.operator-preview-window-card--w2 {
  border-top: 3px solid #f59e0b;
}

.operator-preview-window-card--w3 {
  border-top: 3px solid #10b981;
}

.operator-preview-window-card--mine {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.28), 0 8px 24px rgba(245, 158, 11, 0.12);
}

.operator-preview-window-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.operator-preview-window-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
}

.operator-preview-window-card__badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.operator-preview-window-card__frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  background: #0b1628;
  cursor: pointer;
}

.operator-preview-window-card__scale {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.operator-preview-window-card__frame:hover {
  filter: brightness(1.03);
}

.display-screen--preview {
  --preview-scale: 0.28;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  min-height: 720px;
  max-height: 720px;
  transform: translate(-50%, -50%) scale(var(--preview-scale));
  transform-origin: center center;
  margin: 0;
  padding: 8px 10px 10px;
  box-sizing: border-box;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.display-screen--preview .display-header {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-height: 68px;
  max-height: 88px;
  padding: 4px 2px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  position: relative;
  z-index: 2;
}

.display-screen--preview .display-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.display-screen--preview .display-logo-img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.display-screen--preview .display-title-ar {
  font-size: 0.95rem;
  line-height: 1.25;
}

.display-screen--preview .display-title-en {
  font-size: 0.72rem;
  line-height: 1.2;
}

.display-screen--preview .display-window-badge--preview {
  font-size: 0.72rem;
  margin-top: 3px;
  padding: 2px 8px;
}

.display-screen--preview .clock {
  font-size: 0.88rem;
  padding: 6px 10px;
  flex-shrink: 0;
}

.display-screen--preview .now-serving {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  padding: 4px 0;
}

.display-screen--preview .now-serving__label {
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0;
}

.display-screen--preview .big-number {
  font-size: clamp(5rem, 13vw, 8.75rem);
  margin: 4px 0 6px;
  letter-spacing: 2px;
  line-height: 1;
}

.display-screen--preview .now-serving-window-block {
  gap: 6px;
  justify-items: center;
  display: grid;
}

.display-screen--preview .now-serving__goto {
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
}

.display-screen--preview .window-number {
  font-size: clamp(2.5rem, 6.5vw, 4.1rem);
  line-height: 1.1;
  margin: 0;
}

.display-screen--preview .recent-calls,
.display-screen--preview .upcoming-calls {
  display: none !important;
}

.display-window-badge--preview {
  font-size: 0.85rem;
  margin-top: 4px;
  opacity: 0.9;
}

@media (max-width: 1100px) {
  .operator-display-preview__grid {
    grid-template-columns: 1fr;
  }

  .operator-display-preview__viewport {
    max-height: min(85vh, 920px);
  }
}

.operator-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
}

.operator-modal.is-hidden {
  display: none;
}

.operator-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 22, 0.72);
  backdrop-filter: blur(4px);
}

.operator-modal__card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 20px 18px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.operator-modal__card--accent {
  border-color: rgba(0, 224, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 120, 200, 0.2);
}

.operator-modal__lead {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.operator-modal__question {
  margin: 0 0 14px;
  font-weight: 700;
  line-height: 1.65;
}

.operator-modal__hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.transfer-window-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.transfer-window-btn {
  flex: 1 1 30%;
  min-width: 100px;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(10, 22, 40, 0.9));
  color: #e8f1ff;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.transfer-window-btn:hover {
  border-color: rgba(0, 224, 255, 0.45);
}

.transfer-incoming-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.transfer-incoming-actions .btn {
  flex: 1 1 140px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.operator-top-row--generic .generic-operator-form {
  margin-bottom: 0;
}

.operator-top-row .hint-cards {
  min-width: 0;
}

.operator-top-row .availability-zone {
  display: flex;
  margin-bottom: 0;
  position: relative;
  z-index: 6;
  min-width: 150px;
}

#availabilityBtn {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
}

#availabilityBtn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.operator-top-row .btn.btn-toggle.btn-toggle-tall {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-width: none;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px 14px;
  font-size: 1.2rem;
  line-height: 1.35;
  border-radius: 16px;
}

.operator-top-row .btn.btn-toggle.btn-toggle-tall .btn-icon {
  font-size: 2.2rem;
}

.operator-top-row .btn.btn-toggle.btn-toggle-tall .btn-text {
  font-size: 1.15rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .operator-top-row,
  .operator-top-row--generic {
    grid-template-columns: 1fr;
    direction: rtl;
  }
  .operator-pillar {
    width: 100%;
    min-width: 0;
    min-height: 72px;
  }
  .operator-top-row .btn.btn-toggle.btn-toggle-tall {
    min-height: 72px;
    flex-direction: row;
  }
}

.availability-zone {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.hint-text {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
}

.feedback-msg {
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
  direction: rtl;
  text-align: right;
}

.feedback-msg__row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  direction: rtl;
}

.feedback-msg__row .feedback-line {
  flex: 1 1 0;
  min-width: min(100%, 220px);
  margin: 0;
}

.feedback-line {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.65;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  unicode-bidi: plaintext;
}

.feedback-line--primary {
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

.feedback-line--success {
  background: color-mix(in srgb, var(--success) 14%, var(--card));
  border-color: color-mix(in srgb, var(--success) 32%, var(--line));
}

.feedback-line--accent {
  background: color-mix(in srgb, #90e46e 22%, rgb(16 38 52 / 88%));
  border-color: color-mix(in srgb, #00d437 45%, var(--line));
}

.feedback-line--warning {
  background: color-mix(in srgb, #ff2c28 24%, rgb(17 12 12 / 88%));
  border-color: color-mix(in srgb, #ff2c28 55%, var(--line));
}

.feedback-line--danger {
  background: color-mix(in srgb, var(--danger) 12%, var(--card));
}

.feedback-line--info,
.feedback-line--muted {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
}

.ticket-num {
  color: #133a89;
  background: linear-gradient(180deg, #e8f0ff 0%, #c5d8f5 100%);
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(19, 58, 137, 0.2);
  border: 1px solid rgba(19, 58, 137, 0.22);
}

.rtl-text {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
}

.highlight-box {
  font-size: 1.2rem;
  padding: 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--success) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--success) 25%, var(--line));
  direction: rtl;
  text-align: right;
}

.current-status-main {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.current-status-sub {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.window-num {
  color: var(--primary);
  font-weight: 900;
  unicode-bidi: isolate;
}

.status-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.status-subtitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--muted);
}

.history-filter-wrap {
  margin-inline-start: auto;
}

.history-filter-select {
  min-width: 110px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 800;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  background: color-mix(in srgb, var(--primary) 6%, var(--card));
  color: var(--text);
  cursor: pointer;
}

.operator-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.operator-history-head,
.operator-history-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr .7fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.operator-history-head span,
.operator-history-item > span {
  min-width: 0;
  text-align: center;
  justify-self: stretch;
}

.operator-history-head {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  border: 1px dashed color-mix(in srgb, var(--primary) 22%, var(--line));
}

.history-ticket {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.operator-history-item {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 50%, var(--card));
}

.operator-history-item.is-done {
  border-color: color-mix(in srgb, var(--success) 30%, var(--line));
}

.operator-history-item.is-skipped {
  border-color: color-mix(in srgb, var(--warning) 35%, var(--line));
}

.history-status {
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.history-window {
  font-weight: 800;
  font-size: 0.92rem;
  text-align: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg) 70%, var(--card));
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 120px;
  margin-inline: auto;
}

.history-window.is-mine {
  color: #0d3d6e;
  background: linear-gradient(180deg, #d4ebff 0%, #9fd0ff 100%);
  border-color: #4a9ae6;
  box-shadow: 0 2px 10px rgba(37, 99, 167, 0.28);
  max-width: 104px;
}

.history-time {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.history-date {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.35;
  white-space: nowrap;
}

.history-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-announce-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(0, 224, 255, 0.22);
  background: linear-gradient(160deg, rgba(0, 224, 255, 0.18) 0%, rgba(19, 58, 137, 0.08) 100%);
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.history-announce-btn:hover { transform: translateY(-2px); filter: brightness(1.03); }
.history-announce-btn:active { transform: translateY(1px); }

.operator-history-empty {
  padding: 12px;
  color: var(--muted);
  text-align: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 60%, var(--card));
}

.operator-actions {
  margin-top: 8px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ticket-preview {
  margin-top: 12px;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 1.2px;
  text-align: center;
}

.ticket-preview .ticket-num,
.big-number .ticket-num {
  font-size: inherit;
  padding: 4px 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
}

.table th {
  color: var(--primary2);
  font-weight: 900;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.status-box {
  font-size: 1.16rem;
  color: var(--muted);
  line-height: 1.8;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.metric h3 {
  margin-top: 0;
  color: var(--muted);
}

.metric-value {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--primary);
}

.display-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 18px;
}

/* معاينة شاشة المناداة — تجاوز قواعد الشاشة الكاملة (تُحمَّل بعد .display-screen) */
main.display-screen.display-screen--preview {
  min-height: 720px;
  max-height: 720px;
  height: 720px;
  display: flex;
  flex-direction: column;
  grid-template-rows: unset;
  gap: 0;
  padding: 8px 10px 10px;
  overflow: hidden;
}

main.display-screen.display-screen--preview .display-header {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-height: 68px;
  max-height: 88px;
}

main.display-screen.display-screen--preview .now-serving {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.display-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.display-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.display-brand-text {
  display: grid;
  gap: 2px;
  color: var(--text);
}

.display-title-ar {
  font-size: 1.08rem;
  font-weight: 900;
}

.display-title-en {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}

.display-window-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--primary) 18%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
}

.clock {
  font-size: 1.18rem;
  color: var(--muted);
  white-space: nowrap;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

.now-serving {
  text-align: center;
  display: grid;
  align-content: center;
  gap: clamp(20px, 4.5vh, 40px);
  line-height: 1.55;
}

.now-serving__label {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: var(--muted);
  line-height: 1.7;
}

.now-serving-window-block {
  display: grid;
  gap: 12px;
  margin-top: 0;
  justify-items: center;
  line-height: 1.55;
}

.now-serving__goto {
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.45;
}

.big-number {
  font-size: clamp(5rem, 22vw, 15rem);
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1.05;
  color: #ffffff;
  margin: clamp(8px, 2vh, 20px) 0 clamp(12px, 2.5vh, 28px);
  text-shadow:
    0 0 28px color-mix(in srgb, var(--primary) 42%, transparent),
    0 0 56px color-mix(in srgb, var(--primary) 28%, transparent);
  animation:
    popIn 0.5s ease,
    bigNumberGlow 2.8s ease-in-out infinite;
  will-change: text-shadow, filter;
}

@keyframes bigNumberGlow {
  0%, 100% {
    text-shadow:
      0 0 22px color-mix(in srgb, var(--primary) 38%, transparent),
      0 0 44px color-mix(in srgb, var(--primary) 26%, transparent),
      0 0 72px color-mix(in srgb, var(--primary) 14%, transparent);
    filter: brightness(1);
  }
  50% {
    text-shadow:
      0 0 36px color-mix(in srgb, var(--primary) 58%, transparent),
      0 0 68px color-mix(in srgb, var(--primary) 42%, transparent),
      0 0 110px color-mix(in srgb, var(--primary) 24%, transparent);
    filter: brightness(1.08);
  }
}

.window-number {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  color: var(--success);
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 0 18px color-mix(in srgb, var(--success) 28%, transparent);
}

.recent-calls ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.upcoming-calls ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.recent-calls li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.upcoming-calls li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

/* Ø´Ø§Ø´Ø© Ø§Ù„Ù…Ù†Ø§Ø¯Ø§Ø©: Ø¢Ø®Ø± 3 Ø£Ø±Ù‚Ø§Ù… Ø´ÙØ§ÙØ© ÙŠØ³Ø§Ø± */
.recent-calls {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: min(360px, 34vw);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.upcoming-calls {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: min(420px, 38vw);
  padding: 16px 18px 16px 40px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  overflow: visible;
}

.upcoming-calls--slim {
  width: min(420px, 38vw);
  padding: 16px 18px 16px 44px;
  overflow: visible;
}

.upcoming-calls--slim ul {
  gap: 10px;
}

.upcoming-calls--slim .upcoming-calls li,
.upcoming-calls--slim li.upcoming-item {
  padding: 12px 14px;
  border-radius: 14px;
  min-height: 52px;
}

.upcoming-calls--slim .upcoming-num {
  font-size: 2rem;
}

.upcoming-calls--slim h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

@media (max-width: 900px) {
  .recent-calls {
    position: static;
    width: auto;
    transform: none;
    margin-top: 12px;
  }
  .upcoming-calls {
    position: static;
    width: auto;
    transform: none;
    margin-top: 12px;
  }
}

.recent-calls h3 {
  margin: 0 0 10px;
  color: #fff;
  font-weight: 900;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  direction: ltr;
}

.recent-calls h3 .panel-ico {
  margin-inline-end: 0;
  margin-inline-start: 0;
  order: -1;
}

.upcoming-calls h3 {
  margin: 0 0 12px;
  color: #fff;
  font-weight: 900;
  font-size: 1.35rem;
}

.recent-calls li {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.upcoming-calls li {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.recent-call-main { color: #fff; }
.recent-call-time { color: rgba(255, 255, 255, 0.8); }

.upcoming-num {
  display: inline-block;
  width: auto;
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.06em;
}

.upcoming-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
}

.upcoming-item {
  position: relative;
  isolation: isolate;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.upcoming-calls--slim .upcoming-tag {
  font-size: 0.72rem;
}

.upcoming-item--next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 8px rgba(255, 255, 255, 0.08);
  animation: upcomingNextGlow 4s linear infinite;
  will-change: box-shadow;
}

.upcoming-item--next::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2), transparent 72%);
  opacity: 0.12;
  animation: upcomingGlowAura 4s linear infinite;
  will-change: opacity;
}

.upcoming-item--next .upcoming-num {
  color: #fff;
  font-size: 2.65rem;
  width: auto;
  flex: 0 1 auto;
  animation: upcomingNumGlow 4s linear infinite;
  will-change: text-shadow;
}

.upcoming-arrow {
  position: absolute;
  left: -36px;
  top: 50%;
  color: #ffd400;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 4px rgba(255, 212, 0, 0.25);
  animation: upcomingArrowPulse 4s linear infinite;
  will-change: transform, opacity;
}

.upcoming-ready {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.65);
  flex-shrink: 0;
  margin-inline-end: 10px;
  position: relative;
  right: -4px;
}

.upcoming-calls--slim .upcoming-item--next {
  min-height: 64px;
}

.upcoming-calls--slim .upcoming-item--next .upcoming-num {
  font-size: 2.65rem;
  width: auto;
  flex: 0 1 auto;
}

/* ØªÙˆÙ‡Ø¬ Ø®ÙÙŠÙ Ø¬Ø¯Ø§Ù‹ â€” Ø­Ù„Ù‚Ø© Ù…ØªØµÙ„Ø© */
@keyframes upcomingNextGlow {
  0%, 100% {
    background-color: rgba(255, 255, 255, 0.19);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.38),
      0 0 6px rgba(255, 255, 255, 0.06);
  }
  50% {
    background-color: rgba(255, 255, 255, 0.22);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.48),
      0 0 10px rgba(255, 255, 255, 0.1);
  }
}

@keyframes upcomingGlowAura {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.16; }
}

@keyframes upcomingNumGlow {
  0%, 100% { text-shadow: 0 0 4px rgba(255, 255, 255, 0.12); }
  50% { text-shadow: 0 0 8px rgba(255, 255, 255, 0.2); }
}

@keyframes upcomingArrowPulse {
  0%, 100% {
    transform: translateY(-50%) translateX(0);
    opacity: 0.82;
  }
  50% {
    transform: translateY(-50%) translateX(5px);
    opacity: 0.92;
  }
}

.panel-ico {
  color: rgba(255, 255, 255, 0.9);
  margin-inline-end: 6px;
}

.recent-call-main {
  font-weight: 800;
}

.recent-call-time {
  margin-inline-start: auto;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}

.hero-instructions h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.hero-instructions p { margin: 0; color: var(--muted); }

.process-card {
  display: grid;
  gap: 10px;
  background: linear-gradient(130deg, color-mix(in srgb, var(--primary) 18%, var(--card)), color-mix(in srgb, var(--primary2) 16%, var(--card)));
}

.process-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.process-step {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--text);
}

.process-arrow {
  color: var(--primary);
  font-size: 1.3rem;
}

.instruction-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.instruction-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.instruction-card ol {
  margin: 0;
  padding-inline-start: 22px;
  line-height: 1.95;
  color: var(--text);
}

.instruction-card li::marker {
  color: var(--primary);
  font-weight: 900;
}

.error-text { color: var(--danger); margin: 0; }


@media (max-width: 980px) {
  .top-nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nav-brand-block,
  .nav-links,
  .user-box { justify-self: stretch; }
  .nav-links { justify-content: center; width: 100%; }
}

@media (max-width: 760px) {
  .display-header { flex-direction: column; align-items: flex-start; }
  .display-logo-img { width: 80px; height: 80px; }
  .display-title-ar { font-size: .95rem; }
  .display-title-en { font-size: .74rem; }
  .process-arrow { transform: rotate(90deg); }
}

@keyframes popIn {
  from { transform: translateY(8px) scale(.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* â€”â€” Home â€”â€” */
.home-page { gap: 20px; }

.home-page {
  grid-template-rows: auto 1fr;
  min-height: calc(100vh - 140px);
}

.home-welcome-card {
  margin-bottom: 4px;
}

.home-welcome-name {
  color: #ffc35b;
  font-weight: 900;
}

.home-welcome-card .reception-daily-card__greeting {
  justify-content: center;
  text-align: center;
}

.reception-daily-card__headline {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
}

.reception-daily-card__headline .reception-daily-card__icon {
  margin: 0;
}

.reception-daily-card__headline .reception-daily-card__title {
  margin: 0;
  white-space: nowrap;
}

.reception-daily-card__body {
  flex: 1;
  display: grid;
  gap: 10px;
}

.home-welcome-card .reception-daily-card__body {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.home-welcome-card__lead {
  white-space: nowrap;
}

.reception-daily-card__title--morning {
  color: #fab462;
}

.reception-daily-card__title--evening {
  color: #00e0ff;
}

.reception-daily-card__subtitle {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  max-width: 42rem;
}

.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  .home-tiles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .home-tiles-grid { grid-template-columns: 1fr; }
}

.home-tile {
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 20px 14px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: #e8f1ff;
  border: 1px solid rgba(0, 224, 255, 0.14);
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.86) 0%, rgba(10, 22, 40, 0.82) 55%, rgba(16, 33, 52, 0.86) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: homeTileIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--delay, 0s);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  align-content: center;
  min-height: 148px;
}

.home-tile::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 224, 255, 0.16), transparent 70%);
  animation: homeGlow 4s ease-in-out infinite;
}

.home-tile:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 55px rgba(0, 224, 255, 0.14);
  border-color: rgba(0, 224, 255, 0.26);
  background: linear-gradient(155deg, rgba(19, 58, 137, 0.36) 0%, rgba(10, 22, 40, 0.86) 55%, rgba(0, 224, 255, 0.14) 100%);
}

.home-tile::after {
  content: none;
}

.home-tile:hover .home-tile__icon {
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

.home-tile__icon {
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* homeShine removed */

/* تذييل الموقع — ثابت أسفل الصفحة (مستر تك) */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > .top-nav {
  flex-shrink: 0;
}

body > main {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

.home-footer,
.app-site-footer {
  flex-shrink: 0;
  margin-top: auto;
  text-align: center;
  padding: 12px 16px 18px;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  font-size: 0.78rem;
  width: 100%;
  max-width: var(--container, 1200px);
  margin-inline: auto;
  box-sizing: border-box;
}

body > .app-site-footer {
  margin-top: auto;
}

.home-footer p,
.home-footer div {
  margin: 0;
}

.mrtech-link {
  position: relative;
  color: #bacdf2;
  text-decoration: none;
  font-weight: 900;
}

.mrtech-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: linear-gradient(90deg, #00e0ff, #133a89, #00e0ff);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.mrtech-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.home-tile__icon {
  font-size: clamp(3rem, 6.5vw, 4rem);
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
  animation: homeIconFloat 3s ease-in-out infinite;
}

.home-tile__title {
  font-size: 1.28rem;
  font-weight: 900;
  color: #00e0ff;
}

.home-tile__subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-tile.tile-a { border-color: color-mix(in srgb, #3b82f6 35%, var(--line)); }
.home-tile.tile-b { border-color: color-mix(in srgb, #10b981 35%, var(--line)); }
.home-tile.tile-c { border-color: color-mix(in srgb, #8b5cf6 35%, var(--line)); }
.home-tile.tile-d { border-color: color-mix(in srgb, #f59e0b 35%, var(--line)); }
.home-tile.tile-e { border-color: color-mix(in srgb, #06b6d4 35%, var(--line)); }
.home-tile.tile-f { border-color: color-mix(in srgb, #ec4899 35%, var(--line)); }
.home-tile.tile-profile { border-color: color-mix(in srgb, #ec4899 35%, var(--line)); }
.home-tile.tile-chat { border-color: color-mix(in srgb, #14b8a6 35%, var(--line)); }
.home-tile.tile-kiosk { border-color: color-mix(in srgb, #2dd4bf 38%, var(--line)); }
.home-tile.tile-g { border-color: color-mix(in srgb, #6366f1 35%, var(--line)); }
.home-tile.tile-logout { border-color: color-mix(in srgb, #f87171 40%, var(--line)); }

.home-tile--action {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.home-tile--logout {
  background: linear-gradient(
    155deg,
    rgba(127, 29, 29, 0.55) 0%,
    rgba(10, 22, 40, 0.82) 50%,
    rgba(153, 27, 27, 0.4) 100%
  );
}

.home-tile--logout .home-tile__title {
  color: #fecaca;
}

.home-tile--logout:hover {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 24px 55px rgba(248, 113, 113, 0.12);
}

body.phms-assistant-open {
  overflow: hidden;
}

.phms-assistant {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: "Cairo", sans-serif;
}

.phms-assistant--open {
  display: flex;
}

.phms-assistant__backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(4, 10, 24, 0.72);
  backdrop-filter: blur(4px);
}

.phms-assistant__panel {
  position: relative;
  z-index: 2;
  width: min(1140px, 98vw);
  max-height: min(92vh, 900px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(0, 224, 255, 0.35);
  background: linear-gradient(165deg, #0f2347 0%, #0a1424 100%);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.phms-assistant__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.phms-assistant__kicker {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: rgba(125, 211, 252, 0.9);
  font-weight: 700;
}

.phms-assistant__head h2 {
  margin: 0;
  font-size: 1.45rem;
  color: #f0f7ff;
}

.phms-assistant__close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.phms-assistant__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.phms-assistant__chip {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.phms-assistant__chip:hover {
  border-color: rgba(0, 224, 255, 0.45);
  background: rgba(0, 224, 255, 0.1);
}

.phms-assistant__messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phms-assistant__msg {
  max-width: 96%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.phms-assistant__msg--bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

.phms-assistant__msg--user {
  align-self: flex-end;
  background: rgba(0, 224, 255, 0.14);
  border: 1px solid rgba(0, 224, 255, 0.32);
  color: #f0f9ff;
}

.phms-assistant__msg p {
  margin: 0;
}

.phms-assistant__typing {
  margin: 0;
  color: rgba(148, 163, 184, 0.9);
  font-style: italic;
}

.phms-assistant-flow {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}

.phms-assistant-flow__title {
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: 800;
  color: #7dd3fc;
}

.phms-assistant-flow__track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.phms-assistant-flow__step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgb(171 220 249);
  border: 1px solid rgba(0, 224, 255, 0.22);
}

.phms-assistant-flow__num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.15rem;
  color: #0a1424;
  background: linear-gradient(145deg, #7dd3fc, #38bdf8);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

.phms-assistant-flow__body {
  display: grid;
  gap: 2px;
  text-align: right;
}

.phms-assistant-flow__body strong {
  font-size: 1.05rem;
  color: #03396f;
}

.phms-assistant-flow__body small {
  font-size: 0.95rem;
  color: rgb(0 0 0 / 88%);
  line-height: 1.55;
}

.phms-assistant-flow__arrow {
  color: rgba(125, 211, 252, 0.85);
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 0;
}

.phms-assistant__composer {
  flex-shrink: 0;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  position: relative;
  z-index: 3;
  background: inherit;
}

.phms-assistant__composer textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #f0f7ff;
  padding: 14px 16px;
  font-size: 1.05rem;
  line-height: 1.55;
  resize: vertical;
  font-family: inherit;
}

.phms-assistant__composer .phms-assistant__send,
.phms-assistant__send.btn {
  font-size: 1.05rem;
  padding: 12px 16px;
  font-weight: 800;
}

.phms-assistant__composer-row .phms-assistant__send {
  width: auto;
  cursor: pointer;
  pointer-events: auto;
}

.phms-assistant__send:disabled {
  opacity: 0.65;
  cursor: wait;
}

@keyframes homeTileIn {
  from { opacity: 0; transform: translateY(24px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes homeIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes homeGlow {
  0%, 100% { opacity: 0.5; transform: translate(0, 0); }
  50% { opacity: 1; transform: translate(-8px, 8px); }
}

/* â€”â€” Profile â€”â€” */
.profile-page { max-width: 640px; margin-inline: auto; }

.profile-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(232, 240, 255, 0.9) 100%);
  border: 1px solid rgba(19, 58, 137, 0.18);
  box-shadow: 0 18px 44px rgba(19, 58, 137, 0.12);
}

.profile-card h2 {
  margin: 0 0 6px;
  color: #133a89;
}

.profile-card .muted {
  color: #223b5c;
  opacity: 0.85;
  font-weight: 800;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
  border: none;
  box-shadow: 0 8px 24px rgba(63, 111, 255, 0.2);
}

.profile-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  color: #000;
  font-weight: 800;
}

.field-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.field-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(19, 58, 137, 0.08);
  color: #133a89;
  flex-shrink: 0;
}

.field-control input {
  border: none;
  background: transparent;
  padding: 0;
  outline: none;
  width: 100%;
}

.field-control:focus-within {
  outline: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
  border-color: var(--primary);
}

.avatar-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 18px;
  border: 1px dashed rgba(19, 58, 137, 0.28);
  background: rgba(232, 240, 255, 0.6);
}

.avatar-picker__meta {
  display: grid;
  gap: 2px;
}

.avatar-picker__title {
  font-weight: 900;
  color: #133a89;
}

.avatar-picker__hint {
  font-size: 0.8rem;
  color: #607798;
}

.avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, #133a89, #2563eb);
  box-shadow: 0 14px 30px rgba(19, 58, 137, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.avatar-btn:hover { transform: translateY(-2px); filter: brightness(1.03); }
.avatar-btn:active { transform: translateY(1px); }

.avatar-btn__ico { font-size: 1.1rem; }

.muted { color: var(--muted); margin: 4px 0 0; }

.status-box.success {
  color: var(--success);
  font-weight: 800;
}

/* â€”â€” Dashboard â€”â€” */
.dashboard-page { gap: 18px; }

.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(125deg, #071a3a 0%, #133a89 45%, #00e0ff 140%);
  color: #fff;
  border: none;
}

.dash-hero h1 { margin: 0 0 4px; font-size: 1.5rem; }
.dash-hero p { margin: 0; opacity: 0.88; font-size: 0.92rem; }

.dash-stat-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 1.85rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.dash-chart-head--mini {
  align-items: flex-start;
}

.dash-chart-filters--period {
  flex-shrink: 0;
}

.dash-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  animation: dashPulse 2s ease infinite;
}

.dash-live-pill--green::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.85);
  animation: dashLiveDot 1.4s ease-in-out infinite;
}

@keyframes dashLiveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.88); }
}

@keyframes dashPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.dash-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dash-kpi-strip--top .dash-kpi {
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.9) 0%, rgba(10, 22, 40, 0.86) 55%, rgba(16, 33, 52, 0.9) 100%);
  border: 1px solid rgba(0, 224, 255, 0.12);
}

.dash-kpi {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.9) 0%, rgba(10, 22, 40, 0.86) 55%, rgba(16, 33, 52, 0.9) 100%);
  border: 1px solid rgba(0, 224, 255, 0.12);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  overflow: hidden;
}

.dash-kpi::before {
  content: "";
  position: absolute;
  inset: -60% -30% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 224, 255, 0.22), transparent 70%);
  opacity: 0.9;
  pointer-events: none;
}

.dash-kpi:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 46px rgba(19, 58, 137, 0.18);
  filter: saturate(1.05);
}

.dash-kpi span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
}

.dash-kpi strong {
  font-size: 1.65rem;
  color: #00e0ff;
}

.dash-kpi i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 1.9rem;
  opacity: 0.85;
  color: rgba(255, 255, 255, 0.9);
}

.dash-kpi span {
  font-size: 0.95rem;
}

.dash-kpi strong {
  font-size: 1.85rem;
}

.dash-kpi--avg strong {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dash-windows-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dash-window-card {
  position: relative;
  padding: 20px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.92) 0%, rgba(10, 22, 40, 0.88) 55%, rgba(16, 33, 52, 0.92) 100%);
  border: 1px solid rgba(0, 224, 255, 0.12);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  display: grid;
  gap: 10px;
}

.dash-window-card::after {
  content: "";
  position: absolute;
  top: -30px;
  left: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(19, 58, 137, 0.06);
}

.dash-window-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 224, 255, 0.12);
  color: #00e0ff;
  font-weight: 900;
  font-size: 1rem;
  border: 1px solid rgba(0, 224, 255, 0.18);
}

.dash-window-card h3 {
  margin: 0 0 2px;
  font-size: 1.15rem;
  color: #00e0ff;
}

.dash-window-emp {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.dash-window-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-window-ico {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(0, 224, 255, 0.10);
  border: 1px solid rgba(0, 224, 255, 0.14);
  font-size: 1.3rem;
}

.dash-window-metric {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 18px;
  background: rgba(0, 224, 255, 0.06);
  border: 1px solid rgba(0, 224, 255, 0.10);
}

.dash-window-metric span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.dash-window-value {
  font-size: 2.5rem;
  color: #00e0ff;
  line-height: 1;
}

.dash-window-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  padding-top: 4px;
}

.dash-window-emp {
  font-size: 0.9rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.9);
}

.dash-window-sub b {
  color: #fff;
  font-weight: 900;
}

.dash-chart-card h3 {
  margin: 0 0 4px;
}

.dash-chart-card {
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.92) 0%, rgba(10, 22, 40, 0.88) 55%, rgba(16, 33, 52, 0.92) 100%);
  border: 1px solid rgba(0, 224, 255, 0.12);
}

.dash-chart-wrap canvas,
.dash-chart-wrap--tall canvas {
  background: rgba(10, 22, 40, 0.55);
  border-radius: 18px;
  border: 1px solid rgba(0, 224, 255, 0.12);
  padding: 10px;
}

.dash-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dash-chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-chart-filters label {
  min-width: 120px;
}

.dash-chart-wrap {
  position: relative;
  height: 220px;
}

.dash-chart-wrap--tall {
  height: 280px;
}

.dash-mini-charts-card .dash-chart-head {
  margin-bottom: 10px;
}

.dash-mini-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-chart-block {
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.92) 0%, rgba(10, 22, 40, 0.88) 55%, rgba(16, 33, 52, 0.92) 100%);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 20px;
  padding: 14px 12px 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.mini-chart-block h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.mini-chart-block canvas {
  width: 100% !important;
  height: 160px !important;
}

/* â€”â€” Instructions guide â€”â€” */
.guide-page { gap: 18px; }

.guide-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 28px 22px;
  background: linear-gradient(135deg, #0c1f3d 0%, #1a4080 45%, #2d6bb5 100%);
  color: #fff;
  border: none;
}

.guide-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(400px 200px at 20% 0%, rgba(120, 180, 255, 0.35), transparent),
    radial-gradient(300px 180px at 90% 100%, rgba(80, 220, 200, 0.2), transparent);
  animation: guideShimmer 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes guideShimmer {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.guide-kicker {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.guide-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  position: relative;
}

.guide-hero > p {
  margin: 0 auto 16px;
  max-width: 520px;
  opacity: 0.9;
  position: relative;
}

.guide-hero-line {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .guide-hero-line { white-space: normal; }
}

.guide-hero-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.guide-hero-flow .flow-step {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.85rem;
  opacity: 0.82;
  animation: none;
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.25s ease, opacity 0.35s ease;
}

.guide-hero-flow .flow-step.flow-step--active {
  opacity: 1;
  transform: translateY(-1px);
}

.guide-hero-flow .flow-step.flow-step--active,
.guide-hero-flow .flow-step:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.42), rgba(16, 185, 129, 0.22));
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.25);
}

.guide-hero-flow .flow-step b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-inline-end: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.85rem;
  line-height: 1;
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.guide-hero-flow .flow-step.flow-step--active b,
.guide-hero-flow .flow-step:hover b {
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.65);
}

.flow-step--5 b {
  background: rgba(0, 224, 255, 0.22);
  color: #0b1c35;
  border: 1px solid rgba(0, 224, 255, 0.25);
}

.guide-hero-flow .flow-arrow {
  font-style: normal;
  opacity: 0.85;
  font-weight: 900;
  animation: guideArrow 1.2s ease-in-out infinite;
}

@keyframes guideFlowPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes guideArrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.guide-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 8px 0 20px;
}

.guide-path-line {
  position: absolute;
  top: 50%;
  right: 4%;
  left: 4%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #133a89, transparent);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.guide-step-card {
  position: relative;
  z-index: 1;
  padding: 22px 16px 18px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.guide-step-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}


.guide-step-card[data-step="1"] { transition-delay: 0.02s; }
.guide-step-card[data-step="2"] { transition-delay: 0.06s; }
.guide-step-card[data-step="3"] { transition-delay: 0.1s; }
.guide-step-card[data-step="4"] { transition-delay: 0.14s; }
.guide-step-card[data-step="5"] { transition-delay: 0.18s; }
.guide-step-card[data-step="6"] { transition-delay: 0.22s; }

@media (prefers-reduced-motion: reduce) {
  .guide-hero-flow .flow-arrow,
  .guide-step-icon {
    animation: none !important;
  }
  .guide-step-card {
    opacity: 1;
    transform: none;
  }
}

.guide-step-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 900;
  color: #00e0ff;
  background: rgba(19, 58, 137, 0.1);
  border: 2px solid rgba(19, 58, 137, 0.22);
  backdrop-filter: blur(4px);
}

.guide-step-icon {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 8px;
  animation: guideIconPulse 2.4s ease-in-out infinite;
}

@keyframes guideIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.guide-step-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #00e0ff;
}

.guide-step-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
}

.guide-step-card[data-step="1"] { border-top: 4px solid #3b82f6; }
.guide-step-card[data-step="2"] { border-top: 4px solid #10b981; }
.guide-step-card[data-step="3"] { border-top: 4px solid #f59e0b; }
.guide-step-card[data-step="4"] { border-top: 4px solid #8b5cf6; }
.guide-step-card[data-step="5"] { border-top: 4px solid #ef4444; }
.guide-step-card[data-step="6"] { border-top: 4px solid #133a89; }

.guide-tips-list {
  margin: 0;
  padding-inline-start: 22px;
  line-height: 1.9;
}

.guide-tips {
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.92) 0%, rgba(10, 22, 40, 0.88) 55%, rgba(16, 33, 52, 0.92) 100%);
  border: 1px solid rgba(0, 224, 255, 0.12);
}

.guide-tips h2 {
  margin-top: 0;
  color: #00e0ff;
  text-shadow: none;
}

.guide-tips-list li {
  padding: 10px 10px;
  border-radius: 14px;
  margin: 8px 0;
  background: rgba(0, 224, 255, 0.08);
  border: 1px solid rgba(0, 224, 255, 0.14);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.82);
}

.guide-tips-list--rich {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  margin: 8px 0;
  border: 1px solid transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  text-align: right;
}

.guide-tip__ico {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.25rem;
  line-height: 1;
}

.guide-tip__body {
  flex: 1;
  min-width: 0;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

.guide-tip__title {
  display: block;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.guide-tip--kiosk { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); }
.guide-tip--kiosk .guide-tip__ico { background: rgba(16, 185, 129, 0.22); }
.guide-tip--kiosk .guide-tip__title { color: #34d399; }

.guide-tip--reception { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); }
.guide-tip--reception .guide-tip__ico { background: rgba(245, 158, 11, 0.22); }
.guide-tip--reception .guide-tip__title { color: #fbbf24; }

.guide-tip--operator { background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.35); }
.guide-tip--operator .guide-tip__ico { background: rgba(139, 92, 246, 0.22); }
.guide-tip--operator .guide-tip__title { color: #c4b5fd; }

.guide-tip--display { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.32); }
.guide-tip--display .guide-tip__ico { background: rgba(239, 68, 68, 0.2); }
.guide-tip--display .guide-tip__title { color: #fca5a5; }

.guide-tip--admin { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.35); }
.guide-tip--admin .guide-tip__ico { background: rgba(59, 130, 246, 0.22); }
.guide-tip--admin .guide-tip__title { color: #93c5fd; }

.guide-tip--avail { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.32); }
.guide-tip--avail .guide-tip__ico { background: rgba(34, 197, 94, 0.22); color: #4ade80; }

.guide-tip--finish { background: rgba(14, 165, 233, 0.12); border-color: rgba(14, 165, 233, 0.32); }
.guide-tip--finish .guide-tip__ico { background: rgba(14, 165, 233, 0.22); color: #38bdf8; }

.guide-tip--transfer { background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.32); }
.guide-tip--transfer .guide-tip__ico { background: rgba(168, 85, 247, 0.22); color: #c084fc; }

.guide-tip--next { background: rgba(6, 182, 212, 0.12); border-color: rgba(6, 182, 212, 0.32); }
.guide-tip--next .guide-tip__ico { background: rgba(6, 182, 212, 0.22); color: #22d3ee; }

.guide-tip--history { background: rgba(251, 146, 60, 0.12); border-color: rgba(251, 146, 60, 0.32); }
.guide-tip--history .guide-tip__ico { background: rgba(251, 146, 60, 0.22); color: #fb923c; }

.guide-tip--preview { background: rgba(99, 102, 241, 0.12); border-color: rgba(99, 102, 241, 0.32); }
.guide-tip--preview .guide-tip__ico { background: rgba(99, 102, 241, 0.22); color: #a5b4fc; }

.guide-cinema h2 { margin-top: 0; }

.cinema-stage {
  position: relative;
  min-height: 280px;
  margin-top: 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, #0a1628, #1a3560);
  overflow: hidden;
  border: 1px solid rgba(120, 160, 255, 0.25);
}

.cinema-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 52px 24px 56px;
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.cinema-scene-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.cinema-scene--active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.cinema-emoji {
  font-size: 3rem;
  animation: cinemaBounce 2s ease infinite;
}

@keyframes cinemaBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.cinema-scene strong { font-size: 1.15rem; }
.cinema-scene small { opacity: 0.8; }

.cinema-progress {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}

.cinema-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.3s ease, transform 0.3s ease;
}

.cinema-dot.is-on {
  background: #7dd3fc;
  transform: scale(1.25);
}

/* â€”â€” Reception â€”â€” */
.reception-page { gap: 16px; }

.reception-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reception-pager .btn.btn-sm {
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 800;
}

.reception-pager .btn.btn-sm.primary,
.reception-pager .btn.btn-sm:not(:disabled) {
  background: linear-gradient(135deg, rgba(35, 248, 116, 0.34) 0%, rgba(10, 22, 40, 0.86) 55%, rgba(0, 224, 255, 0.18) 100%);
  border: 1px solid rgba(35, 248, 116, 0.25);
  color: #e8f1ff;
}

.reception-pager .btn.btn-sm.secondary:not(.primary) {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(0, 224, 255, 0.14);
  color: rgba(232, 241, 255, 0.85);
}

.reception-pager__nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.reception-pager__page {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(35, 248, 116, 0.34) 0%, rgba(10, 22, 40, 0.86) 55%, rgba(0, 224, 255, 0.18) 100%);
  border: 1px solid rgba(35, 248, 116, 0.25);
  color: #e8f1ff;
  font-weight: 900;
}

.reception-pager__range {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  padding: 0 4px;
  letter-spacing: 0.02em;
}

.reception-pager .btn:disabled {
  opacity: 0.55;
  transform: none;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  color: rgba(232, 241, 255, 0.45) !important;
}

.reception-daily-card {
  background: linear-gradient(135deg, rgba(16, 33, 52, 0.95) 0%, rgba(19, 58, 137, 0.55) 100%);
  border: 1px solid rgba(0, 224, 255, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.reception-daily-card__greeting {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
}

.reception-page .reception-daily-card__greeting {
  align-items: stretch;
}

.reception-page .reception-daily-card__body {
  flex: 1;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.reception-page .reception-daily-card__lead,
.reception-page .reception-daily-note,
.reception-page .reception-daily-extra {
  max-width: none;
  width: 100%;
  text-align: center;
}

.reception-daily-issued {
  font-size: 1.22em;
  padding: 4px 16px;
  box-shadow: 0 0 0 1px rgba(35, 248, 116, 0.35);
}

.reception-page .reception-daily-card__lead {
  text-wrap: pretty;
}

.reception-daily-card__icon {
  font-size: 2.4rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 224, 255, 0.35));
}

.reception-daily-card__title {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  color: #e8f4ff;
  line-height: 1.45;
}

.reception-daily-card__lead {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.28rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
  max-width: 44rem;
}

.reception-page .reception-daily-card__lead {
  max-width: none;
}

.reception-daily-range {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 8px;
  background: rgba(35, 248, 116, 0.14);
  color: #23f874;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.reception-daily-note,
.reception-daily-extra {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  max-width: 44rem;
  text-align: right;
}

.reception-daily-extra {
  margin-bottom: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 224, 255, 0.08);
  border: 1px dashed rgba(0, 224, 255, 0.28);
  color: rgba(255, 255, 255, 0.88);
}

.reception-issue-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.reception-issue-btn--compact {
  padding: 14px 10px;
  border-radius: 14px;
}

.reception-issue-btn--compact .reception-issue-ico {
  font-size: 1.35rem;
}

.reception-issue-btn--compact .reception-issue-title {
  font-size: 1.22rem;
}

.reception-issue-btn--compact .reception-issue-sub {
  font-size: 0.88rem;
}

.reception-issue-btn--compact .reception-issue-ico {
  font-size: 1.55rem;
}

.reception-toolbar .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.reception-toolbar .btn .btn-icon {
  margin: 0;
}

@media (max-width: 720px) {
  .reception-issue-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reception-daily-card__greeting {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .home-welcome-card__lead {
    white-space: normal;
  }
}

.reception-issue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.reception-issue-btn {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 22px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(16, 33, 52, 0.88) 0%, rgba(10, 22, 40, 0.84) 55%, rgba(16, 33, 52, 0.88) 100%);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.reception-issue-btn::before {
  content: "";
  position: absolute;
  inset: auto -30% -30% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 224, 255, 0.22), transparent 70%);
  transform: rotate(12deg);
  pointer-events: none;
}

.reception-issue-btn:hover:not(:disabled) {
  transform: translateY(-5px);
  border-color: rgba(19, 58, 137, 0.35);
  box-shadow: 0 16px 36px rgba(19, 58, 137, 0.15);
}

.reception-issue-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.reception-issue-btn--bulk {
  background: linear-gradient(155deg, rgba(19, 58, 137, 0.28) 0%, rgba(10, 22, 40, 0.84) 60%, rgba(16, 33, 52, 0.88) 100%);
}

.reception-issue-ico { font-size: 2rem; line-height: 1; }

.reception-issue-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #23f874;
}

.reception-issue-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
}

.reception-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(16, 33, 52, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
}

.reception-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reception-selected {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

#printSelectedBtn.btn.primary {
  background: linear-gradient(135deg, rgba(35, 248, 116, 0.34) 0%, rgba(10, 22, 40, 0.86) 55%, rgba(0, 224, 255, 0.18) 100%);
  border: 1px solid rgba(35, 248, 116, 0.25);
  color: #e8f1ff;
}

#printTicketBtn.btn.secondary {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(0, 224, 255, 0.12);
}

#selectNineTickets.btn.secondary {
  background: linear-gradient(135deg, rgba(0, 224, 255, 0.2) 0%, rgba(10, 22, 40, 0.75) 100%);
  border: 1px solid rgba(0, 224, 255, 0.28);
  color: #e8f1ff;
}

#ticketsTable th {
  color: #23f874;
}

.reception-msg {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.reception-msg--ok {
  background: color-mix(in srgb, var(--success) 12%, var(--card));
  color: var(--success);
}

.reception-msg--err {
  color: var(--danger);
}

.reception-table-card h3 { margin-top: 0; }

.reception-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}

.reception-table-head h3 {
  flex: 0 0 auto;
  margin: 0;
}

.reception-table-head .reception-pager {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.reception-table-head .reception-filters {
  flex: 0 0 auto;
}

.reception-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .reception-table-head {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .reception-table-head .reception-pager {
    flex: 1 1 100%;
    order: 3;
    justify-content: center;
  }
}

.reception-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.reception-filter select {
  min-width: 130px;
  border-radius: 14px;
  border: 1px solid rgba(0, 224, 255, 0.18);
  background: rgba(16, 33, 52, 0.9);
  color: #e8f1ff;
}

.ticket-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  white-space: nowrap;
}

.ticket-status__ico {
  font-size: 1rem;
  line-height: 1;
}

.ticket-status__txt {
  font-size: 0.88rem;
}

.ticket-status--waiting .ticket-status__txt { color: #7dd3fc; }
.ticket-status--called .ticket-status__txt { color: #fbbf24; }
.ticket-status--completed .ticket-status__txt { color: #23f874; }
.ticket-status--skipped .ticket-status__txt { color: #f87171; }

@media (max-width: 900px) {
  .dash-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-windows-grid { grid-template-columns: 1fr; }
  .guide-path { grid-template-columns: 1fr; }
  .guide-path-line { display: none; }
}

@media (max-width: 600px) {
  .operator-actions-dock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .op-dock-btn { min-height: 64px; }
  .op-dock-label { font-size: 0.88rem; white-space: normal; }
}

/* —— مراقبة المدير —— */
.monitor-live-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.monitor-live-card__head h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.monitor-live-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.monitor-display-preview {
  margin: 0;
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.monitor-display-preview .operator-display-preview__viewport {
  min-height: 420px;
}

.operator-preview-window-card__badge--live {
  background: rgba(35, 248, 116, 0.2);
  color: #23f874;
  border: 1px solid rgba(35, 248, 116, 0.35);
}

body.monitor-page .operator-preview-window-card {
  border-color: rgba(0, 224, 255, 0.22);
}

.monitor-live-card__hint {
  margin: 6px 0 0;
  font-size: 0.88rem;
}

.monitor-window-card {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.monitor-window-card:hover {
  border-color: rgba(0, 224, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 224, 255, 0.2);
}

.monitor-window-card--speaking {
  border-color: rgba(34, 197, 94, 0.75) !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35), 0 12px 28px rgba(34, 197, 94, 0.12);
}

.monitor-window-sound-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.monitor-window-sound-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.9);
  animation: dashLiveDot 1s ease-in-out infinite;
}

/* —— نظام المحادثة —— */
.phms-chat {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1300;
  font-family: "Cairo", sans-serif;
}

.phms-chat__fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(0, 224, 255, 0.45);
  background: linear-gradient(145deg, #133a89, #0a1628);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  position: relative;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.phms-chat__fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff2c28;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.phms-chat__panel {
  display: none;
  flex-direction: column;
  position: absolute;
  left: 0;
  bottom: 70px;
  width: min(420px, calc(100vw - 36px));
  height: min(560px, calc(100vh - 120px));
  border-radius: 18px;
  border: 1px solid rgba(0, 224, 255, 0.28);
  background: linear-gradient(165deg, #0d1f3a 0%, #0a1424 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.phms-chat--open .phms-chat__panel {
  display: flex;
}

.phms-chat__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.phms-chat__panel-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phms-chat__popout {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.phms-chat__popout:hover {
  background: rgba(0, 224, 255, 0.12);
  border-color: rgba(0, 224, 255, 0.4);
}

.phms-chat__ico {
  width: 20px;
  height: 20px;
  display: block;
  color: #fff;
  stroke: #fff;
}

.phms-chat__panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.phms-chat__close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.phms-chat__layout {
  display: grid;
  grid-template-columns: 130px 1fr;
  flex: 1;
  min-height: 0;
}

.phms-chat__sidebar {
  border-left: 1px solid rgba(148, 163, 184, 0.15);
  padding: 8px;
}

.phms-chat--page .phms-chat__sidebar {
  overflow-y: auto;
}

.phms-chat__sidebar-hint {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.6);
  line-height: 1.4;
}

.phms-chat__conv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.phms-chat__conv-btn {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #f0f7ff;
  padding: 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-align: right;
}

.phms-chat__conv-btn.is-active {
  border-color: rgba(0, 224, 255, 0.4);
  background: rgba(0, 224, 255, 0.12);
}

.phms-chat__conv-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.phms-chat__conv-text strong {
  font-size: 0.82rem;
  line-height: 1.25;
}

.phms-chat__conv-text small {
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.65);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phms-chat__main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.phms-chat__main-head {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.9rem;
}

.phms-chat__days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.phms-chat__day-btn {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.phms-chat__day-btn.is-active {
  border-color: rgba(0, 224, 255, 0.45);
  background: rgba(0, 224, 255, 0.15);
}

.phms-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phms-chat__empty {
  margin: 0;
  text-align: center;
  color: rgba(226, 232, 240, 0.55);
  font-size: 0.88rem;
}

.phms-chat__bubble {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.phms-chat__bubble--mine {
  align-self: flex-start;
  margin-inline-end: auto;
  margin-inline-start: 0;
  background: rgba(0, 224, 255, 0.12);
  border-color: rgba(0, 224, 255, 0.28);
}

.phms-chat__bubble--other {
  align-self: flex-end;
  margin-inline-start: auto;
  margin-inline-end: 0;
}

.phms-chat__bubble--mine.phms-chat__bubble--voice {
  max-width: min(96%, 360px);
}

.phms-chat__bubble--mine.phms-chat__bubble--voice audio {
  width: min(100%, 320px);
  max-width: 320px;
  min-width: 260px;
}

.phms-chat__bubble--user-admin {
  background: rgba(254, 202, 202, 0.14);
  border-color: rgba(252, 165, 165, 0.45);
}

.phms-chat__bubble--user-emp1 {
  background: rgba(254, 240, 138, 0.16);
  border-color: rgba(250, 204, 21, 0.42);
}

.phms-chat__bubble--user-emp2 {
  background: rgba(187, 247, 208, 0.14);
  border-color: rgba(134, 239, 172, 0.42);
}

.phms-chat__bubble--user-emp3 {
  background: rgba(254, 215, 170, 0.16);
  border-color: rgba(251, 146, 60, 0.42);
}

.phms-chat__bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.65);
  margin-bottom: 4px;
}

.phms-chat__bubble p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.phms-chat__bubble audio {
  width: 100%;
  max-width: 240px;
}

.phms-chat__file-link {
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: none;
}

.phms-chat__composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.phms-chat__composer-tools {
  display: flex;
  gap: 8px;
}

.phms-chat__tool-btn {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  cursor: pointer;
  color: #fff;
  font-size: 1rem;
  min-width: 48px;
  min-height: 48px;
}

.phms-chat__tool-btn .phms-chat__ico {
  width: 26px;
  height: 26px;
}

.phms-chat__tool-btn:hover {
  background: rgba(0, 224, 255, 0.12);
  border-color: rgba(0, 224, 255, 0.35);
}

.phms-chat__composer textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: #f0f7ff;
  padding: 8px 10px;
  resize: vertical;
  font-family: inherit;
}

.phms-chat__composer-row .phms-chat__send {
  width: auto;
}

.phms-chat__record-hint {
  margin: 0;
  padding: 0 10px 8px;
  font-size: 0.78rem;
  color: #f87171;
  font-weight: 700;
}

/* صفحة المحادثات — التفاصيل في chat-ui.css */
.phms-chat--page {
  position: static;
  left: auto;
  bottom: auto;
  width: 100%;
}

.phms-chat--page .phms-chat__panel {
  display: flex;
  position: static;
  width: 100%;
}

.phms-chat--page.phms-chat--open .phms-chat__panel {
  display: flex;
}

.phms-chat--page .phms-chat__layout {
  grid-template-columns: minmax(160px, 220px) 1fr;
}

@media (max-width: 520px) {
  .phms-chat__layout {
    grid-template-columns: 1fr;
  }
  .phms-chat__sidebar {
    max-height: 120px;
    border-left: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  }
  .phms-chat--page .phms-chat__layout {
    grid-template-columns: 1fr;
  }
}
