:root {
  color-scheme: light;
  --bg: #f4f8ff;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --line: #d9e6f3;
  --line-soft: #e7eef7;
  --text: #172033;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --nav: #ffffff;
  --nav-2: #eaf3ff;
  --primary: #087443;
  --primary-dark: #065f38;
  --blue: #2563eb;
  --blue-dark: #0b1b7a;
  --cyan: #24c8db;
  --gold: #f5b23d;
  --danger: #b42318;
  --warning: #b54708;
  --ok: #027a48;
  --shadow-sm: 0 8px 22px rgb(37 99 235 / 7%);
  --shadow-md: 0 18px 44px rgb(37 99 235 / 10%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(112deg, rgb(37 99 235 / 94%) 0 10.8%, transparent 11%),
    linear-gradient(120deg, rgb(36 200 219 / 22%) 0 22%, transparent 22.2%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #ffffff 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  box-sizing: border-box;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgb(255 255 255 / 88%);
  color: var(--text);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-sm);
}

.brand-logo {
  width: min(168px, 100%);
  height: auto;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(90deg, var(--blue) 0%, #2f8df6 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgb(37 99 235 / 18%);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.nav-item.active .nav-badge,
.nav-item:hover .nav-badge {
  background: #fff;
  color: var(--blue);
}

.profile-box {
  margin-top: auto;
  padding: 16px 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.profile-box strong {
  color: var(--text);
}

.main {
  min-width: 0;
  padding: 28px;
  background: rgb(255 255 255 / 36%);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 82%);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 19px;
  line-height: 1.2;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar p,
.login-panel p,
.setup-grid p,
.panel-head p,
.section-head p,
.metric span,
.metric small,
.topbar-meta span,
.command-strip span,
.meta-list span {
  color: var(--muted);
}

.topbar-meta {
  display: grid;
  gap: 2px;
  min-width: 130px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: var(--shadow-sm);
}

.topbar-meta span {
  font-size: 12px;
}

.topbar-actions,
.toolbar {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.primary,
.ghost,
.danger,
.small-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 700;
}

.primary {
  padding: 0 15px;
  background: linear-gradient(90deg, var(--primary), #11a36f);
  color: #fff;
  box-shadow: 0 12px 22px rgb(8 116 67 / 18%);
}

.primary:hover {
  background: var(--primary-dark);
}

.ghost {
  padding: 0 14px;
  background: #eef6ff;
  color: var(--text);
}

.danger {
  padding: 0 14px;
  background: #fee4e2;
  color: var(--danger);
}

.notice,
.login-panel,
.account-panel,
.metric,
.owner-panel,
.work-panel,
.task-form,
.setup-grid,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.notice {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px;
  color: var(--warning);
}

.login-panel {
  display: grid;
  gap: 15px;
  max-width: 820px;
  margin-bottom: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

#loginForm .primary {
  grid-column: 1 / -1;
  min-height: 56px;
}

.account-panel {
  margin-bottom: 18px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.account-panel .form-grid {
  margin-top: 14px;
}

.phone-login-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgb(15 23 42 / 4%);
}

.phone-login-panel summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  min-height: 58px;
  padding: 0 18px;
  list-style: none;
}

.phone-login-panel summary::-webkit-details-marker {
  display: none;
}

.phone-login-panel .form-grid {
  padding: 0 18px 18px;
}

.oauth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  min-height: 58px;
  box-shadow: 0 8px 18px rgb(15 23 42 / 4%);
}

.oauth-button:hover,
.phone-login-panel summary:hover {
  background: #f8fbff;
}

.google-mark,
.phone-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-weight: 900;
  flex: 0 0 auto;
}

.google-mark {
  background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  color: #fff;
  font-family: Arial, sans-serif;
}

.phone-mark {
  background: #edf4ff;
  color: var(--primary);
  font-size: 12px;
}

.notification-tools {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.notification-tools > div:first-child {
  display: grid;
  gap: 4px;
}

.notification-tools span {
  color: var(--muted);
}

.command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.command-strip > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-sm);
}

.command-strip span {
  font-size: 12px;
}

.command-strip strong {
  font-size: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 122px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.metric::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  content: "";
}

.metric strong {
  font-size: 31px;
  line-height: 1;
}

.metric small {
  font-size: 12px;
}

.metric.active {
  border-color: var(--blue);
  box-shadow: 0 14px 28px rgb(37 99 235 / 16%);
}

.usage-guide-card {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-sm);
}

.usage-guide-card summary {
  padding: 14px 18px;
  color: var(--blue);
  cursor: pointer;
  font-weight: 850;
  list-style-position: inside;
}

.usage-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.usage-guide-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.usage-guide-grid strong {
  color: var(--text);
}

.usage-guide-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.work-panel {
  overflow-x: auto;
  box-shadow: var(--shadow-md);
}

.work-panel,
.owner-panel,
.task-inbox,
.task-form,
.setup-grid {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.panel-head,
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-head {
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head.compact {
  padding-bottom: 12px;
}

.section-head {
  display: grid;
  gap: 4px;
  justify-content: stretch;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-left: auto;
}

.task-toolbar {
  display: grid;
  grid-template-columns: 140px minmax(180px, 1fr) minmax(180px, 1fr) 170px minmax(220px, 1.2fr);
  gap: 10px;
  align-items: end;
  width: min(100%, 980px);
}

.coaching-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  width: min(100%, 1120px);
}

.log-toolbar {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(220px, 1.15fr);
  gap: 10px;
  align-items: end;
  width: min(100%, 1180px);
}

.task-toolbar label {
  gap: 5px;
}

.filter-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.toolbar > .filter-field {
  min-width: 160px;
}

.task-toolbar > .filter-field {
  min-width: 0;
}

.coaching-toolbar > .filter-field {
  min-width: 0;
}

.log-toolbar > .filter-field {
  min-width: 0;
}

.filter-label {
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.toolbar input,
.toolbar select,
.toolbar .multi-filter summary {
  min-height: 38px;
  padding: 8px 10px;
}

.multi-filter {
  position: relative;
  min-width: 0;
}

.multi-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.multi-filter summary::-webkit-details-marker {
  display: none;
}

.multi-filter summary::after {
  content: "v";
  color: var(--muted);
  font-size: 10px;
}

.multi-filter[open] summary {
  border-color: var(--blue);
  outline: 3px solid rgb(37 99 235 / 14%);
}

.multi-filter-options {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: max(100%, 230px);
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.multi-filter-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.multi-filter-options label:hover {
  background: #f2f7ff;
}

.multi-filter-options input {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
}

.filter-chips {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.filter-chip.strong {
  background: #f2f4f7;
  color: var(--text);
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-weight: 800;
  color: var(--muted);
}

.toggle-row input {
  width: 16px;
  height: 16px;
  min-height: 0;
}

.owner-panel {
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.task-inbox {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: var(--shadow-sm);
}

.inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.inbox-actions button {
  pointer-events: auto;
}

.inbox-list {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.inbox-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.inbox-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inbox-item strong,
.inbox-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item div span,
.inbox-item small {
  color: var(--muted);
  font-size: 12px;
}

.inbox-item .inbox-assignee {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.insight-card {
  display: grid;
  width: 100%;
  text-align: left;
  gap: 8px;
  min-height: 158px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.insight-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.insight-card.active {
  border-color: var(--blue);
  background: #eef6ff;
  box-shadow: inset 4px 0 0 var(--blue), var(--shadow-sm);
}

.insight-card > span,
.insight-card small {
  color: var(--muted);
  font-size: 12px;
}

.insight-card > strong {
  font-size: 18px;
  line-height: 1.2;
}

.mini-list {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.mini-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.mini-list span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.field-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-label {
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select {
  height: 44px;
  min-height: 44px;
  line-height: 1.2;
  padding-top: 0;
  padding-bottom: 0;
}

input[type="date"],
input[type="month"],
input[type="datetime-local"],
select {
  -webkit-appearance: auto;
  appearance: auto;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgb(37 99 235 / 14%);
  border-color: var(--blue);
}

textarea {
  min-height: 44px;
  line-height: 1.45;
  resize: vertical;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f2f7ff;
  color: #475467;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8fbff;
}

th:first-child,
td:first-child,
td:nth-child(5) {
  white-space: nowrap;
}

.task-title {
  display: grid;
  gap: 5px;
}

.task-title strong {
  line-height: 1.25;
}

.task-party-line {
  color: #344054;
  font-weight: 800;
}

.compact-date {
  white-space: nowrap;
  font-size: 12px;
}

.person-name-cell {
  max-width: 150px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.task-mobile-pic {
  display: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.task-meta,
.person-line,
.person-line small {
  color: var(--muted);
  font-size: 12px;
}

.task-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.badge.approval {
  background: #fff7ed;
  color: #b45309;
}

.badge.waiting {
  background: #fef3c7;
  color: var(--warning);
}

.badge.accepted {
  background: #e0f2fe;
  color: #0369a1;
}

.badge.requirement {
  background: #eef6ff;
  color: var(--blue);
}

.badge.locked {
  background: #ecfdf3;
  color: var(--ok);
}

.badge.declined {
  background: #fee2e2;
  color: #991b1b;
}

.badge.response {
  background: #fef3c7;
  color: #92400e;
}

.badge.response.unread {
  background: #ffedd5;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px rgb(251 146 60 / 45%);
}

.badge.response.seen {
  background: #eef6ff;
  color: var(--muted);
}

.person-line strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.status.new {
  background: #eef2f6;
  color: #475467;
}

.status.accepted,
.status.started {
  background: #e0f2fe;
  color: var(--blue);
}

.status.in_progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.status.submitted {
  background: #fef0c7;
  color: var(--warning);
}

.status.revision_requested {
  background: #ffedd5;
  color: #c2410c;
}

.status.approved {
  background: #dcfae6;
  color: var(--ok);
}

.status.created,
.status.acl_rebuilt,
.status.system_sync {
  background: #eef6ff;
  color: var(--blue);
}

.status.cancelled {
  background: #fee4e2;
  color: var(--danger);
}

.status.draft {
  background: #eef2f6;
  color: #475467;
}

.status.approved_by_supervisor,
.status.om_confirmed {
  background: #dcfae6;
  color: var(--ok);
}

.status.questioned_by_om,
.status.rejected_by_om {
  background: #fee4e2;
  color: var(--danger);
}

.needs-response-row {
  box-shadow: inset 4px 0 var(--gold);
}

select[data-task-status] {
  border-width: 2px;
  font-weight: 750;
}

select[data-status-value="new"] {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475467;
}

select[data-status-value="accepted"] {
  border-color: #7dd3fc;
  background: #f0f9ff;
  color: #0369a1;
}

select[data-status-value="in_progress"] {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

select[data-status-value="submitted"] {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #b45309;
}

select[data-status-value="revision_requested"] {
  border-color: #fdba74;
  background: #fff7ed;
  color: #c2410c;
}

select[data-status-value="approved"] {
  border-color: #86efac;
  background: #f0fdf4;
  color: #027a48;
}

select[data-status-value="cancelled"] {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b42318;
}

.task-form,
.setup-grid,
.user-management {
  margin-bottom: 18px;
}

.task-form {
  display: grid;
  gap: 18px;
  max-width: 1100px;
  padding: 22px;
  box-shadow: var(--shadow-md);
}

.task-form > label {
  min-width: 100%;
}

.task-form textarea {
  min-height: 128px;
}

.setup-grid {
  display: grid;
  gap: 16px;
  max-width: 980px;
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.user-form {
  display: grid;
  gap: 13px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.assignment-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.assignment-editor > summary {
  padding: 12px 14px;
  font-weight: 900;
  cursor: pointer;
}

.assignment-editor-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.assignment-disabled {
  opacity: 0.72;
}

.assignment-add-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.assignment-add-grid label {
  display: grid;
  gap: 5px;
}

.assignment-table-wrap {
  overflow-x: auto;
}

.mini-table {
  min-width: 1040px;
  background: #fff;
}

.mini-table th,
.mini-table td {
  padding: 9px;
}

.mini-table select,
.mini-table input {
  min-height: 34px;
  font-size: 13px;
}

.review-kpi-panel {
  display: grid;
  gap: 16px;
}

.review-toolbar {
  align-items: end;
  justify-content: flex-start;
}

.advanced-filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.advanced-filter > summary {
  padding: 12px 14px;
  font-weight: 900;
  cursor: pointer;
}

.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px;
}

.review-summary-card {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.guide-panel {
  display: grid;
  gap: 16px;
}

.guide-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 0 18px 18px;
}

.guide-toc {
  position: sticky;
  top: 16px;
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
}

.guide-toc a {
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.guide-toc a:hover {
  background: #eef6ff;
  color: var(--blue);
}

.guide-content {
  display: grid;
  gap: 12px;
}

.guide-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.guide-section h3 {
  margin: 0;
  font-size: 18px;
}

.guide-section p,
.guide-section li {
  color: var(--muted);
  line-height: 1.55;
}

.guide-section ol,
.guide-section ul {
  margin: 0;
  padding-left: 20px;
}

.guide-section code {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text);
  font-size: 12px;
}

.guide-grid {
  display: grid;
  gap: 10px;
}

.guide-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-grid > div {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
}

.guide-score-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.guide-score-scale span {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.guide-score-scale strong {
  color: var(--blue);
  font-size: 20px;
}

.review-summary-card span,
.last-updated {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.review-summary-card strong {
  font-size: 26px;
}

.review-table-section {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding: 0 18px 18px;
}

.review-table {
  min-width: 980px;
}

.review-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.review-table th button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.review-table tbody tr[data-review-drill] {
  cursor: pointer;
}

.review-table tbody tr[data-review-drill]:hover {
  background: #f8fbff;
}

.follow-up-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.follow-up-score-card div,
.follow-up-score-card:not(form) {
  color: var(--muted);
  font-size: 13px;
}

.follow-up-score-card strong {
  color: var(--blue);
  font-size: 22px;
}

.follow-up-score-card select {
  width: 130px;
}

.table-tools {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 0;
}

.table-tools label {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.coaching-recap {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 14px 18px 0;
}

.coaching-recap-card {
  display: grid;
  gap: 5px;
  min-height: 84px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-sm);
}

.coaching-recap-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.coaching-recap-card strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.coaching-form-wrap,
.followup-task-panel {
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.coaching-form-wrap summary,
.followup-task-panel summary {
  min-height: 48px;
  padding: 12px 16px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
}

.compact-form {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.inline-check {
  margin: 0;
}

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

.coaching-detail-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.coaching-detail-section {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.coaching-detail-grid p {
  margin: 0;
}

.coaching-attachment-list {
  display: grid;
  gap: 8px;
}

.quick-picks {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.deadline-field {
  align-content: start;
}

.deadline-picker {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 150px);
  gap: 10px;
  align-items: end;
}

.quick-picks button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

.quick-picks button:hover {
  background: #dbeafe;
}

.requirement-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
}

.requirement-panel.compact {
  padding: 12px;
}

.requirement-panel h3 {
  margin: 0;
  font-size: 16px;
}

.requirement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.check-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 74px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-card input {
  width: auto;
  margin-top: 3px;
}

.check-card span {
  display: grid;
  gap: 4px;
}

.check-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.check-card.compact {
  min-height: 0;
  padding: 10px;
}

.form-note {
  color: var(--muted);
  font-size: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.check-row input {
  width: auto;
}

.setup-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.setup-list div,
.meta-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
}

.setup-list span,
.meta-row span {
  color: var(--muted);
  font-size: 12px;
}

.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  background: rgb(16 24 40 / 36%);
}

.detail-card {
  position: relative;
  width: min(520px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  border-radius: 0;
  box-shadow: -12px 0 30px rgb(16 24 40 / 14%);
}

.icon-button {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: #eef2f6;
  color: #344054;
}

.detail-title {
  padding-right: 42px;
}

.detail-title h2 {
  margin-top: 4px;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.result-form,
.approval-form,
.acceptance-form,
.cancel-task-panel,
.comment-thread {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.edit-task-panel {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
}

.cancel-task-panel {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid #fecdca;
  border-radius: 8px;
  background: #fffbfa;
}

.cancel-task-panel summary {
  cursor: pointer;
  color: var(--danger);
  font-weight: 800;
}

.cancel-task-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.edit-task-panel summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 800;
}

.edit-task-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.result-form h3,
.approval-form h3,
.acceptance-form h3,
.cancel-task-form h3,
.comment-thread h3 {
  margin: 0;
  font-size: 18px;
}

.result-form p,
.approval-form p,
.acceptance-form p,
.cancel-task-form p,
.comment-thread p,
.result-existing,
.result-readonly-note,
.result-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.result-existing,
.result-readonly-note,
.result-meta {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
}

.task-result-summary {
  display: grid;
  gap: 10px;
}

.result-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #cfe1f5;
  border-radius: 8px;
  background: #ffffff;
}

.result-note strong {
  color: var(--text);
  font-size: 13px;
}

.result-note p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.result-note.muted p {
  color: var(--muted);
}

.requirement-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
}

.requirement-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

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

.attachment-grid.single {
  grid-template-columns: 1fr;
}

.attachment-field {
  display: grid;
  gap: 8px;
}

.file-picker {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border: 1px dashed #bfd4ea;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.file-picker input {
  min-height: 34px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.attachment-list {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
  font-size: 12px;
}

.attachment-list a {
  color: var(--blue);
  text-decoration: none;
}

.attachment-list a:hover {
  text-decoration: underline;
}

.attachment-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.attachment-link span {
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-link div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment-item {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
}

.comment-item > .comment-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.comment-item .comment-attachments {
  margin-top: 2px;
}

.comment-item strong {
  font-size: 13px;
}

.comment-item span,
.empty-state {
  color: var(--muted);
  font-size: 12px;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.actions-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.small-button {
  padding: 0 11px;
  background: #eef6ff;
  color: var(--blue);
}

.small-button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 18px rgb(37 99 235 / 18%);
}

.small-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.warning-action {
  color: var(--warning);
}

.log-detail {
  display: inline-block;
  max-width: 280px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 12px 30px rgb(16 24 40 / 24%);
}

.hidden {
  display: none !important;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 14px;
    padding: 14px;
  }

  .brand {
    justify-items: start;
  }

  .brand-logo {
    width: min(148px, 100%);
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-box {
    display: none;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .toolbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
    margin-left: 0;
  }

  .command-strip,
  .metric-grid,
  .inbox-item,
  .insight-grid,
  .requirement-grid,
  .setup-list {
    grid-template-columns: 1fr;
  }

  .task-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .coaching-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .log-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .log-toolbar > label:last-child {
    grid-column: 1 / -1;
  }

  .usage-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-panel {
    overflow-x: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #f8fbff;
  }

  tbody tr {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }

  td {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line-soft);
    white-space: normal;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    content: attr(data-label);
  }

  td:first-child,
  td:nth-child(5) {
    white-space: normal;
  }

  .actions-inline {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .detail-card {
    width: min(620px, 100%);
  }
}

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

  .topbar-actions,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .usage-guide-grid,
  .log-toolbar {
    grid-template-columns: 1fr;
  }

  .deadline-picker {
    grid-template-columns: 1fr;
  }

  .attachment-grid {
    grid-template-columns: 1fr;
  }

  .task-toolbar {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 96px;
  }

  .panel-head,
  .task-inbox .panel-head {
    gap: 12px;
  }

  .inbox-actions {
    justify-content: stretch;
  }

  .inbox-actions button {
    flex: 1 1 130px;
  }

  .inbox-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .inbox-item small,
  .inbox-item button {
    grid-column: 1 / -1;
  }

  .detail-panel {
    align-items: stretch;
  }

  .detail-card {
    width: 100%;
    padding: 18px 14px 96px;
  }

  td {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }

  label {
    min-width: 100%;
  }
}

@media (max-width: 920px) {
  body {
    background:
      linear-gradient(120deg, rgb(37 99 235 / 34%) 0 18%, transparent 18.3%),
      linear-gradient(128deg, rgb(36 200 219 / 18%) 0 34%, transparent 34.3%),
      linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  }

  .sidebar {
    gap: 10px;
    padding: 10px 12px;
    box-shadow: 0 8px 22px rgb(37 99 235 / 8%);
  }

  .brand {
    display: grid;
    gap: 10px;
    justify-items: start;
    padding: 12px;
  }

  .brand-logo {
    width: min(128px, 100%);
  }

  .brand strong {
    font-size: 16px;
  }

  .brand span {
    margin-top: 2px;
    font-size: 11px;
  }

  .nav {
    display: flex;
    grid-template-columns: none;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--line-soft);
    background: rgb(255 255 255 / 72%);
    font-size: 14px;
    white-space: nowrap;
  }

  .main {
    padding: 12px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
    gap: 10px;
    align-items: stretch;
    margin-bottom: 12px;
    padding: 13px;
  }

  .topbar > div:first-child {
    grid-column: 1 / -1;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .topbar-meta {
    min-width: 0;
    padding: 9px 11px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
  }

  .topbar-actions .ghost,
  .topbar-actions .danger {
    min-height: 42px;
  }

  .command-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .command-strip > div {
    padding: 10px 11px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
  }

  .metric {
    min-height: 92px;
    padding: 13px 14px;
  }

  .metric strong {
    font-size: 26px;
  }

  .owner-panel,
  .task-inbox,
  .work-panel,
  .task-form,
  .setup-grid {
    margin-bottom: 12px;
  }

  .panel-head {
    padding: 14px;
  }

  .task-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .task-toolbar label:last-child {
    grid-column: 1 / -1;
  }

  tbody {
    padding: 10px;
  }

  tbody tr {
    padding: 12px;
  }

  td {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 8px 0;
  }
}

@media (max-width: 520px) {
  .sidebar {
    position: sticky;
    top: 0;
    max-height: none;
    gap: 8px;
    padding: 8px;
  }

  .brand {
    padding: 8px;
  }

  .brand-logo {
    width: min(118px, 100%);
  }

  .brand strong {
    font-size: 15px;
  }

  .brand span {
    font-size: 10px;
  }

  .nav {
    display: flex;
    grid-template-columns: none;
  }

  .nav-item {
    min-height: 34px;
    padding: 0 11px;
    font-size: 13px;
  }

  .nav-badge {
    min-width: 20px;
    height: 19px;
    padding: 0 6px;
    font-size: 10px;
  }

  .main {
    padding: 10px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .topbar p {
    font-size: 14px;
  }

  .topbar-meta {
    min-height: 58px;
    box-shadow: none;
  }

  .topbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions .danger.hidden {
    display: none !important;
  }

  .topbar-actions:has(.danger.hidden) {
    grid-template-columns: 1fr;
  }

  .topbar-actions .ghost:only-child,
  .topbar-actions .ghost:last-child:first-child {
    grid-column: 1 / -1;
  }

  .command-strip {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 86px;
    padding: 12px;
  }

  .metric strong {
    font-size: 24px;
  }

  .metric small {
    display: none;
  }

  .panel-head {
    gap: 10px;
    padding: 13px;
  }

  .task-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-toolbar label {
    min-width: 0;
  }

  .task-toolbar .filter-field {
    min-width: 0;
  }

  .task-toolbar label:last-child {
    grid-column: 1 / -1;
  }

  .task-toolbar input,
  .task-toolbar select,
  .task-toolbar .multi-filter summary {
    min-height: 36px;
    padding: 7px 9px;
  }

  #taskRows,
  #logRows,
  #userRows {
    gap: 11px;
    padding: 10px;
  }

  #taskRows tr,
  #logRows tr,
  #userRows tr {
    display: grid;
    gap: 8px;
    padding: 12px;
  }

  #taskRows td,
  #logRows td,
  #userRows td {
    display: block;
    padding: 0;
    border-bottom: 0;
  }

  #taskRows td::before,
  #logRows td::before,
  #userRows td::before {
    display: block;
    margin-bottom: 3px;
  }

  #taskRows td[data-label="No"],
  #taskRows td[data-label="Task"],
  #logRows td[data-label="Task"],
  #userRows td[data-label="Nama"] {
    font-size: 15px;
  }

  #taskRows td[data-label="No"]::before,
  #taskRows td[data-label="Task"]::before,
  #userRows td[data-label="Nama"]::before {
    display: none;
  }

  #taskRows td[data-label="No"] {
    color: #334155;
    font-weight: 800;
  }

  #taskRows .task-mobile-pic {
    display: block;
  }

  #taskRows td[data-label="Aksi"] .actions-inline {
    display: grid;
    grid-template-columns: 1fr;
  }

  #taskRows .small-button,
  #taskRows select[data-task-status] {
    width: 100%;
  }

  .inbox-item {
    grid-template-columns: 1fr auto;
    padding: 11px;
  }

  .inbox-item .small-button {
    min-width: 82px;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .insight-card {
    min-height: 0;
  }

  .task-form,
  .setup-grid,
  .login-panel {
    padding: 14px;
  }

  .detail-card {
    padding: 18px 14px 92px;
  }
}

@media (max-width: 520px) {
  body {
    background:
      linear-gradient(118deg, rgb(37 99 235 / 18%) 0 18%, transparent 18.3%),
      linear-gradient(130deg, rgb(36 200 219 / 12%) 0 34%, transparent 34.3%),
      linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  }

  .sidebar {
    padding: 7px 8px;
  }

  .brand {
    gap: 8px;
    padding: 9px 8px;
  }

  .brand-logo {
    width: min(108px, 100%);
  }

  .brand strong {
    font-size: 14px;
  }

  .brand span {
    font-size: 10px;
    line-height: 1.15;
  }

  .nav {
    gap: 6px;
    padding-bottom: 0;
  }

  .nav-item {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 7px;
  }

  .main {
    padding: 8px 8px 12px;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 10px;
    padding: 12px;
  }

  .eyebrow {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .topbar p {
    font-size: 13px;
  }

  .topbar-meta {
    min-height: 48px;
    padding: 8px 10px;
  }

  .topbar-actions .ghost,
  .topbar-actions .danger {
    min-height: 40px;
    padding: 0 12px;
  }

  .command-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 9px;
  }

  .command-strip > div {
    gap: 2px;
    min-height: 56px;
    padding: 8px;
  }

  .command-strip span,
  .topbar-meta span {
    font-size: 10px;
  }

  .command-strip strong,
  .topbar-meta strong {
    font-size: 13px;
  }

  .metric-grid {
    gap: 8px;
    margin-bottom: 10px;
  }

  .metric {
    min-height: 72px;
    padding: 10px 11px;
  }

  .metric span {
    font-size: 13px;
  }

  .metric strong {
    font-size: 24px;
  }

  .owner-panel,
  .task-inbox,
  .work-panel,
  .task-form,
  .setup-grid,
  .login-panel {
    margin-bottom: 10px;
  }

  .panel-head,
  .task-inbox .panel-head {
    gap: 7px;
    padding: 12px;
  }

  .panel-head h2 {
    font-size: 18px;
  }

  .panel-head p {
    font-size: 13px;
    line-height: 1.25;
  }

  .insight-grid {
    gap: 8px;
    padding: 0 12px 12px;
  }

  .insight-card {
    gap: 5px;
    min-height: 0;
    padding: 11px 12px;
  }

  .insight-card > strong {
    font-size: 18px;
  }

  .insight-card > span,
  .insight-card small {
    font-size: 11px;
  }

  .mini-list {
    gap: 4px;
  }

  .mini-list div {
    font-size: 12px;
  }

  .task-toolbar {
    gap: 7px;
    padding-top: 2px;
  }

  .task-toolbar label,
  .task-toolbar .filter-label {
    font-size: 11px;
  }

  .table-tools {
    justify-content: stretch;
    padding: 12px 12px 0;
  }

  .table-tools label {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .detail-panel,
  .detail-card,
  .handover-panel,
  .cancel-task-panel,
  .edit-task-panel,
  .handover-form,
  .cancel-task-form,
  .edit-task-form {
    max-width: 100%;
    overflow-x: hidden;
  }

  .detail-card .form-grid.two,
  .handover-form .form-grid.two,
  .cancel-task-form .form-grid.two,
  .edit-task-form .form-grid.two {
    grid-template-columns: 1fr;
  }

  .detail-card label,
  .detail-card input,
  .detail-card select,
  .detail-card textarea {
    min-width: 0;
    max-width: 100%;
  }

  .handover-panel summary,
  .cancel-task-panel summary,
  .edit-task-panel summary {
    font-size: 18px;
    line-height: 1.2;
  }

  .handover-form h3,
  .cancel-task-form h3,
  .edit-task-form h3,
  .requirement-panel h3 {
    font-size: 20px;
    line-height: 1.2;
  }

  .handover-form p {
    font-size: 14px;
    line-height: 1.35;
  }

  .edit-task-form .check-row,
  .detail-card .check-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }
}

@media (max-width: 520px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .sidebar,
  .main,
  .topbar,
  .topbar-meta,
  .topbar-actions,
  .command-strip,
  .metric-grid,
  .task-inbox,
  .work-panel,
  .owner-panel {
    max-width: 100%;
    min-width: 0;
  }

  .main {
    overflow-x: hidden;
  }

  .topbar {
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions .ghost,
  .topbar-actions .danger {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .command-strip,
  .metric-grid {
    width: 100%;
  }

  .command-strip > div,
  .metric {
    min-width: 0;
  }

  .command-strip strong,
  .topbar-meta strong,
  .metric span,
  .metric strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .sidebar,
  .main,
  .topbar,
  .topbar-meta,
  .topbar-actions,
  .command-strip,
  .metric-grid,
  .task-inbox,
  .work-panel,
  .owner-panel,
  .task-form,
  .setup-grid,
  .login-panel {
    max-width: 100%;
    min-width: 0;
  }

  .main {
    overflow-x: hidden;
  }

  .topbar,
  .form-grid,
  .deadline-picker,
  .attachment-grid,
  .guide-layout,
  .guide-grid.two,
  .guide-score-scale,
  .coaching-toolbar,
  .coaching-recap,
  .handover-form .form-grid.two,
  .edit-task-form .form-grid.two {
    grid-template-columns: 1fr;
  }

  .topbar > div:first-child {
    grid-column: auto;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions .ghost,
  .topbar-actions .danger,
  input,
  select,
  textarea {
    min-width: 0;
    max-width: 100%;
  }

  .work-panel,
  .task-form,
  .coaching-form-wrap,
  .setup-grid,
  .detail-card {
    overflow-x: hidden;
  }

  .coaching-recap {
    margin-right: 12px;
    margin-left: 12px;
    width: calc(100% - 24px);
  }

  .coaching-form-wrap,
  .followup-task-panel {
    margin-right: 12px;
    margin-left: 12px;
  }

  .guide-layout {
    padding: 0 12px 12px;
  }

  .guide-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  label {
    min-width: 0;
  }
}

@media print {
  body.print-review-kpi .sidebar,
  body.print-review-kpi .topbar,
  body.print-review-kpi .view:not(#reviewKpiView),
  body.print-review-kpi .review-toolbar,
  body.print-review-kpi .advanced-filter,
  body.print-review-kpi .form-actions {
    display: none !important;
  }

  body.print-review-kpi .app-shell,
  body.print-review-kpi .main,
  body.print-review-kpi #reviewKpiView,
  body.print-review-kpi .review-kpi-panel {
    display: block !important;
    width: 100%;
    padding: 0;
    background: #fff;
  }

  body.print-review-kpi .review-summary-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 0;
  }

  body.print-review-kpi .review-table-section {
    overflow: visible;
    padding: 12px 0;
  }

  body.print-review-kpi .review-table {
    min-width: 0;
    font-size: 10px;
  }
}
