:root {
  color-scheme: light;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: #f3f5f8;
  color: #1b1f24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f5f8;
}

.app {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.header-subtitle {
  color: rgba(226, 232, 240, 0.7);
  font-size: 13px;
}

.notice {
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
}

.notice.inline {
  margin-top: 12px;
}

.notice.info {
  background: #e0f2fe;
  color: #0c4a6e;
  border: 1px solid #bae6fd;
}

.notice.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.notice.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.notice.warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.visibility-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #78350f;
}

.visibility-item {
  background: rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
}
.help {
  gap: 12px;
}

.help-list {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-note {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.info-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.info-tabs .tab {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d1d7e0;
  background: #f8fafc;
  font-size: 12px;
}

.info-tabs .tab.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.notifications .notification-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live {
  gap: 12px;
}

.overview {
  gap: 12px;
}

.overview .row-header {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.overview .row-inline {
  justify-content: flex-start;
  gap: 6px;
}

.overview summary {
  list-style: none;
  cursor: pointer;
}

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

.collapsible > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 24px;
}

.collapsible > summary::after {
  content: "▾";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  color: #64748b;
}

.collapsible[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.collapsible > summary::-webkit-details-marker {
  display: none;
}

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

.overview .summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 6px;
}

.overview .summary-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

.overview .summary-card {
  padding: 4px 6px;
  gap: 2px;
}

.overview .summary-value {
  font-size: 13px;
}

.overview .live-label {
  font-size: 9px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
}

.summary-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.summary-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.divider {
  height: 1px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 6px 0 12px;
}

.summary-value {
  font-size: 14px;
  font-weight: 700;
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.status-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.live-label {
  font-size: 10px;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
}

.live-value {
  font-size: 16px;
  font-weight: 600;
}

.live-value {
  word-break: break-all;
}

.access-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.access-block {
  margin-top: 12px;
}

.access-row {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.access-row.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.access-row.fail {
  border-color: #fecaca;
  background: #fef2f2;
}

.access-title {
  font-weight: 600;
}

.access-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}

.access-status {
  color: #334155;
}

.access-error {
  color: #b91c1c;
  font-size: 12px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #101827;
  color: #f7f7fb;
  border-radius: 16px;
}

.header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.header p {
  margin: 0;
  opacity: 0.75;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 20px;
}

.top-row .card {
  width: 100%;
}

.top-row .card {
  min-height: 360px;
  max-height: 360px;
  overflow: hidden;
}

.top-row details[open] {
  overflow: auto;
}

.global-actions {
  display: flex;
  gap: 8px;
}

.global-actions button {
  min-width: 140px;
}

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

.admin-invite-grid .input-row {
  grid-template-columns: 1fr auto;
}

.admin-invite-master {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .admin-invite-grid {
    grid-template-columns: 1fr;
  }

  .admin-invite-master {
    grid-column: span 1;
  }
}

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

.sticky-tabs {
  position: sticky;
  top: 12px;
  z-index: 3;
  background: #f1f5f9;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 18px rgba(15, 23, 42, 0.08);
}

.tab {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1e3a8a;
}

.log-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

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

.pager-info {
  font-size: 12px;
  color: #64748b;
}

.notification-bell {
  position: relative;
}

.bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 6px;
}

.critical-alert {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
}

.bell-panel {
  position: absolute;
  right: 0;
  top: 42px;
  width: 320px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 30px rgba(15, 23, 42, 0.15);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}

.bell-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #1f2937;
}

.icon-btn.secondary {
  background: #e2e8f0;
  color: #1f2937;
}

.icon-btn.secondary.active {
  background: #cbd5f5;
  color: #1e3a8a;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 20;
  padding: 20px;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  width: min(640px, 100%);
  max-height: 80vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
}
.task-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #e2e8f0;
  min-width: 220px;
}

.task-switcher-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.task-switcher select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.35);
  background: #0f172a;
  color: #e2e8f0;
}

.status-caption {
  font-size: 13px;
  color: #64748b;
}

.autosave-note {
  margin-left: 8px;
  font-size: 11px;
  color: #16a34a;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-areas: "left main";
  gap: 20px;
  align-items: start;
}

.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.main > * {
  width: 100%;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar.left {
  grid-area: left;
}

.sidebar.right {
  grid-area: right;
}

.task-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  width: 100%;
}

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

.sticky {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  overflow: auto;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(16, 24, 39, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card h2,
.card h3 {
  margin: 0;
}

.action-bar {
  position: sticky;
  top: 12px;
  z-index: 4;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.12);
}

.action-bar .row-inline {
  justify-content: flex-start;
}

.action-bar {
  padding: 8px 10px;
  gap: 6px;
}

.action-bar h2 {
  font-size: 14px;
}

.action-bar .status-caption {
  font-size: 10px;
}

.action-bar .status-pill {
  font-size: 10px;
  padding: 3px 8px;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.action-buttons .cta {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-buttons .danger.cta {
  box-shadow: 0 6px 14px rgba(185, 28, 28, 0.2);
}

.cta-icon {
  font-size: 12px;
  line-height: 1;
}

.action-buttons button {
  padding: 6px 10px;
  font-size: 11px;
}

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

.task-editor-grid .section {
  border-bottom: none;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.task-editor-grid .section summary {
  margin-bottom: 6px;
}

@media (max-width: 960px) {
  .task-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .row-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1024px) {
  .top-row {
    grid-template-columns: 1fr;
  }
}

.status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
}

.status-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.status-pill.off {
  background: #fee2e2;
  color: #991b1b;
}

.collapsible {
  padding: 0;
}

.collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 24px;
}

.collapsible > summary::-webkit-details-marker {
  display: none;
}

.collapsible > summary .row-header {
  margin: 0;
}

.collapsible[open] > summary {
  border-bottom: 1px solid #e2e8f0;
}

.collapsible > *:not(summary) {
  padding: 0 24px 24px 24px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.status-grid.secondary {
  margin-top: 12px;
}

.status-details {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.status-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #475569;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #425066;
}

.label-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.required {
  color: #dc2626;
  margin-left: 6px;
  font-weight: 600;
}

.optional {
  color: #64748b;
  margin-left: 8px;
  font-size: 12px;
}

input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d1d7e0;
  font-size: 13px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

textarea {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d1d7e0;
  font-size: 13px;
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.actions {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.row-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.row-header-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

.section {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.section:last-of-type {
  border-bottom: none;
}

.section summary {
  list-style: none;
  cursor: pointer;
}

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

.section > summary,
.status-details > summary {
  position: relative;
  padding-right: 18px;
}

.section > summary::after,
.status-details > summary::after {
  content: "▾";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  color: #94a3b8;
}

.section[open] > summary::after,
.status-details[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.row-inline {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.row-inline input {
  flex: 1;
}

.row-inline.column {
  flex-direction: column;
  align-items: stretch;
}

.select-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.select-inline select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #d1d7e0;
  background: #ffffff;
  font-size: 12px;
}

.competitor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toggle-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: 16px;
  height: 16px;
}

.checkbox.inline {
  margin-top: 24px;
  font-size: 12px;
  color: #475569;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}

.ghost {
  background: transparent;
  color: #2563eb;
  padding: 6px 10px;
}

.ghost.tiny {
  font-size: 11px;
  padding: 2px 6px;
}

.membership-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #1f2937;
}

.modal-list-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
}

button.primary {
  background: #2563eb;
  color: #fff;
}

button.secondary {
  background: #e2e8f0;
  color: #1f2937;
}

button.secondary.active {
  background: #2563eb;
  color: #fff;
}

button.danger {
  background: #ef4444;
  color: #fff;
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-summary {
  font-size: 12px;
  color: #475569;
  margin-top: 6px;
}

.role-presets {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

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

.role-list {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1f2937;
  font-size: 11px;
  font-weight: 600;
}

.role-empty {
  font-size: 12px;
  color: #64748b;
}

.role-badges {
  display: flex;
  gap: 6px;
  margin: 6px 0;
  flex-wrap: wrap;
}
.busy-accounts {
  margin-top: 24px;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f8fafc;
}

.account-phone {
  font-weight: 600;
}

.account-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.status {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status.ok {
  color: #16a34a;
}

.status.limited {
  color: #f97316;
}

.account-error {
  font-size: 12px;
  color: #64748b;
  max-width: 240px;
  text-align: right;
}

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.role-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tasks-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(320px, 1fr);
  gap: 16px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
  padding-right: 4px;
}

.task-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-search {
  margin-bottom: 0;
}

.task-search input {
  width: 100%;
  height: 34px;
  font-size: 12px;
  padding: 6px 10px;
}

.task-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.task-filters .chip {
  padding: 6px 10px;
  font-size: 12px;
}

.select-inline {
  font-size: 12px;
}

.select-inline select {
  height: 34px;
}

.chip {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.chip.active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1e3a8a;
}

.task-item {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.icon-btn {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.icon-btn.primary {
  background: #2563eb;
  color: #fff;
}

.icon-btn.danger {
  background: #ef4444;
  color: #fff;
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-direction: column;
  align-items: flex-start;
}

.task-meta {
  font-size: 11px;
  color: #64748b;
}

.task-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-meta.monitor {
  font-weight: 600;
}

.task-meta.monitor.on {
  color: #16a34a;
}

.task-meta.monitor.off {
  color: #f97316;
}

.task-item.active {
  border-color: #2563eb;
  background: #e0f2fe;
}

.task-title {
  font-weight: 600;
}

.task-summary {
  background: #eef2ff;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-summary-title {
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
}

.task-summary-row {
  font-size: 12px;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  white-space: nowrap;
}

.task-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-direction: column;
  align-items: flex-start;
}

.task-badge.ok {
  background: #dcfce7;
  color: #15803d;
}

.task-badge.off {
  background: #e2e8f0;
  color: #64748b;
}

.task-badge.warn {
  background: #ffedd5;
  color: #b45309;
}

.match-badge {
  font-size: 10px;
  font-weight: 600;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.match-badge.ok {
  background: #dcfce7;
  color: #15803d;
}

.match-badge.warn {
  background: #fee2e2;
  color: #b91c1c;
}

.task-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-box {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.collapsible {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hint {
  font-size: 11px;
  color: #64748b;
}

label .hint {
  display: block;
  margin-top: 4px;
}

.tdata-report {
  font-size: 12px;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tdata-errors {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.tdata-error-row {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.tdata-error-path {
  font-size: 12px;
  color: #0f172a;
  word-break: break-all;
}

.tdata-error-text {
  font-size: 12px;
  color: #b91c1c;
}

.tdata-error-hint {
  font-size: 11px;
  color: #7c2d12;
}

.status-text {
  font-size: 12px;
  color: #1d4ed8;
  margin-top: 4px;
}

.status-text.compact {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

.task-toolbar {
  padding: 6px 10px;
  font-size: 12px;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-actions button {
  padding: 8px 10px;
  font-size: 12px;
}

.sidebar-actions.expanded {
  margin-top: 8px;
}

.side-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.side-stat {
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-stat strong {
  font-size: 14px;
  color: #0f172a;
}

.logs .log-row {
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-time {
  font-size: 12px;
  color: #64748b;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.log-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.log-users,
.log-errors {
  font-size: 12px;
  color: #475569;
  white-space: pre-line;
}

.log-result-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.log-result {
  font-size: 13px;
  color: #1f2937;
}

.log-result.success {
  color: #0f766e;
}

.log-result.error {
  color: #b91c1c;
}

.log-result.unconfirmed {
  color: #b45309;
}

.log-status {
  font-weight: 600;
}

.log-status.success {
  color: #0f766e;
}

.log-status.failed {
  color: #b91c1c;
}

.log-status.skipped {
  color: #64748b;
}

.log-status.unconfirmed {
  color: #b45309;
}

.invite-stats {
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
}

.invite-details {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  display: grid;
  gap: 4px;
  white-space: pre-line;
}

.wrap {
  word-break: break-all;
}

.pre-line {
  white-space: pre-line;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.empty {
  padding: 12px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 14px;
}

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  max-width: 360px;
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  font-size: 13px;
}

.toast.info {
  border-left: 4px solid #2563eb;
}

.toast.success {
  border-left: 4px solid #16a34a;
}

.toast.error {
  border-left: 4px solid #dc2626;
}

.toast.warn {
  border-left: 4px solid #f59e0b;
}

.error-boundary {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f8fafc;
}

.error-boundary-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  max-width: 420px;
  text-align: center;
}

.error-boundary-card h2 {
  margin: 0 0 8px;
}

.error-boundary-card p {
  margin: 0 0 16px;
  color: #475569;
  font-size: 14px;
}

.account-details {
  margin-top: 8px;
}

.account-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #475569;
}

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

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

  .top-row {
    grid-template-columns: 1fr;
  }

  .sticky {
    position: static;
    height: auto;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 20px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }

  .task-switcher {
    width: 100%;
  }

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

  .sticky {
    position: static;
    height: auto;
  }

  .tasks-layout {
    grid-template-columns: 1fr;
  }

  .account-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .account-actions {
    align-items: flex-start;
  }
}
