/* HotelCast admin panel */
:root {
  --hc-sidebar-w: 250px;
  --hc-sidebar-bg: #111827;
  --hc-sidebar-fg: #cbd5e1;
  --hc-accent: #2563eb;
  --hc-bg: #f3f5f9;
  --hc-radius: .75rem;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Gujarati", "Helvetica Neue", Arial, sans-serif;
}
body.hc-admin { background: var(--hc-bg); font-family: var(--bs-body-font-family); }
body.lang-gu { font-family: "Noto Sans Gujarati", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

/* Layout */
.hc-layout { display: flex; min-height: 100vh; }
.hc-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hc-content { padding: 1.25rem; flex: 1 0 auto; }
.hc-footer { padding: .75rem 1.25rem; }
@media (max-width: 575.98px) { .hc-content { padding: .75rem; } }

/* Sidebar (static on lg+, offcanvas below) */
.hc-sidebar { background: var(--hc-sidebar-bg) !important; color: var(--hc-sidebar-fg); --bs-offcanvas-width: var(--hc-sidebar-w); --bs-offcanvas-bg: var(--hc-sidebar-bg); }
@media (min-width: 992px) {
  .hc-layout { background: linear-gradient(to right, var(--hc-sidebar-bg) var(--hc-sidebar-w), transparent var(--hc-sidebar-w)); }
  .hc-sidebar { width: var(--hc-sidebar-w); flex: 0 0 var(--hc-sidebar-w); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .hc-sidebar .offcanvas-body { display: flex; flex-direction: column; height: calc(100vh - 72px); }
}
.hc-sidebar .offcanvas-body { display: flex; flex-direction: column; }
.hc-brand { padding: 1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); min-height: 72px; }
.hc-brand-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--hc-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.hc-brand-logo { width: 38px; height: 38px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.hc-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hc-brand-text small { color: #94a3b8; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.hc-nav { padding: .75rem .5rem; gap: 2px; }
.hc-nav .nav-link { color: var(--hc-sidebar-fg); border-radius: .5rem; padding: .6rem .85rem; display: flex; align-items: center; gap: .75rem; font-size: .95rem; }
.hc-nav .nav-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; }
.hc-nav .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.hc-nav .nav-link.active { background: var(--hc-accent); color: #fff; }
.hc-sidebar-foot { margin-top: auto; padding: 1rem; color: #64748b; }

/* Top bar */
.hc-topbar { position: sticky; top: 0; z-index: 1020; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; padding: .55rem 1rem; gap: .5rem; min-height: 56px; }
.hc-topbar-title { font-size: 1.05rem; min-width: 0; }
.hc-online-badge { font-size: .85rem; padding: .45em .8em; }

/* Emergency banner */
.hc-emergency-banner { background: #b00020; color: #fff; display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; animation: hcPulse 2s infinite; }
@keyframes hcPulse { 0%, 100% { background: #b00020; } 50% { background: #d50032; } }

/* Cards */
.card { border: 0; border-radius: var(--hc-radius); box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; border-radius: var(--hc-radius) var(--hc-radius) 0 0 !important; font-weight: 600; }
.stat-card { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; height: 100%; }
.stat-card .stat-icon { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.stat-card .stat-value { font-size: 1.5rem; white-space: nowrap; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: #6b7280; font-size: .85rem; }
.bg-soft-primary { background: #e0e7ff; color: #3730a3; }
.bg-soft-success { background: #dcfce7; color: #166534; }
.bg-soft-danger { background: #fee2e2; color: #991b1b; }
.bg-soft-secondary { background: #e5e7eb; color: #374151; }
.bg-soft-warning { background: #fef3c7; color: #92400e; }
.bg-soft-info { background: #e0f2fe; color: #075985; }

.page-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.4rem; margin: 0; font-weight: 700; }
.page-head .lead-sm { color: #6b7280; font-size: .9rem; margin: .15rem 0 0; }

/* Empty states */
.hc-empty { text-align: center; padding: 2.5rem 1rem; color: #4b5563; }
.hc-empty i.bi { font-size: 2.75rem; color: #9ca3af; display: block; margin-bottom: .5rem; }

/* Room status tiles */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.room-tile { border-radius: .6rem; padding: .55rem .65rem; color: #fff; min-height: 86px; display: flex; flex-direction: column; text-decoration: none; position: relative; transition: transform .12s; }
.room-tile:hover { transform: translateY(-2px); color: #fff; }
.room-tile .rt-num { font-size: 1.25rem; font-weight: 700; line-height: 1.1; }
.room-tile .rt-show { font-size: .75rem; opacity: .95; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.room-tile .rt-meta { font-size: .68rem; opacity: .8; margin-top: auto; }
.room-tile.st-online { background: linear-gradient(135deg, #16a34a, #15803d); }
.room-tile.st-offline { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.room-tile.st-none { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.room-tile.mode-off { background: linear-gradient(135deg, #334155, #1e293b); }
.room-tile.mode-emergency { outline: 3px solid #fde047; }
.room-tile .rt-badge { position: absolute; top: .45rem; right: .5rem; font-size: .9rem; }
.legend-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: -1px; margin-right: .25rem; }

/* Target picker */
.room-check-grid { display: flex; flex-wrap: wrap; gap: .3rem; max-height: 260px; overflow-y: auto; }
.room-check-grid .btn { min-width: 3.6rem; }

/* Content library */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.content-card { overflow: hidden; display: flex; flex-direction: column; }
.content-thumb { aspect-ratio: 16/9; background: #1f2937; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 2.4rem; position: relative; overflow: hidden; }
.content-thumb img { width: 100%; height: 100%; object-fit: cover; }
.content-thumb .type-badge { position: absolute; top: .45rem; left: .45rem; font-size: .7rem; }
.content-card.inactive .content-thumb { opacity: .45; }
.thumb-sm { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: .35rem; background: #1f2937; color: #9ca3af; display: inline-flex; align-items: center; justify-content: center; }

/* Playlist editor */
.pl-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; margin-bottom: .4rem; }
.pl-item .drag-handle { cursor: grab; color: #9ca3af; font-size: 1.25rem; padding: 0 .2rem; touch-action: none; }
.pl-item.sortable-ghost { opacity: .4; background: #dbeafe; }
.pl-item .pl-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-item input[type=number] { width: 5.5rem; }

/* Timetable builder */
.tt-row .form-control { min-width: 0; }

/* Tables */
.table-hc { --bs-table-bg: transparent; margin: 0; }
.table-hc thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; font-weight: 600; background: #f9fafb; white-space: nowrap; }
.table-hc td { vertical-align: middle; }
.table-responsive { border-radius: 0 0 var(--hc-radius) var(--hc-radius); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.log-pre { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: .5rem; max-height: 70vh; overflow: auto; font-size: .8rem; white-space: pre-wrap; word-break: break-all; }

/* Forms */
.form-label { font-weight: 600; font-size: .9rem; }
.form-text { font-size: .8rem; }
.form-control-color { width: 3.5rem; }
.strength-bar { height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; margin-top: .35rem; }
.strength-bar > span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.hint-box { background: #eff6ff; border: 1px dashed #93c5fd; border-radius: .6rem; padding: .85rem 1rem; }
.hint-box code { font-size: .95rem; word-break: break-all; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(243,245,249,.95); padding: .75rem 0; z-index: 5; border-top: 1px solid #e5e7eb; }

/* Login */
.hc-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: radial-gradient(circle at 20% 20%, #1e3a8a, #0f172a 60%); }
.hc-login .card { width: 100%; max-width: 400px; }
.hc-content-guest { padding: 0; }

/* Preview modal */
.preview-frame { width: 100%; aspect-ratio: 16/9; border: 0; background: #000; border-radius: .5rem; }

/* Settings tabs */
.nav-tabs-scroll { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: thin; }
.nav-tabs-scroll .nav-link { white-space: nowrap; }

/* FullCalendar tweaks */
.fc { font-size: .88rem; }
.fc .fc-toolbar-title { font-size: 1.15rem; }
@media (max-width: 575.98px) {
  .fc .fc-toolbar { flex-direction: column; gap: .5rem; }
  .page-head h1 { font-size: 1.2rem; }
  .stat-card .stat-value { font-size: 1.35rem; }
}

/* Bulk action bar */
.bulk-bar { position: sticky; bottom: .75rem; z-index: 10; }
.btn-xs { padding: .15rem .45rem; font-size: .75rem; }

/* 2.0: white-label accent, sidebar sections, hotel context banner */
.btn-primary { --bs-btn-bg: var(--hc-accent); --bs-btn-border-color: var(--hc-accent); --bs-btn-hover-bg: var(--hc-accent-dark, var(--hc-accent)); --bs-btn-hover-border-color: var(--hc-accent-dark, var(--hc-accent)); --bs-btn-active-bg: var(--hc-accent-dark, var(--hc-accent)); --bs-btn-active-border-color: var(--hc-accent-dark, var(--hc-accent)); --bs-btn-disabled-bg: var(--hc-accent); --bs-btn-disabled-border-color: var(--hc-accent); }
.hc-nav-section { color: #64748b; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: .9rem .85rem .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-nav-section:first-child { padding-top: .2rem; }
.hc-context-banner { background: var(--hc-accent); color: #fff; display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem; }
.min-w-0 { min-width: 0; }
.invoice-sheet { background: #fff; max-width: 900px; margin: 0 auto; padding: 2rem; border-radius: var(--hc-radius); }
@media print {
  .hc-sidebar, .hc-topbar, .hc-footer, .no-print, .hc-context-banner, .alert { display: none !important; }
  body.hc-admin, .hc-layout { background: #fff !important; }
  .hc-content { padding: 0 !important; }
  .invoice-sheet { box-shadow: none !important; padding: 0; max-width: none; }
}

/* ------------------------------------------------------------------ 2.6 panels (docs/modules/panels.md)
   The shell is themed by <body data-panel="platform|reseller|customer|chain">; only variables change. */
body[data-panel="platform"] { --hc-sidebar-bg: #1e1b4b; --hc-sidebar-fg: #c7d2fe; --hc-bg: #f1f2f8; --hc-topbar-bg: #312e81; --hc-topbar-fg: #eef2ff; --hc-topbar-border: #3730a3; --hc-panel-badge-bg: #4338ca; }
body[data-panel="reseller"] { --hc-sidebar-bg: #134e4a; --hc-sidebar-fg: #ccfbf1; --hc-bg: #f0f7f6; --hc-topbar-bg: #ffffff; --hc-topbar-fg: #0f172a; --hc-topbar-border: #99f6e4; --hc-panel-badge-bg: #0d9488; }
body[data-panel="chain"] { --hc-sidebar-bg: #1e293b; --hc-sidebar-fg: #cbd5e1; --hc-topbar-bg: #ffffff; --hc-topbar-fg: #0f172a; --hc-topbar-border: #e5e7eb; --hc-panel-badge-bg: #475569; }
body[data-panel="customer"] { --hc-topbar-bg: #ffffff; --hc-topbar-fg: #0f172a; --hc-topbar-border: #e5e7eb; }
.hc-topbar { background: var(--hc-topbar-bg, #fff); color: var(--hc-topbar-fg, #0f172a); border-bottom: 1px solid var(--hc-topbar-border, #e5e7eb); }
.hc-topbar .btn-link.text-body { color: var(--hc-topbar-fg, #0f172a) !important; }
body[data-panel="platform"] .hc-topbar .btn-light { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
body[data-panel="platform"] .hc-topbar .btn-light:hover { background: rgba(255,255,255,.22); color: #fff; }
.hc-panel-badge { display: inline-flex; align-items: center; gap: .35rem; background: var(--hc-panel-badge-bg, #4338ca); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; white-space: nowrap; margin-right: .5rem; }
.hc-sidebar .hc-nav-section { color: color-mix(in srgb, var(--hc-sidebar-fg) 60%, transparent); }
.hc-sidebar-console { display: block; color: #fff; text-decoration: none; margin-bottom: .5rem; font-weight: 600; }
.hc-sidebar-console:hover { color: #fff; text-decoration: underline; }
body[data-panel="platform"] .hc-brand-icon { background: #6366f1; }
body[data-panel="reseller"] .hc-brand-icon { background: #14b8a6; }
body[data-panel="chain"] .hc-brand-icon { background: #64748b; }

/* Global search in the top bar */
.hc-global-search { position: relative; flex: 0 1 26rem; min-width: 10rem; margin-left: .75rem; }
.hc-global-search i { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.hc-global-search .form-control { padding-left: 1.9rem; border-radius: 999px; background: rgba(255,255,255,.9); }
body[data-panel="platform"] .hc-global-search .form-control { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; }
body[data-panel="platform"] .hc-global-search .form-control::placeholder { color: #c7d2fe; }
body[data-panel="platform"] .hc-global-search .form-control:focus { background: rgba(255,255,255,.95); color: #0f172a; }
body[data-panel="platform"] .hc-global-search .form-control:focus::placeholder { color: #94a3b8; }

/* Impersonation banner: a platform user inside a customer workspace */
.hc-impersonation { background: repeating-linear-gradient(135deg, #7c3aed 0 14px, #6d28d9 14px 28px); color: #fff; padding: .55rem 1rem; font-size: .95rem; position: sticky; top: 0; z-index: 1030; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.hc-impersonation-as { background: rgba(255,255,255,.2); border-radius: .35rem; padding: .05rem .4rem; font-weight: 600; margin-left: .25rem; }
.hc-impersonation + .hc-topbar { top: 46px; }
body[data-impersonating="1"] .hc-topbar { border-left: 6px solid #7c3aed; }

/* Console pieces: KPI tiles, switches, alert list, result groups */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.kpi { background: #fff; border-radius: var(--hc-radius); padding: .85rem 1rem; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .15rem; min-height: 86px; position: relative; overflow: hidden; }
.kpi:hover { color: inherit; box-shadow: 0 4px 12px rgba(16,24,40,.12); }
.kpi .kpi-label { font-size: .78rem; color: #6b7280; display: flex; align-items: center; gap: .35rem; }
.kpi .kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.kpi .kpi-sub { font-size: .75rem; color: #6b7280; }
.kpi.kpi-danger .kpi-value { color: #b91c1c; } .kpi.kpi-warning .kpi-value { color: #b45309; } .kpi.kpi-success .kpi-value { color: #15803d; }
.kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--hc-accent); opacity: .7; }
.kpi.kpi-danger::after { background: #dc2626; } .kpi.kpi-warning::after { background: #f59e0b; } .kpi.kpi-success::after { background: #16a34a; }
.hc-alerts .list-group-item { display: flex; gap: .75rem; align-items: flex-start; }
.hc-alerts .list-group-item i { font-size: 1.1rem; margin-top: .1rem; }
.hc-switch { display: inline-flex; align-items: center; gap: .5rem; }
.hc-switch .form-check-input { width: 2.4em; height: 1.25em; cursor: pointer; margin: 0; }
.hc-switch .form-check-input:checked { background-color: #16a34a; border-color: #16a34a; }
.hc-switch .form-check-input[disabled] { opacity: .5; }
.hc-switch-label { font-size: .85rem; }
.hc-switch.is-busy { opacity: .6; }
.feature-row { display: flex; align-items: center; gap: .75rem; padding: .5rem .25rem; border-bottom: 1px solid #f1f5f9; }
.feature-row:last-child { border-bottom: 0; }
.feature-row .feature-name { flex: 1 1 auto; min-width: 0; }
.feature-row .feature-name small { display: block; color: #6b7280; }
.search-group { margin-bottom: 1rem; }
.search-group .card-header { display: flex; align-items: center; gap: .5rem; }
.quick-actions .btn { display: inline-flex; align-items: center; gap: .4rem; }
.c360-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.c360-avatar { width: 56px; height: 56px; border-radius: 14px; background: var(--hc-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; flex: 0 0 56px; }
.c360-meta { font-size: .85rem; color: #6b7280; display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.nav-tabs-c360 { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.nav-tabs-c360 .nav-link { white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.danger-zone { border: 1px solid #fecaca; }
.danger-zone .card-header { color: #991b1b; background: #fef2f2; }
@media (max-width: 575.98px) {
  .hc-impersonation { font-size: .85rem; padding: .45rem .75rem; }
  .hc-impersonation + .hc-topbar { top: 42px; }
  .hc-panel-badge { font-size: .62rem; padding: .22rem .45rem; }
}

/* 2.6 inline charts (Super Admin dashboard / reports) */
.hc-bars { display: flex; flex-direction: column; gap: .4rem; }
.hc-bar-row { display: grid; grid-template-columns: minmax(70px, 32%) 1fr auto; align-items: center; gap: .6rem; font-size: .82rem; }
.hc-bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #475569; }
.hc-bar-track { background: #eef2f7; border-radius: 999px; height: 10px; overflow: hidden; }
.hc-bar { display: block; height: 100%; background: var(--hc-accent); border-radius: 999px; min-width: 2px; transition: width .3s; }
.hc-bar-success { background: #16a34a; } .hc-bar-danger { background: #dc2626; } .hc-bar-warning { background: #f59e0b; } .hc-bar-info { background: #0ea5e9; } .hc-bar-secondary { background: #94a3b8; }
.hc-bar-value { font-weight: 600; white-space: nowrap; }
.hc-stacked-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #eef2f7; }
.hc-stacked-bar > span { display: block; height: 100%; }
.hc-stacked-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; margin-top: .5rem; color: #475569; }
.hc-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; vertical-align: -1px; }
.severity-high { color: #b91c1c; } .severity-medium { color: #b45309; } .severity-low { color: #0369a1; }
