﻿:root {
  color-scheme: light;
  --bg: #f4efe5;
  --bg-soft: rgba(255, 250, 241, 0.88);
  --panel: rgba(255, 252, 247, 0.82);
  --panel-strong: rgba(255, 248, 238, 0.96);
  --border: rgba(87, 63, 42, 0.12);
  --text: #22170f;
  --muted: #6d5a4a;
  --accent: #a44b22;
  --accent-strong: #7b3211;
  --accent-soft: rgba(164, 75, 34, 0.12);
  --shadow: 0 20px 50px rgba(49, 31, 18, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-sans: "Aptos", "Segoe UI Variable", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top left, rgba(218, 145, 94, 0.28), transparent 28%),
    radial-gradient(circle at bottom right, rgba(118, 160, 135, 0.18), transparent 22%),
    linear-gradient(180deg, #f7f1e8 0%, #efe6d8 100%);
  color: var(--text);
}

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

.page-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.7;
  pointer-events: none;
}

.orb-a {
  top: 80px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: rgba(201, 115, 53, 0.22);
}

.orb-b {
  left: -40px;
  bottom: 60px;
  width: 200px;
  height: 200px;
  background: rgba(80, 123, 112, 0.16);
}

.layout {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 56px;
}

.hero {
  max-width: 760px;
  margin-bottom: 28px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.dashboard-head h2,
.panel-head h2,
.panel-head h3 {
  margin: 0;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  max-width: 10ch;
}

.hero-copy {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.auth-panel {
  padding: 28px;
}

.notice-panel {
  margin-top: 18px;
  padding: 22px 24px;
}

.panel-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.unlock-form {
  display: grid;
  gap: 18px;
}

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

.field span {
  font-size: 0.95rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(92, 66, 42, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px 16px;
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(164, 75, 34, 0.42);
  box-shadow: 0 0 0 4px rgba(164, 75, 34, 0.08);
  transform: translateY(-1px);
}

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

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

.primary-btn,
.ghost-btn,
.copy-btn,
.link-btn,
.link-inline {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.copy-btn:hover,
.link-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  padding: 13px 18px;
  background: linear-gradient(135deg, #ae5126, #8b3713);
  color: #fff7f1;
  font-weight: 700;
}

.ghost-btn,
.copy-btn,
.link-btn {
  padding: 10px 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.link-inline {
  padding: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
  border-radius: 0;
}

.helper-copy,
.compact-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.status {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.dashboard {
  margin-top: 32px;
  display: grid;
  gap: 22px;
}

.admin-panel {
  padding: 24px;
}

.self-panel {
  padding: 24px;
}

.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.search-field input {
  min-width: min(320px, 100%);
}

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

.stat-card,
.server-item,
.key-item,
.group-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.stat-card {
  padding: 18px;
  background: var(--panel-strong);
}

.stat-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-value {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.content-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 22px;
}

.content-grid > .panel {
  padding: 22px;
}

.admin-header,
.editor-head,
.editor-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-copy {
  max-width: 720px;
}

.admin-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

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

.invite-card {
  grid-column: 1 / -1;
}

.config-editor-card {
  grid-column: 1 / -1;
}

.config-editor {
  min-height: 360px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font: 0.95rem/1.6 var(--font-mono);
  resize: vertical;
}

.config-editor:focus {
  outline: 2px solid rgba(123, 50, 17, 0.18);
  border-color: rgba(123, 50, 17, 0.32);
}

.editor-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 244, 0.72);
  padding: 18px;
}

.editor-card h4 {
  margin: 0;
}

.editor-list {
  display: grid;
  gap: 12px;
}

.invite-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.invite-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
  padding: 16px;
}

.invite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.invite-code {
  font-family: var(--font-mono);
  font-size: 1rem;
}

.invite-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.invite-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.invite-active {
  background: rgba(80, 123, 112, 0.12);
  color: #355d52;
}

.invite-expired,
.invite-used-up {
  background: rgba(139, 55, 19, 0.1);
  color: #8b3713;
}

.editor-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(92, 66, 42, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

.editor-fields {
  display: grid;
  gap: 12px;
}

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

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

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

.compact-field span {
  font-size: 0.82rem;
}

.compact-field input {
  padding: 12px 14px;
}

.inline-field-actions {
  display: grid;
  align-content: end;
  gap: 8px;
}

.field-action-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.danger-btn {
  background: rgba(139, 55, 19, 0.1);
  color: #8b3713;
}

.list-stack,
.groups-list {
  display: grid;
  gap: 14px;
}

.server-item,
.key-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.server-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.server-rank,
.server-order {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
}

.server-rank {
  background: rgba(123, 50, 17, 0.08);
  color: var(--accent-strong);
}

.server-order {
  background: rgba(80, 123, 112, 0.12);
  color: #355d52;
}

.server-url,
.key-code {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  word-break: break-all;
}

.server-url {
  margin: 0 0 12px;
}

.server-actions,
.key-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.group-card {
  padding: 16px;
  background: rgba(255, 250, 244, 0.72);
}

.group-title {
  margin: 0 0 14px;
  font-size: 1.08rem;
}

.group-body {
  display: grid;
  gap: 12px;
}

.key-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.key-name {
  margin: 0;
  font-weight: 700;
}

.key-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(123, 50, 17, 0.08);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.key-code {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(35, 23, 16, 0.06);
}

.key-meta-extra {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
}

.key-meta-extra p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.masked {
  filter: blur(5px);
  user-select: none;
}

.insights-summary,
.insights-usage-list,
.insights-errors-list {
  display: grid;
  gap: 14px;
}

.insights-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
}

.insight-card,
.usage-item,
.error-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.insight-card {
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 244, 236, 0.86));
  box-shadow: 0 18px 34px rgba(64, 38, 18, 0.08);
}

.insight-card::before,
.usage-item::before,
.error-item::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(164, 75, 34, 0.9), rgba(164, 75, 34, 0));
}

.insight-card.is-copper::before {
  background: linear-gradient(90deg, rgba(164, 75, 34, 0.92), rgba(164, 75, 34, 0));
}

.insight-card.is-sage::before {
  background: linear-gradient(90deg, rgba(80, 123, 112, 0.92), rgba(80, 123, 112, 0));
}

.insight-card.is-violet::before {
  background: linear-gradient(90deg, rgba(116, 93, 173, 0.92), rgba(116, 93, 173, 0));
}

.insight-card.is-rose::before {
  background: linear-gradient(90deg, rgba(175, 79, 81, 0.92), rgba(175, 79, 81, 0));
}

.insight-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.insight-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(164, 75, 34, 0.14);
  box-shadow: inset 0 0 0 3px rgba(164, 75, 34, 0.25);
}

.insight-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.insight-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.usage-item,
.error-item {
  padding: 18px;
  box-shadow: 0 18px 36px rgba(64, 38, 18, 0.07);
}

.usage-item-head,
.error-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.usage-item-title-wrap,
.error-item-title-wrap {
  display: grid;
  gap: 6px;
}

.usage-title,
.error-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.3;
}

.usage-subtitle,
.error-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.usage-badge-row,
.error-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.usage-badge,
.error-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.usage-badge {
  background: rgba(164, 75, 34, 0.1);
  color: var(--accent-strong);
}

.usage-badge.subtle {
  background: rgba(80, 123, 112, 0.12);
  color: #355d52;
}

.usage-meter {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.usage-meter-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(164, 75, 34, 0.08);
  overflow: hidden;
}

.usage-meter-fill {
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, #a44b22, #d18a62);
}

.usage-meter-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.usage-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.usage-kpi-card,
.usage-models-card,
.error-meta-chip,
.error-snippet {
  border: 1px solid rgba(87, 63, 42, 0.08);
  border-radius: 14px;
  background: rgba(248, 242, 234, 0.75);
}

.usage-kpi-card {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.usage-kpi-label,
.error-meta-label,
.usage-section-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.usage-kpi-value,
.error-meta-value,
.usage-section-title {
  color: var(--text);
  font-weight: 700;
}

.usage-kpi-time {
  font-size: 0.9rem;
  line-height: 1.5;
}

.usage-models-card {
  margin-top: 16px;
  padding: 14px;
}

.usage-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

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

.usage-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.usage-model-name {
  font-weight: 700;
  word-break: break-word;
}

.usage-model-stat {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.usage-models-empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.error-item {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.92), transparent 36%),
    linear-gradient(180deg, rgba(255, 251, 248, 0.92), rgba(249, 241, 237, 0.82));
}

.error-status-badge.is-danger {
  background: rgba(175, 79, 81, 0.14);
  color: #9b2f32;
}

.error-status-badge.is-warning {
  background: rgba(194, 138, 41, 0.14);
  color: #8d5b08;
}

.error-status-badge.is-neutral {
  background: rgba(109, 90, 74, 0.12);
  color: #5d4a3d;
}

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

.error-meta-chip {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.error-meta-value {
  word-break: break-word;
  line-height: 1.5;
}

.error-snippet {
  margin: 16px 0 0;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  line-height: 1.65;
}

.empty-state {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(87, 63, 42, 0.16);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  text-align: center;
}

.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;
}

@media (max-width: 900px) {
  .layout {
    padding-top: 48px;
  }

  .auth-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid,
  .two-columns,
  .three-columns,
  .four-columns,
  .usage-kpi-grid,
  .error-meta-grid {
    grid-template-columns: 1fr;
  }

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

  .dashboard-head {
    align-items: stretch;
  }

  .toolbar {
    width: 100%;
  }

  .search-field,
  .search-field input {
    min-width: 100%;
  }

  .admin-actions {
    justify-items: stretch;
    width: 100%;
  }

  .config-editor {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero,
  .auth-panel,
  .dashboard {
    animation: rise 540ms ease both;
  }

  .dashboard {
    animation-delay: 80ms;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }

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

.insights-hero-card {
  display: grid;
  gap: 16px;
  margin-bottom: 4px;
}

.insights-hero-head,
.insights-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.insights-hero-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insights-hero-title,
.insights-section-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

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

.insights-sort-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.insights-sort-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.insights-sort-btn:hover,
.insights-sort-btn.is-active {
  transform: translateY(-1px);
  background: rgba(164, 75, 34, 0.1);
  color: var(--accent-strong);
}

.insights-trend-card {
  border: 1px solid rgba(87, 63, 42, 0.08);
  border-radius: 16px;
  background: rgba(248, 242, 234, 0.78);
  padding: 14px;
}

.insights-trend-card.is-blocked {
  border-color: rgba(175, 79, 81, 0.28);
}

.insights-pie-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.insights-pie-card,
.insights-quota-card {
  border: 1px solid rgba(87, 63, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.insights-pie-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.insights-pie-chart {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.8), 0 14px 28px rgba(64, 38, 18, 0.08);
}

.insights-pie-legend {
  display: grid;
  gap: 10px;
}

.insights-pie-legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(248, 242, 234, 0.75);
}

.insights-pie-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.insights-pie-label {
  color: var(--text);
  font-size: 0.9rem;
  word-break: break-word;
}

.insights-pie-value {
  color: var(--accent-strong);
  font-size: 0.84rem;
}

.insights-quota-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.95), rgba(246, 237, 229, 0.88));
}

.insights-quota-card.is-blocked {
  background: linear-gradient(180deg, rgba(255, 244, 245, 0.96), rgba(250, 232, 234, 0.9));
}

.insights-quota-title,
.insights-quota-meta {
  margin: 0;
}

.insights-quota-title {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insights-quota-value {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.insights-quota-meta {
  color: var(--muted);
  line-height: 1.7;
}

.error-detail-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 180ms ease;
}

.error-detail-panel.is-open {
  max-height: 420px;
}

.error-item.is-expanded {
  border-color: rgba(164, 75, 34, 0.22);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

@media (max-width: 900px) {
  .insights-pie-layout,
  .insights-pie-card {
    grid-template-columns: 1fr;
  }

  .insights-pie-chart {
    margin: 0 auto;
  }
}

.billing-btn {
  background: rgba(80, 123, 112, 0.12);
  color: #355d52;
  border-color: rgba(80, 123, 112, 0.18);
}

.billing-select-wrap {
  display: inline-flex;
}

.billing-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 8px 12px;
  font: inherit;
  min-width: 112px;
  outline: none;
}

.billing-select:focus {
  border-color: rgba(80, 123, 112, 0.3);
  box-shadow: 0 0 0 4px rgba(80, 123, 112, 0.08);
}


.announcement-row {
  gap: 14px;
}

.announcement-textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.7;
}

.announcement-status-card {
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 14px 16px;
  border: 1px solid rgba(92, 66, 42, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(247,238,227,0.92));
}

.announcement-status-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.announcement-status-value {
  font-size: 1rem;
}

.announcement-status-meta {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

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

.announcement-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 23, 15, 0.42);
  backdrop-filter: blur(8px);
}

.announcement-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(80vh, 760px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 244, 234, 0.4);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.94), transparent 32%),
    linear-gradient(180deg, rgba(255,251,246,0.98), rgba(243,232,219,0.98));
  box-shadow: 0 28px 80px rgba(37, 24, 14, 0.28);
}

.announcement-head,
.announcement-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.announcement-meta {
  margin: 16px 0 0;
  color: var(--muted);
}

.announcement-body {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(92, 66, 42, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  line-height: 1.8;
}

.announcement-body p {
  margin: 0;
}

.announcement-actions {
  margin-top: 18px;
}
