/* QueueMe admin — QPoint clarity with a distinct queue-route operating language. */
:root {
  --qm-admin-canvas: #f3f8f6;
  --qm-admin-surface: #fffdf8;
  --qm-admin-card: #ffffff;
  --qm-admin-ink: #17324d;
  --qm-admin-muted: #65788b;
  --qm-admin-line: #dce8e6;
  --qm-admin-blue: #1f57c3;
  --qm-admin-blue-deep: #163d84;
  --qm-admin-mint: #b9e4d4;
  --qm-admin-mint-deep: #23876e;
  --qm-admin-active: #eaf3ff;
}

body { background: var(--qm-admin-canvas) !important; color: var(--qm-admin-ink) !important; }
body:not(.dark) aside,
body:not(.dark) main > header,
body.bg-gray-100 > div.bg-white {
  background: rgba(255,253,248,.96) !important;
  border-color: var(--qm-admin-line) !important;
}
body:not(.dark) aside { position: relative; overflow: hidden; box-shadow: 1px 0 0 rgba(23,50,77,.02); }
body:not(.dark) aside::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  left: -106px;
  bottom: -102px;
  border: 23px solid rgba(185,228,212,.58);
  border-radius: 50%;
  pointer-events: none;
}
body:not(.dark) aside > * { position: relative; z-index: 1; }
body:not(.dark) main > header {
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(23,50,77,.03);
}
body:not(.dark) main > header::after {
  content: "";
  position: absolute;
  right: 15%;
  bottom: -23px;
  width: 138px;
  height: 49px;
  border: 2px solid rgba(35,135,110,.32);
  border-bottom: 0;
  border-radius: 66px 66px 0 0;
  transform: rotate(-8deg);
  pointer-events: none;
}
body:not(.dark) main > header::before {
  content: "";
  position: absolute;
  right: 19%;
  bottom: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--qm-admin-mint-deep);
  box-shadow: -25px -12px 0 -1px var(--qm-admin-blue), -48px 5px 0 -1px #ef8269;
  pointer-events: none;
}
body:not(.dark) main > header > * { position: relative; z-index: 1; }
body:not(.dark) .bg-background-light { background: var(--qm-admin-canvas) !important; }
body:not(.dark) .bg-surface-light,
body.bg-gray-100 .max-w-4xl .bg-white {
  background: var(--qm-admin-card) !important;
  border-color: var(--qm-admin-line) !important;
  box-shadow: 0 10px 28px rgba(23,50,77,.055) !important;
}
body:not(.dark) .border-slate-200,
body.bg-gray-100 .border-gray-300 { border-color: var(--qm-admin-line) !important; }
body:not(.dark) .text-slate-800,
body:not(.dark) .text-gray-900,
body:not(.dark) .text-gray-800,
body.bg-gray-100 h1,
body.bg-gray-100 h2 { color: var(--qm-admin-ink) !important; }
body:not(.dark) .text-slate-500,
body:not(.dark) .text-slate-600,
body:not(.dark) .text-gray-500,
body:not(.dark) .text-gray-600,
body:not(.dark) .text-gray-700 { color: var(--qm-admin-muted) !important; }
.text-primary, .text-blue-600, .text-blue-500 { color: var(--qm-admin-blue) !important; }
.bg-primary, .bg-blue-600, .peer-checked\:bg-blue-600:checked + div { background-color: var(--qm-admin-blue) !important; }
.hover\:bg-primary-hover:hover, .hover\:bg-blue-700:hover { background-color: var(--qm-admin-blue-deep) !important; }
.bg-primary\/10, .bg-blue-50 { background-color: var(--qm-admin-active) !important; }
.hover\:bg-primary\/10:hover { background-color: var(--qm-admin-active) !important; }
.hover\:text-primary:hover { color: var(--qm-admin-blue) !important; }
.focus\:ring-primary\/20:focus, .focus\:ring-blue-500:focus { --tw-ring-color: rgba(31,87,195,.18) !important; }
.focus\:border-primary:focus { border-color: var(--qm-admin-blue) !important; }
input, select, textarea { border-color: #d3e3dc !important; }
input:focus, select:focus, textarea:focus { border-color: var(--qm-admin-blue) !important; }
aside a.rounded-lg { border-radius: 13px !important; }
aside a.bg-primary\/10 { font-weight: 700; }
aside .material-icons { position: relative; }
button, select { border-radius: 12px !important; }

/* Non-equal data cards get a small queue marker while tables remain dense and usable. */
main .bg-surface-light.rounded-xl {
  border-radius: 19px 11px 19px 19px !important;
}
main .grid > .bg-surface-light.rounded-xl:not(.queue-welcome) { position: relative; overflow: hidden; }
main .grid > .bg-surface-light.rounded-xl:not(.queue-welcome)::before {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  right: -36px;
  top: -36px;
  border: 12px solid rgba(185,228,212,.50);
  border-radius: 50%;
}
main .grid > .bg-surface-light.rounded-xl:nth-child(2n)::before { border-color: rgba(31,87,195,.10); border-radius: 47% 53% 59% 41%; }
main .grid > .bg-surface-light.rounded-xl > * { position: relative; z-index: 1; }
main table thead { background: #f0f7f4 !important; }
main table tbody tr:hover { background: #f8fcfa !important; }
.empty-state { border: 1px dashed #bad7cc; border-radius: 18px; background: #f9fcfa; }
.empty-state::before { content: ""; display: block; width: 30px; height: 30px; margin: 0 auto 11px; border: 6px solid var(--qm-admin-blue); border-top: 0; border-radius: 0 0 16px 16px; box-shadow: 0 -9px 0 -5px var(--qm-admin-mint-deep); }

/* Dashboard welcome + direct paths intentionally break the rectangle-only rhythm. */
.queue-welcome {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  min-height: 240px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid #cfe4da;
  border-radius: 28px 12px 28px 28px;
  background: linear-gradient(116deg, #effaf4 0%, #fffdf8 64%, #e9f3ff 100%);
}
.queue-welcome::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: -295px;
  bottom: -340px;
  border: 34px solid rgba(35,135,110,.14);
  border-radius: 50%;
}
.queue-welcome-copy { position: relative; z-index: 1; padding: 32px 36px; }
.queue-welcome-label { margin: 0 0 7px; color: var(--qm-admin-mint-deep); font-size: 12px; font-weight: 800; letter-spacing: .10em; }
.queue-welcome h2 { max-width: 520px; margin: 0; color: var(--qm-admin-ink); font-size: clamp(25px, 2.5vw, 34px); line-height: 1.22; letter-spacing: -.05em; }
.queue-welcome-copy > p:not(.queue-welcome-label) { max-width: 520px; margin: 10px 0 0; color: var(--qm-admin-muted); }
.queue-quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 21px; }
.queue-quick-actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #cce4da;
  border-radius: 12px;
  background: rgba(255,255,255,.76);
  color: var(--qm-admin-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.queue-quick-actions a:first-child { border-color: var(--qm-admin-blue); background: var(--qm-admin-blue); color: #fff; }
.queue-quick-actions a:hover { border-color: var(--qm-admin-blue); background: #edf4ff; transform: translateY(-1px); }
.queue-quick-actions a:first-child:hover { background: var(--qm-admin-blue-deep); }
.queue-quick-actions .material-icons { font-size: 18px; }
.queue-welcome-route { position: relative; z-index: 1; align-self: stretch; min-width: 0; color: var(--qm-admin-mint-deep); }
.queue-welcome-route::after { content: ""; position: absolute; width: 18px; height: 18px; right: 17%; bottom: 29px; border-radius: 50%; background: #ef8269; box-shadow: -32px -15px 0 -1px var(--qm-admin-blue), -66px 5px 0 -1px var(--qm-admin-mint-deep); }
.queue-welcome-route svg { position: absolute; width: min(100%, 390px); height: 100%; right: 2px; top: 0; }
.queue-welcome-route svg circle:nth-of-type(2) { color: var(--qm-admin-blue); }

/* Settings uses the same components without flattening its form controls. */
body.bg-gray-100 .max-w-4xl .bg-white {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--qm-admin-line);
  border-radius: 20px 11px 20px 20px !important;
}
body.bg-gray-100 .max-w-4xl .bg-white::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -24px;
  width: 86px;
  height: 86px;
  border: 14px solid rgba(185,228,212,.42);
  border-radius: 50%;
  pointer-events: none;
}
body.bg-gray-100 .max-w-4xl .bg-white > * { position: relative; z-index: 1; }
body.bg-gray-100 > div.bg-white { box-shadow: 0 2px 10px rgba(23,50,77,.03) !important; }

/* Login keeps its real form but gives the system a recognisable route board. */
body:has(#loginForm) {
  position: relative;
  overflow: hidden;
  background: #17324d !important;
}
body:has(#loginForm)::before {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  left: -410px;
  bottom: -395px;
  border: 58px solid rgba(185,228,212,.20);
  border-radius: 50%;
}
body:has(#loginForm)::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  right: 18%;
  top: 22%;
  border-radius: 50%;
  background: var(--qm-admin-mint);
  box-shadow: -33px 24px 0 -1px #62a9ff, 29px 44px 0 -1px #ef8269;
}
body:has(#loginForm) .max-w-md { position: relative; z-index: 1; }
body:has(#loginForm) .max-w-md > div { border: 1px solid rgba(255,255,255,.40); box-shadow: 0 28px 68px rgba(4,24,45,.35) !important; }
body:has(#loginForm) .bg-primary\/10 { background: #eaf3ff !important; }
body:has(#loginForm) #loginBtn { background: var(--qm-admin-blue) !important; }
body:has(#loginForm) #loginBtn:hover { background: var(--qm-admin-blue-deep) !important; }

@media (max-width: 1023px) {
  body:not(.dark) main > header { padding-left: 18px !important; padding-right: 18px !important; }
  body:not(.dark) .p-6 { padding: 18px !important; }
  .queue-welcome { grid-template-columns: 1fr .62fr; }
  .queue-welcome-copy { padding: 29px 27px; }
}
@media (max-width: 640px) {
  body:not(.dark) main > header { height: auto !important; min-height: 64px; flex-wrap: wrap; gap: 10px; padding-top: 12px !important; padding-bottom: 12px !important; }
  body:not(.dark) main > header::after, body:not(.dark) main > header::before { display: none; }
  body.bg-gray-100 > div.bg-white .max-w-6xl { padding-left: 16px !important; padding-right: 16px !important; flex-wrap: wrap; gap: 10px; }
  body.bg-gray-100 .max-w-4xl { padding: 16px !important; }
  .queue-welcome { display: block; min-height: 0; }
  .queue-welcome-copy { padding: 27px 21px 24px; }
  .queue-welcome h2 { font-size: 27px; }
  .queue-welcome-route { height: 122px; margin: -19px 0 0; }
  .queue-welcome-route svg { width: 320px; right: -13px; }
  .queue-quick-actions a { flex: 1 1 126px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
