:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #243d3a;
  background: #f5f7f8;
  font-synthesis: none;
  --green: #176c62;
  --dark: #123d38;
  --line: #e5ebeb;
  --muted: #758482;
  --shadow: 0 12px 36px #183b3210;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 14px;
  background: white;
  color: #29423f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover {
  background: #f0f5f4;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
button.primary:hover {
  background: #10594f;
}
button.danger {
  color: #b63740;
  border-color: #f4d6d8;
}
button.ghost {
  border: 0;
  background: transparent;
  padding: 8px;
}
button.small {
  padding: 7px 10px;
  font-size: 12px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #85bcb0;
  outline-offset: 3px;
}
input,
textarea,
select {
  border: 1px solid #dce5e3;
  border-radius: 8px;
  background: white;
  padding: 11px 12px;
  color: #243d3a;
  outline: none;
  width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #41998a;
  box-shadow: 0 0 0 3px #176c6210;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #46605c;
}
label.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 400;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  font-weight: 650;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.35px;
}
h3 {
  font-size: 15px;
}
small,
.muted {
  color: var(--muted);
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.loading {
  display: grid;
  place-items: center;
  height: 100dvh;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-story {
  background: var(--dark);
  color: white;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-story:after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  right: -230px;
  bottom: -100px;
  box-shadow:
    0 0 0 80px #ffffff04,
    0 0 0 160px #ffffff03;
}
.login-story h1 {
  font-size: 50px;
  line-height: 1.15;
  max-width: 530px;
  margin-bottom: 25px;
  letter-spacing: -2px;
}
.login-story p {
  color: #adc9c3;
  line-height: 1.8;
  max-width: 420px;
}
.login-story .brand {
  font-size: 24px;
}
.login-form {
  display: grid;
  align-content: center;
  justify-content: center;
  padding: 40px;
}
.login-form form {
  width: 360px;
  max-width: 90vw;
  display: grid;
  gap: 22px;
}
.eyebrow {
  letter-spacing: 1.9px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #8eaaa5;
  margin-bottom: 18px;
}
.login-form h1 {
  margin: 0 0 8px;
}
.login-note {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 20px;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 650;
  letter-spacing: -0.6px;
}
.brand img {
  width: 34px;
  height: 34px;
}
.brand em {
  font-size: 10px;
  font-style: normal;
  color: #7fa69e;
  letter-spacing: 2px;
  margin-left: 5px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 16px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  background: #edf2f1;
  color: #647f78;
  white-space: nowrap;
}
.pill.ai {
  background: #eeebfb;
  color: #7d66b2;
}
.pill.waiting {
  background: #fff2d9;
  color: #a57525;
}
.pill.human,
.pill.online {
  background: #e2f3ed;
  color: #347d65;
}
.pill.closed {
  background: #edf0f2;
  color: #74858c;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.avatar {
  height: 36px;
  width: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e6eeeb;
  color: #44766b;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}
.avatar.blue {
  background: #e9effb;
  color: #6787ba;
}
.avatar.lilac {
  background: #f0eafa;
  color: #9978b1;
}
.avatar.amber {
  background: #fff0dc;
  color: #b58b51;
}
.avatar.large {
  height: 58px;
  width: 58px;
  font-size: 19px;
  border-radius: 18px;
}
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 24px;
  gap: 12px;
  color: #85938f;
  align-content: center;
  height: 100%;
}
.empty .icon {
  width: 36px;
  height: 36px;
  stroke-width: 1.2;
}
.empty h2 {
  color: #48635c;
  font-weight: 550;
}
.empty p {
  max-width: 290px;
  line-height: 1.7;
  font-size: 13px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 22px;
  box-shadow: 0 3px 14px #23423403;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 18px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}
.table-wrap {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  padding: 15px 18px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #869894;
  background: #fbfcfc;
  font-weight: 650;
}
td {
  padding: 17px 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
td small {
  display: block;
  margin-top: 4px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
dialog {
  border: 1px solid #e0e8e6;
  border-radius: 17px;
  box-shadow: 0 30px 100px #13352c40;
  padding: 0;
  max-width: 710px;
  width: calc(100% - 30px);
  max-height: 90dvh;
  color: #24473e;
}
dialog::backdrop {
  background: #172e2d60;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-body {
  padding: 26px 28px;
  display: grid;
  gap: 20px;
}
.dialog-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fafcfc;
}
.hint {
  font-size: 12px;
  color: #81908b;
  line-height: 1.7;
}
.notice {
  padding: 13px 16px;
  background: #edf5f2;
  border: 1px solid #dbeae4;
  border-radius: 9px;
  color: #547468;
  font-size: 12px;
  line-height: 1.7;
}
.error {
  color: #b44848;
  font-size: 13px;
  line-height: 1.5;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #153f37;
  color: white;
  border-radius: 10px;
  padding: 13px 22px;
  z-index: 100;
  box-shadow: var(--shadow);
  display: none;
  max-width: 90vw;
}
.secret {
  font-family: Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background: #f2f6f4;
  padding: 15px;
  border: 1px solid #dce8e1;
  border-radius: 8px;
}
code {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.metric {
  font-size: 34px;
  letter-spacing: -1px;
  font-weight: 550;
  margin: 18px 0 5px;
}
.metric-label {
  font-size: 12px;
  color: #7e918b;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 230px;
  padding-top: 30px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  height: 100%;
  font-size: 10px;
  color: #80958b;
}
.bar-col i {
  display: block;
  width: 100%;
  max-width: 55px;
  background: #b1d8c7;
  border-radius: 6px 6px 0 0;
  min-height: 3px;
}
.progress {
  height: 6px;
  background: #eaf0ed;
  border-radius: 5px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--green);
}
[hidden] { display: none !important; }
