/* iSmile BD Tasks — brand tokens from the iSmile Brand Identity Guidelines v1 */
:root {
  --navy: #1A2E42;
  --cyan: #26C3ED;
  --cyan-ink: #0B7594;
  --cyan-soft: #E9F8FD;
  --mist: #F4F7FA;
  --muted: #5E6B78;
  --line: #E1E8EF;
  --line-soft: #EEF2F6;
  --red: #B42318;
  --red-soft: #FDECEA;
  --amber: #93460C;
  --amber-soft: #FEF3E2;
  --radius: 12px;
  --f-head: 'Roboto Slab', Georgia, serif;
  --f-text: 'Nunito Sans', system-ui, sans-serif;
  --f-label: 'Rajdhani', 'Nunito Sans', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--f-text); color: var(--navy); background: var(--mist); font-size: 15px; line-height: 22px; }
a { color: var(--cyan-ink); }
a:hover { color: var(--navy); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--f-head); margin: 0; }
.h1 { font-weight: 800; font-size: 32px; line-height: 38px; margin: 4px 0 8px; }
.h2 { font-weight: 700; font-size: 22px; line-height: 28px; margin: 0 0 12px; }
.lbl { font-family: var(--f-label); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.ink { color: var(--cyan-ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 18px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.right { margin-left: auto; }

/* Shell */
.public-head { padding: 24px; display: flex; justify-content: center; }
.public-main { padding: 0 16px 48px; }
.narrow { max-width: 460px; margin: 0 auto; }
.shell { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: stretch; min-height: 100vh; }
.side { flex: 0 0 240px; background: var(--navy); color: #fff; padding: 28px 20px; display: flex; flex-direction: column; gap: 4px; }
.side-logo { margin: 0 0 6px 8px; }
.side-kicker { color: var(--cyan); margin: 0 0 22px 8px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; color: #fff; text-decoration: none; min-height: 44px; }
.side-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-link.on { background: var(--cyan); color: var(--navy); font-weight: 700; }
.side-link .count { margin-left: auto; background: var(--cyan); color: var(--navy); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.side-link.on .count { background: var(--navy); color: #fff; }
.side-foot { margin-top: auto; padding: 24px 14px 0; color: #B9C6D3; font-size: 13px; }
.linklike { background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; cursor: pointer; text-decoration: underline; }
.content { flex: 1 1 560px; min-width: 0; padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 24px; }
.phone-head, .tabbar { display: none; }
@media (max-width: 760px) {
  .side { display: none; }
  .phone-head { display: flex; width: 100%; align-items: center; gap: 10px; background: var(--navy); color: var(--cyan); padding: 14px 16px; }
  .content { padding: 16px 16px 96px; gap: 16px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 0 calc(10px + env(safe-area-inset-bottom)); z-index: 10; }
  .tabbar a { min-width: 72px; min-height: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
  .tabbar a.on { color: var(--cyan-ink); font-weight: 700; }
  .h1 { font-size: 26px; line-height: 32px; }
}

/* Building blocks */
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 20px; }
.card.soft { background: var(--cyan-soft); border-color: #BDEBF8; }
.card.flag-overdue { border-color: #F4C7C3; }
.card.flag-quiet { border-color: #F5D9A8; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font: 700 15px var(--f-text); padding: 10px 20px; min-height: 44px; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--cyan); color: var(--navy); }
.btn-primary:hover { color: var(--navy); filter: brightness(.96); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-block { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-family: var(--f-label); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; white-space: nowrap; }
.chip-overdue { background: var(--red-soft); color: var(--red); }
.chip-quiet { background: var(--amber-soft); color: var(--amber); }
.chip-self { color: var(--cyan-ink); padding: 0; }
.chip-done { background: var(--cyan-soft); color: var(--cyan-ink); }
.chip-muted { background: var(--line-soft); color: var(--muted); }
.proof { display: inline-block; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; background: var(--cyan-soft); color: var(--cyan-ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; text-decoration: none; }
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.progress.on-navy { background: #2E4560; }
.progress.on-navy > span { background: var(--cyan); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.list-row:first-of-type { border-top: 0; }
.stat { font: 800 34px/40px var(--f-head); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .wide { flex: 3 1 460px; min-width: 0; }
.cols > .narrowcol { flex: 2 1 320px; min-width: 0; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
table.data th { text-align: left; padding: 8px 8px 8px 0; color: var(--muted); }
table.data td { padding: 12px 8px 12px 0; border-top: 1px solid var(--line-soft); vertical-align: top; }
.red { color: var(--red); }
.amber { color: var(--amber); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=number], select, textarea {
  font: 15px/22px var(--f-text); color: var(--navy); border: 1px solid #C9D4DE; border-radius: var(--radius); padding: 10px 12px; background: #fff; min-height: 44px; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 1px; }
.hint { font-size: 13px; color: var(--muted); }
.alert { border-radius: var(--radius); padding: 12px 14px; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-ok { background: var(--cyan-soft); color: var(--navy); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { flex: 1; min-width: 64px; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.pills input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.pills input:focus-visible + span { outline: 3px solid var(--cyan); }
.adders { display: flex; gap: 8px; }
.adder { flex: 1; border: 1.5px dashed var(--cyan-ink); border-radius: var(--radius); background: #fff; color: var(--cyan-ink); font: 700 13px var(--f-text); min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; position: relative; }
.adder input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filelist { display: flex; flex-direction: column; gap: 8px; }
.filelist .file { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; min-width: 0; }
.filelist .file strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .file .size { flex-shrink: 0; white-space: nowrap; }
.filelist .file img, .filelist .file .doc { width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: var(--cyan-soft); color: var(--cyan-ink); display: flex; align-items: center; justify-content: center; font: 700 11px var(--f-text); text-transform: uppercase; }
/* A long file name must never widen the page (fieldsets default to their content's width). */
fieldset { min-width: 0; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; }
@media (max-width: 760px) { .sticky-actions { bottom: 64px; } }
.task-head { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.task-head .lbl { color: var(--cyan); }
.task-head .muted { color: #B9C6D3; }
.dot { width: 26px; height: 26px; border-radius: 999px; flex: none; display: flex; align-items: center; justify-content: center; }
.dot.done { background: var(--navy); color: #fff; }
.dot.open { border: 2px solid var(--line); }
.dot.late { border: 2px solid var(--red); }
.timeline-item { border-radius: var(--radius); background: #fff; border: 1px solid var(--line); padding: 12px 14px; }
.timeline-item.comment { background: var(--cyan-soft); border-color: transparent; }
.timeline-item.hidden { opacity: .6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
