:root {
    --hospital-white: #ffffff;
    --hospital-orange: #f15722;
    --hospital-navy: #152847;
    --hospital-navy-soft: #1e3761;
    --hospital-bg: #f0f4f9;
    --hospital-border: #e2e8f0;
    --hospital-muted: #64748b;
    --hospital-success: #16a34a;
    --hospital-danger: #dc2626;
}

/* ---------- Light app shell (staff dashboards) ---------- */
body.hospital-bg.hospital-light {
    color: var(--hospital-navy);
    background: linear-gradient(180deg, #f8fafc 0%, var(--hospital-bg) 45%, #eef2f7 100%);
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, "Inter", sans-serif;
    font-size: 1rem;
}

.top-nav {
    background: var(--hospital-white);
    border-bottom: 3px solid var(--hospital-orange);
    box-shadow: 0 1px 3px rgba(21, 40, 71, 0.08);
}

.top-nav .navbar-brand {
    color: var(--hospital-navy) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.layout-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
}

.sidebar-panel {
    background: var(--hospital-white);
    border-radius: 16px;
    border: 1px solid var(--hospital-border);
    box-shadow: 0 4px 20px rgba(21, 40, 71, 0.06);
    padding: 1.25rem 1rem;
    min-height: calc(100vh - 100px);
}

.nav-link-soft {
    color: var(--hospital-navy);
    text-decoration: none;
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    margin-bottom: 6px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link-soft:hover,
.nav-link-soft.active {
    background: rgba(241, 87, 34, 0.12);
    color: var(--hospital-orange);
    transform: translateX(3px);
}

.content-panel {
    background: var(--hospital-white);
    border: 1px solid var(--hospital-border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 24px rgba(21, 40, 71, 0.06);
}

.glass-card {
    background: var(--hospital-white);
    border: 1px solid var(--hospital-border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(21, 40, 71, 0.07);
}

.metric-card {
    border-radius: 14px;
    background: var(--hospital-white);
    border: 1px solid var(--hospital-border);
    box-shadow: 0 6px 20px rgba(21, 40, 71, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(241, 87, 34, 0.12);
}

.hospital-btn {
    background: linear-gradient(135deg, #ff6b35, var(--hospital-orange));
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 14px rgba(241, 87, 34, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hospital-btn:hover {
    background: #e04a15;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(241, 87, 34, 0.4);
}

.queue-card {
    background: var(--hospital-white);
    border: 1px solid var(--hospital-border);
    border-left: 5px solid var(--hospital-orange);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(21, 40, 71, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.queue-card:hover {
    box-shadow: 0 6px 18px rgba(21, 40, 71, 0.1);
    transform: translateY(-1px);
}

.queue-card.status-waiting { border-left-color: var(--hospital-orange); }
.queue-card.status-progress { border-left-color: var(--hospital-navy); }
.queue-card.status-completed { border-left-color: var(--hospital-success); }
.queue-card.status-na { border-left-color: var(--hospital-danger); }

.table-premium {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(21, 40, 71, 0.04);
    --bs-table-color: var(--hospital-navy);
    --bs-table-border-color: var(--hospital-border);
}

.table-premium thead th {
    background: var(--hospital-navy);
    color: #fff;
    font-weight: 700;
    border: none;
    padding: 0.85rem 1rem;
}

.login-shell {
    background: var(--hospital-white);
    border-radius: 20px;
    border: 1px solid var(--hospital-border);
    box-shadow: 0 20px 60px rgba(21, 40, 71, 0.12);
    overflow: hidden;
}

.chart-placeholder {
    background: linear-gradient(135deg, #f1f5f9, #e8eef5);
    border: 1px dashed var(--hospital-border);
    border-radius: 12px;
    color: var(--hospital-muted);
}

/* ---------- Public TV display (light + high contrast) ---------- */
body.hospital-bg.tv-display {
    color: var(--hospital-navy);
    background: linear-gradient(165deg, #ffffff 0%, #f4f7fb 50%, #eef2f8 100%);
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, sans-serif;
}

/* Dense TV layout: 15 rows (2 completed + 13 queue) visible on one screen */
.tv-display.tv-display-dense .tv-display-container {
    max-width: 100%;
}

.tv-display.tv-display-dense .row.g-2,
.tv-display.tv-display-dense .row.g-lg-3 {
    --bs-gutter-y: 0.35rem;
    --bs-gutter-x: 0.35rem;
}

.tv-display.tv-display-dense .tv-header-compact {
    border-radius: 12px;
    padding: 0.35rem 0.6rem !important;
    box-shadow: 0 4px 16px rgba(21, 40, 71, 0.06);
}

.tv-display.tv-display-dense .tv-header-title {
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
}

.tv-display.tv-display-dense .tv-contact {
    font-size: clamp(0.72rem, 1.05vw, 0.88rem);
}

.tv-display.tv-display-dense .doctor-banner-wrap {
    gap: 0.35rem;
    margin-bottom: 0;
}

.tv-display.tv-display-dense .doctor-pill {
    padding: 0.22rem 0.5rem;
    font-size: clamp(0.68rem, 1vw, 0.82rem);
    border-radius: 8px;
    border-width: 1px;
    box-shadow: 0 2px 8px rgba(21, 40, 71, 0.06);
}

@media (min-width: 992px) {
    .tv-display.tv-display-dense .queue-panel.tv-queue-panel {
        height: calc(100vh - 12px);
        max-height: calc(100vh - 12px);
    }
}

.tv-display.tv-display-dense .queue-panel.tv-queue-panel {
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0.5rem !important;
}

.tv-display.tv-display-dense .tv-queue-title {
    font-size: clamp(0.82rem, 1.25vw, 1rem);
    margin-bottom: 0.25rem !important;
}

.tv-display.tv-display-dense #queueTransition {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.tv-display.tv-display-dense .tv-queue-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow: hidden;
}

.tv-display.tv-display-dense .interrupt {
    font-size: clamp(0.72rem, 1.15vw, 0.95rem);
    padding: 0.3rem 0.45rem;
    margin-bottom: 0.3rem;
    border-width: 2px;
}

.tv-display.tv-display-dense .queue-table.queue-table-tv thead th {
    padding: 0.22rem 0.45rem;
    font-size: clamp(0.58rem, 0.85vw, 0.72rem);
    letter-spacing: 0.06em;
}

.tv-display.tv-display-dense .queue-section-head td {
    padding: 0.15rem 0.45rem !important;
    border-bottom-width: 1px;
}

.tv-display.tv-display-dense .queue-section-title {
    font-size: clamp(0.58rem, 0.85vw, 0.72rem);
    letter-spacing: 0.1em;
}

.tv-display.tv-display-dense .queue-table.queue-table-tv td {
    padding: 0.18rem 0.45rem !important;
    font-size: clamp(0.68rem, 1vw, 0.82rem);
    line-height: 1.12;
}

.tv-display.tv-display-dense .queue-line1-tv {
    margin-bottom: 0.06rem;
    min-height: 1.05em;
    gap: 0.35rem;
}

.tv-display.tv-display-dense .queue-token-tv {
    font-size: clamp(0.72rem, 1.05vw, 0.88rem);
}

.tv-display.tv-display-dense .queue-name-tv {
    font-size: clamp(0.68rem, 1vw, 0.84rem);
}

.tv-display.tv-display-dense .status-badge-tv {
    padding: 0.12rem 0.42rem;
    font-size: clamp(0.52rem, 0.78vw, 0.68rem);
}

.tv-display.tv-display-dense .queue-meta-tv {
    font-size: clamp(0.6rem, 0.88vw, 0.76rem);
}

.tv-display.tv-display-dense .queue-empty-row td {
    padding: 0.2rem 0.45rem !important;
    font-size: clamp(0.6rem, 0.85vw, 0.75rem) !important;
}

.tv-display .tv-header {
    background: var(--hospital-white);
    border: 1px solid var(--hospital-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(21, 40, 71, 0.08);
    padding: 1rem 1.5rem;
}

.tv-display .tv-header h1,
.tv-display .tv-header h2 {
    color: var(--hospital-navy);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tv-display .doctor-banner-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tv-display .doctor-pill {
    background: var(--hospital-white);
    border: 2px solid var(--hospital-navy);
    color: var(--hospital-navy);
    border-radius: 12px;
    padding: 0.6rem 1.1rem;
    font-weight: 800;
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    box-shadow: 0 4px 12px rgba(21, 40, 71, 0.08);
    animation: pillPulse 3s ease-in-out infinite;
}

.tv-display .doctor-pill.emergency {
    border-color: var(--hospital-orange);
    color: var(--hospital-orange);
}

@keyframes pillPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(21, 40, 71, 0.08); }
    50% { box-shadow: 0 4px 18px rgba(241, 87, 34, 0.2); }
}

.tv-display .queue-panel,
.tv-display .tv-display-media-panel {
    background: var(--hospital-white);
    border: 1px solid var(--hospital-border);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(21, 40, 71, 0.08);
    min-height: 72vh;
}

.tv-display .queue-panel h2,
.tv-display .tv-queue-title {
    color: var(--hospital-navy);
    font-weight: 800;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.tv-display .tv-header-title {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.tv-display .tv-contact {
    font-size: clamp(0.85rem, 1.25vw, 1rem);
}

.tv-display .queue-table-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--hospital-border);
    box-shadow: 0 4px 20px rgba(21, 40, 71, 0.06);
}

.tv-display .tv-queue-scroll {
    max-height: min(68vh, calc(100vh - 200px));
    overflow: hidden;
}

.tv-display .queue-transition-wrap {
    transition: opacity var(--tv-queue-fade-ms, 220ms) ease, transform var(--tv-queue-fade-ms, 220ms) ease;
}

.tv-display .queue-transition-wrap.queue-anim-out {
    opacity: 0.35;
    transform: translateY(-10px);
}

.tv-display .queue-transition-wrap.queue-anim-in {
    animation: tvQueueSlideIn var(--tv-queue-slide-ms, 380ms) ease forwards;
}

@keyframes tvQueueSlideIn {
    from {
        opacity: 0.5;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tv-display .queue-table.queue-table-tv thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--hospital-navy);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.65rem;
    font-size: clamp(0.7rem, 1.1vw, 0.85rem);
    border: none;
}

.tv-display .queue-section-head td {
    background: linear-gradient(90deg, rgba(21, 40, 71, 0.08), rgba(241, 87, 34, 0.06));
    border-bottom: 2px solid var(--hospital-orange);
    padding: 0.35rem 0.65rem !important;
}

.tv-display .queue-section-title {
    font-weight: 900;
    font-size: clamp(0.72rem, 1.15vw, 0.88rem);
    letter-spacing: 0.12em;
    color: var(--hospital-navy);
    text-transform: uppercase;
}

.tv-display .queue-table.queue-table-tv tbody tr.queue-data-row.queue-row-alt td {
    background: #f1f5f9 !important;
}

.tv-display .queue-table.queue-table-tv tbody tr.queue-data-row:hover td {
    background: #fff7f4 !important;
}

.tv-display .queue-table.queue-table-tv td {
    padding: 0.42rem 0.65rem !important;
    font-size: clamp(0.82rem, 1.25vw, 1.05rem);
    line-height: 1.25;
    border-bottom: 1px solid var(--hospital-border);
}

.tv-display .queue-line1-tv {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    min-height: 1.35em;
}

.tv-display .queue-token-tv {
    font-weight: 900;
    color: var(--hospital-navy);
    font-size: clamp(0.88rem, 1.35vw, 1.08rem);
    white-space: nowrap;
    flex: 0 0 auto;
}

.tv-display .queue-name-tv {
    font-weight: 700;
    color: var(--hospital-navy);
    font-size: clamp(0.82rem, 1.25vw, 1.02rem);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-display .status-badge-tv {
    flex: 0 0 auto;
    padding: 0.22rem 0.55rem;
    font-size: clamp(0.62rem, 1vw, 0.78rem);
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.tv-display .queue-meta-tv {
    font-size: clamp(0.72rem, 1.1vw, 0.92rem);
    color: var(--hospital-muted);
    font-weight: 600;
}

.tv-display .queue-empty-row td {
    font-size: clamp(0.72rem, 1.05vw, 0.88rem) !important;
    padding: 0.35rem 0.65rem !important;
}

.tv-display .status-badge-tv.status-badge {
    display: inline-block;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.tv-display .queue-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.tv-display .status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: clamp(0.75rem, 1.3vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tv-display .status-badge:hover {
    transform: scale(1.02);
}

.tv-display .status-badge.waiting {
    background: var(--hospital-orange);
    color: #fff;
    box-shadow: 0 4px 16px rgba(241, 87, 34, 0.45);
}

.tv-display .status-badge.in_progress {
    background: var(--hospital-navy);
    color: #fff;
    box-shadow: 0 4px 16px rgba(21, 40, 71, 0.35);
}

.tv-display .status-badge.completed {
    background: var(--hospital-success);
    color: #fff;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.tv-display .status-badge.not_available {
    background: var(--hospital-danger);
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.tv-display .interrupt {
    text-align: center;
    font-weight: 900;
    font-size: clamp(0.95rem, 1.65vw, 1.35rem);
    line-height: 1.2;
    padding: clamp(0.55rem, 1.1vw, 0.85rem) 0.75rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    color: #fff;
    border: 3px solid rgba(255, 255, 255, 0.85);
    animation: tvGlow 2s ease-in-out infinite, tvBorderPulse 1.4s ease-in-out infinite;
}

.tv-display .interrupt-red {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.tv-display .interrupt-orange {
    background: linear-gradient(135deg, #f15722, #c2410c);
}

.tv-display .interrupt-gray {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

@keyframes tvGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(241, 87, 34, 0.35), 0 8px 28px rgba(21, 40, 71, 0.2); }
    50% { box-shadow: 0 0 32px rgba(241, 87, 34, 0.55), 0 12px 36px rgba(21, 40, 71, 0.25); }
}

@keyframes tvBorderPulse {
    0%, 100% { border-color: rgba(255, 255, 255, 0.7); }
    50% { border-color: rgba(255, 255, 255, 1); }
}

.tv-display .tv-display-media-stage {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    min-height: 42vh;
    box-shadow: inset 0 0 0 1px var(--hospital-border);
}

.tv-display .tv-display-media-stage .tv-display-media-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-display .tv-display-media-stage .tv-display-media-slide.active {
    opacity: 1;
    z-index: 1;
}

.tv-display .tv-display-media-stage img,
.tv-display .tv-display-media-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tv-display .tv-display-media-brand {
    background: linear-gradient(90deg, rgba(21, 40, 71, 0.06), rgba(241, 87, 34, 0.08));
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--hospital-border);
}

.tv-display .announcement-bar {
    background: var(--hospital-navy);
    color: #fff;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
}

/* ---------- Doctor status broadcast ticker (public TV) ---------- */
body.hospital-bg.tv-display.tv-has-broadcast-ticker {
    padding-bottom: clamp(5.5rem, 14vh, 9.5rem);
}

.doctor-broadcast-ticker {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: linear-gradient(180deg, #1a3358 0%, #152847 40%, #0f1f38 100%);
    color: #fff;
    border-top: 3px solid var(--hospital-orange);
    box-shadow:
        0 -6px 28px rgba(0, 0, 0, 0.35),
        0 0 32px rgba(241, 87, 34, 0.18);
    font-family: 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.doctor-broadcast-ticker.ticker-fade-hide {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.doctor-broadcast-inner {
    max-width: 100%;
    padding: 0.45rem 0 0.55rem;
}

.doctor-broadcast-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.25rem 1rem 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.doctor-broadcast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: rgba(241, 87, 34, 0.25);
    color: var(--hospital-orange);
    font-size: 1.1rem;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(241, 87, 34, 0.65));
    animation: doctorBroadcastIconPulse 1.8s ease-in-out infinite;
}

@keyframes doctorBroadcastIconPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.88; }
}

.doctor-broadcast-label {
    font-size: clamp(0.7rem, 1.1vw, 0.82rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: var(--hospital-orange);
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    box-shadow: 0 0 14px rgba(241, 87, 34, 0.45);
}

.doctor-broadcast-live {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: clamp(0.65rem, 1vw, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.92);
}

.doctor-broadcast-live .live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: doctorBroadcastLivePulse 1.2s ease-in-out infinite;
}

@keyframes doctorBroadcastLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.doctor-broadcast-track-wrap {
    overflow: hidden;
    position: relative;
    padding: 0.35rem 0 0.45rem;
    mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.doctor-broadcast-marquee {
    display: flex;
    width: max-content;
    white-space: nowrap;
    animation-name: doctorBroadcastMarquee;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: var(--ticker-duration, 55s);
    will-change: transform;
}

.doctor-broadcast-marquee:hover {
    animation-play-state: paused;
}

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

.doctor-broadcast-seg {
    display: inline-block;
    padding: 0.15rem 3.5rem 0.15rem 0;
    font-size: clamp(1rem, 2.1vw, 1.55rem);
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.doctor-broadcast-seg .ticker-doc {
    color: var(--hospital-orange);
    font-weight: 800;
    margin-right: 0.35rem;
}

.doctor-broadcast-seg .ticker-sep {
    color: var(--hospital-orange);
    font-weight: 800;
    opacity: 0.9;
    padding: 0 0.25rem;
    font-size: 0.85em;
}

@media (max-width: 992px) {
    .layout-shell {
        grid-template-columns: 1fr;
    }

    .sidebar-panel {
        min-height: auto;
    }
}

/* ---------- Nurse queue DataTables ---------- */
.queue-dt-card .dataTables_wrapper .dataTables_length,
.queue-dt-card .dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.75rem;
}

.queue-dt-card table.dataTable {
    font-size: 0.92rem;
}

.queue-dt-card table.dataTable thead th {
    background: #f8fafc;
    color: var(--hospital-navy);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--hospital-border) !important;
}

.queue-dt-card table.dataTable tbody td {
    vertical-align: middle;
    border-color: var(--hospital-border) !important;
}

.queue-dt-card .page-item.active .page-link {
    background-color: #152847;
    border-color: #152847;
}

.queue-dt-card .page-link {
    color: #152847;
}

.dt-live-badge {
    font-weight: 600;
}

.dt-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    margin-right: 6px;
    animation: dtPulse 1.4s ease-in-out infinite;
}

@keyframes dtPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.queue-filters-card {
    border-radius: 16px;
}

.dt-type-real { background: #e2e8f0; color: #152847; }
.dt-type-old { background: #fff7ed; color: #c2410c; }
.dt-type-private { background: #ede9fe; color: #5b21b6; }

.btn-add-patient {
    background: linear-gradient(135deg, #f15722 0%, #ff7a45 100%);
    color: #fff !important;
    border: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-add-patient:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(241, 87, 34, 0.35);
}

.queue-dt-toolbar {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.queue-table-wrap {
    border-radius: 12px;
    overflow: hidden;
}

.btn-icon-dt {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1px solid var(--hospital-border);
    background: #fff;
    color: #152847;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn-icon-dt:hover:not(:disabled) {
    background: #f0f4f9;
    border-color: #cbd5e1;
    color: #f15722;
    transform: translateY(-1px);
}

.btn-icon-dt-danger:hover:not(:disabled) {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.dt-status-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(21, 40, 71, 0.12);
}
