:root {
    --rt-primary: #3457e9;
    --rt-primary-dark: #253fb2;
    --rt-ink: #172033;
    --rt-muted: #697386;
    --rt-surface: #ffffff;
    --rt-canvas: #f5f7fb;
    --rt-border: #e5e9f2;
    --rt-success: #1ca76f;
    --rt-shadow: 0 18px 50px rgba(30, 44, 78, .08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { background: var(--rt-canvas); color: var(--rt-ink); font-family: "Roboto", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .95rem; font-weight: 400; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; letter-spacing: -.012em; }
a { text-decoration: none; }
.min-w-0 { min-width: 0; }

.rt-navbar { min-height: 72px; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(225,230,241,.85); backdrop-filter: blur(16px); }
.rt-navbar .navbar-brand { color: var(--rt-ink); font-weight: 500; letter-spacing: -.015em; }
.rt-navbar .nav-link { color: #566078; font-weight: 500; padding: .65rem .9rem !important; }
.rt-navbar .nav-link:hover { color: var(--rt-primary); }
.rt-brand-mark { display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #5b72f2, #2945d4); box-shadow: 0 9px 20px rgba(52,87,233,.25); }
.rt-brand-mark-lg { width: 48px; height: 48px; border-radius: 15px; font-size: 1.15rem; }
.rt-user-menu { display: flex; align-items: center; gap: .7rem; border: 0; padding: .35rem .55rem; }
.rt-user-menu:hover { background: #f2f4f9; }
.rt-user-menu::after { color: #8a93a5; }
.rt-avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #e9edff; color: var(--rt-primary); font-weight: 500; }
.rt-avatar-lg { width: 44px; height: 44px; }
.rt-user-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-weight: 500 !important; }
.rt-user-role { color: #8790a2; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }

.rt-main { min-height: calc(100vh - 148px); }
.rt-footer { padding: 1.5rem 0; color: #8790a2; font-size: .86rem; }
.rt-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding: 3.75rem 0 2.5rem; }
.rt-page-header-compact { padding-bottom: 2rem; }
.rt-dashboard-header { align-items: center; }
.rt-dashboard-header > :first-child { flex: 1 1 360px; min-width: 0; }
.rt-header-stats { display: grid; flex: 0 1 520px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; width: min(100%, 520px); }
.rt-header-stats .rt-stat-card { min-width: 0; }
.rt-page-title { font-size: clamp(1.75rem, 2.7vw, 2.25rem); font-weight: 300; line-height: 1.18; letter-spacing: -.025em; }
.rt-page-header .text-secondary { max-width: 700px; font-size: .95rem; font-weight: 300; line-height: 1.55; }
.rt-section-title { font-size: 1.15rem; font-weight: 400; line-height: 1.3; letter-spacing: -.012em; }
.rt-card-title { font-size: 1.25rem; font-weight: 400; line-height: 1.3; letter-spacing: -.012em; }
.rt-confirm-title { font-size: 1.45rem; font-weight: 400; }
.rt-eyebrow { font-size: .68rem; font-weight: 500; letter-spacing: .14em; }
.rt-back-link { color: #687287; font-weight: 500; }
.rt-back-link:hover { color: var(--rt-primary); }
.rt-primary-button { border: 0; background: linear-gradient(135deg, #4967f0, #2946d5); box-shadow: 0 10px 24px rgba(52,87,233,.22); }
.rt-primary-button:hover { background: linear-gradient(135deg, #3c59dc, #223ab8); transform: translateY(-1px); }

.rt-stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; border: 1px solid var(--rt-border); border-radius: 18px; background: #fff; }
.rt-stat-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; font-size: 1.2rem; }
.rt-stat-icon-blue { color: #3457e9; background: #ebefff; }
.rt-stat-icon-green { color: #148a5b; background: #e7f8f1; }
.rt-stat-value { display: block; font-size: 1.25rem; font-weight: 500; line-height: 1.15; }
.rt-stat-label { display: block; color: var(--rt-muted); font-size: .82rem; }

.rt-room-card { display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--rt-border); border-radius: 22px; background: var(--rt-surface); box-shadow: 0 8px 30px rgba(30,44,78,.04); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.rt-room-card:hover { transform: translateY(-4px); border-color: #cfd7ee; box-shadow: var(--rt-shadow); }
.rt-room-card-inactive { opacity: .72; }
.rt-room-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.rt-room-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--rt-primary); background: linear-gradient(135deg, #edf0ff, #e3e9ff); font-size: 1.25rem; }
.rt-status { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 500; }
.rt-status-active { color: #087c50; background: #e6f8f0; }
.rt-status-active i { font-size: .42rem; }
.rt-status-inactive { color: #7a8292; background: #eff1f5; }
.rt-status-inactive i { color: #a5adbb; font-size: .42rem; }
.rt-status-toggle { border: 0; cursor: pointer; transition: box-shadow .18s ease, transform .18s ease, opacity .18s ease; }
.rt-status-toggle:hover { box-shadow: 0 5px 14px rgba(30,44,78,.12); transform: translateY(-1px); }
.rt-status-toggle:focus-visible { outline: 3px solid rgba(52,87,233,.22); outline-offset: 2px; }
.rt-status-toggle:disabled { cursor: wait; opacity: .65; }
.rt-status-loading i { animation: rt-status-pulse .8s ease-in-out infinite alternate; }
@keyframes rt-status-pulse { to { opacity: .25; } }
.swal2-popup { border-radius: 20px !important; font-family: "Roboto", ui-sans-serif, system-ui, sans-serif !important; }
.swal2-title { color: var(--rt-ink) !important; font-size: 1.5rem !important; font-weight: 400 !important; }
.swal2-content { color: var(--rt-muted) !important; font-size: .95rem !important; font-weight: 400 !important; }
.swal2-styled { border-radius: 10px !important; font-weight: 500 !important; }
.rt-room-description { min-height: 3rem; }
.rt-room-meta { display: flex; flex-wrap: wrap; gap: .75rem 1.1rem; margin: .85rem 0 1.35rem; color: #7d8698; font-size: .8rem; }
.rt-room-actions { display: flex; justify-content: space-between; gap: .75rem; margin-top: auto; }
.rt-room-actions [hidden] { display: none !important; }

.rt-panel { padding: 1.75rem; border: 1px solid var(--rt-border); border-radius: 22px; background: #fff; box-shadow: 0 8px 30px rgba(30,44,78,.04); }
.rt-panel-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rt-border); }
.rt-people-list { display: grid; gap: .4rem; margin-top: 1rem; }
.rt-person { display: flex; align-items: center; gap: .85rem; padding: .8rem; border-radius: 15px; }
.rt-person:hover { background: #f7f8fc; }
.rt-security-list { display: grid; gap: 1rem; padding: 0; margin: 0; list-style: none; }
.rt-security-list li { display: flex; align-items: flex-start; gap: .75rem; color: #596378; }
.rt-security-list i { color: var(--rt-success); margin-top: .1rem; }

.rt-form-panel { padding: 2.25rem; }
.form-label.fw-semibold { font-weight: 500 !important; }
.form-control { border-color: #dfe4ee; border-radius: 12px; padding: .75rem .9rem; }
.form-control:focus { border-color: #7890f4; box-shadow: 0 0 0 .25rem rgba(52,87,233,.1); }
.rt-profile-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--rt-primary); background: #ebefff; font-size: 1.15rem; }
.rt-profile-icon-security { color: #148a5b; background: #e7f8f1; }
.rt-account-summary { display: grid; gap: .75rem; padding: 1rem; border-radius: 14px; background: #f7f8fc; }
.rt-account-summary div { display: flex; justify-content: space-between; gap: 1rem; }
.rt-account-summary span { color: var(--rt-muted); }
.rt-account-summary strong { overflow-wrap: anywhere; text-align: right; }
.rt-password-help ul { margin: .5rem 0 0; padding-left: 1.15rem; }
.rt-operator-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; padding: .7rem; border: 1px solid var(--rt-border); border-radius: 16px; background: #f8f9fc; max-height: 360px; overflow-y: auto; }
.rt-operator-option { display: flex; align-items: center; gap: .75rem; padding: .8rem; border: 1px solid transparent; border-radius: 13px; background: #fff; cursor: pointer; }
.rt-operator-option:hover { border-color: #cfd7ee; }
.rt-operator-option input { position: absolute; opacity: 0; pointer-events: none; }
.rt-operator-option .bi-check-circle-fill { margin-left: auto; color: #cfd4df; }
.rt-operator-option:has(input:checked) { border-color: #8094ed; background: #f0f3ff; }
.rt-operator-option:has(input:checked) .bi-check-circle-fill { color: var(--rt-primary); }
.rt-empty-operators { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: .75rem; min-height: 110px; color: var(--rt-muted); text-align: center; }

.rt-empty-state { padding: 5rem 1rem; border: 1px dashed #cfd6e5; border-radius: 24px; background: rgba(255,255,255,.7); text-align: center; color: var(--rt-muted); }
.rt-empty-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 1.25rem; border-radius: 22px; background: #e9edfa; color: #68758f; font-size: 1.75rem; }
.rt-confirm-shell { display: grid; place-items: center; min-height: calc(100vh - 180px); }
.rt-confirm-card { width: min(100%, 560px); padding: 3rem; }
.rt-danger-icon { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 22px; color: #d54242; background: #fff0f0; font-size: 1.7rem; }

.rt-login-body { overflow-x: hidden; background: #fff; }
.rt-login-shell { display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(440px, .92fr); min-height: 100vh; }
.rt-login-story { position: relative; display: grid; place-items: center; overflow: hidden; padding: 5rem; color: #fff; background: linear-gradient(145deg, #172762 0%, #2949ce 55%, #4e6df0 100%); }
.rt-login-story::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 28px 28px; }
.rt-login-story-content { position: relative; z-index: 2; max-width: 600px; }
.rt-story-icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 4rem; border: 1px solid rgba(255,255,255,.28); border-radius: 19px; background: rgba(255,255,255,.14); font-size: 1.45rem; backdrop-filter: blur(10px); }
.rt-login-hero-title { margin: 0 0 1.5rem; font-size: clamp(2.5rem, 4.3vw, 4.25rem); font-weight: 300; line-height: 1.02; letter-spacing: -.035em; }
.rt-story-copy { max-width: 520px; color: rgba(255,255,255,.78); font-size: 1.15rem; line-height: 1.7; }
.rt-security-note { display: flex; align-items: center; gap: .8rem; max-width: 500px; margin-top: 4rem; padding: 1rem 1.1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(12,25,76,.2); color: rgba(255,255,255,.88); }
.rt-security-note i { font-size: 1.35rem; }
.rt-orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.rt-orb-one { right: -120px; top: -120px; width: 420px; height: 420px; background: rgba(116,151,255,.2); }
.rt-orb-two { left: -180px; bottom: -220px; width: 520px; height: 520px; background: rgba(18,33,102,.32); }
.rt-login-panel { display: grid; place-items: center; padding: 4rem; background: #fff; }
.rt-login-card { width: min(100%, 470px); }
.rt-login-brand { font-weight: 500; }
.rt-login-title { font-size: 1.65rem; font-weight: 400; letter-spacing: -.018em; }

.rt-meeting-body { margin: 0; height: 100vh; overflow: hidden; background: #0d111b; }
.rt-meeting-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; padding: 0 1rem; color: #fff; background: #111726; border-bottom: 1px solid #252d3d; }
.rt-meeting-back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #d9deea; background: #202838; }
.rt-meeting-back:hover { color: #fff; background: #2b3548; }
.rt-meeting-title { max-width: min(55vw, 720px); font-weight: 500; }
.rt-meeting-subtitle { color: #919bad; font-size: .72rem; }
.rt-live-pill { display: flex; align-items: center; gap: .45rem; padding: .4rem .65rem; border-radius: 999px; color: #bbf7d0; background: rgba(34,197,94,.14); font-size: .72rem; font-weight: 500; letter-spacing: .08em; }
.rt-live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.16); }
.rt-jitsi-stage { width: 100vw; height: calc(100vh - 64px); background: #080b12; }
.rt-jitsi-stage iframe { display: block; width: 100% !important; height: 100% !important; border: 0; }
.rt-meeting-error { display: grid; place-items: center; width: 100%; height: calc(100vh - 64px); padding: 1.5rem; }

@media (max-width: 991.98px) {
    .rt-page-header { align-items: flex-start; flex-direction: column; padding-top: 3rem; }
    .rt-dashboard-header > :first-child { flex-basis: auto; }
    .rt-header-stats { flex-basis: auto; width: min(100%, 620px); }
    .rt-login-shell { grid-template-columns: 1fr; }
    .rt-login-story { display: none; }
    .rt-login-panel { min-height: 100vh; padding: 2rem; }
}

@media (max-width: 575.98px) {
    .rt-page-header { padding-top: 2.25rem; }
    .rt-page-title { font-size: 1.7rem; }
    .rt-header-stats { grid-template-columns: 1fr; }
    .rt-room-actions { flex-direction: column; }
    .rt-room-actions .btn { width: 100%; }
    .rt-operator-picker { grid-template-columns: 1fr; }
    .rt-form-panel { padding: 1.25rem; }
    .rt-confirm-card { padding: 2rem 1.25rem; }
    .rt-meeting-title { max-width: 52vw; }
    .rt-meeting-bar .rt-brand-mark { display: none; }
}
