/* PolicyLive — Employee portal (MIS / data team) */

.emp-auth-wrap { max-width: 560px; margin: auto; }

.pill--warn { background: #fff4e5; color: #b45309; }
.pill--danger { background: #fdecec; color: #b42318; }
.pill--muted { background: #eef1f6; color: #5b6474; }
.pill--orange { background: #fff1e6; color: #c2410c; }
.pill--violet { background: #f1ecfd; color: #6d3fd4; }

.emp-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.emp-toolbar input, .emp-toolbar select { max-width: 260px; }

.emp-card { background: #fff; border: 1px solid var(--grey-mid); border-radius: 16px; padding: 18px; margin-bottom: 20px; }
.emp-card h2 { margin: 0 0 4px; font-size: 1rem; color: var(--navy); }
.emp-card > p { margin: 0 0 14px; color: var(--grey); font-size: .84rem; }

.emp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.emp-form .full { grid-column: 1 / -1; }
.emp-form label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--grey); }
.emp-form input:disabled, .emp-form textarea:disabled, .emp-form select:disabled { background: #f4f6f9; color: #6b7484; font-weight: 500; }
.auto-block { border: 1px dashed #cdd6e3; border-radius: 12px; padding: 14px; background: #fbfcfe; }
.auto-block > b { display: block; color: var(--navy); font-size: .82rem; margin-bottom: 10px; }
.auto-ok { color: #137f3a; font-weight: 700; font-size: .8rem; }
.auto-warn { color: #b45309; font-weight: 700; font-size: .8rem; }

.notes-list { display: grid; gap: 8px; margin-top: 10px; }
.note-item { background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; padding: 8px 10px; font-size: .8rem; color: var(--navy); }
.note-item small { display: block; color: var(--grey); margin-top: 3px; }

.wa-btn, .call-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 6px 11px; font-size: .75rem; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.wa-btn { background: #25d366; color: #fff; }
.wa-btn:hover { background: #1eb855; color: #fff; }
.call-btn { background: var(--navy); color: #fff; }
.call-btn:hover { background: #123f73; color: #fff; }

.emp-ready { border-left: 4px solid #25d366; }
.emp-banner { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; font-size: .86rem; }
.emp-banner b { color: #166534; }

.emp-modal { position: fixed; inset: 0; background: rgba(13, 46, 89, .5); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 80; }
.emp-modal[hidden] { display: none; }
.emp-modal-card { background: #fff; border-radius: 16px; padding: 20px; width: min(600px, 100%); max-height: 90vh; overflow: auto; }
.emp-modal-card h3 { margin: 0 0 14px; color: var(--navy); }
#emp-modal-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#emp-modal-body label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--grey); }
#emp-modal-body .full { grid-column: 1 / -1; }
.emp-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem; }
.emp-empty { padding: 18px; text-align: center; color: var(--grey); font-size: .85rem; }

/* Full-screen break / lunch countdown */
.timer-overlay { position: fixed; inset: 0; z-index: 200; background: #0d2e59; color: #fff; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.timer-overlay.is-on { display: flex; }
.timer-label { font-size: .95rem; letter-spacing: .28em; text-transform: uppercase; opacity: .8; }
.timer-clock { font-size: clamp(64px, 18vw, 170px); font-weight: 800; line-height: 1; margin: 16px 0 8px; font-variant-numeric: tabular-nums; }
.timer-note { opacity: .85; max-width: 520px; font-size: .95rem; }
.timer-bar-wrap { width: min(560px, 90vw); height: 10px; border-radius: 99px; background: rgba(255,255,255,.2); margin-top: 30px; overflow: hidden; }
.timer-bar { display: block; height: 100%; background: #ff8a3d; width: 100%; transition: width .5s linear; }
.timer-foot { opacity: .6; font-size: .82rem; margin-top: 28px; max-width: 520px; }

/* Customer contact numbers are always blurred for telecallers (the admin
   portal has its own toggle). The lead picked via "Next call" is revealed
   because that is the number being dialled right now. */
body[data-portal="dialler"] .num-blur { filter: blur(4px); opacity: .5; user-select: none; }
body[data-portal="dialler"] .num-blur.num-reveal { filter: none; opacity: 1; user-select: text; }

.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 54px; gap: 12px; align-items: center; font-size: .84rem; }
.funnel-label { color: var(--grey); }
.funnel-bar { height: 12px; border-radius: 99px; background: #eef1f6; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: var(--navy); border-radius: 99px; }
.funnel-row:nth-child(2) .funnel-bar i { background: #4a7fd4; }
.funnel-row:nth-child(3) .funnel-bar i { background: #b45309; }
.funnel-row:nth-child(4) .funnel-bar i { background: #6d3fd4; }
.funnel-row:nth-child(5) .funnel-bar i { background: #c2410c; }
.funnel-row:nth-child(6) .funnel-bar i { background: #137f3a; }
.funnel-row:nth-child(7) .funnel-bar i { background: #b42318; }
.funnel-row:nth-child(8) .funnel-bar i { background: #9aa3b2; }
.funnel-count { text-align: right; font-weight: 700; color: var(--navy); }

.perf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.perf-tile { background: #f8fafc; border: 1px solid #eef1f6; border-radius: 14px; padding: 14px; }
.perf-tile span { display: block; font-size: .7rem; color: var(--grey); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.perf-tile strong { font-size: 1.5rem; color: var(--navy); }
.perf-tile small { display: block; font-size: .72rem; color: var(--grey); margin-top: 4px; }
.perf-tile--hl { background: #eef4fa; border-color: #d8e6f2; }
.perf-tile--hl strong { color: var(--navy); }

@media (max-width: 860px) { .perf-grid { grid-template-columns: 1fr 1fr; } }

.cb-list { display: grid; gap: 8px; }
.cb-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid #eef1f6; border-radius: 12px; padding: 10px 12px; background: #f8fafc; }
.cb-item b { color: var(--navy); }
.cb-item small { color: var(--grey); }
.cb-item--due { border-color: #f7c9c9; background: #fef3f3; }
.cb-item--due small { color: #b42318; font-weight: 700; }
.cb-item .act { margin: 0; }
.target-bar { height: 10px; border-radius: 99px; background: #eef1f6; overflow: hidden; margin-top: 10px; }
.target-bar i { display: block; height: 100%; background: linear-gradient(90deg, #0d2e59, #137f3a); border-radius: 99px; }
.target-note { font-size: .78rem; color: var(--grey); margin-top: 6px; }
.perf-sub { font-size: .72rem; color: var(--grey); text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 8px; }

@media (max-width: 860px) {
  .emp-form { grid-template-columns: 1fr; }
  .emp-toolbar input, .emp-toolbar select { max-width: none; width: 100%; }
}
@media (max-width: 640px) {
  #emp-modal-body { grid-template-columns: 1fr; }
}

/* ---- Unified Employee + MIS login (desk picker) ---- */
.login-card { border: 1px solid var(--grey-mid); box-shadow: var(--shadow-md); }
.login-card__head { margin-bottom: 20px; }
.login-card__head h2 { margin: 0 0 4px; font-size: 1.2rem; color: var(--navy); }
.login-card__head p { margin: 0; color: var(--grey); font-size: .84rem; line-height: 1.5; }

.role-group { margin-bottom: 20px; }
.role-group > label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--grey);
  margin-bottom: 7px;
}
.role-select { position: relative; }
.role-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  padding: 13px 44px 13px 15px;
  border: 1px solid var(--grey-mid);
  border-radius: 12px;
  background: var(--white);
  color: var(--black);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.role-select select:hover { border-color: var(--navy); }
.role-select select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13, 46, 89, .12);
}
[data-theme="dark"] .role-select select:focus { box-shadow: 0 0 0 3px rgba(156, 194, 240, .18); }
.role-select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--grey);
  border-bottom: 2px solid var(--grey);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
/* ---- Compact form pages (short hero, tight card) ---- */
.page-hero--compact { padding: 34px 0; }
.page-hero--compact .page-hero-inner h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 4px; }
.page-hero--compact .page-hero-inner p { margin: 0; font-size: .9rem; opacity: .85; }

.emp-auth-wrap .card { padding: 22px; }
.emp-auth-wrap .form-grid { gap: 14px 16px; }
.emp-auth-wrap .form-control { padding: 11px 14px; }
.emp-auth-wrap .consent { padding: 12px 14px; }
.emp-auth-wrap .consent span { font-size: .82rem; line-height: 1.5; }
.emp-auth-wrap .partner-stepper { margin-bottom: 16px; }

/* Fields that were read from the policy document (auto-filled) */
.form-control.is-auto { border-color: #22c55e !important; background: #f2fdf5; }
[data-theme="dark"] .form-control.is-auto { background: #10281a; border-color: #2f7d4f !important; }
.auto-tag {
  display: inline-block;
  margin-top: 2px;
  color: #137f3a;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Fields the policy document did not give us - MIS fills them by hand */
.form-control.is-empty,
select.form-control.is-empty,
textarea.form-control.is-empty {
  border-color: #e5484d !important;
  background: #fff6f6;
}
[data-theme="dark"] .form-control.is-empty {
  background: #2a1518;
  border-color: #a33a3a !important;
}
.empty-tag {
  display: inline-block;
  margin-top: 2px;
  color: #b42318;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
