:root {
  --ink: #22313b;
  --ink-strong: #17252e;
  --muted: #6b7b86;
  --line: #dce7e2;
  --green: #087a53;
  --green-2: #12a36d;
  --mint: #eaf7f1;
  --soft: #f6f9f8;
  --paper: #fff;
  --amber: #b87816;
  --amber-bg: #fff8e8;
  --red: #a43a3a;
  --shadow: 0 14px 36px rgba(28, 44, 39, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: #f7faf9;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel-login-body {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(120deg, rgba(8, 122, 83, 0.12), transparent 34%),
    linear-gradient(180deg, #f7faf9, #eef5f1);
}

.login-shell {
  width: min(560px, 100%);
}

.login-card,
.panel-sidebar,
.stats-grid article,
.focus-card,
.numbers-section,
.modal-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.login-card {
  padding: 38px;
}

.login-brand,
.panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.login-brand img,
.panel-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.login-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 34px 0 22px;
  border-radius: 20px;
  background: var(--mint);
  color: var(--green);
}

.login-icon svg {
  width: 34px;
  height: 34px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--ink-strong);
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  color: var(--ink-strong);
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: 0;
}

.login-copy {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 700;
}

.panel-google-auth {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  border: 1px solid #dfe9e5;
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #f8fbfa);
}

.panel-google-slot {
  display: grid;
  min-height: 42px;
  place-items: center;
}

.panel-google-auth p {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.panel-google-auth p.is-success {
  color: var(--green);
}

.panel-email-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-email-divider::before,
.panel-email-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #dfe7e3;
}

.login-form,
.add-number-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 56px;
  border: 1px solid #cfdad5;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink-strong);
  background: #fff;
  font-size: 17px;
  font-weight: 800;
  outline: none;
}

input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(18, 163, 109, 0.12);
}

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

.code-boxes input {
  padding: 0;
  text-align: center;
  font-size: 24px;
}

.login-form button,
.add-number-form button,
.add-number-button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #087a53, #0f8f61);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(8, 122, 83, 0.18);
}

.login-form button:disabled,
.add-number-form button:disabled,
.add-number-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-feedback {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
}

.form-feedback.is-success {
  color: var(--green);
}

.login-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.panel-login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(18, 163, 109, 0.16), transparent 28%),
    linear-gradient(135deg, #eef7f3 0%, #f8fbfa 46%, #edf4f1 100%);
}

.panel-login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(8, 122, 83, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 122, 83, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000, transparent 74%);
}

.panel-login-body .login-shell {
  width: min(940px, 100%);
  position: relative;
  z-index: 1;
}

.panel-login-body .login-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(390px, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(21, 76, 57, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 80px rgba(29, 58, 48, 0.18);
  padding: 0;
}

.login-showcase {
  min-height: 570px;
  display: grid;
  align-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(4, 45, 34, 0.96), rgba(8, 101, 71, 0.94)),
    #073d2d;
  color: #ffffff;
  padding: 28px;
}

.login-showcase::before {
  content: "";
  position: absolute;
  inset: auto -80px -110px 40px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.panel-login-body .login-brand {
  position: relative;
  z-index: 1;
  align-items: center;
}

.panel-login-body .login-brand img,
.login-mobile-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.panel-login-body .login-brand strong {
  display: block;
  font-size: 0.96rem;
}

.panel-login-body .login-brand span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 800;
}

.panel-preview {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.preview-top,
.preview-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-top span {
  width: 108px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.preview-top svg {
  width: 24px;
  height: 24px;
  color: #6ee7b7;
}

.preview-number {
  display: grid;
  gap: 6px;
}

.preview-number small,
.preview-stats span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 850;
}

.preview-number strong {
  color: #ffffff;
  font-size: clamp(1.22rem, 2.1vw, 1.52rem);
  font-weight: 900;
  letter-spacing: 0;
}

.preview-rows {
  display: grid;
  gap: 9px;
}

.preview-rows span {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.preview-rows span:nth-child(2) {
  width: 82%;
}

.preview-rows span:nth-child(3) {
  width: 64%;
}

.preview-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}

.preview-stats b {
  color: #8df6c2;
  font-size: 1.72rem;
  line-height: 1;
  font-weight: 900;
}

.login-assurance {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.login-assurance span {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
}

.login-assurance svg {
  width: 17px;
  height: 17px;
  color: #7ee7b4;
}

.login-assurance b {
  font-size: 0.76rem;
  font-weight: 900;
}

.login-panel {
  display: grid;
  align-content: center;
  padding: clamp(24px, 4.2vw, 46px);
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  color: var(--ink-strong);
  font-weight: 900;
}

.panel-login-body .login-icon {
  width: 48px;
  height: 48px;
  margin: 0 0 16px;
  border: 1px solid rgba(18, 163, 109, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, #eef9f4, #e3f4ed);
}

.panel-login-body .login-icon svg {
  width: 23px;
  height: 23px;
}

.panel-login-body h1 {
  max-width: 500px;
  margin-bottom: 10px;
  font-size: clamp(1.84rem, 3.1vw, 2.38rem);
  line-height: 1.08;
}

.panel-login-body .login-copy {
  max-width: 500px;
  margin-bottom: 0;
  color: #62727c;
  font-size: 0.92rem;
  line-height: 1.55;
}

.panel-login-body .panel-google-auth {
  margin-top: 20px;
  border-color: rgba(8, 122, 83, 0.14);
  border-radius: 14px;
  padding: 14px;
}

.panel-login-body .panel-email-divider {
  margin: 16px 0 0;
}

.panel-login-body .login-form {
  gap: 11px;
  margin-top: 20px;
}

.panel-login-body label span {
  margin-bottom: 8px;
  font-size: 0.86rem;
}

.panel-login-body input {
  min-height: 50px;
  border-radius: 12px;
  background: #fbfdfc;
  font-size: 0.94rem;
}

.panel-login-body .code-boxes {
  gap: 8px;
}

.panel-login-body .code-boxes input {
  min-height: 48px;
  font-size: 1.08rem;
}

.panel-login-body .login-form button {
  min-height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #087a53, #11a06c);
  box-shadow: 0 16px 30px rgba(8, 122, 83, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.panel-login-body .login-form button:hover:not(:disabled) {
  filter: saturate(1.05);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(8, 122, 83, 0.24);
}

.panel-login-body .login-link {
  width: fit-content;
  margin-top: 16px;
  color: #64727a;
  font-size: 0.86rem;
}

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

.panel-numbers-app {
  position: relative;
  overflow: hidden;
}

.panel-numbers-app::before {
  display: none;
}

.panel-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-width: 0 1px 0 0;
  border-radius: 0;
  box-shadow: none;
  padding: 24px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.panel-drawer-toggle,
.panel-drawer-close,
.panel-drawer-backdrop,
.panel-mobile-topbar {
  display: none;
}

.panel-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.panel-account {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  border: 1px solid #e1ebe6;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.panel-account span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-account strong {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-nav {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.panel-nav a,
.logout-button {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.panel-nav a.is-active,
.panel-nav a:hover {
  color: var(--green);
  background: var(--mint);
}

.panel-nav a:hover,
.logout-button:hover {
  background: #f1f7f4;
}

.logout-button {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  justify-content: flex-start;
}

.panel-main {
  position: relative;
  z-index: 1;
  padding: 32px 36px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  min-height: 46px;
}

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

.panel-header .add-number-button {
  min-height: 42px;
  padding: 0 14px;
  font-size: 13px;
  box-shadow: 0 10px 22px rgba(8, 122, 83, 0.14);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.panel-header .add-number-button:hover {
  background: linear-gradient(135deg, #087a53, #12a36d);
  box-shadow: 0 12px 26px rgba(8, 122, 83, 0.18);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.stats-grid article {
  padding: 20px;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.stats-grid article:hover {
  border-color: rgba(8, 122, 83, 0.2);
  box-shadow: 0 12px 30px rgba(28, 44, 39, 0.06);
}

.stats-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stats-grid strong {
  color: var(--ink-strong);
  font-size: 27px;
  font-weight: 900;
}

.focus-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
  box-shadow: none;
}

.focus-card::before,
.focus-card::after {
  display: none;
}

.focus-card::before {
  inset: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: panel-grid-drift 11s linear infinite;
}

.focus-card::after {
  top: -45%;
  bottom: -45%;
  left: -22%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: rotate(16deg);
  animation: panel-scan 4.8s ease-in-out infinite;
}

.focus-card > * {
  position: relative;
  z-index: 1;
}

.focus-card h2 {
  color: var(--ink-strong);
  font-size: 25px;
}

.focus-card p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.focus-card > svg {
  width: 38px;
  height: 38px;
  color: var(--green);
  opacity: 0.74;
  filter: none;
  animation: none;
}

.numbers-section {
  margin-top: 16px;
  padding: 24px 28px;
  box-shadow: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 0;
}

.section-head > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

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

.number-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.number-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #087a53, #18b579);
  opacity: 0;
  transition: opacity 180ms ease;
}

.number-card:hover {
  border-color: rgba(8, 122, 83, 0.22);
  box-shadow: 0 12px 30px rgba(28, 44, 39, 0.06);
}

.number-card:hover::before {
  opacity: 1;
}

.number-card h3 {
  margin: 0 0 7px;
  color: var(--ink-strong);
  font-size: 18px;
}

.number-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--green);
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.status-pill.is-manual {
  color: var(--amber);
  background: var(--amber-bg);
}

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

.number-actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--green);
  background: var(--mint);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.number-actions a:hover {
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 20px rgba(8, 122, 83, 0.14);
}

.credit-balance-chip {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink-strong);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: none;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.credit-balance-chip:hover {
  border-color: rgba(8, 122, 83, 0.28);
  color: var(--green);
  background: #fbfdfc;
}

.credit-balance-chip.is-large {
  min-height: 46px;
  padding: 0 16px;
}

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

.research-focus .eyebrow {
  color: var(--green);
}

.research-number-card {
  align-items: stretch;
}

.research-number-card.is-complete .research-progress-track span {
  background: linear-gradient(90deg, #0f8f61, #6ee7b7);
}

.number-card-main {
  min-width: 0;
}

.number-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.number-title-line h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.number-flag {
  width: 28px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(23, 37, 46, 0.08);
}

.research-progress {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.research-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.research-progress-meta strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.research-progress-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(8, 122, 83, 0.08), rgba(18, 163, 109, 0.04)),
    #edf4f1;
  box-shadow: inset 0 1px 2px rgba(23, 37, 46, 0.06);
}

.research-progress-track span {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  background:
    linear-gradient(90deg, #087a53, #18b579 62%, #87efbf),
    #087a53;
  box-shadow: 0 0 18px rgba(18, 163, 109, 0.26);
  transition: width 220ms linear;
}

.research-progress-track span i {
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent),
    repeating-linear-gradient(115deg, transparent 0 10px, rgba(255, 255, 255, 0.14) 10px 18px);
  transform: translateX(-100%);
  animation: progress-shine 1.8s ease-in-out infinite;
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 44px 18px;
  border: 1px dashed #c9d9d2;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  color: var(--green);
}

.empty-state h3 {
  margin-bottom: 8px;
  color: var(--ink-strong);
}

.credit-hero h2 {
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
}

.credit-packages-section {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
}

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

.credit-package-card {
  position: relative;
  display: grid;
  gap: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.credit-package-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  display: block;
  height: 3px;
  background: transparent;
}

.credit-package-card:hover,
.credit-package-card.is-highlighted {
  border-color: rgba(8, 122, 83, 0.24);
  box-shadow: 0 14px 34px rgba(28, 44, 39, 0.08);
  transform: translateY(-1px);
}

.credit-package-card.is-highlighted::before {
  background: linear-gradient(90deg, #087a53, #18b579);
}

.credit-package-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green);
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.credit-package-card h3 {
  margin: 8px 0;
  color: var(--ink-strong);
  font-size: 23px;
}

.credit-package-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.credit-package-card > strong {
  color: var(--ink-strong);
  font-size: 21px;
  font-weight: 900;
}

.credit-package-card button {
  width: 100%;
}

.credit-package-card button,
.settings-actions a,
.settings-actions button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: linear-gradient(135deg, #087a53, #10a36c);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(8, 122, 83, 0.16);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.credit-package-card button span,
.credit-package-card button svg {
  color: #fff;
  opacity: 1;
}

.credit-package-card button:hover {
  filter: saturate(1.04);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(8, 122, 83, 0.2);
}

.credit-package-card button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.credit-feedback {
  margin-top: 14px;
}

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

.credit-history-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.credit-history-row strong,
.credit-history-row span {
  display: block;
}

.credit-history-row strong {
  color: var(--ink-strong);
  font-size: 16px;
}

.credit-history-row span,
.credit-history-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.credit-history-row em {
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--amber);
  background: var(--amber-bg);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.credit-history-row em.credit-status-paid {
  color: var(--green);
  background: var(--mint);
}

.payment-dialog {
  width: min(760px, 100%);
}

.embedded-checkout-frame {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.settings-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
}

.settings-card svg {
  width: 24px;
  height: 24px;
  color: var(--green);
}

.settings-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.settings-card strong {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.settings-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.settings-payment-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid rgba(8, 122, 83, 0.14);
  border-radius: 8px;
  padding: 16px;
  background: var(--mint);
}

.settings-payment-note svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--green);
}

.settings-payment-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-strong);
}

.settings-payment-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.settings-actions button[data-logout] {
  background: #eef3f1;
  color: var(--muted);
  box-shadow: none;
}

.settings-actions button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.settings-feedback {
  margin-top: 12px;
}

.chat-import-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
}

.panel-main:not(.is-chat-empty) .chat-import-card {
  display: none;
}

.panel-main.has-chat-detail-open .panel-header {
  display: none;
}

.panel-main.has-chat-detail-open .chats-layout {
  margin-top: 0;
}

.panel-main.has-chat-detail-open .chat-detail-section {
  min-height: calc(100vh - 48px);
}

.panel-main.is-chat-empty .chat-import-card {
  display: grid;
  min-height: min(58vh, 560px);
  align-items: center;
  margin-top: 24px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 252, 0.96)),
    radial-gradient(circle at 50% 0%, rgba(8, 122, 83, 0.08), transparent 42%);
}

.chat-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: stretch;
}

.panel-main.is-chat-empty .chat-upload-form {
  width: min(760px, 100%);
  margin: 0 auto;
  grid-template-columns: 1fr;
  gap: 16px;
}

.chat-dropzone {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 78px;
  border: 1px dashed #c6d8d0;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.panel-main.is-chat-empty .chat-dropzone {
  min-height: 330px;
  grid-template-columns: 1fr;
  place-items: center;
  align-content: center;
  gap: 16px;
  border-color: #bed8cc;
  border-width: 2px;
  padding: 36px;
  text-align: center;
}

.chat-dropzone:hover,
.chat-dropzone.is-dragging,
.chat-dropzone.has-file {
  border-color: rgba(8, 122, 83, 0.4);
  background: var(--mint);
  box-shadow: 0 12px 28px rgba(28, 44, 39, 0.06);
}

.chat-dropzone.is-dragging {
  border-style: solid;
  transform: translateY(-1px);
}

.chat-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.chat-dropzone-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--mint);
}

.panel-main.is-chat-empty .chat-dropzone-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto;
  color: #fff;
  background: linear-gradient(135deg, #087a53, #12a36d);
  box-shadow: 0 18px 38px rgba(8, 122, 83, 0.18);
}

.chat-dropzone-icon svg {
  width: 23px;
  height: 23px;
}

.panel-main.is-chat-empty .chat-dropzone-icon svg {
  width: 32px;
  height: 32px;
}

.chat-dropzone-title,
.chat-dropzone-meta {
  display: block;
  min-width: 0;
}

.chat-dropzone-title {
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-main.is-chat-empty .chat-dropzone-title {
  max-width: 520px;
  margin: 0 auto;
  font-size: 22px;
  white-space: normal;
}

.chat-dropzone-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.panel-main.is-chat-empty .chat-dropzone-meta {
  max-width: 520px;
  margin: 4px auto 0;
  font-size: 14px;
  line-height: 1.55;
}

.chat-import-button,
.chat-demo-preview-button,
.chat-export-guide-button,
.chat-analysis-actions button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, #087a53, #10a36c);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(8, 122, 83, 0.15);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.chat-demo-preview-button {
  display: none;
  border: 1px solid #dce9e3;
  color: var(--green);
  background: #fff;
  box-shadow: none;
}

.chat-export-guide-button {
  border: 1px solid #dce9e3;
  color: var(--green);
  background: #fff;
  box-shadow: none;
}

.panel-main.is-chat-empty .chat-import-button {
  width: min(360px, 100%);
  min-height: 54px;
  justify-self: center;
  font-size: 14px;
}

.panel-main.is-chat-empty .chat-demo-preview-button {
  display: inline-flex;
  width: min(360px, 100%);
  justify-self: center;
}

.panel-main.is-chat-empty .chat-export-guide-button {
  width: min(360px, 100%);
  justify-self: center;
}

.chat-import-button:hover,
.chat-demo-preview-button:hover,
.chat-export-guide-button:hover,
.chat-analysis-actions button:hover {
  filter: saturate(1.05);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(8, 122, 83, 0.2);
}

.chat-import-button:disabled,
.chat-demo-preview-button:disabled,
.chat-export-guide-button:disabled,
.chat-analysis-actions button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.chat-feedback,
.chat-analysis-feedback {
  margin-top: 12px;
}

.chat-import-progress {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: 0 14px 30px rgba(28, 44, 39, 0.05);
}

.chat-import-progress[hidden] {
  display: none;
}

.chat-import-progress-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.chat-import-progress-head > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--mint);
}

.chat-import-progress-head svg {
  width: 20px;
  height: 20px;
}

.chat-import-progress:not(.is-error):not(.is-success) .chat-import-progress-head svg {
  animation: panel-spin 1s linear infinite;
}

.chat-import-progress-head strong,
.chat-import-progress-head em,
.chat-import-progress-head b {
  display: block;
}

.chat-import-progress-head strong {
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 900;
}

.chat-import-progress-head em {
  min-width: 0;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-import-progress-head b {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.chat-import-progress-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf4f1;
}

.chat-import-progress-track span {
  position: relative;
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087a53, #13aa72, #7ee2b8);
  transition: width 240ms ease;
}

.chat-import-progress-track span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  animation: progress-shine 1.5s ease-in-out infinite;
}

.chat-import-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.chat-import-progress.is-success {
  border-color: rgba(8, 122, 83, 0.22);
  background: var(--mint);
}

.chat-import-progress.is-error {
  border-color: rgba(176, 58, 58, 0.26);
  background: #fff8f8;
}

.chat-import-progress.is-error .chat-import-progress-head > span,
.chat-import-progress.is-error .chat-import-progress-track span {
  color: #b03a3a;
  background: #ffe7e7;
}

.chat-import-progress.is-error .chat-import-progress-track span {
  background: linear-gradient(90deg, #b03a3a, #e06b6b);
}

.chat-import-progress.is-error .chat-import-progress-head b,
.chat-import-progress.is-error p {
  color: #b03a3a;
}

.chat-analysis-feedback a {
  color: var(--green);
  font-weight: 900;
}

.chat-demo-dialog {
  width: min(1180px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
}

.chat-export-guide-dialog {
  width: min(860px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
}

.chat-demo-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.chat-demo-head span,
.chat-demo-ai > div span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green);
  background: var(--mint);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-demo-head h2 {
  margin: 8px 0 0;
  font-size: 22px;
}

.chat-demo-head button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--green);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.chat-demo-head button:hover {
  border-color: rgba(8, 122, 83, 0.28);
  background: var(--mint);
  box-shadow: 0 12px 26px rgba(28, 44, 39, 0.05);
}

.export-guide-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.export-guide-tabs button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.export-guide-tabs button.is-active {
  border-color: rgba(8, 122, 83, 0.25);
  color: var(--green);
  background: var(--mint);
}

.export-guide-tabs svg {
  width: 18px;
  height: 18px;
}

.export-guide-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.export-guide-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.export-guide-title > svg {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 9px;
  color: var(--green);
  background: var(--mint);
}

.export-guide-title h3 {
  margin: 0 0 6px;
  color: var(--ink-strong);
  font-size: 19px;
}

.export-guide-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.export-guide-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
}

.export-guide-steps li {
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.45;
}

.export-guide-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.export-guide-notes span {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.export-guide-notes svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--green);
}

.chat-demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
  align-items: stretch;
}

.chat-demo-grid .chat-statistics-section {
  height: 100%;
  margin-bottom: 0;
}

.chat-demo-ai {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.chat-demo-ai h3 {
  margin: 10px 0 0;
  color: var(--ink-strong);
  font-size: 20px;
}

.chat-demo-ai p,
.chat-demo-ai li {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.chat-demo-ai p {
  margin: 0;
}

.chat-demo-ai ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.chats-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.chats-layout:not(.has-selected-chat) .chat-detail-section {
  display: none;
}

.chats-layout.has-selected-chat .chat-list-section {
  display: none;
}

.chat-list-section,
.chat-detail-section {
  min-height: 360px;
}

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

.chats-layout:not(.has-selected-chat) .chat-list {
  grid-template-columns: 1fr;
}

.chat-list-empty,
.chat-detail-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed #c9d9d2;
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.chat-list-empty {
  min-height: 210px;
}

.chat-list-empty svg,
.chat-detail-empty svg {
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: var(--green);
}

.chat-list-empty strong,
.chat-list-empty span,
.chat-detail-empty h2,
.chat-detail-empty p {
  display: block;
}

.chat-list-empty strong,
.chat-detail-empty h2 {
  margin-bottom: 7px;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
}

.chat-list-empty span,
.chat-detail-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.chat-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(320px, auto) auto;
  gap: 14px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 252, 0.98)),
    linear-gradient(135deg, rgba(8, 122, 83, 0.05), transparent 54%);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.chat-list-item:hover,
.chat-list-item.is-selected {
  border-color: rgba(8, 122, 83, 0.24);
  background: #fbfdfc;
  box-shadow: 0 18px 34px rgba(28, 44, 39, 0.07);
  transform: translateY(-1px);
}

.chat-list-item.is-selected {
  background: var(--mint);
}

.chat-list-item-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: #eef8f3;
}

.chat-list-item-icon svg {
  width: 24px;
  height: 24px;
}

.chat-list-item-body {
  min-width: 0;
}

.chat-list-item-body strong,
.chat-list-item-body em,
.chat-list-item-body small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-item-body strong {
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
}

.chat-list-item-body em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.chat-list-item-body small {
  margin-top: 4px;
  color: #87969f;
  font-size: 12px;
  font-weight: 800;
}

.chat-list-item-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: center;
  min-width: 320px;
}

.chat-list-item-stats > span {
  display: grid;
  min-height: 50px;
  align-content: center;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-list-item-stats b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 900;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.chat-list-item-signals {
  grid-column: 2 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.chat-list-item-signals span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  border: 1px solid #dce9e3;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.chat-list-item-signals svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.chat-list-item-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  align-self: center;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--green);
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.chat-list-item-action svg {
  width: 16px;
  height: 16px;
}

.chat-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.chat-back-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 0 12px;
  color: var(--green);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.chat-back-button:hover {
  border-color: rgba(8, 122, 83, 0.28);
  background: var(--mint);
  box-shadow: 0 12px 26px rgba(28, 44, 39, 0.05);
}

.chat-back-button svg {
  width: 17px;
  height: 17px;
}

.chat-detail-head h2 {
  margin-bottom: 5px;
  font-size: 22px;
}

.chat-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.chat-detail-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--green);
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.chat-metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.chat-metadata-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.chat-metadata-grid span,
.chat-metadata-grid strong {
  display: block;
}

.chat-metadata-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-metadata-grid strong {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.chat-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fbfdfc;
}

.chat-detail-tabs button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.chat-detail-tabs button:hover,
.chat-detail-tabs button.is-active {
  color: var(--green);
  background: #fff;
  box-shadow: 0 10px 24px rgba(28, 44, 39, 0.06);
}

.chat-detail-tabs svg {
  width: 17px;
  height: 17px;
}

.chat-tab-panel {
  min-height: 320px;
}

.chat-conversation-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6faf7;
}

.chat-conversation-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #dce9e3;
  padding: 12px;
  background: #fff;
}

.chat-conversation-toolbar span,
.chat-conversation-toolbar strong,
.chat-owner-select span {
  display: block;
}

.chat-conversation-toolbar span,
.chat-owner-select span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-conversation-toolbar strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 900;
}

.chat-owner-select {
  flex: 0 0 min(260px, 42%);
}

.chat-owner-select select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink-strong);
  background: #fbfdfc;
  font-size: 13px;
  font-weight: 850;
  outline: none;
}

.chat-message-list {
  display: grid;
  gap: 8px;
  max-height: min(78vh, 860px);
  overflow-y: auto;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(8, 122, 83, 0.035), transparent 32%),
    linear-gradient(45deg, transparent 0 48%, rgba(8, 122, 83, 0.025) 48% 52%, transparent 52%),
    #eef6f1;
}

.chat-load-more {
  justify-self: center;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d6e6de;
  border-radius: 999px;
  padding: 0 13px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(28, 44, 39, 0.05);
}

.chat-load-more:disabled svg {
  animation: panel-spin 900ms linear infinite;
}

.chat-load-more svg {
  width: 16px;
  height: 16px;
}

.chat-day-divider {
  display: flex;
  justify-content: center;
  margin: 6px 0;
}

.chat-day-divider span {
  border: 1px solid rgba(191, 211, 201, 0.76);
  border-radius: 999px;
  padding: 5px 10px;
  color: #60746b;
  background: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 900;
}

.chat-message-row {
  display: flex;
  min-width: 0;
}

.chat-message-row.is-own {
  justify-content: flex-end;
}

.chat-message-row.is-other {
  justify-content: flex-start;
}

.chat-message-bubble {
  position: relative;
  display: grid;
  gap: 3px;
  max-width: min(72%, 620px);
  min-width: 96px;
  border: 1px solid rgba(220, 233, 227, 0.78);
  border-radius: 8px;
  padding: 8px 10px 6px;
  color: var(--ink-strong);
  background: #fff;
  box-shadow: 0 8px 18px rgba(28, 44, 39, 0.05);
}

.chat-message-row.is-own .chat-message-bubble {
  border-color: rgba(127, 211, 177, 0.78);
  background: #d9fdd3;
}

.chat-message-bubble strong {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.chat-message-bubble p {
  display: block;
  min-width: 0;
  margin: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.chat-message-bubble p svg {
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -2px;
  color: var(--muted);
}

.chat-message-bubble time {
  justify-self: end;
  margin-left: 18px;
  color: #6f8179;
  font-size: 10px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.chat-message-row.is-media .chat-message-bubble,
.chat-message-row.is-deleted .chat-message-bubble {
  color: #6f8179;
  font-style: italic;
}

.chat-message-row.is-pending .chat-message-bubble {
  opacity: 0.72;
}

.chat-message-row.is-typing .chat-message-bubble {
  min-width: 76px;
}

.chat-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 18px;
}

.chat-typing-dots b {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7a8b84;
  animation: chat-typing-bounce 1000ms ease-in-out infinite;
}

.chat-typing-dots b:nth-child(2) {
  animation-delay: 140ms;
}

.chat-typing-dots b:nth-child(3) {
  animation-delay: 280ms;
}

.chat-simulation-form {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  border-top: 1px solid #dce9e3;
  padding: 10px;
  background: rgba(246, 250, 247, 0.96);
  backdrop-filter: blur(10px);
}

.chat-simulation-form textarea {
  min-height: 44px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid #d8e7df;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink-strong);
  background: #fff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  outline: none;
}

.chat-simulation-form textarea:focus {
  border-color: rgba(8, 122, 83, 0.38);
  box-shadow: 0 0 0 4px rgba(8, 122, 83, 0.08);
}

.chat-simulation-form button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 22px rgba(8, 122, 83, 0.18);
}

.chat-simulation-form button svg {
  width: 19px;
  height: 19px;
}

.chat-simulation-feedback {
  grid-column: 1 / -1;
  display: none;
  margin: 0;
  color: #b45309;
  font-size: 12px;
  font-weight: 850;
}

.chat-simulation-feedback.is-visible {
  display: block;
}

.chat-simulation-feedback a {
  color: var(--green);
  font-weight: 950;
}

.chat-message-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  text-align: center;
  color: var(--muted);
}

.chat-message-empty svg {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: var(--green);
}

.chat-message-empty strong,
.chat-message-empty span {
  display: block;
}

.chat-message-empty strong {
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 900;
}

.chat-message-empty span {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 800;
}

.chat-statistics-section {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.chat-tab-panel .chat-statistics-section,
.chat-statistics-panel {
  margin-bottom: 0;
}

.chat-statistics-panel {
  padding: 0;
}

.chat-statistics-accordion {
  padding: 0;
  overflow: hidden;
}

.chat-statistics-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  transition: background 160ms ease;
}

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

.chat-statistics-summary:hover {
  background: var(--mint);
}

.chat-statistics-summary span,
.chat-statistics-summary h2,
.chat-statistics-summary p {
  display: block;
}

.chat-statistics-summary > div > span {
  width: fit-content;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-statistics-summary h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 20px;
  font-weight: 900;
}

.chat-statistics-summary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-statistics-summary > strong {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--green);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.chat-statistics-summary > strong svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.chat-statistics-accordion[open] .chat-statistics-summary {
  border-bottom: 1px solid var(--line);
}

.chat-statistics-accordion[open] .chat-statistics-summary > strong svg {
  transform: rotate(180deg);
}

.chat-statistics-accordion[open] .chat-statistics-summary > strong span {
  font-size: 0;
}

.chat-statistics-accordion[open] .chat-statistics-summary > strong span::after {
  content: "Gizle";
  font-size: 12px;
}

.chat-statistics-body {
  padding: 16px;
}

.chat-stat-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.chat-stat-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 252, 0.98)),
    linear-gradient(135deg, rgba(8, 122, 83, 0.05), transparent);
}

.chat-stat-metrics span,
.chat-stat-metrics strong {
  display: block;
}

.chat-stat-metrics span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-stat-metrics strong {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.chat-counter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chat-counter-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  border: 1px solid #dce9e3;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.chat-counter-pill svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.chat-counter-pill strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.chat-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.chat-insight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid #dce9e3;
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.chat-insight-card svg {
  width: 19px;
  height: 19px;
  color: var(--green);
}

.chat-insight-card span,
.chat-insight-card strong {
  display: block;
  min-width: 0;
}

.chat-insight-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-insight-card strong {
  margin-top: 3px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.chat-stats-grid section,
.chat-activity-wide {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.chat-activity-wide {
  margin-top: 12px;
}

.chat-stats-grid h3,
.chat-activity-wide h3 {
  margin-bottom: 10px;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 900;
}

.chat-participant-list,
.chat-activity-list {
  display: grid;
  gap: 9px;
}

.chat-participant-row,
.chat-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
}

.chat-participant-row strong,
.chat-participant-row span,
.chat-participant-row em,
.chat-activity-row span,
.chat-activity-row strong {
  display: block;
}

.chat-participant-row strong,
.chat-activity-row span {
  min-width: 0;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-participant-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-participant-row em,
.chat-activity-row strong {
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.chat-stat-bar {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf4f1;
}

.chat-stat-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087a53, #6ee7b7);
}

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

.chat-hour-grid span {
  display: grid;
  min-height: 30px;
  place-items: center;
  border: 1px solid rgba(8, 122, 83, calc(0.08 + (var(--intensity) * 0.22)));
  border-radius: 6px;
  color: var(--green);
  background: rgba(8, 122, 83, calc(0.035 + (var(--intensity) * 0.18)));
  font-size: 10px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.chat-weekday-list {
  display: grid;
  gap: 8px;
}

.chat-weekday-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.chat-weekday-row span,
.chat-weekday-row strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
}

.chat-weekday-row strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.chat-ai-heading {
  margin-bottom: 14px;
}

.chat-ai-heading h2 {
  margin-bottom: 5px;
  font-size: 18px;
}

.chat-ai-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.chat-analysis-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.chat-analysis-form label,
.chat-analysis-form label span {
  display: block;
}

.chat-analysis-form label span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-analysis-type {
  margin-bottom: 12px;
}

.chat-analysis-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink-strong);
  background: #fbfdfc;
  font-size: 13px;
  font-weight: 850;
  outline: none;
}

.chat-analysis-form textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink-strong);
  background: #fbfdfc;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.chat-analysis-form textarea:focus {
  border-color: rgba(8, 122, 83, 0.42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 122, 83, 0.08);
}

.chat-analysis-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.chat-analysis-actions > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.chat-analysis-actions > span svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.chat-analysis-history {
  margin-top: 18px;
}

.chat-analysis-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.chat-analysis-card + .chat-analysis-card {
  margin-top: 10px;
}

.chat-analysis-card strong,
.chat-analysis-card span {
  display: block;
}

.chat-analysis-card strong {
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 900;
}

.chat-analysis-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-analysis-card p,
.chat-analysis-empty {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.chat-analysis-empty {
  color: var(--muted);
  font-weight: 800;
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chat-typing-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes panel-pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes panel-grid-drift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 48px 24px;
  }
}

@keyframes panel-scan {
  0%,
  34% {
    transform: translateX(0) rotate(16deg);
    opacity: 0;
  }

  46% {
    opacity: 1;
  }

  78% {
    transform: translateX(520%) rotate(16deg);
    opacity: 0;
  }

  100% {
    transform: translateX(520%) rotate(16deg);
    opacity: 0;
  }
}

@keyframes panel-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.68;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.94;
  }
}

@keyframes progress-shine {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(110%);
  }
}

@keyframes panel-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 49, 59, 0.46);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--soft);
}

@media (max-width: 920px) {
  .panel-app.has-chat-detail-open .panel-mobile-topbar {
    display: none;
  }

  .panel-app.has-chat-detail-open .panel-main {
    padding-top: 14px;
  }

  .panel-login-body .login-card {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin: 0 auto;
  }

  .login-showcase {
    display: none;
  }

  .login-mobile-brand {
    display: flex;
    margin-bottom: 28px;
  }

  .login-panel {
    padding: clamp(26px, 7vw, 44px);
  }

  .panel-app {
    grid-template-columns: 1fr;
  }

  .panel-drawer-lock {
    overflow: hidden;
  }

  .panel-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 28;
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    background: rgba(247, 250, 249, 0.92);
    backdrop-filter: blur(14px);
  }

  .panel-mobile-topbar strong {
    color: var(--ink-strong);
    font-size: 18px;
    font-weight: 900;
  }

  .panel-drawer-toggle {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #dce9e3;
    border-radius: 8px;
    color: var(--ink-strong);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(28, 44, 39, 0.08);
  }

  .panel-drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid #dce9e3;
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
  }

  .panel-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 29;
    display: block;
    pointer-events: none;
    background: rgba(23, 37, 46, 0.34);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .panel-app.is-drawer-open .panel-drawer-backdrop {
    pointer-events: auto;
    opacity: 1;
  }

  .panel-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(84vw, 310px);
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    padding: 24px 18px;
    transform: translateX(-104%);
    transition: transform 220ms ease;
    box-shadow: 18px 0 48px rgba(28, 44, 39, 0.16);
  }

  .panel-app.is-drawer-open .panel-sidebar {
    transform: translateX(0);
  }

  .panel-brand {
    padding-right: 46px;
  }

  .panel-account {
    margin-top: 16px;
  }

  .panel-nav {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .logout-button {
    position: static;
    margin-top: 12px;
  }

  .panel-main {
    padding: 82px 18px 24px;
  }

  .panel-header > div:first-child {
    display: none;
  }

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

  .credit-packages,
  .settings-grid,
  .chats-layout,
  .chat-insight-grid {
    grid-template-columns: 1fr;
  }

  .chat-list-section,
  .chat-detail-section {
    min-height: auto;
  }

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

  .chat-list-item-stats,
  .chat-list-item-signals,
  .chat-list-item-action {
    grid-column: 1 / -1;
  }

  .chat-list-item-stats {
    min-width: 0;
  }

  .chat-list-item-action {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .panel-login-body {
    padding: 14px;
  }

  .panel-main {
    padding: 78px 12px 18px;
  }

  .panel-login-body .login-card {
    padding: 0;
    border-radius: 16px;
  }

  .login-panel {
    padding: 24px 18px;
  }

  .panel-login-body h1 {
    font-size: clamp(1.72rem, 8.2vw, 2.2rem);
  }

  .panel-login-body .login-copy {
    font-size: 0.9rem;
  }

  .panel-login-body .code-boxes {
    gap: 6px;
  }

  .panel-login-body .code-boxes input {
    min-height: 48px;
  }

  .numbers-section,
  .modal-dialog {
    padding: 20px;
  }

  .panel-header,
  .section-head,
  .number-card,
  .focus-card {
    display: block;
  }

  .panel-header-actions {
    display: grid;
    margin-top: 16px;
  }

  .add-number-button {
    width: 100%;
    margin-top: 16px;
  }

  .panel-header-actions .add-number-button {
    margin-top: 0;
  }

  .credit-balance-chip {
    width: 100%;
  }

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

  .number-actions {
    margin-top: 14px;
  }

  .research-progress-meta,
  .number-title-line {
    align-items: flex-start;
  }

  .research-progress-meta {
    display: grid;
    gap: 4px;
  }

  .chat-upload-form,
  .chat-metadata-grid,
  .chat-conversation-toolbar,
  .chat-stat-metrics,
  .chat-insight-grid,
  .chat-stats-grid,
  .chat-demo-grid,
  .export-guide-tabs,
  .export-guide-notes,
  .chat-analysis-actions,
  .chat-detail-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chat-detail-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .chat-detail-tabs::-webkit-scrollbar {
    display: none;
  }

  .chat-detail-tabs button {
    flex: 1 0 max-content;
    min-width: 118px;
  }

  .chat-owner-select {
    width: 100%;
    flex: 1 1 auto;
  }

  .chat-message-list {
    max-height: 64vh;
    padding: 12px;
  }

  .chat-message-bubble {
    max-width: 86%;
  }

  .chat-demo-head {
    display: grid;
  }

  .chat-demo-head button {
    width: 100%;
  }

  .chat-import-button,
  .chat-export-guide-button,
  .chat-analysis-actions button {
    width: 100%;
  }

  .chat-dropzone-title {
    white-space: normal;
  }

  .chat-statistics-summary {
    display: grid;
  }

  .chat-statistics-summary > strong {
    width: 100%;
  }

  .chat-import-progress-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .chat-import-progress-head b {
    grid-column: 2;
  }

  .chat-hour-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .chat-weekday-row {
    grid-template-columns: 74px minmax(0, 1fr) auto;
  }

  .chat-list-item {
    padding: 14px;
  }

  .chat-list-item-stats {
    grid-template-columns: 1fr;
  }

  .chat-list-item-signals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chat-list-item-signals span {
    justify-content: center;
  }
}
