:root {
  --bg: #eefbf5;
  --bg-2: #f8fbfa;
  --sidebar: #111827;
  --sidebar-2: #182231;
  --panel: #ffffff;
  --ink: #151b23;
  --muted: #647080;
  --line: #dfe7ee;
  --green: #13c982;
  --green-dark: #0c9f67;
  --green-soft: #e6f9f1;
  --green-rgb: 19, 201, 130;
  --red: #ff5264;
  --red-soft: #fff0f2;
  --red-rgb: 255, 82, 100;
  --orange: #ff951a;
  --orange-soft: #fff5e8;
  --shadow: 0 12px 34px rgba(17, 24, 39, .08);
  --soft-shadow: 0 4px 14px rgba(17, 24, 39, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(var(--green-rgb), .12), transparent 260px),
    var(--bg);
  color: var(--ink);
  font-family: "Nirmala UI", "Shruti", "Noto Sans Gujarati", Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

button, .nav-item {
  border: 0;
  border-radius: 7px;
  min-height: 34px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 9px 11px;
  font-size: 13px;
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(var(--green-rgb), .65);
  box-shadow: 0 0 0 3px rgba(var(--green-rgb), .12);
}

textarea { resize: vertical; }
label span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
h1, h2, h3, p { margin-top: 0; overflow-wrap: anywhere; }
h1 { margin-bottom: 0; font-size: 20px; line-height: 1.15; font-weight: 700; }
h2 { font-size: 16px; }
h3 { font-size: 14px; margin-bottom: 10px; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--red); min-height: 18px; margin: 0; font-size: 12px; }
.eyebrow { color: var(--green-dark); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.stack { display: grid; gap: 9px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.inline-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.primary { background: var(--green); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(var(--green-rgb), .22); }
.primary:hover { background: var(--green-dark); }
.ghost { background: #eef3f7; color: #435063; }
.danger { background: var(--red-soft); color: #a31d2d; }
.strong-danger { background: var(--red); color: #fff; font-weight: 800; box-shadow: 0 8px 18px rgba(var(--red-rgb), .2); }
.strong-danger:hover { background: #e83f51; }
.small { min-height: 30px; padding: 6px 9px; font-size: 12px; }

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(820px, 100%);
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #e8eef5;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
}

.brand {
  height: 68px;
  display: grid;
  align-content: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand strong { color: var(--green); font-size: 12px; letter-spacing: .08em; }
.brand span { font-size: 18px; font-weight: 800; }

.nav {
  display: grid;
  gap: 6px;
  padding: 12px 9px;
}

.nav-item {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: #c7d1dd;
  font-weight: 700;
  font-size: 12px;
}

.nav-item:hover { background: rgba(255,255,255,.06); }
.nav-item.active {
  background: rgba(var(--green-rgb), .18);
  color: #dffdf1;
  box-shadow: inset 3px 0 0 var(--green);
}

#openAdminFromNav {
  background: rgba(var(--green-rgb), .12);
  color: #dffdf1;
}

#openAdminFromNav.active {
  background: rgba(var(--green-rgb), .24);
  box-shadow: inset 3px 0 0 var(--green);
}

.page {
  min-width: 0;
  min-height: 100vh;
}

.appbar {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(240px, 390px) auto auto;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(17, 24, 39, .07);
  padding: 10px 18px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.top-search {
  background: #f7fafc;
  height: 38px;
}

.notification-wrap {
  position: relative;
  justify-self: end;
}

.notification-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, .08);
  color: var(--green-dark);
  box-shadow: var(--soft-shadow);
  position: relative;
  font-weight: 900;
}

.notification-btn span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: auto;
  border-radius: 9px;
  background: var(--green-soft);
}

.notification-btn b {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  line-height: 1;
  border: 2px solid #fff;
}

.notification-btn b.muted-badge {
  background: #94a3b8;
}

.notification-panel {
  position: absolute;
  top: 48px;
  right: 0;
  width: min(360px, calc(100vw - 32px));
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(17, 24, 39, .1);
  border-radius: 12px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .18);
  padding: 10px;
  z-index: 20;
}

.notification-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 5px 9px;
  color: var(--ink);
}

.notification-panel header small {
  color: var(--muted);
  font-size: 11px;
}

.notification-list {
  display: grid;
  gap: 7px;
}

.notification-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 9px 10px;
  text-align: left;
  background: #f8fafc;
  color: var(--ink);
  border: 1px solid rgba(17, 24, 39, .06);
  border-radius: 9px;
}

.notification-item:hover {
  border-color: rgba(var(--green-rgb), .45);
  background: var(--green-soft);
}

.notification-item span {
  display: grid;
  gap: 2px;
}

.notification-item small {
  color: var(--muted);
  font-size: 11px;
}

.notification-item b {
  min-width: 32px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(17, 24, 39, .08);
}

.user-chip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.user-chip > span {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #31df9b, #9bf23e);
  color: #052016;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
}

.user-chip small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.content {
  padding: 18px clamp(16px, 3vw, 46px);
}

.analytics-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
}

.analytics-summary article {
  min-height: 58px;
  padding: 10px 12px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(17, 24, 39, .07);
  border-radius: 10px;
  box-shadow: var(--soft-shadow);
}

.analytics-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr .9fr;
  gap: 12px;
}

.analytics-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
  padding: 14px;
  min-width: 0;
}

.analytics-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(17, 24, 39, .07);
}

.analytics-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(120px, .55fr);
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(17, 24, 39, .06);
}

.analytics-row:first-child {
  border-top: 0;
}

.analytics-rank,
.priority-rank {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(var(--green-rgb), .1);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
}

.analytics-main {
  min-width: 0;
}

.analytics-main strong,
.priority-content strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-main small,
.priority-content small {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.analytics-main small b {
  color: var(--red);
  font-weight: 800;
}

.analytics-track {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  gap: 8px;
}

.analytics-bar {
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(15, 23, 42, .07);
}

.analytics-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
}

.analytics-track em {
  color: #64748b;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.priority-item {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  text-align: left;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(17, 24, 39, .07);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 10px;
  margin-bottom: 8px;
  box-shadow: none;
}

.priority-rank {
  background: var(--red-soft);
  color: var(--red);
}

.priority-item b {
  border: 1px solid rgba(var(--red-rgb), .25);
  background: var(--red-soft);
  color: var(--red);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
}

.priority-item:hover {
  border-color: rgba(var(--red-rgb), .35);
  background: #fff;
  transform: translateY(-1px);
}

.analytics-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.task-filter-panel {
  position: sticky;
  top: 66px;
  z-index: 4;
  margin: 0 calc(clamp(16px, 3vw, 46px) * -1) 10px;
  padding: 18px clamp(16px, 3vw, 46px) 10px;
  background:
    linear-gradient(180deg, rgba(231, 250, 242, .98), rgba(231, 250, 242, .94)),
    var(--bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17, 24, 39, .12);
}

.period-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.period-card {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(17, 24, 39, .07);
  border-radius: 10px;
  padding: 8px 9px;
  color: #4a5665;
  font-weight: 800;
  min-height: 42px;
  display: grid;
  align-content: center;
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.period-card.active {
  background: #fff;
  border-color: rgba(var(--green-rgb), .75);
  box-shadow: inset 0 -3px 0 var(--green), var(--shadow);
  color: var(--ink);
}

.status-strip {
  display: flex;
  justify-content: center;
  gap: 30px;
  border-bottom: 1px solid rgba(17, 24, 39, .16);
  margin-bottom: 10px;
}

.status-tab {
  background: transparent;
  border-radius: 0;
  color: #53606c;
  font-size: 15px;
  padding: 7px 2px 14px;
  min-height: auto;
}

.status-tab.active {
  color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--green);
}

.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: var(--red); }
.dot.red-ring { border: 2px solid var(--red); background: transparent; }
.dot.orange { background: var(--orange); }
.dot.green { background: var(--green); }

.sort-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}

.one-time-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 40px;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  padding: 7px 11px;
  box-shadow: var(--soft-shadow);
  color: #405064;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.one-time-filter input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
}

.one-time-filter:has(input:checked) {
  border-color: rgba(var(--green-rgb), .55);
  background: var(--green-soft);
  color: var(--green-dark);
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,.88);
  padding: 5px 7px 5px 10px;
  box-shadow: var(--soft-shadow);
}

.sort-control span {
  margin: 0;
  color: #526170;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.sort-control select {
  border: 0;
  box-shadow: none;
  min-height: 28px;
  padding: 4px 26px 4px 6px;
  background: transparent;
  font-weight: 700;
}

.completed-strip {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: -4px 0 0;
}

.completed-filter {
  min-width: 150px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #53606c;
  font-weight: 800;
  box-shadow: var(--soft-shadow);
}

.completed-filter.active {
  border-color: rgba(var(--green-rgb), .75);
  box-shadow: inset 0 -3px 0 var(--green), var(--soft-shadow);
  color: var(--ink);
}

.completed-filter b {
  margin-left: 6px;
  color: var(--ink);
}

.clock-dot {
  width: 18px;
  height: 18px;
}

.task-list {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.task-card {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(var(--green-rgb), .8);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 12px 14px 10px;
  box-shadow: var(--soft-shadow);
  position: relative;
}

.task-card.overdue {
  border-color: rgba(var(--red-rgb), .7);
  border-left-color: var(--red);
}

:root[data-card-style="bold"] .task-card {
  border-width: 2px;
  border-left-width: 7px;
}

:root[data-card-style="minimal"] .task-card {
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

:root[data-card-style="soft"] .task-card {
  background: linear-gradient(180deg, #fff 0%, var(--green-soft) 100%);
  border-color: rgba(var(--green-rgb), .35);
}

:root[data-card-style="soft"] .task-card.overdue {
  background: linear-gradient(180deg, #fff 0%, var(--red-soft) 100%);
  border-color: rgba(var(--red-rgb), .35);
  border-left-color: var(--red);
}

.task-age {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--red);
  font-size: 12px;
}

.task-title {
  font-size: 17px;
  line-height: 1.3;
  margin: 0 110px 10px 0;
  font-weight: 650;
}

.task-title .code {
  color: #66717e;
  font-size: 12px;
  font-weight: 800;
  margin-right: 8px;
}

.task-meta {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  color: #5b6470;
  margin-bottom: 10px;
  font-size: 12px;
}

.task-meta b { color: var(--ink); }
.meta-red { color: var(--red); }

.task-remark {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  width: fit-content;
  max-width: 100%;
  margin: -1px 0 10px;
  padding: 7px 9px;
  border: 1px solid rgba(var(--green-rgb), .18);
  border-radius: 8px;
  background: rgba(230, 249, 241, .58);
  color: #405064;
  font-size: 12px;
  line-height: 1.35;
}

.task-remark b {
  color: var(--green-dark);
  white-space: nowrap;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  border: 1px solid rgba(17, 24, 39, .1);
  border-radius: 999px;
  background: #f8fafc;
  color: #264a70;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  text-decoration: none;
}

.attachment-link:hover {
  border-color: rgba(var(--green-rgb), .36);
  background: #fff;
  color: var(--green-dark);
}

.attachment-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delegation-info {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(17, 24, 39, .08);
  background: #f8fafc;
  color: #445364;
  font-size: 12px;
}

.delegation-info b {
  color: var(--ink);
}

.delegation-info.blocked {
  border-color: rgba(var(--red-rgb), .2);
  background: var(--red-soft);
}

.delegation-info.delegation-card {
  display: grid;
  gap: 7px;
  align-items: stretch;
  min-width: min(460px, 100%);
  padding: 9px 11px;
  border-color: rgba(var(--red-rgb), .24);
  background: linear-gradient(180deg, #fff 0%, var(--red-soft) 100%);
  box-shadow: 0 10px 22px rgba(var(--red-rgb), .08);
}

.delegation-info.delegation-card.ready {
  border-color: rgba(var(--green-rgb), .24);
  background: linear-gradient(180deg, #fff 0%, var(--green-soft) 100%);
  box-shadow: 0 10px 22px rgba(var(--green-rgb), .08);
}

.delegation-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.delegation-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(var(--red-rgb), .22);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2px;
  padding: 3px 7px;
  text-transform: uppercase;
}

.delegation-info.ready .delegation-chip {
  border-color: rgba(var(--green-rgb), .24);
  color: var(--green-dark);
}

.delegation-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delegation-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.delegation-detail span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 7px;
  background: rgba(255,255,255,.78);
  color: #405064;
  padding: 5px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delegation-detail b {
  color: #687586;
  font-size: 10px;
  text-transform: uppercase;
}

.delegation-info.ready {
  border-color: rgba(var(--green-rgb), .2);
  background: var(--green-soft);
}

.task-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.view-updates-btn {
  color: #23466b;
  background: #eef4f8;
}

.delegate-btn {
  color: var(--green-dark);
  background: var(--green-soft);
}

.disabled-btn,
.disabled-btn:hover {
  opacity: .55;
  cursor: not-allowed;
  color: #66717e;
  border-color: var(--line);
  background: #eef2f6;
}

.task-delete-btn {
  color: #b42334;
  background: var(--red-soft);
}

.task-delete-btn:hover {
  background: rgba(var(--red-rgb), .16);
  color: #8f1d2b;
}

.outline-orange {
  border: 1px solid var(--orange);
  background: var(--orange-soft);
  color: #c86d00;
  font-weight: 800;
}

.outline-green {
  border: 1px solid var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 800;
}

.empty-state {
  background: rgba(255,255,255,.75);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.admin-drawer {
  display: none;
  margin-top: 12px;
}

.admin-drawer.open {
  display: grid;
  gap: 14px;
}

.add-task-view {
  display: grid;
  gap: 14px;
}

.add-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.choice-card {
  min-height: 138px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 18px;
  text-align: left;
}

.choice-card span {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 900;
}

.choice-card strong {
  font-size: 16px;
}

.choice-card small {
  color: var(--muted);
}

.assign-form {
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(17, 24, 39, .12);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.assign-header {
  min-height: 54px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}

.back-btn {
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  min-height: 34px;
  padding: 0;
}

.assign-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}

.assign-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.assign-more input,
.repeat-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.assign-more span,
.repeat-check span {
  margin: 0;
  font-size: 13px;
}

.assign-body {
  display: grid;
  gap: 14px;
  padding: 22px 20px 10px;
}

.attachment-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 14px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-field.compact {
  padding: 0;
}

.file-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(17, 24, 39, .12);
  border-radius: 8px;
  background: #f4f7fa;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
}

.file-attach-btn:hover {
  background: #fff;
  border-color: rgba(var(--green-rgb), .45);
  color: var(--green-dark);
}

.file-attach-btn input {
  display: none;
}

.plain-input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.plain-input:focus {
  box-shadow: none;
  border-color: transparent;
}

.title-input {
  font-size: 15px;
  font-weight: 700;
  min-height: 28px;
}

.description-input {
  min-height: 58px;
  font-size: 14px;
}

.hint-input {
  padding-left: 16px;
  color: #5c6773;
}

.checklist-btn {
  justify-content: flex-start;
  width: max-content;
  background: transparent;
  color: #5c6773;
  font-weight: 700;
  padding: 0;
  min-height: 24px;
}

.assign-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
}

.loop-users-panel {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 260px;
  gap: 14px;
  align-items: start;
  padding: 12px 14px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, #f5faf8 100%);
}

.loop-users-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.loop-users-heading span {
  color: #5c6878;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.loop-users-heading strong {
  border: 1px solid rgba(var(--green-rgb), .35);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  padding: 4px 9px;
  font-size: 11px;
}

#taskLoopUsers {
  display: none;
}

.loop-user-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.loop-user-option {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  border: 1px solid #d9e2eb;
  border-radius: 9px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.loop-user-option:hover,
.loop-user-option.selected {
  border-color: rgba(var(--green-rgb), .7);
  background: #f0fff8;
  box-shadow: 0 8px 18px rgba(var(--green-rgb), .1);
}

.loop-user-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.loop-user-option b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.loop-user-option small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.mini-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.loop-users-panel > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.chip-control,
.repeat-select,
.end-date {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c9d1d8;
  border-radius: 6px;
  background: #fff;
  min-height: 40px;
  padding: 0 10px;
  color: #5c6773;
}

.chip-control span,
.end-date span {
  margin: 0;
  color: #5c6773;
  white-space: nowrap;
}

.chip-control select,
.chip-control input,
.repeat-select select,
.end-date input {
  border: 0;
  padding: 0;
  box-shadow: none;
  min-width: 0;
  background: transparent;
}

.priority-chip {
  border-color: var(--green);
}

.repeat-options {
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  background: #fff;
}

.repeat-option {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.repeat-label {
  color: #5c6773;
  min-width: 178px;
  font-size: 13px;
}

.weekday-buttons,
.month-date-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.weekday-buttons button,
.month-date-buttons button {
  min-width: 28px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #c9d1d8;
  border-radius: 0;
  background: #fff;
  color: #303b47;
  font-weight: 700;
}

.weekday-buttons button:nth-child(7) {
  color: var(--red);
}

.weekday-buttons button.active,
.month-date-buttons button.active {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-dark);
}

.month-date-buttons {
  max-width: 300px;
}

.month-date-buttons button.last-day {
  min-width: 72px;
}

.periodic-days {
  width: 92px;
  margin: 0;
}

.periodic-days input {
  text-align: center;
}

.custom-repeat {
  display: grid;
  gap: 12px;
}

.custom-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.custom-check span {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.custom-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.custom-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 0;
  color: #5c6773;
}

.custom-select span {
  margin: 0;
  color: #5c6773;
  font-size: 13px;
  white-space: nowrap;
}

.custom-select select {
  min-width: 92px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #c9d1d8;
  border-radius: 6px;
  background: #fff;
}

.assign-footer {
  display: grid;
  grid-template-columns: auto 144px 144px 28px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 14px;
}

.repeat-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  white-space: nowrap;
}

.info-dot {
  width: 22px;
  height: 22px;
  border: 2px solid #6b7682;
  color: #6b7682;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

.assign-submit {
  min-width: 142px;
}

.employee-admin {
  display: none;
}

.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 13px; }

.employee-view {
  display: grid;
  gap: 14px;
}

.employee-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.employee-toolbar-btn {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 14px;
}

.employee-search {
  width: min(280px, 100%);
  min-height: 42px;
  font-weight: 700;
}

.employee-metrics {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.employee-metrics span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #25aaf6;
  border-radius: 999px;
  background: #dff3ff;
  color: #102133;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
}

.employee-metrics span:first-child {
  border-color: var(--green);
  background: var(--green-soft);
}

.team-member-panel {
  display: grid;
  gap: 12px;
  max-width: 680px;
}

.team-member-form {
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(17, 24, 39, .1);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.team-member-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.member-grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.team-member-body input,
.team-member-body select {
  min-height: 44px;
  background: #f1f5f9;
  border-color: transparent;
  border-radius: 7px;
  font-weight: 700;
  color: #52606d;
}

.phone-field {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  min-height: 44px;
  border-radius: 7px;
  background: #f1f5f9;
  overflow: hidden;
}

.phone-field span {
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  border-right: 1px solid #d8e0e7;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.phone-field input {
  border-radius: 0;
  background: transparent;
}

.member-submit {
  min-height: 44px;
  font-size: 14px;
}

.employee-list-panel {
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
}

.employee-table-head,
.employee-row {
  display: grid;
  grid-template-columns: 70px minmax(210px, 1.25fr) minmax(105px, .45fr) minmax(145px, .6fr) minmax(105px, .38fr) minmax(410px, 1.15fr);
  align-items: center;
  gap: 12px;
}

.employee-table-head {
  min-height: 42px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  padding: 0 10px;
}

.employee-list-panel .mini-list {
  gap: 3px;
  max-height: none;
  margin: 0;
}

.employee-row {
  min-height: 64px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

.employee-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.employee-user-cell {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.employee-user-cell strong {
  display: block;
  font-size: 14px;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}

.employee-user-cell small {
  display: block;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.employee-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #58c1b3;
  color: #102133;
  font-weight: 900;
}

.role-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.role-team-member {
  background: #fff0d7;
  border-color: #ffc46d;
  color: #6f3c00;
}

.role-admin {
  background: #e9ddff;
  border-color: #9f7aea;
  color: #4c1d95;
}

.role-manager {
  background: #dff7ea;
  border-color: #46c784;
  color: #075e3b;
}

.employee-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.row-action {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.row-action-neutral {
  background: #eef3f7;
  color: #334155;
}

.row-action-neutral:hover {
  background: #e2e8f0;
}

.row-action-blue {
  background: #eaf4ff;
  border-color: #c9e2ff;
  color: #14508f;
}

.row-action-blue:hover {
  background: #ddecff;
}

.row-action-danger {
  background: #fff0f2;
  border-color: #ffd5db;
  color: #b42335;
}

.row-action-danger:hover {
  background: #ffe3e8;
}

.upload-panel {
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(17, 24, 39, .12);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.upload-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.upload-result {
  min-height: 42px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  padding: 10px;
  white-space: pre-wrap;
  font: 12px/1.45 Consolas, "Segoe UI", monospace;
}

.mini-list {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  margin-top: 10px;
}

.mini-employee {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.report-panel {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(17, 24, 39, .1);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.report-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-panel h2 {
  margin: 0;
  font-size: 20px;
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.report-filters label {
  display: grid;
  gap: 5px;
}

.report-filters span {
  color: #5c6878;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-filters select,
.report-filters input {
  min-height: 38px;
  border-radius: 7px;
  font-size: 13px;
}

.report-search {
  grid-column: span 2;
}

.report-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(var(--green-rgb), .28);
  border-radius: 999px;
  background: var(--green-soft);
  color: #405064;
  font-size: 12px;
  font-weight: 700;
}

.report-summary b {
  color: var(--green-dark);
  font-size: 14px;
}

.report-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  max-height: 58vh;
  background: #fff;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  font-size: 12px;
}

.report-table th,
.report-table td {
  padding: 10px;
  border-bottom: 1px solid #e8eef4;
  text-align: left;
  vertical-align: top;
}

.report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #101820;
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
}

.report-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
  max-width: 420px;
}

.admin-tools-view {
  max-width: 860px;
}

.admin-tools-panel {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(17, 24, 39, .1);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 16px;
}

.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.admin-action-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 14px;
}

.admin-action-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.admin-action-card small {
  color: var(--muted);
  font-weight: 700;
}

.theme-settings-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.theme-settings-panel header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.theme-settings-panel h3 {
  margin-bottom: 4px;
}

.theme-preview {
  min-width: 86px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(var(--green-rgb), .22);
}

.theme-controls {
  display: grid;
  grid-template-columns: 120px minmax(120px, 160px) 120px minmax(120px, 160px);
  gap: 10px;
  align-items: end;
}

.theme-presets,
.theme-controls .inline-actions {
  grid-column: 1 / -1;
}

.theme-card-style {
  grid-column: span 2;
}

.theme-color-field input {
  min-height: 38px;
  padding: 4px;
}

.theme-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
}

.theme-presets button {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  min-height: 58px;
  border: 1px solid #d7e0e8;
  background:
    linear-gradient(90deg, var(--preset-sidebar) 0 20%, transparent 20%),
    linear-gradient(135deg, var(--preset-bg), #fff);
  color: #425064;
  padding: 9px 10px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(17, 24, 39, .05);
}

.theme-presets button::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--preset);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(17, 24, 39, .12);
}

.theme-presets strong,
.theme-presets small {
  display: block;
  line-height: 1.15;
}

.theme-presets strong {
  color: var(--ink);
  font-size: 12px;
}

.theme-presets small {
  color: #647080;
  font-size: 10px;
  margin-top: 3px;
}

.theme-presets button.active {
  border-color: rgba(var(--green-rgb), .55);
  box-shadow: inset 0 -3px 0 var(--green), 0 10px 22px rgba(var(--green-rgb), .14);
  color: var(--green-dark);
}

.ip-access-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.ip-access-panel header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ip-access-panel h3 {
  margin-bottom: 4px;
}

#currentIpBadge {
  background: var(--green-soft);
  border: 1px solid rgba(var(--green-rgb), .45);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ip-access-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
}

.ip-access-list {
  display: grid;
  gap: 6px;
}

.ip-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.floating-add {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 28px rgba(var(--green-rgb), .34);
  font-size: 30px;
  z-index: 10;
}

.sync {
  position: fixed;
  right: 86px;
  bottom: 36px;
  color: var(--muted);
  font-size: 11px;
}

.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }

dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  width: min(440px, calc(100% - 24px));
}

dialog::backdrop { background: rgba(15, 23, 42, .35); }
.dialog-body { padding: 8px; }

.task-update-dialog {
  width: min(760px, calc(100% - 28px));
  border: 1px solid rgba(216, 226, 235, .95);
  border-radius: 8px;
}

.history-dialog {
  width: min(680px, calc(100% - 28px));
  border: 1px solid rgba(216, 226, 235, .95);
  border-radius: 8px;
}

.delegate-dialog {
  width: min(620px, calc(100% - 28px));
  border: 1px solid rgba(216, 226, 235, .95);
  border-radius: 8px;
}

.delegate-form {
  gap: 12px;
  padding: 18px;
}

.delegate-form textarea {
  resize: vertical;
}

.history-dialog-body {
  gap: 12px;
  padding: 18px;
}

.history-dialog-body .muted {
  margin: 4px 0 0;
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 9px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.history-item {
  border: 1px solid rgba(210, 222, 232, .95);
  border-radius: 8px;
  background: #fff;
  padding: 10px 11px;
}

.history-item-head,
.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-item-head strong {
  color: var(--ink);
  font-size: 13px;
}

.history-item-head span,
.history-meta {
  color: #607084;
  font-size: 11px;
}

.history-meta {
  justify-content: flex-start;
  margin-top: 4px;
}

.history-item p {
  margin: 8px 0 0;
  color: #354255;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.task-update-form {
  gap: 14px;
  padding: 18px;
}

.dialog-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-title-row h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}

.dialog-close {
  min-height: 28px;
  width: 28px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: #566273;
  font-size: 20px;
  line-height: 1;
}

.status-help {
  margin: -8px 0 4px;
  color: var(--ink);
  font-size: 12px;
}

.status-textarea {
  min-height: 118px;
  border-radius: 4px;
  font-size: 16px;
  color: #4f5d6b;
  resize: vertical;
}

.full-submit {
  width: 100%;
  min-height: 48px;
  border-radius: 5px;
  font-size: 15px;
}

.hidden-field {
  display: none;
}

@media (max-width: 1180px) {
  .appbar { grid-template-columns: 1fr; }
  .notification-wrap { justify-self: start; }
  .notification-panel { left: 0; right: auto; }
  .analytics-summary { grid-template-columns: repeat(3, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .period-strip { grid-template-columns: repeat(3, 1fr); }
  .status-strip { justify-content: flex-start; overflow-x: auto; }
  .add-choice { grid-template-columns: 1fr; }
  .assign-controls { grid-template-columns: repeat(2, 1fr); }
  .loop-users-panel { grid-template-columns: 1fr; }
  .assign-footer { grid-template-columns: 1fr 1fr; }
  .report-panel > header { display: grid; }
  .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-search { grid-column: span 2; }
  .theme-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-spacer { display: none; }
  .employee-table-head { display: none; }
  .employee-row { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .task-filter-panel {
    top: 0;
    margin: 0 -12px 10px;
    padding: 12px;
  }
  .sort-strip { align-items: stretch; flex-direction: column; }
  .one-time-filter, .sort-control { width: 100%; }
  .period-strip, .grid2, .assign-controls, .assign-footer, .member-grid.two, .report-filters, .loop-users-panel { grid-template-columns: 1fr; }
  .report-search { grid-column: span 1; }
  .assign-header { grid-template-columns: 34px 1fr; }
  .assign-more { grid-column: 1 / -1; }
  .admin-action-grid, .admin-action-card { grid-template-columns: 1fr; }
  .theme-settings-panel header, .theme-controls { grid-template-columns: 1fr; }
  .theme-settings-panel header { display: grid; }
  .theme-card-style { grid-column: span 1; }
  .theme-presets { grid-template-columns: 1fr; }
  .ip-access-panel header, .ip-access-form, .ip-access-item { grid-template-columns: 1fr; }
  .ip-access-panel header, .ip-access-item { align-items: stretch; flex-direction: column; }
  .analytics-summary { grid-template-columns: repeat(2, 1fr); }
  .analytics-row { grid-template-columns: 1fr; }
  .mini-employee { grid-template-columns: 1fr; }
  .repeat-option { align-items: flex-start; flex-direction: column; }
  .repeat-label { min-width: 0; }
  .content { padding: 12px; }
  .task-title { margin-right: 0; font-size: 16px; }
  .task-age { position: static; display: block; margin-bottom: 8px; }
  .user-chip { justify-content: flex-start; flex-wrap: wrap; }
}
