:root {
  --bg: #f5f7fb; --card: #ffffff; --ink: #16213e; --muted: #6b7280;
  --brand: #0C8DD1; --brand-2: #0C8DD1; --brand-dark: #0C8DD1;
  --header: #0f2a6b; --line: #e3e8f0; --ok: #16a34a; --err: #dc2626;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg);
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  display: flex; flex-direction: column; }
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Blue header only */
.topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: #fff;
  color: #fff; box-shadow: 0 2px 12px rgba(15,42,107,.25); }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { font-weight: 800; letter-spacing: .18em; font-size: 20px; color: #fff; }
.brand-sub { font-size: 11px; letter-spacing: .22em; color: #bcd0ff; text-transform: uppercase; }
nav a { margin-left: 18px; text-decoration: none; color: #757575; font-size: 14px; }
/* nav a:hover { color: #fff; } */
nav .user { margin-left: 30px; color: #1ba0e8; font-size: 14px; }

.container { max-width: 1000px; width: 100%; margin: 17px auto; padding: 0 18px; flex: 1; }
h1 { margin-top: 0;margin-bottom: 1vh; color: var(--ink); }
h2 { color: var(--brand); margin-top: 0; }
.muted { color: var(--muted); font-size: 14px; }
.link { display: inline-block; margin-top: 10px; color: var(--brand-2);
  text-decoration: none; font-size: 13px; }
.link:hover { text-decoration: underline; }

.hero { text-align: center; margin: 32px 0 24px; }
.hero-logo { font-size: clamp(35px, 6vw, 96px); font-weight: 800; letter-spacing: .14em;
  margin: 0; color: var(--brand); }
.hero-tagline { letter-spacing: .35em; color: var(--brand-2); font-size: 14px;
  text-transform: uppercase; margin-top: 8px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(16,33,62,.05); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; text-align: center; color: var(--muted); font-size: 13px;
  text-transform: uppercase; letter-spacing: .06em; }
.stat span { display: block; font-size: 32px; font-weight: 800; color: var(--brand);
  margin-bottom: 4px; }

label { display: block; margin: 12px 0; font-size: 14px; color: var(--ink); }
input[type=text], input[type=password], input[type=number] { width: 100%; padding: 11px;
  margin-top: 5px; border: 1px solid var(--line); border-radius: 9px; font-size: 15px;
  background: #fff; color: var(--ink); }
input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
input[type=file] { display: block; margin: 12px 0; color: var(--muted); }

.btn { display: inline-block; padding: 10px 18px; border-radius: 9px; margin: 4px 6px 4px 0;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  text-decoration: none; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: var(--brand-2); }
.btn.primary { background: var(--brand-2); color: #fff; border-color: var(--brand-2);margin-bottom:2vh }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { background: #fff; color: var(--err); border-color: #fbcaca; }
.btn.danger:hover { background: var(--err); color: #fff; border-color: var(--err); }

#toast-stack { position: fixed; top: 18px; right: 18px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 36px)); }
.flash { padding: 12px 16px; border-radius: 9px; font-size: 14px;
  border: 1px solid var(--line); background: var(--card);
  box-shadow: 0 6px 20px rgba(16,33,62,.12);
  animation: toast-in .25s ease-out; transition: opacity .35s ease, transform .35s ease; }
.flash.flash-hide { opacity: 0; transform: translateX(12px); }
.flash.success { background: #ecfdf3; color: var(--ok); border-color: #b7f0c9; }
.flash.error { background: #fef2f2; color: var(--err); border-color: #fbcaca; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* .back-btn-row { display: flex; justify-content: flex-end;
  max-width: 1000px; width: 100%; margin: 14px auto 0; padding: 0 18px; }
.back-btn { padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; font-size: 13px;
  box-shadow: 0 2px 8px rgba(16,33,62,.08); }
.back-btn:hover { border-color: var(--brand-2); color: var(--brand-2); } */

.bell { position: relative; margin-left: 18px; text-decoration: none; font-size: 17px; }
.bell-badge { position: absolute; top: -6px; right: -10px; background: var(--err); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 5px; line-height: 1.4; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--brand); font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; font-size: 12px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px;
  background: #eef2ff; color: var(--brand); }

.login-card { max-width: 380px; margin: 0 auto; }
.question .q-text { font-size: 16px; }
.option { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  margin: 7px 0; cursor: pointer; }
.option:hover { background: #eef4ff; border-color: var(--brand-2); }
.badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px;
  background: #eef2ff; color: var(--muted); }
.badge.done { background: #ecfdf3; color: var(--ok); }

.timer { position: sticky; top: 10px; z-index: 5; display: inline-block; padding: 9px 18px;
  border-radius: 9px; background: var(--brand-2); color: #fff; font-weight: 700;
  margin-bottom: 14px; box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.timer.urgent { background: var(--err); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.result-card { text-align: center; }
.score-big { font-size: 52px; font-weight: 800; margin: 12px 0; color: var(--brand); }

.site-footer { text-align: center; padding: 16px; margin-top: 20px;
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }

.confirm-overlay { position: fixed; inset: 0; background: rgba(15,22,45,.55);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  backdrop-filter: blur(2px); }
.confirm-box { background: var(--card); border-radius: 14px; padding: 26px 28px;
  max-width: 420px; width: calc(100% - 40px); box-shadow: 0 12px 40px rgba(15,22,45,.35);
  border-top: 4px solid var(--brand-2); }
.confirm-box p { margin: 0 0 20px; color: var(--ink); font-size: 15px; line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

.monitor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.monitor-grid-5x5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .monitor-grid-5x5 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.monitor-tile { position: relative; background: #0b1220; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; }
.monitor-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Shared screen fills the whole tile ("fullscreen"); webcam is a small
   picture-in-picture overlay pinned to the top of the tile. */
.monitor-tile .monitor-screen { position: absolute; inset: 0; background: #000; }
.monitor-tile .monitor-cam { position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 34%; aspect-ratio: 4/3; height: auto; border-radius: 6px; border: 2px solid rgba(255,255,255,.6);
  box-shadow: 0 2px 8px rgba(0,0,0,.5); z-index: 2; }
.monitor-tile-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 8px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px; z-index: 2; }
.monitor-tile .tile-close { position: absolute; top: 4px; right: 4px; padding: 2px 8px;
  background: rgba(0,0,0,.55); color: #fff; border-color: rgba(255,255,255,.3); z-index: 3; }

.funnel-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.funnel-label { flex: 0 0 260px; font-size: 14px; }
.funnel-bar-track { flex: 1; background: var(--line); border-radius: 6px; height: 16px; overflow: hidden; }
.funnel-bar { height: 100%; background: var(--brand-2); border-radius: 6px; }
.funnel-bar.qualified { background: var(--ok); }
.funnel-pct { flex: 0 0 50px; text-align: right; font-weight: 700; color: var(--muted); }

.cloudiceLink{
  color:  var(--muted) !important;
  text-decoration: none !important;
}

.back-btn-row {
    width: 100%;
    /* max-width: 1200px; */
    margin: 3vh 1.9vh;
    /* padding: 0 30px; */
    display: flex;
    justify-content: flex-start;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 1vh 2vh;
    border: 1px solid #0C8DD1;
    border-radius: 10px;
    background: none;
    color: #0C8DD1;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
}

/* .back-btn:hover {
    background: #2348C6;
    color: #fff;
    border-color: #2348C6;
} */

select{
  padding :1.3vh 1.8vh !important;
  border-radius: 10px;
  margin-left : 2vh;
  border:1px solid #d9d9d9;
  width :40vh;
}
select:focus{
  outline: none !important;
  box-shadow: none;
}

.user-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.user-block a{
  margin-top: 1vh !important;

}

.user-block .logout {
  font-size: 14px;
  
}

