/* WebValley IT Lead Portal. Colours taken from the WebValley IT logo. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-semibold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-bold.woff") format("woff"); }

:root {
  --green: #19ae5e;
  --green-dark: #0f7f43;
  --green-soft: #e8f7ee;
  --orange: #ef7b25;
  --orange-dark: #c95f12;
  --orange-soft: #fdf0e5;
  --red: #dc3545;
  --blue: #2f6fd6;
  --blue-dark: #1f56b0;
  --red-soft: #fdecee;
  --ink: #231f20;
  --ink-2: #3b3536;
  --muted: #6f6a6b;
  --line: #e7e5e4;
  --bg: #f5f5f3;
  --card: #fff;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 Inter, "Noto Sans Bengali", "Nirmala UI", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; font-weight: 600; }
h3:first-child { margin-top: 0; }
p { margin: 0; }
code { background: #efeeec; padding: 1px 5px; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.main { padding-top: 24px; padding-bottom: 60px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.pad { padding: 16px 18px; }
.pad-card { padding: 18px; }
.right { text-align: right; flex-shrink: 0; }
.late { color: var(--red); font-weight: 500; }
.nowrap { white-space: nowrap; }
.d-block { display: block; }
.mb { margin-bottom: 12px; }
.mt { margin-top: 14px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 26px 0 12px; }

/* Top bar: white, logo left, green active link */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--green) 0 62%, var(--orange) 62% 100%); }
.topbar-in { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 40px; width: auto; display: block; }
.brand-text { font-weight: 600; color: var(--muted); font-size: 12.5px; border-left: 1px solid var(--line); padding-left: 10px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: #f3f3f1; text-decoration: none; }
.nav a.on { color: var(--green-dark); background: var(--green-soft); }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-user .me { display: flex; align-items: center; gap: 8px; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 6px 7px; cursor: pointer; }

/* Page head */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin-top: 3px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.back::before { content: "\2039"; margin-right: 5px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; background: var(--green); color: #fff; border: 1px solid var(--green); padding: 8px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: #d6d3d1; font-weight: 500; }
.btn-ghost:hover { background: #f5f5f4; border-color: #c4c0bd; }
.btn-block { width: 100%; padding: 11px; }
.link-danger { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; padding: 0; }
.link-danger:hover { text-decoration: underline; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.card.form, .card.filters { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 40px 20px; }
.empty p { margin-bottom: 14px; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lead-cols { grid-template-columns: 1fr 1fr; align-items: start; }

/* Dashboard tiles: solid brand colours with a "View details" strip */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { display: flex; flex-direction: column; border-radius: 14px; color: #fff; overflow: hidden; min-height: 148px; transition: transform .15s; }
.tile:hover { text-decoration: none; transform: translateY(-2px); }
.tile-body { flex: 1; padding: 18px 20px 14px; }
.tile strong { display: block; font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.tile span { display: block; margin-top: 8px; font-weight: 600; font-size: 15px; }
.tile small { display: block; font-size: 12px; opacity: .85; margin-top: 2px; }
.tile-foot { background: rgba(0,0,0,.15); padding: 9px 20px; font-size: 13px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.t-ink { background: var(--ink); }
.t-green { background: var(--green); }
.t-dkgreen { background: var(--green-dark); }
.t-orange { background: var(--orange); }

/* Search */
.search-big { display: flex; gap: 8px; margin-bottom: 20px; }
.search-big input { margin: 0; padding: 11px 14px; font-size: 15px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.meet-list li { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; padding: 12px 18px; align-items: start; }
.meet-list li:hover { background: #fafaf9; }
.meet-time { font-weight: 700; color: var(--green-dark); font-size: 13px; padding-top: 2px; }
.meet-info a { color: var(--ink); }

/* Status: one value shown at a time, chosen from a dropdown */
.status-select { display: inline-block; width: auto; margin: 0; padding: 5px 30px 5px 12px; border-radius: 20px; border: 0; font-weight: 600; font-size: 12.5px; color: #fff; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23fff' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
.status-select option { color: var(--ink); background: #fff; }
.status-select.big { font-size: 14px; padding: 10px 36px 10px 14px; border-radius: 8px; width: 100%; }
.st-success { background-color: var(--green); }
.st-waiting { background-color: var(--orange); }
.st-meetset { background-color: var(--blue); }
.st-cancel { background-color: var(--red); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; color: #fff; }
.b-success { background: var(--green); }
.b-waiting { background: var(--orange); }
.b-meetset { background: var(--blue); }
.b-cancel { background: var(--red); }
.src { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 4px; white-space: nowrap; }
.src-fb { background: #e9f0fd; color: #1d4fa8; }
.src-manual { background: #f0eeec; color: var(--ink-2); }
tr.row-success td:first-child, li.row-success { box-shadow: inset 4px 0 0 var(--green); }
tr.row-waiting td:first-child, li.row-waiting { box-shadow: inset 4px 0 0 var(--orange); }
tr.row-meetset td:first-child, li.row-meetset { box-shadow: inset 4px 0 0 var(--blue); }
.meet-over { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--red); }
tr.row-cancel td:first-child, li.row-cancel { box-shadow: inset 4px 0 0 var(--red); }
.tag-today, .tag-tom { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; margin-left: 4px; vertical-align: 1px; }
.tag-today { background: var(--green); color: #fff; }
.tag-tom { background: var(--green-soft); color: var(--green-dark); }

/* Performance table (dark header) */
.perf { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; margin-bottom: 18px; }
.perf-head { background: var(--ink); color: #fff; padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.perf-head h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills a { padding: 5px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: #ebe9e6; }
.pills a:hover { text-decoration: none; background: #e0ddd9; }
.pills a.on { background: var(--green); color: #fff; }
.perf-head .pills a { background: rgba(255,255,255,.12); color: #fff; }
.perf-head .pills a.on { background: var(--green); }
.perf-wrap { overflow-x: auto; }
.perf-table { width: 100%; border-collapse: collapse; }
.perf-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; text-align: center; color: #fff; white-space: nowrap; }
.perf-table th:first-child { text-align: left; background: var(--ink-2); }
.perf-table th.h-leads { background: #6f6a6b; }
.perf-table th.h-meet { background: var(--ink-2); }
.perf-table th.h-success { background: var(--green); }
.perf-table th.h-waiting { background: var(--orange); }
.perf-table th.h-meetset { background: var(--blue); }
.perf-table th.h-cancel { background: var(--red); }
.perf-table th.h-rate { background: var(--green-dark); }
.perf-table td { padding: 11px 14px; text-align: center; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; }
.perf-table td:first-child { text-align: left; font-size: 14px; }
.perf-table tbody tr:nth-child(even) { background: #fafaf9; }
.perf-table tfoot td { background: #f3f3f1; font-size: 15px; border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.who .avatar { background: var(--ink); }
.t-success { color: var(--green-dark); }
.t-waiting { color: var(--orange-dark); }
.t-meetset { color: var(--blue-dark); }
.t-cancel { color: var(--red); }

/* Year report rows */
.year-list { list-style: none; margin: 0; padding: 0; }
.year-list li { display: grid; grid-template-columns: 90px 1fr 70px; gap: 16px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.year-list li:last-child { border-bottom: 0; }
.year-list li.now { background: #fafaf9; }
.year-list .m { font-weight: 600; }
.year-list .m a { color: var(--ink); }
.year-list .nums { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.year-list .nums b { color: var(--ink); font-weight: 600; }
.bar { display: block; height: 6px; border-radius: 3px; background: #efeeec; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; }
.rate { font-weight: 700; text-align: right; font-size: 16px; }
.lo { color: var(--red); } .bar i.lo { background: var(--red); }
.mid { color: var(--orange-dark); } .bar i.mid { background: var(--orange); }
.hi { color: var(--green-dark); } .bar i.hi { background: var(--green); }

/* Summary row (reports, import) */
.month-row { display: grid; grid-template-columns: repeat(6, 1fr); }
.month-row.report-cards { grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.month-row.compact { grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; }
.month-row > div { padding: 12px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.month-row.compact > div { border-bottom: 0; }
.month-row span { display: block; font-size: 12.5px; color: var(--muted); }
.month-row strong { font-size: 24px; font-weight: 700; }
.c-success strong { color: var(--green-dark); }
.c-waiting strong { color: var(--orange-dark); }
.c-meetset strong { color: var(--blue-dark); }
.c-cancel strong { color: var(--red); }
.c-fb strong { color: #1d4fa8; }

/* Forms */
.form label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 14px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; font: inherit; color: var(--ink); background: #fff; border: 1px solid #d6d3d1; border-radius: 8px; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(25, 174, 94, .25); border-color: var(--green); }
input[disabled], input[readonly] { background: #f5f5f4; color: var(--muted); }
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.span2 { grid-column: span 2; }
.form-foot { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.narrow { max-width: 520px; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }
.check input { width: auto; margin: 0; accent-color: var(--green); }
.pad-top { padding-top: 26px; }
.chip { font: inherit; font-size: 12px; background: var(--green-soft); color: var(--green-dark); border: 0; border-radius: 20px; padding: 3px 10px; cursor: pointer; }
.chip:hover { background: #d3f0df; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.perm { padding: 7px 0; margin: 0 !important; border-bottom: 1px dashed var(--line); }
.danger-zone { margin: 4px 0 20px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 5px 0 0; }
.seg label { margin: 0 !important; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 16px; cursor: pointer; font-weight: 500; border: 1px solid #d6d3d1; border-radius: 8px; background: #fff; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--green); }
.meeting-fields.off { opacity: .45; }
.field-note { display: block; font-weight: 400; font-size: 12.5px; margin-top: 5px; }
.field-note.dup { color: var(--red); }
.field-note.ok { color: var(--green-dark); }
.label { display: block; font-weight: 500; font-size: 13px; }
.field { margin-bottom: 14px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input, .filters select { width: auto; margin: 0; }
.filters .grow { flex: 1 1 240px; }
.inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.inline-date input { margin: 0; width: auto; }

/* Tables */
.table-card { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafaf9; white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: #fafaf9; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td a.rowlink { color: var(--ink); }
.clip-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.small-table td, .small-table th { padding: 7px 10px; }
.pager { display: flex; justify-content: center; gap: 18px; align-items: center; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 14px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.tabs a.on { color: var(--green-dark); box-shadow: inset 0 -2px 0 var(--green); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* Lead details */
.details { display: grid; grid-template-columns: 120px 1fr; margin: 0; padding: 8px 18px 14px; }
.details dt { color: var(--muted); padding: 7px 0; }
.details dd { margin: 0; padding: 7px 0; word-break: break-word; }
.notes { border-top: 1px solid var(--line); padding: 14px 18px; }
.notes h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* Import help */
.help p { margin-bottom: 10px; }
.help ul { padding-left: 18px; margin: 0 0 16px; color: var(--ink-2); }
.help li { margin-bottom: 6px; }
.cols-hint { display: flex; flex-wrap: wrap; gap: 6px; }
.cols-hint span, .colmap { display: inline-block; background: #f3f3f1; border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px; font-size: 12.5px; margin: 2px 4px 2px 0; }

/* Settings logo preview */
.logo-preview { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed #d6d3d1; border-radius: 10px; margin-bottom: 14px; }
.logo-preview img { height: 40px; width: auto; }

/* Alerts */
.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.alert-ok { background: var(--green-soft); border-color: #b6e3c8; color: #0b5e32; }
.alert-err { background: var(--red-soft); border-color: #f2c0c5; color: #8f1d29; }

/* Login */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: var(--bg); }
.auth-box { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 30px 28px; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(35, 31, 32, .08); border-top: 4px solid var(--green); }
.auth-box.wide { max-width: 620px; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head img { height: 44px; width: auto; margin-bottom: 12px; }
.auth-head h1 { font-size: 18px; }

/* Responsive */
@media (max-width: 1100px) {
  .nav a { padding: 8px 9px; }
  .brand-text { display: none; }
}
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .cols, .lead-cols { grid-template-columns: 1fr; }
  .month-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1180px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 65px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 14px 14px; box-shadow: 0 10px 20px rgba(0,0,0,.06); }
  .nav-open .nav { display: flex; }
  .nav-user { margin: 6px 0 0; border-top: 1px solid var(--line); padding-top: 8px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .main { padding-top: 18px; }
  .brand img { height: 30px; }
  .tiles { gap: 10px; }
  .tile { min-height: 124px; }
  .tile-body { padding: 14px 14px 10px; }
  .tile strong { font-size: 32px; }
  .tile span { font-size: 13.5px; }
  .tile-foot { padding: 8px 14px; font-size: 12px; }
  .month-row, .month-row.report-cards { grid-template-columns: 1fr 1fr; }
  .month-row.src-row { grid-template-columns: repeat(3, 1fr); }
  .month-row.src-row > div { padding: 10px 12px; }
  .month-row.compact { grid-template-columns: repeat(3, 1fr); }
  .grid2, .perm-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .filters > * { flex: 1 1 100%; }
  .filters .inline { flex: 1 1 45%; }
  .filters .inline input { flex: 1; }
  .search-big input { font-size: 14px; }
  .meet-list li { grid-template-columns: 1fr; gap: 6px; }
  .meet-list .right { text-align: left; }
  .meet-time { grid-column: 1 / -1; }
  .table thead, .table tfoot { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 84px 1fr; column-gap: 10px; align-items: center; }
  .table td > * { grid-column: 2; justify-self: start; }
  .table td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12px; grid-column: 1; grid-row: 1 / span 4; align-self: start; padding-top: 2px; }
  .last-note { max-width: none; }
  tr.row-success td:first-child, tr.row-waiting td:first-child, tr.row-cancel td:first-child, tr.row-meetset td:first-child { box-shadow: none; }
  tr.row-meetset { box-shadow: inset 4px 0 0 var(--blue); }
  tr.row-success { box-shadow: inset 4px 0 0 var(--green); }
  tr.row-waiting { box-shadow: inset 4px 0 0 var(--orange); }
  tr.row-cancel { box-shadow: inset 4px 0 0 var(--red); }
  .clip-cell { max-width: none; white-space: normal; }
  .perf-table { min-width: 560px; }
  .perf-table td { font-size: 16px; padding: 10px; }
  .year-list li { grid-template-columns: 44px 1fr 46px; gap: 10px; padding: 12px 14px; }
  .year-list .nums { gap: 2px 12px; font-size: 12.5px; }
  .page-head h1 { font-size: 20px; }
  .details { grid-template-columns: 105px 1fr; }
}
@media print {
  .topbar, .no-print, .menu-btn, .alert { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .main { padding: 0; }
  .card, .perf { border-color: #ccc; break-inside: avoid; }
  .badge, .perf-table th, .bar i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Follow-up */
.count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; margin-left: 3px; vertical-align: 1px; }
.fu-form textarea { min-height: 70px; }
.quick-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.timeline { list-style: none; margin: 0; padding: 4px 18px 8px; }
.timeline li { display: grid; grid-template-columns: 62px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.tl-date { text-align: center; background: var(--green-soft); color: var(--green-dark); border-radius: 8px; padding: 6px 2px; font-weight: 700; font-size: 13px; line-height: 1.2; height: fit-content; }
.tl-date span { display: block; font-size: 11px; font-weight: 500; }
.tl-body p { margin: 2px 0 4px; white-space: pre-line; }
.tl-meta { font-size: 12.5px; color: var(--muted); }
.inline-form { display: inline; margin-left: 6px; }
.last-note { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 340px; }
.tab-count { color: var(--muted); font-weight: 500; }

/* Next call fields */
.next-call { margin-bottom: 6px; }
.grid2.tight label { margin-bottom: 10px; }

/* Call alert under the top bar: glows and the bell shakes until the calls are done */
.call-alert { background: var(--orange); color: #fff; position: sticky; top: 65px; z-index: 15; animation: alertGlow 2s ease-in-out infinite; }
.call-alert.has-missed { background: #d9480f; }
.call-alert-in { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
.call-alert .bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.18); flex-shrink: 0; animation: bellShake 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
.call-alert .bell::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #fff; animation: ring 2s ease-out infinite; }
.call-alert .bell i { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #fff; color: var(--orange-dark); font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.call-text { flex: 1; min-width: 0; }
.call-text .missed { display: inline-block; background: rgba(0,0,0,.2); border-radius: 4px; padding: 0 7px; font-size: 12.5px; font-weight: 600; margin-left: 4px; }
.call-now { display: block; font-size: 13px; font-weight: 600; }
.call-now:empty { display: none; }
.call-alert .btn { background: rgba(255,255,255,.95); color: var(--orange-dark); border-color: transparent; }
.call-alert .btn:hover { background: #fff; }
.call-alert .btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.call-alert .btn-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.call-list { display: none; list-style: none; margin: 0 0 10px; padding: 4px 0; background: #fff; border-radius: 10px; color: var(--ink); box-shadow: 0 8px 20px rgba(0,0,0,.12); max-height: 50vh; overflow: auto; }
.call-alert.open .call-list { display: block; }
.call-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); align-items: center; }
.call-list li:last-child { border-bottom: 0; }
.call-list a { color: var(--ink); }
.call-list .when { font-size: 12.5px; font-weight: 600; color: var(--orange-dark); white-space: nowrap; }
.call-list li.due { background: var(--orange-soft); }
.call-list li.due .when { color: #d9480f; }
.call-alert.calling { animation: alertGlow .9s ease-in-out infinite; }
.call-alert.calling .bell { animation: bellShake .9s ease-in-out infinite; }
@keyframes bellShake {
  0%, 60%, 100% { transform: rotate(0); }
  64% { transform: rotate(16deg); } 70% { transform: rotate(-14deg); } 76% { transform: rotate(10deg); } 82% { transform: rotate(-6deg); } 88% { transform: rotate(3deg); }
}
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes alertGlow { 0%, 100% { box-shadow: inset 0 0 0 rgba(255,255,255,0); filter: brightness(1); } 50% { filter: brightness(1.1); box-shadow: 0 4px 18px rgba(239,123,37,.55); } }
@media (prefers-reduced-motion: reduce) { .call-alert, .call-alert .bell, .call-alert .bell::after { animation: none !important; } }

@media (max-width: 760px) {
  .call-alert-in { flex-wrap: wrap; gap: 8px 10px; }
  .call-text { flex: 1 1 calc(100% - 50px); font-size: 13.5px; }
  .call-alert .btn { flex: 1; }
}
@media print { .call-alert { display: none !important; } }
#followup, #history, #performance { scroll-margin-top: 140px; }
@media (max-width: 760px) { #followup, #history, #performance { scroll-margin-top: 250px; } }
.call-links { display: flex; gap: 10px; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.month-row.report-cards.six { grid-template-columns: repeat(6, 1fr); }
a.who { color: var(--ink); }
a.who:hover { text-decoration: none; color: var(--green-dark); }
.who .small { font-weight: 400; }
.act-log .day-sep { display: block; grid-template-columns: none; padding: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.act-log .act-meeting_set .tl-date { background: var(--orange-soft); color: var(--orange-dark); }
.act-log .act-call .tl-date, .act-log .act-login .tl-date { background: #f0eeec; color: var(--ink-2); }
.act-log .act-deleted .tl-date { background: var(--red-soft); color: var(--red); }
@media (max-width: 1000px) { .month-row.report-cards.six { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .month-row.report-cards.six { grid-template-columns: 1fr 1fr; } }

/* Attendance */
.att-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.att-box > div:first-child { flex: 1; min-width: 200px; }
.att-box .att { margin-left: 6px; }
.btn-check { padding: 11px 22px; font-size: 15px; }
.att-wifi { font-size: 13px; font-weight: 600; color: var(--orange-dark); background: var(--orange-soft); padding: 8px 12px; border-radius: 8px; }
.att { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.att-ok { background: var(--green-soft); color: var(--green-dark); }
.att-late { background: var(--orange-soft); color: var(--orange-dark); }
.att-leave { background: #e9f0fd; color: #1d4fa8; }
.att-off { background: #f0eeec; color: var(--muted); }
.att-absent { background: var(--red-soft); color: var(--red); }
.att-table tr.att-off td, .att-table tr.att-holiday td { color: var(--muted); background: #fafaf9; }
.att-table tr.att-absent td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.att-table tr.att-late td:first-child { box-shadow: inset 4px 0 0 var(--orange); }
.att-table tr.att-present td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.att-cols { grid-template-columns: 1.4fr 1fr; align-items: start; }
.score-card { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.score-card p { margin-top: 3px; }
.score-ring { --c: var(--green); width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #efeeec 0); }
.score-ring span { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.score-ring.mid { --c: var(--orange); } .score-ring.lo { --c: var(--red); }
.month-row strong.sm { font-size: 18px; }
.ip-now { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--orange-soft); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; }
.ip-now.ok { background: var(--green-soft); }
.today-att li, .leave-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; }
.today-att .right { font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.fix summary { cursor: pointer; font-size: 12.5px; color: var(--green-dark); }
.fix form { display: flex; gap: 6px; margin-top: 6px; }
.fix input { width: 110px; margin: 0; padding: 4px 6px; }
@media (max-width: 1000px) { .att-cols { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .att-box form, .att-box .btn-check { width: 100%; } }

/* Client messages */
.msg-card { border-left: 4px solid var(--green); }
.msg-preview { font-family: "Noto Sans Bengali", "Nirmala UI", "Hind Siliguri", Inter, sans-serif; font-size: 15px; background: #e7f7ec; border-radius: 10px 10px 10px 2px; padding: 12px 14px; line-height: 1.6; margin-bottom: 12px; white-space: normal; }
.btn-wa { border-color: var(--green); color: var(--green-dark); font-weight: 600; }
.btn-wa:hover { background: var(--green); color: #fff; border-color: var(--green); }
.wa-link { display: block; margin-top: 6px; font-weight: 600; color: var(--green-dark); }
.main { overflow-x: clip; }

/* SMS */
.sms-card { border-left: 4px solid var(--blue); }
.card-head.flat { padding: 0 0 12px; border: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chip.on { background: var(--green); color: #fff; }
.sms-card textarea { font-family: "Noto Sans Bengali", "Nirmala UI", "Hind Siliguri", Inter, sans-serif; font-size: 15px; line-height: 1.6; }
.sms-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.sms-log { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.sms-log li { padding: 2px 0; }
.sms-log li.late { color: var(--red); }
.sms-link { margin-left: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.grid3 textarea { font-family: "Noto Sans Bengali", "Nirmala UI", "Hind Siliguri", Inter, sans-serif; }
.form .switch-row, .switch-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: 10px; margin-bottom: 16px; cursor: pointer; }
.switch-row { position: relative; }
.switch-row input { position: absolute; left: 0; top: 0; margin: 0; opacity: 0; width: 1px; height: 1px; }
.switch { display: block; flex: none; width: 42px; height: 24px; border-radius: 12px; background: #c9c5c3; position: relative; transition: background .15s; margin-top: 1px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch-row input:checked + .switch { background: var(--green); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .mode-pick { grid-template-columns: 1fr; } }
.mode-pick .check { align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.mode-pick .check input { margin-top: 3px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--green-dark); font-weight: 600; cursor: pointer; text-decoration: underline; }
.test-row { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.test-num { max-width: 220px; }

.msg-edit { font-family: "Noto Sans Bengali", "Nirmala UI", "Hind Siliguri", Inter, sans-serif; font-size: 15px; line-height: 1.6; background: #e7f7ec; border-color: #cdebd8; }
