:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182d2b;
  background: #f5f7f6;
  font-size: 15px;
  line-height: 1.55;
  --accent: #146b54;
  --muted: #526561;
  --border: #d6dfdc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: var(--accent);
}
.workspace {
  max-width: 960px;
  margin: auto;
  padding: 32px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.brand {
  font-size: 23px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.025em;
}
.brand span {
  font-weight: 400;
  color: #182d2b;
}
.tag,
.eyebrow {
  font-size: 12px;
  color: var(--muted);
}
.intro {
  padding: 36px 0 12px;
}
.eyebrow {
  letter-spacing: 0.08em;
  font-weight: 700;
}
h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 12px 0;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
p {
  color: var(--muted);
}
section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  margin: 20px 0;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #a9bab4;
  border-radius: 6px;
  background: white;
  color: #182d2b;
  margin-top: 6px;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #95c8ba;
  outline-offset: 2px;
}
button {
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  background: #105640;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  background: white;
  border-color: #a9bab4;
  color: #24483f;
}
.secondary:hover {
  background: #edf4f0;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}
#status {
  padding: 12px 16px;
  background: #eaf2ee;
  border: 1px solid var(--border);
}
#status.error {
  background: #fff1ed;
  border-color: #ad3b23;
  color: #892d19;
}
dt {
  font-weight: 600;
  margin-top: 12px;
}
dd {
  margin: 3px 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--muted);
}
footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .workspace {
    padding: 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  section {
    padding: 20px;
  }
  .tag {
    max-width: 100px;
    text-align: right;
  }
}

::selection {
  background: #c7e5d9;
  color: #182d2b;
}
input,
textarea {
  caret-color: #146b54;
}
a {
  text-underline-offset: 3px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.section-heading h2 {
  margin: 0;
}
details {
  margin: 18px 0;
}
summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}
fieldset {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
  padding: 16px 0 0;
}
legend {
  font-weight: 700;
  padding-right: 12px;
  overflow-wrap: anywhere;
}
.line-state {
  font-size: 13px;
  margin: 0 0 12px;
}
.staff-list {
  max-height: 190px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 16px;
}
.staff-list label {
  margin: 0;
  padding: 8px 0;
}
input[readonly] {
  background: #f5f7f6;
}
.staff-list input {
  accent-color: var(--accent);
}

.user-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.user-row h3 {
  margin: 0;
}
.user-row p {
  margin: 8px 0;
}
.user-row .actions {
  margin-top: 14px;
}
#user-form {
  margin-top: 28px;
}
#issued {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
[hidden] {
  display: none !important;
}
.workspace {
  max-width: 1280px;
}
h1 {
  font-size: 28px;
}
h3 {
  font-size: 16px;
  margin: 0 0 14px;
}
p {
  max-width: 72ch;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
}
.button.secondary {
  background: white;
  color: #24483f;
  border-color: #a9bab4;
}
.button:hover {
  background: #105640;
  color: white;
}
.admin-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 28px;
}
.sidebar {
  position: sticky;
  top: 20px;
  padding: 12px 0;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar nav a {
  padding: 12px 16px;
  text-decoration: none;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
}
.sidebar nav a:hover {
  background: #eaf2ee;
}
.sidebar nav a[aria-current="page"] {
  color: var(--accent);
  background: #e0eee7;
}
.sidebar nav a[aria-disabled="true"] {
  color: #68756f;
  cursor: not-allowed;
}
#admin-identity {
  margin: 28px 16px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.admin-content {
  min-width: 0;
}
.admin-content > section {
  margin: 0;
  min-height: 520px;
}
.admin-content h1 {
  margin: 0 0 24px;
}
.admin-content .section-heading h1 {
  margin-bottom: 8px;
}
.installation {
  max-width: 720px;
  margin: 28px auto;
}
#install-progress {
  margin: 0 0 30px;
  font-size: 13px;
  color: var(--accent);
}
#settings h2 {
  margin-top: 30px;
}
#connected-settings {
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 24px;
}
.hint {
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 42px 0;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  padding: 14px 12px;
  background: #f6f8f7;
}
td {
  padding: 18px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
td .actions {
  flex-wrap: nowrap;
}
td .button,
td button {
  font-size: 12px;
  padding: 7px 11px;
}
.user-name {
  font-weight: 650;
  text-decoration: none;
}
.user-name:hover {
  text-decoration: underline;
}
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 13px;
}
#user-form {
  margin-top: 20px;
  max-width: 760px;
}
.number-field {
  border: 1px solid #a9bab4;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 3px 0;
}
.number-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 5px 5px 5px 12px;
  background: #e4f0e9;
  color: #24483f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
}
.number-pill > span {
  overflow-wrap: anywhere;
}
.number-pill button {
  padding: 4px;
  display: flex;
  border-radius: 50%;
  color: #24483f;
  background: transparent;
}
.number-pill button:hover {
  background: #c8dfd2;
}
#add-numbers {
  flex-shrink: 0;
  padding: 8px 12px;
}
#user-access,
#user-statistics {
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding-top: 28px;
}
#user-statistics .section-heading p {
  margin: 4px 0;
}
.stats-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 22px 0 30px;
}
.stats-totals strong {
  display: block;
  font-size: 28px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
.stats-totals span {
  font-size: 12px;
  color: var(--muted);
}
.chart-block {
  padding: 18px 0;
}
#activity-chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.chart-legend span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.chart-legend i,
.outcome-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.calls-color {
  background: #146b54;
}
.messages-color {
  background: #356bb3;
}
.outcome-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.donut-layout {
  display: flex;
  align-items: center;
  gap: 12px;
}
.donut-layout svg {
  width: 130px;
  flex-shrink: 0;
}
.outcome-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  font-size: 12px;
}
.outcome-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
}
.outcome-legend li span {
  flex: 1;
  text-transform: capitalize;
}
.outcome-legend strong {
  font-variant-numeric: tabular-nums;
}
.danger {
  background: #a0392b;
  color: white;
}
.danger:hover {
  background: #80281e;
}
.danger.secondary,
.text-danger {
  color: #922f24;
  background: white;
}
.text-danger:hover {
  background: #fff0eb;
}
.error {
  color: #922f24;
}
dialog {
  width: min(600px, calc(100% - 32px));
  border: 0;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 16px 60px #142b2940;
  color: #182d2b;
  max-height: 85vh;
}
dialog::backdrop {
  background: #182d2b66;
}
dialog h2 {
  margin: 0;
}
.number-options {
  max-height: 45vh;
  overflow: auto;
}
.number-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: white;
  color: #182d2b;
  padding: 14px 12px;
}
.number-option strong,
.number-option small {
  display: block;
}
.number-option small {
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
}
.number-option > span:last-child {
  font-size: 12px;
  color: var(--accent);
}
.number-option:hover,
.number-option[aria-pressed="true"] {
  background: #edf5f0;
}
#delete-dialog {
  max-width: 480px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #a9bab4 #f5f7f6;
}
@media (max-width: 950px) {
  .admin-layout {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 18px;
  }
  .outcome-charts {
    grid-template-columns: 1fr;
  }
  .sidebar nav a {
    padding: 10px;
  }
}
@media (max-width: 650px) {
  .workspace {
    padding: 16px;
  }
  .admin-layout {
    display: block;
  }
  .sidebar {
    position: static;
    padding: 0 0 20px;
  }
  .sidebar nav {
    display: flex;
  }
  .sidebar nav a {
    flex: 1;
    text-align: center;
  }
  #admin-identity {
    display: none;
  }
  .admin-content > section {
    padding: 20px;
  }
  .number-field {
    flex-direction: column;
  }
  .stats-totals {
    gap: 12px;
  }
  .stats-totals strong {
    font-size: 23px;
  }
  .section-heading {
    align-items: flex-start;
  }
  dialog {
    padding: 20px;
  }
  .chart-legend {
    gap: 10px;
  }
  .donut-layout svg {
    width: 110px;
  }
}

#activity-chart {
  overflow-x: auto;
}
#activity-chart svg {
  min-width: 650px;
}

.template-row {
  padding: 22px 0;
  border-bottom: 1px solid var(--line, #dce5df);
}
.template-row h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
.template-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#templates-section {
  margin-top: 32px;
}
#template-form-error,
#delete-template-error {
  color: #8c281f;
}
.template-row .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.template-row .actions select {
  width: auto;
}

#templates-section {
  border: 0;
  border-radius: 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--border);
}
.template-toolbar {
  gap: 10px;
  flex-wrap: wrap;
}
.template-row .section-heading {
  align-items: baseline;
  gap: 10px;
  margin-bottom: 0;
}
.status-badge {
  display: inline-block;
  background: #eef1ef;
  color: #46554e;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: capitalize;
}
.status-badge.accepted {
  background: #e2f3e9;
  color: #146b54;
}
.status-badge.failed {
  background: #fff0eb;
  color: #8c281f;
}

.app-legal-links{margin:24px auto;padding:16px 24px;max-width:1200px;color:#52645c;font-size:12px;line-height:2}.app-legal-links a{color:#146b54;text-underline-offset:3px}
