:root {
  --ink: #16151f;
  --muted: #777789;
  --line: #ecebf2;
  --surface: #ffffff;
  --soft: #f7f7fb;
  --purple: #5d3fd3;
  --purple-dark: #372c91;
  --violet: #8b5cf6;
  --blue: #24a3d8;
  --gold: #f4ad22;
  --green: #17a871;
  --red: #df4d55;
  --shadow: 0 20px 55px rgba(35, 26, 76, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(141, 91, 246, 0.22), transparent 28rem),
    linear-gradient(135deg, #f5f2ff 0%, #ffffff 45%, #f0f8ff 100%);
}

body.auth-pending .shell,
body.signed-out .shell {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(93, 63, 211, 0.12), rgba(36, 163, 216, 0.08)),
    #f7f7fb;
}

.login-screen[hidden] {
  display: none !important;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(31, 28, 59, 0.14);
}

.login-card .brand.compact {
  margin-bottom: 8px;
}

.login-card h1 {
  margin: 4px 0 0;
  font-size: 30px;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-weight: 800;
}

a {
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 28px);
  margin: 14px;
  overflow: hidden;
  border: 1px solid rgba(93, 63, 211, 0.2);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.shell.sidebar-collapsed .sidebar {
  width: 0;
  padding-right: 0;
  padding-left: 0;
  overflow: hidden;
  border: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px 20px;
  color: #fff;
  background: linear-gradient(180deg, #312783 0%, #4438a4 100%);
  transition: width 180ms ease, padding 180ms ease;
}

.brand,
.profile-button,
.panel-header,
.section-head,
.metric-card,
.reply-row,
.payment-card,
.tara-widget header,
.calendar-card {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
}

.brand-mark,
.avatar,
.tara-face {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--purple-dark);
  background: #fff;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.sidebar-footer span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.primary-action,
.primary-small,
.upload-button,
.ghost-button,
.icon-button,
.profile-button,
.nav-item {
  border: 0;
}

.primary-action {
  width: 100%;
  padding: 13px 16px;
  border-radius: 9px;
  color: var(--purple-dark);
  background: #fff;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.nav-icon {
  width: 25px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-footer strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.main {
  min-width: 0;
  padding: 24px 30px 34px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfe 100%);
  overflow: auto;
}

.topbar {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.menu-button,
.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: var(--soft);
  color: var(--purple-dark);
  font-weight: 900;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search {
  position: relative;
}

.search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.search input {
  width: min(310px, 28vw);
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--soft);
  outline: 0;
}

.search input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(93, 63, 211, 0.45);
  box-shadow: 0 0 0 4px rgba(93, 63, 211, 0.1);
}

.profile-button {
  gap: 10px;
  padding: 6px 10px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.avatar {
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, #222 0%, #8b5cf6 100%);
}

.profile-button strong,
.profile-button small {
  display: block;
}

.profile-button small {
  color: var(--muted);
}

.user-switcher {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-switcher select {
  min-width: 178px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.metric-grid.compact {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.metric-card {
  position: relative;
  min-height: 224px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 28px rgba(36, 31, 72, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card:hover,
.metric-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent, var(--purple)) 35%, #fff);
  box-shadow: 0 18px 40px rgba(36, 31, 72, 0.12);
  transform: translateY(-2px);
}

.metric-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  content: "";
  background: var(--accent, var(--purple));
}

.metric-circle-card::before {
  display: none;
}

.metric-circle-card {
  align-items: center;
  justify-content: space-between;
  aspect-ratio: 1;
  min-height: 0;
  padding: 20px;
  text-align: center;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--accent, var(--purple)) 7%, #fff) 100%);
}

.metric-graph {
  grid-column: span 1;
  border-radius: 28px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent, var(--purple)) 8%, #fff), #fff 58%),
    #fff;
}

.metric-content {
  position: relative;
  z-index: 1;
}

.metric-value {
  display: block;
  margin: 9px 0 7px;
  font-size: 36px;
  font-weight: 900;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-symbol {
  display: grid;
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent, var(--purple));
  background: color-mix(in srgb, var(--accent, var(--purple)) 12%, #fff);
  font-weight: 900;
}

.metric-circle-card .metric-symbol {
  width: 38px;
  height: 38px;
  margin: 0 auto 8px;
  font-size: 13px;
}

.metric-expand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--accent, var(--purple));
  background: color-mix(in srgb, var(--accent, var(--purple)) 12%, #fff);
  font-size: 12px;
  font-weight: 900;
}

.metric-circle-card .metric-expand {
  margin-top: 2px;
}

.metric-kpi-donut {
  display: grid;
  position: relative;
  z-index: 1;
  width: min(150px, 78%);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 55%, transparent 56%),
    conic-gradient(var(--accent, var(--purple)) var(--pct), #edf0f6 0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    0 18px 32px color-mix(in srgb, var(--accent, var(--purple)) 16%, transparent);
}

.metric-kpi-donut::before {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #fff, color-mix(in srgb, var(--accent, var(--purple)) 6%, #fff));
  box-shadow: 0 8px 18px rgba(34, 30, 62, 0.08);
  content: "";
}

.metric-kpi-donut > div {
  position: relative;
  z-index: 1;
}

.metric-kpi-donut .metric-value {
  margin: 0;
  font-size: 28px;
}

.metric-circle-card .metric-content {
  display: grid;
  gap: 2px;
}

.metric-mini-bars {
  display: flex;
  position: relative;
  z-index: 1;
  align-items: end;
  gap: 7px;
  width: 100%;
  min-height: 76px;
  padding-top: 8px;
}

.metric-mini-bars i {
  display: block;
  flex: 1;
  min-width: 8px;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, var(--accent, var(--purple)), var(--purple-dark));
}

.metric-line-graph {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 78px;
}

.metric-line-graph svg {
  width: 100%;
  height: 78px;
}

.metric-line-graph path {
  fill: none;
  stroke: var(--accent, var(--purple));
  stroke-linecap: round;
  stroke-width: 7;
}

.metric-mini-donut {
  display: grid;
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent, var(--purple)) var(--pct), #eef0f6 0);
}

.metric-mini-donut span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-weight: 900;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
}

.overview-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr);
  gap: 20px;
  align-items: stretch;
}

.em-panel,
.payment-pie-panel {
  min-height: 520px;
}

.em-panel .panel-header {
  align-items: flex-start;
}

.em-panel [data-left-view-filters="overview"] {
  max-width: 520px;
}

.secondary-dashboard-grid {
  margin-top: 20px;
}

.db-metric-grid {
  grid-template-columns: minmax(220px, 320px);
  margin-top: 20px;
  margin-bottom: 0;
}

.panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(37, 32, 72, 0.05);
}

.panel.wide {
  grid-column: span 1;
}

.panel-header,
.section-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

select,
input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

.ghost-button,
.primary-small,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  font-weight: 800;
}

.ghost-button {
  color: var(--purple);
  background: #f1efff;
}

.primary-small,
.upload-button {
  color: #fff;
  background: var(--purple);
}

.primary-small.as-link {
  text-decoration: none;
}

.primary-small:disabled,
.ghost-button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
}

.upload-button input {
  display: none;
}

.bar-chart {
  display: block;
  min-height: 205px;
  padding: 6px 0 0;
}

.em-panel .bar-chart {
  min-height: 410px;
}

.date-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.date-chart line {
  stroke: #e5e6ee;
  stroke-width: 1;
}

.date-chart text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.date-chart rect,
.date-chart polyline,
.date-chart circle {
  transition: opacity 160ms ease, transform 160ms ease;
}

.date-chart .chart-point {
  cursor: help;
}

.date-chart .chart-point:hover {
  opacity: 0.72;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 40;
  min-width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff;
  background: rgba(22, 21, 31, 0.94);
  box-shadow: 0 10px 24px rgba(22, 21, 31, 0.16);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.filter-bar button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.filter-bar button:hover,
.filter-bar button.active {
  border-color: rgba(93, 63, 211, 0.34);
  color: var(--purple);
  background: #f1efff;
}

.metric-filter-bar {
  margin-bottom: 16px;
}

.dropdown-filter-bar {
  align-items: end;
}

.dropdown-filter-bar label {
  display: grid;
  min-width: min(240px, 100%);
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dropdown-filter-bar select {
  min-width: 220px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-transform: none;
}

.advanced-settings {
  margin-top: 20px;
}

.advanced-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(37, 32, 72, 0.05);
  cursor: pointer;
  list-style: none;
}

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

.advanced-settings summary::after {
  content: "+";
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: var(--purple);
  background: #f1efff;
  font-size: 20px;
  font-weight: 900;
}

.advanced-settings[open] summary::after {
  content: "-";
}

.advanced-settings summary span,
.advanced-settings summary strong {
  display: block;
}

.advanced-settings summary strong {
  margin-top: 4px;
  font-size: 18px;
}

.advanced-settings > .panel {
  margin-top: 14px;
}

.payment-pie-wrap {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.payment-pie {
  display: grid;
  width: min(250px, 82%);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--segments));
  box-shadow: 0 18px 34px rgba(37, 32, 72, 0.08);
}

.payment-pie span {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(22, 21, 31, 0.72);
  box-shadow: 0 8px 18px rgba(37, 32, 72, 0.18);
  font-size: 26px;
  font-weight: 900;
}

.payment-pie-legend {
  display: grid;
  width: 100%;
  gap: 10px;
}

.payment-pie-legend button {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  font-weight: 800;
}

.payment-pie-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.dashboard-replies-panel {
  grid-column: 1 / -1;
}

.dashboard-replies-panel .panel-header {
  align-items: end;
}

.dashboard-replies-panel select {
  max-width: 520px;
}

.dashboard-reply-detail {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.dashboard-reply-detail div,
.dashboard-reply-detail strong,
.dashboard-reply-detail span {
  display: block;
}

.dashboard-reply-detail span {
  margin-top: 4px;
  color: var(--muted);
}

.dashboard-reply-detail p {
  color: var(--muted);
}

.dashboard-reply-detail b {
  color: var(--ink);
}

.donut-wrap {
  display: grid;
  place-items: center;
  gap: 18px;
  min-height: 230px;
}

.donut {
  display: grid;
  width: 154px;
  height: 154px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--purple) var(--pct), #eef0f6 0);
}

.donut span {
  display: grid;
  width: 98px;
  height: 98px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 26px;
  font-weight: 900;
}

.legend {
  display: grid;
  gap: 8px;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
}

.legend .blue {
  background: var(--purple);
}

.legend .gray {
  background: #d8dbe6;
}

.sparkline {
  height: 120px;
  background:
    linear-gradient(180deg, transparent 0 49%, var(--line) 49% 51%, transparent 51%),
    url("data:image/svg+xml,%3Csvg width='360' height='120' viewBox='0 0 360 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 86 C 44 72, 51 34, 91 52 S 151 112, 188 69 236 11, 278 37 310 78, 354 60' fill='none' stroke='%235d3fd3' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E")
      center / 100% 100% no-repeat;
}

.inline-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 18px;
}

.inline-stat strong {
  font-size: 32px;
}

.inline-stat span {
  color: var(--muted);
}

.reply-list,
.status-stack {
  display: grid;
  gap: 12px;
}

.reply-row {
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.reply-row .avatar,
.payment-card .avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.reply-row p,
.payment-card p {
  color: var(--muted);
  font-size: 13px;
}

.reply-row button {
  margin-left: auto;
}

.status-item {
  display: grid;
  gap: 7px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f6;
}

.track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent, var(--purple));
}

.section-head {
  align-items: end;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--tag-color, var(--purple));
  background: var(--tag-bg, #f1efff);
  font-size: 12px;
  font-weight: 800;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 18px;
}

.stripe-panel {
  margin-bottom: 18px;
}

.stripe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.stripe-readiness {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.readiness-progress {
  display: none;
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #edeafb;
}

.readiness-progress.active {
  display: block;
}

.readiness-progress span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  transition: width 240ms ease;
}

.readiness-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.readiness-dot {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.readiness-item.pass .readiness-dot {
  background: var(--green);
}

.readiness-item strong,
.readiness-item span {
  display: block;
}

.readiness-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

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

.env-grid code,
.test-card-grid div {
  min-width: 0;
  padding: 13px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.test-card-grid {
  margin-top: 14px;
}

.test-card-grid strong,
.test-card-grid span {
  display: block;
}

.test-card-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.payment-result {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.payment-result .panel {
  max-width: 720px;
}

.payment-result h1 {
  margin: 8px 0 14px;
}

.payment-result p {
  margin-bottom: 18px;
  color: var(--muted);
}

.webinar-publish-panel {
  margin-bottom: 18px;
}

.webinar-room-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.webinar-room-preview div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.webinar-room-preview strong,
.webinar-room-preview p {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.webinar-room-preview p {
  color: var(--muted);
  font-size: 13px;
}

.users-table {
  display: grid;
  gap: 16px;
}

.newsletter-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
}

.newsletter-layout .wide {
  grid-column: 1 / -1;
}

.compact-fields {
  grid-template-columns: 1fr;
}

.inline-search {
  margin-bottom: 14px;
}

.newsletter-groups,
.newsletter-contact-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.newsletter-group,
.newsletter-contact {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.newsletter-group {
  justify-content: space-between;
}

.newsletter-group.active {
  border-color: rgba(93, 63, 211, 0.45);
  background: #f3f0ff;
}

.newsletter-group span,
.newsletter-contact small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.newsletter-contact input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}

.newsletter-send-log {
  margin-top: 14px;
}

.success-note,
.error-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
}

.success-note {
  background: #eaf8f2;
  color: var(--green);
}

.error-note {
  background: #fff0f0;
  color: var(--red);
}

.success-note span,
.error-note span {
  color: var(--ink);
  font-weight: 700;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.user-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-summary p {
  margin-top: 4px;
  color: var(--muted);
}

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

.permission-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.permission-chip input {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
}

.readonly-mode .upload-button,
.readonly-mode [data-write-action] {
  filter: grayscale(0.2);
}

.webinar-site {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(93, 63, 211, 0.12), transparent 36%),
    #fbfbfe;
}

.webinar-hero {
  display: grid;
  min-height: 34vh;
  align-content: center;
  padding: 48px min(7vw, 86px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(49, 39, 131, 0.94), rgba(93, 63, 211, 0.78)),
    url("data:image/svg+xml,%3Csvg width='900' height='420' viewBox='0 0 900 420' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 340 L190 130 L300 230 L430 80 L610 270 L720 160 L900 340 L900 420 L0 420 Z' fill='%23ffffff' opacity='.16'/%3E%3C/svg%3E")
      center / cover no-repeat;
}

.webinar-hero .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.webinar-hero h1 {
  max-width: 760px;
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 66px);
}

.webinar-hero p:last-child {
  margin-top: 16px;
  font-size: 18px;
}

.webinar-join-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 28px;
  max-width: 1120px;
  margin: -44px auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.webinar-join-panel p {
  margin-top: 10px;
  color: var(--muted);
}

.zoom-embed-shell {
  display: grid;
  gap: 14px;
}

.zoom-frame-placeholder {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 26px;
  border: 1px dashed rgba(93, 63, 211, 0.32);
  border-radius: 12px;
  background: #f8f6ff;
  text-align: center;
}

.zoom-frame-placeholder strong,
.zoom-frame-placeholder span {
  display: block;
}

.zoom-frame-placeholder span {
  max-width: 440px;
  margin-top: 8px;
  color: var(--muted);
}

.disabled-link {
  pointer-events: none;
  opacity: 0.62;
}

.kanban-column {
  min-height: 470px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.kanban-column h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.payment-card {
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(37, 32, 72, 0.06);
}

.amount {
  margin-left: auto;
  font-weight: 900;
}

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

.field-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field-grid .full {
  grid-column: 1 / -1;
}

.form-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.preview-panel {
  align-self: start;
}

.preview-panel h2 {
  margin: 6px 0 18px;
  font-size: 24px;
}

.preview-question {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.calendar-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed rgba(93, 63, 211, 0.35);
  border-radius: 12px;
  background: #fbfaff;
}

.calendar-card a {
  color: var(--purple);
  font-weight: 900;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.calendar-day,
.calendar-head {
  min-height: 72px;
  padding: 10px;
  border-radius: 10px;
}

.calendar-head {
  min-height: auto;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day {
  border: 1px solid var(--line);
  background: #f1f2f6;
  color: #a1a4af;
}

.calendar-day.available {
  border-color: rgba(23, 168, 113, 0.35);
  background: #eaf8f2;
  color: var(--ink);
}

.calendar-day strong,
.calendar-day span {
  display: block;
}

.calendar-day span {
  margin-top: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(22, 21, 31, 0.42);
  backdrop-filter: blur(5px);
}

.drawer.open {
  display: flex;
}

.drawer-card {
  width: min(1180px, 100%);
  max-height: min(92vh, 980px);
  padding: 26px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(22, 21, 31, 0.28);
}

.foreground-chart {
  padding: 18px 18px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfbfe);
}

.chart-axis-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chart-axis-note span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.drawer-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.detail-card p {
  margin-top: 6px;
  color: var(--muted);
}

.empty-state {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--soft);
  font-weight: 800;
}

.tara-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 15;
  width: 320px;
  overflow: hidden;
  border: 1px solid rgba(93, 63, 211, 0.2);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(35, 26, 76, 0.2);
}

.tara-widget header {
  gap: 12px;
  padding: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-dark), var(--violet));
  cursor: default;
  user-select: none;
}

.tara-widget header button {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.tara-widget header span {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.tara-body {
  display: grid;
  grid-template-rows: 230px auto;
}

.tara-widget.minimized .tara-body {
  display: none;
}

.tara-widget.minimized {
  width: 76px;
}

.tara-widget.minimized header {
  gap: 6px;
  justify-content: center;
  border-radius: 16px;
}

.tara-widget.minimized header > div:not(.tara-face) {
  display: none;
}

.tara-widget.minimized header button {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 13px;
}

.tara-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow: auto;
  background: #fbfbfe;
}

.message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(37, 32, 72, 0.06);
  font-size: 13px;
}

.message.user {
  justify-self: end;
  color: #fff;
  background: var(--purple);
}

.tara-widget form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.tara-widget form button {
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--purple);
  font-weight: 800;
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 12px;
  }

  .brand div,
  .nav-item span:last-child,
  .primary-action,
  .sidebar-footer {
    display: none;
  }

  .metric-grid,
  .metric-grid.compact,
  .overview-main-grid,
  .dashboard-grid,
  .kanban,
  .form-builder,
  .drawer-list {
    grid-template-columns: 1fr 1fr;
  }

  .panel.wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
    margin: 0;
    border-radius: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    overflow: auto;
  }

  .brand {
    flex: 0 0 auto;
  }

  .nav {
    display: flex;
    min-width: max-content;
  }

  .nav-item {
    grid-template-columns: auto;
    justify-items: center;
    width: 48px;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    grid-template-columns: 40px 1fr;
  }

  .topbar-tools {
    grid-column: 1 / -1;
    width: 100%;
  }

  .search,
  .search input {
    width: 100%;
  }

  .metric-grid,
  .metric-grid.compact,
  .overview-main-grid,
  .dashboard-grid,
  .kanban,
  .form-builder,
  .field-grid,
  .drawer-list {
    grid-template-columns: 1fr;
  }

  .drawer {
    padding: 12px;
  }

  .drawer-card {
    max-height: 94vh;
    padding: 18px;
  }

  .tara-widget {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}
