/* ==========================================================================
   Kodaroom — central stylesheet
   Brand: Navy #000080 · Orange #FFA500 · White #FFFFFF
   ========================================================================== */

:root {
    --tlc-navy: #000080;
    --tlc-navy-700: #0b1a6b;
    --tlc-navy-900: #0b1238;
    --tlc-navy-950: #070c27;
    --tlc-orange: #ffa500;
    --tlc-orange-600: #e69500;
    --tlc-white: #ffffff;
    --tlc-bg: #f4f6fa;
    --tlc-surface: #ffffff;
    --tlc-border: #e3e7ef;
    --tlc-text: #1b2033;
    --tlc-text-strong: #0a1033;
    --tlc-muted: #5d6680;
    --tlc-success: #1f9d55;
    --tlc-danger: #dc3545;
    --tlc-warning: #b7791f;
    --tlc-info: #2563eb;
    --tlc-radius: 12px;
    --tlc-radius-sm: 8px;
    --tlc-shadow: 0 1px 2px rgba(10, 16, 51, .06), 0 1px 8px rgba(10, 16, 51, .04);
    --tlc-topbar-h: 64px;
    --tlc-sidebar-w: 236px;
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-color: var(--tlc-text);
    --bs-body-bg: var(--tlc-bg);
    --bs-link-color: var(--tlc-navy);
    --bs-link-color-rgb: 0, 0, 128;
    --bs-link-hover-color: #00005c;
    --bs-border-color: var(--tlc-border);
}

body.tlc { background: var(--tlc-bg); color: var(--tlc-text); font-size: .9375rem; }
:focus-visible { outline: 3px solid var(--tlc-orange) !important; outline-offset: 2px; }
.skip-link { position: absolute; left: 8px; top: 8px; z-index: 2000; background: #fff; padding: 8px 12px; border-radius: 6px; }

/* Buttons ----------------------------------------------------------------- */
.btn { border-radius: var(--tlc-radius-sm); font-weight: 500; }
.btn-tlc-primary { background: var(--tlc-navy); border-color: var(--tlc-navy); color: #fff; }
.btn-tlc-primary:hover, .btn-tlc-primary:focus { background: #00006a; border-color: #00006a; color: #fff; }
.btn-tlc-accent { background: var(--tlc-orange); border-color: var(--tlc-orange); color: #1a1300; }
.btn-tlc-accent:hover, .btn-tlc-accent:focus { background: var(--tlc-orange-600); border-color: var(--tlc-orange-600); color: #1a1300; }
.btn-tlc-outline { border: 1px solid var(--tlc-border); background: #fff; color: var(--tlc-text-strong); }
.btn-tlc-outline:hover { border-color: var(--tlc-navy); color: var(--tlc-navy); background: #fff; }
.form-control, .form-select { border-radius: var(--tlc-radius-sm); border-color: #d5dbe7; }
.form-control:focus, .form-select:focus { border-color: var(--tlc-navy); box-shadow: 0 0 0 .2rem rgba(0, 0, 128, .12); }
.form-check-input:checked { background-color: var(--tlc-navy); border-color: var(--tlc-navy); }
.form-label { font-weight: 500; color: var(--tlc-text-strong); font-size: .875rem; }

/* Top bar ------------------------------------------------------------------ */
.tlc-topbar {
    position: fixed; inset: 0 0 auto 0; height: var(--tlc-topbar-h); z-index: 1030;
    display: flex; align-items: center; gap: 16px; padding: 0 20px;
    background: var(--tlc-navy-900); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.tlc-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.tlc-brand:hover { color: #fff; }
.tlc-brand-logo { height: 34px; width: auto; }
.tlc-brand-name { font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; }
.tlc-brand-name strong { font-weight: 700; }
.tlc-tagline { align-items: center; gap: 8px; padding-left: 18px; margin-left: 4px; border-left: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .85); font-size: .9rem; }
.tlc-tagline i { font-style: normal; color: var(--tlc-orange); }
.tlc-icon-btn {
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 0; background: transparent; color: #fff; font-size: 1.1rem; text-decoration: none;
}
.tlc-icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.tlc-dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #ff4d4f; border: 2px solid var(--tlc-navy-900); }
.tlc-user { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: #fff; padding: 4px 8px; border-radius: 10px; }
.tlc-user:hover { background: rgba(255, 255, 255, .08); }
.tlc-avatar {
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: #2f6fed; color: #fff; font-weight: 600; font-size: .85rem; flex-shrink: 0;
}
.tlc-user-name { font-weight: 600; font-size: .875rem; line-height: 1.1; }
.tlc-user-role { font-size: .72rem; opacity: .7; }

/* Shell ------------------------------------------------------------------- */
.tlc-shell { display: flex; padding-top: var(--tlc-topbar-h); min-height: 100vh; }
.tlc-sidebar {
    position: fixed; top: var(--tlc-topbar-h); bottom: 0; left: 0; width: var(--tlc-sidebar-w); z-index: 1020;
    background: var(--tlc-navy-900); color: #cfd5ea; display: flex; flex-direction: column; padding: 16px 0 0; overflow-y: auto;
}
.tlc-nav { list-style: none; margin: 0; padding: 0 12px; }
.tlc-nav a {
    display: flex; align-items: center; gap: 14px; padding: 11px 14px; margin-bottom: 2px; border-radius: 10px;
    color: #d5dbef; text-decoration: none; font-weight: 500; position: relative;
}
.tlc-nav a i { width: 20px; text-align: center; font-size: 1.05rem; opacity: .9; }
.tlc-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.tlc-nav a.active { background: #1a2a6c; color: #fff; }
.tlc-nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tlc-orange); }
.tlc-count { margin-left: auto; background: var(--tlc-orange); color: #1a1300; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.tlc-nav-heading { padding: 18px 26px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8891b4; }
.tlc-sidebar-foot { margin-top: auto; padding: 20px 26px; font-size: .78rem; color: #8f98bd; border-top: 1px solid rgba(255, 255, 255, .06); }
.tlc-sidebar-foot strong { display: block; color: #fff; font-size: .95rem; }
.tlc-main { flex: 1; min-width: 0; margin-left: var(--tlc-sidebar-w); padding: 28px 32px 48px; }
.tlc-backdrop { display: none; }

@media (max-width: 991.98px) {
    .tlc-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .tlc-sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
    .tlc-backdrop.open { display: block; position: fixed; inset: var(--tlc-topbar-h) 0 0 0; background: rgba(5, 8, 30, .45); z-index: 1010; }
    .tlc-main { margin-left: 0; padding: 20px 16px 40px; }
    .tlc-topbar { padding: 0 10px; gap: 8px; }
    .tlc-brand-name { font-size: 1.05rem; }
}

/* Page furniture ---------------------------------------------------------- */
.tlc-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.tlc-page-head h1 { font-size: 1.5rem; font-weight: 700; color: var(--tlc-text-strong); margin: 0; letter-spacing: -.01em; }
.tlc-page-head p { margin: 4px 0 0; color: var(--tlc-muted); }
.tlc-card { background: var(--tlc-surface); border: 1px solid var(--tlc-border); border-radius: var(--tlc-radius); box-shadow: var(--tlc-shadow); }
.tlc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--tlc-border); }
.tlc-card-head h2 { font-size: 1rem; font-weight: 600; margin: 0; color: var(--tlc-text-strong); }
.tlc-card-body { padding: 18px 20px; }
.tlc-card-head a { font-size: .85rem; text-decoration: none; }

.tlc-stat { padding: 16px 18px; }
.tlc-stat .label { color: var(--tlc-muted); font-size: .8rem; font-weight: 500; }
.tlc-stat .value { font-size: 1.6rem; font-weight: 700; color: var(--tlc-text-strong); line-height: 1.2; }
.tlc-stat .icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #eef0fb; color: var(--tlc-navy); }

.tlc-list { list-style: none; margin: 0; padding: 0; }
.tlc-list > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--tlc-border); }
.tlc-list > li:last-child { border-bottom: 0; }
.tlc-list .meta { color: var(--tlc-muted); font-size: .8rem; }
.tlc-list .title { font-weight: 600; color: var(--tlc-text-strong); text-decoration: none; }
a.title:hover { color: var(--tlc-navy); text-decoration: underline; }

.tlc-table { margin: 0; }
.tlc-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tlc-muted); font-weight: 600; background: #f8f9fc; border-bottom-width: 1px; white-space: nowrap; }
.tlc-table td, .tlc-table th { padding: 12px 16px; vertical-align: middle; }
.tlc-table tbody tr:hover { background: #fafbfe; }

.tlc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--tlc-border); margin-bottom: 18px; overflow-x: auto; }
.tlc-tabs a { padding: 10px 14px; color: var(--tlc-muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tlc-tabs a.active { color: var(--tlc-navy); border-color: var(--tlc-navy); }

.tlc-empty { text-align: center; padding: 36px 20px; color: var(--tlc-muted); }
.tlc-empty i.big { font-size: 2rem; color: #b6bdd3; margin-bottom: 10px; display: block; }
.tlc-empty-code { font-size: 3.5rem; font-weight: 700; color: var(--tlc-navy); }

/* Status pills */
.tlc-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.tlc-status-live { background: #e7f6ee; color: #137a3f; }
.tlc-status-soon { background: #fff4de; color: #8a5a00; }
.tlc-status-sched { background: #eef0fb; color: var(--tlc-navy); }
.tlc-status-done { background: #eef1f4; color: #4b5563; }
.tlc-status-rec { background: #f3e8ff; color: #6b21a8; }
.tlc-status-cancel { background: #fdecec; color: #b42318; }
.tlc-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: tlc-pulse 1.8s infinite; }
@keyframes tlc-pulse { 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) { .tlc-live-dot { animation: none; } }

.tlc-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 600; background: #eef0fb; color: var(--tlc-navy); }
.tlc-badge-orange { background: #fff4de; color: #8a5a00; }
.tlc-badge-green { background: #e7f6ee; color: #137a3f; }
.tlc-badge-red { background: #fdecec; color: #b42318; }
.tlc-badge-grey { background: #eef1f4; color: #4b5563; }

.tlc-health { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--tlc-border); font-size: .875rem; }
.tlc-health:last-child { border-bottom: 0; }
.tlc-health .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-ok { background: var(--tlc-success); } .dot-bad { background: var(--tlc-danger); } .dot-na { background: #a0a8bf; }

.tlc-file-icon { width: 38px; height: 38px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: #eef0fb; color: var(--tlc-navy); flex-shrink: 0; }
.tlc-file-icon.pdf { background: #fdecec; color: #c0392b; }

/* Calendar */
.tlc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--tlc-border); border-top: 1px solid var(--tlc-border); }
.tlc-cal .dow { padding: 8px; font-size: .75rem; font-weight: 600; color: var(--tlc-muted); text-transform: uppercase; background: #f8f9fc; border-right: 1px solid var(--tlc-border); border-bottom: 1px solid var(--tlc-border); }
.tlc-cal .day { min-height: 112px; padding: 6px; border-right: 1px solid var(--tlc-border); border-bottom: 1px solid var(--tlc-border); background: #fff; }
.tlc-cal .day.other { background: #fafbfd; color: #a0a8bf; }
.tlc-cal .day.today .num { background: var(--tlc-navy); color: #fff; }
.tlc-cal .num { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; font-size: .8rem; font-weight: 600; }
.tlc-cal .ev { display: block; margin-top: 4px; padding: 3px 6px; border-radius: 6px; font-size: .72rem; text-decoration: none; background: #eef0fb; color: var(--tlc-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--tlc-navy); }
.tlc-cal .ev.live { background: #e7f6ee; color: #137a3f; border-color: #22c55e; }
.tlc-cal .ev.cancelled { background: #fdecec; color: #b42318; border-color: #dc3545; text-decoration: line-through; }
.tlc-cal .ev.completed { background: #eef1f4; color: #4b5563; border-color: #9ca3af; }
@media (max-width: 767.98px) {
    .tlc-cal { display: block; border: 0; }
    .tlc-cal .dow, .tlc-cal .day.empty-day { display: none; }
    .tlc-cal .day { min-height: 0; border: 1px solid var(--tlc-border); border-radius: 8px; margin-bottom: 8px; }
    .tlc-cal .day.other { display: none; }
}

/* Auth */
.tlc-auth { background: var(--tlc-bg); }
.tlc-auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.tlc-auth-brand { background: radial-gradient(1200px 500px at 0% 0%, #1a2a6c 0%, var(--tlc-navy-900) 55%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.tlc-auth-brand h1 { font-size: 2.4rem; font-weight: 700; letter-spacing: -.02em; }
.tlc-auth-brand h1 span { color: var(--tlc-orange); }
.tlc-auth-brand .lead { color: #cfd5ea; max-width: 460px; }
.tlc-auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; color: #dfe4f5; }
.tlc-auth-points i { color: var(--tlc-orange); width: 24px; }
.tlc-auth-brand small { color: #8f98bd; }
.tlc-auth-card { align-self: center; justify-self: center; width: min(420px, calc(100% - 32px)); background: #fff; padding: 36px; border-radius: 16px; border: 1px solid var(--tlc-border); box-shadow: var(--tlc-shadow); margin: 24px 0; }
@media (max-width: 860px) {
    .tlc-auth-wrap { grid-template-columns: 1fr; }
    .tlc-auth-brand { padding: 28px 20px; }
    .tlc-auth-brand h1 { font-size: 1.7rem; }
    .tlc-auth-points, .tlc-auth-brand small { display: none; }
    .tlc-auth-card { padding: 24px; }
}

.text-navy { color: var(--tlc-navy) !important; }
.text-orange { color: var(--tlc-orange-600) !important; }
.min-w-0 { min-width: 0; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
code, pre, .font-mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
#toast-container > div { opacity: 1; box-shadow: 0 6px 24px rgba(10, 16, 51, .18); border-radius: 10px; }

/* Guest (no-account) pages: brand bar only, no sidebar */
.tlc-guest .tlc-main { margin-left: 0; padding: calc(var(--tlc-topbar-h) + 24px) 24px 40px; }
.tlc-guest.tlc-classroom .tlc-main { padding: calc(var(--tlc-topbar-h) + 16px) 16px 16px; }
@media (max-width: 767.98px) {
    .tlc-guest .tlc-main { padding: calc(var(--tlc-topbar-h) + 12px) 12px 24px; }
    .tlc-guest.tlc-classroom .tlc-main { padding: calc(var(--tlc-topbar-h) + 8px) 8px 8px; }
}

/* Meeting QR code */
.tlc-qr-box { text-align: center; padding: 14px; border: 1px dashed var(--tlc-border); border-radius: var(--tlc-radius-sm); background: #fbfcfe; }
.tlc-qr-box > div[data-qr], #crInviteQr { display: inline-block; padding: 8px; background: #fff; border-radius: 8px; line-height: 0; }
.tlc-qr-box img, .tlc-qr-box canvas { max-width: 100%; height: auto; }

/* Guest top bar wordmark: "Kodaroom" + "by Techage Innovations" */
.tlc-guest .tlc-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.tlc-guest .tlc-brand-name { font-weight: 700; }
.tlc-guest .tlc-brand-sub { font-size: .72rem; color: rgba(255,255,255,.7); }
