:root {
  --bg-0: #05020d;
  --bg-1: #12061f;
  --bg-2: #1b0f2f;
  --glass: rgba(255, 255, 255, 0.095);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --stroke: rgba(255, 255, 255, 0.18);
  --stroke-soft: rgba(255, 255, 255, 0.11);
  --text: #f8f5ff;
  --muted: #d7c9ea;
  --subtle: #c4a7e7;
  --violet: #a855f7;
  --purple: #7c3aed;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
  scrollbar-color: var(--violet) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(18, 6, 31, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--pink), var(--cyan));
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
  background:
    radial-gradient(circle at 15% 10%, rgba(168, 85, 247, 0.42), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(236, 72, 153, 0.28), transparent 28rem),
    linear-gradient(135deg, #030008 0%, #12061f 45%, #05020d 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px);
  gap: 24px;
  padding: 24px;
}

.auth-hero,
.auth-panel,
.sidebar,
.panel,
.metrics-grid article,
.filter-bar,
.deal-card,
.report-grid article,
.summary-list div,
.compact-list div,
.leaderboard div,
.stage-col,
.user-card,
.modal-panel {
  border: 1px solid var(--stroke);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.auth-hero {
  min-height: calc(100vh - 48px);
  display: grid;
  align-content: center;
  gap: 28px;
  padding: clamp(28px, 5vw, 58px);
  border-radius: 28px;
  overflow: hidden;
}

.auth-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: 58px;
  line-height: 1.02;
  font-weight: 950;
}

.brand-row,
.topbar,
.panel-head,
.actions,
.topbar-actions {
  display: flex;
  align-items: center;
}

.brand-row {
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #ffffff;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(168, 85, 247, 0.35);
}

.brand-logo {
  overflow: hidden;
  padding: 6px;
  background: #ffffff;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-row span,
.user-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.demo-grid button {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--stroke-soft);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  text-align: left;
}

.demo-grid button:hover,
nav button:hover,
nav button.active {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.18);
}

.demo-grid span,
.demo-grid strong,
.demo-grid small {
  display: block;
}

.demo-grid span {
  color: #d8b4fe;
  font-size: 13px;
  font-weight: 900;
}

.demo-grid strong {
  margin: 8px 0 4px;
  overflow-wrap: anywhere;
}

.demo-grid small {
  color: var(--muted);
}

.auth-panel {
  min-height: calc(100vh - 48px);
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 28px;
}

.auth-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-fields {
  display: grid;
  gap: 14px;
}

.auth-fields label {
  margin-bottom: -6px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(168, 85, 247, 0.14);
  color: #ffffff;
  outline: none;
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-error {
  margin-top: -9px;
  color: #fecdd3;
  font-size: 12px;
  font-weight: 800;
}

input.input-invalid {
  border-color: rgba(251, 113, 133, 0.85);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.auth-link {
  width: max-content;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e9d5ff;
  font-size: 14px;
  font-weight: 950;
  text-align: left;
}

.auth-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--stroke-soft);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
  outline: none;
  text-transform: none;
}

select option {
  color: #111827;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(168, 85, 247, 0.72);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.primary-btn,
.ghost-btn,
.logout-btn,
.link-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 950;
}

.primary-btn {
  padding: 0 18px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #ffffff;
}

.ghost-btn {
  padding: 0 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.alert-action {
  border-color: rgba(236, 72, 153, 0.35);
}

.logout-btn {
  margin-top: auto;
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.link-btn {
  min-height: 38px;
  padding: 0 12px;
  background: rgba(168, 85, 247, 0.15);
  color: #e9d5ff;
}

.btn-icon,
.nav-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.error,
.success {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 900;
}

.error {
  border: 1px solid rgba(251, 113, 133, 0.45);
  background: rgba(244, 63, 94, 0.14);
  color: #fecdd3;
}

.success {
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: #bbf7d0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
}

.user-card {
  padding: 14px;
  border-radius: 18px;
}

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

.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.7), rgba(236, 72, 153, 0.6));
  background-position: center;
  background-size: cover;
  color: #ffffff;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(168, 85, 247, 0.28);
}

.avatar-sm {
  width: 48px;
  height: 48px;
  font-size: 15px;
}

.avatar-xs {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.avatar-xl {
  width: 148px;
  height: 148px;
  font-size: 36px;
}

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

nav button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 15px;
  font-weight: 950;
}

nav button.active {
  color: var(--text);
}

.nav-badge {
  min-width: 24px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.24);
  color: #fbcfe8;
  font-size: 12px;
  font-weight: 950;
}

.nav-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workspace {
  min-width: 0;
  padding: 4px 4px 24px;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 2px;
}

.topbar p {
  margin: 0 0 6px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
}

.topbar-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notification-shell {
  position: relative;
}

.notification-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(380px, calc(100vw - 32px));
  display: none;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(12, 5, 22, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.notification-shell:hover .notification-popover,
.notification-shell:focus-within .notification-popover {
  display: grid;
}

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

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

.notification-popover article {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--stroke-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.notification-popover article.unread {
  border-color: rgba(236, 72, 153, 0.42);
}

.notification-popover article span,
.notification-popover article small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(180px, 0.7fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 22px;
}

.filter-readout {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--stroke-soft);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.filter-readout span {
  color: var(--subtle);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics-grid article {
  min-height: 104px;
  padding: 16px;
  border-radius: 22px;
}

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

.metrics-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.metrics-grid strong {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 950;
}

.view-grid,
.split-view,
.calls-view,
.single-view {
  display: grid;
  gap: 16px;
}

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

.split-view {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 16px;
  border-radius: 24px;
}

.panel-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.file-input {
  display: none;
}

.panel-head h2,
.editor h2,
.modal-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
}

.panel-head h2 span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.22);
  color: #e9d5ff;
  font-size: 14px;
  font-weight: 950;
}

.summary-list,
.compact-list,
.leaderboard,
.editor,
.report-grid {
  display: grid;
  gap: 12px;
}

.summary-list div,
.compact-list div,
.leaderboard div {
  padding: 12px;
  border-radius: 18px;
}

.summary-list span,
.summary-list strong,
.summary-list small,
.compact-list strong,
.compact-list span,
.leaderboard strong,
.leaderboard span,
.leaderboard small {
  display: block;
}

.summary-list span,
.compact-list span,
.leaderboard span,
.leaderboard small {
  margin-top: 4px;
  color: var(--muted);
}

.data-table {
  display: grid;
  gap: 10px;
}

.table-tools,
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.table-tools input {
  max-width: 360px;
}

.table-tools span,
.table-pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.table-pagination {
  justify-content: flex-end;
  margin: 12px 0 0;
}

.row {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(90px, 0.7fr) minmax(120px, 0.8fr) minmax(110px, 0.8fr) 82px;
  gap: 12px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--stroke-soft);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 15px;
  font-weight: 750;
}

.row.head {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--subtle);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.lead-row {
  grid-template-columns: minmax(240px, 1.45fr) minmax(120px, 0.75fr) minmax(120px, 0.75fr) minmax(120px, 0.8fr) minmax(170px, 0.95fr);
}

.lead-row .link-btn {
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  width: max-content;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  color: #a5f3fc;
  font-size: 13px;
  font-weight: 950;
}

.chip.status-blocked {
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(244, 63, 94, 0.14);
  color: #fecdd3;
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.row.users-row {
  grid-template-columns: minmax(220px, 1.45fr) minmax(90px, 0.7fr) minmax(110px, 0.7fr) minmax(100px, 0.65fr) minmax(210px, 1fr);
}

.danger-link {
  color: #fecdd3;
}

.editor {
  position: sticky;
  top: 18px;
}

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

.actions {
  gap: 10px;
  flex-wrap: wrap;
}

.pipeline-columns {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(190px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.stage-col {
  min-height: 470px;
  padding: 12px;
  border-radius: 20px;
  box-shadow: none;
}

.stage-col header {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.deal-card {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 18px;
  box-shadow: none;
  cursor: grab;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.deal-card:active {
  cursor: grabbing;
  transform: scale(0.985);
}

.stage-col:hover {
  border-color: rgba(168, 85, 247, 0.38);
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.14), rgba(255, 255, 255, 0.055));
}

.deal-card span,
.deal-card small {
  color: var(--muted);
}

.call-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.call-summary-grid article {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--stroke-soft);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
}

.call-summary-grid span,
.call-summary-grid strong {
  display: block;
}

.call-summary-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.call-summary-grid strong {
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 26px;
  font-weight: 950;
}

.call-row {
  border-color: rgba(168, 85, 247, 0.22);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(3, 0, 8, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.modal-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 18px;
  border-radius: 24px;
}

.form-errors {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 113, 133, 0.44);
  border-radius: 16px;
  background: rgba(244, 63, 94, 0.16);
  color: #fecdd3;
  font-size: 14px;
  font-weight: 850;
}

.form-errors strong,
.form-errors span {
  display: block;
}

.action-help {
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: 16px;
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-size: 15px;
  font-weight: 850;
}

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

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

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

.report-section-head {
  margin-top: 24px;
}

.report-grid article {
  padding: 14px;
  border-radius: 20px;
}

.report-grid span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

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

.report-metrics small {
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

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

.alert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--stroke-soft);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
}

.alert-card.unread {
  border-color: rgba(236, 72, 153, 0.44);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(236, 72, 153, 0.12));
}

.alert-card.severity-warning {
  border-color: rgba(251, 191, 36, 0.42);
}

.alert-card.severity-success {
  border-color: rgba(52, 211, 153, 0.42);
}

.alert-card.severity-danger {
  border-color: rgba(251, 113, 133, 0.52);
}

.alert-card strong,
.alert-card span,
.alert-card small {
  display: block;
}

.alert-card span {
  margin-top: 5px;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

.alert-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--stroke);
  border-radius: 18px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  text-align: center;
}

.empty-state.compact {
  padding: 12px;
  font-size: 13px;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
}

.chat-users,
.chat-thread,
.profile-preview,
.profile-form,
.announcement-form,
.announcement-list article {
  border: 1px solid var(--stroke-soft);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.18);
}

.chat-users {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding: 10px;
}

.chat-users button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.chat-users button.active,
.chat-users button:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.16);
}

.chat-users strong,
.chat-users small,
.thread-head strong,
.thread-head small,
.message-bubble strong,
.message-bubble span,
.message-bubble small,
.announcement-list strong,
.announcement-list span,
.announcement-list small {
  display: block;
}

.chat-users small,
.thread-head small,
.message-bubble small,
.announcement-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.chat-thread {
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  gap: 12px;
  padding: 12px;
}

.thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke-soft);
}

.message-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.message-bubble {
  width: min(78%, 560px);
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--stroke-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.message-bubble.mine {
  justify-self: end;
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.14);
}

.message-bubble span,
.announcement-list span {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

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

.chat-compose textarea {
  min-height: 74px;
}

.announcement-form {
  margin-bottom: 16px;
  padding: 14px;
}

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

.announcement-list article {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.announcement-list article.priority-High,
.announcement-list article.priority-Critical {
  border-color: rgba(251, 191, 36, 0.42);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
}

.profile-preview {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  min-height: 320px;
  padding: 20px;
}

.profile-form {
  padding: 14px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1280px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 1080px) {
  .auth-page,
  .app-shell,
  .split-view,
  .view-grid {
    grid-template-columns: 1fr;
  }

  .auth-hero,
  .auth-panel {
    min-height: auto;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .logout-btn {
    margin-top: 0;
  }

  .editor {
    position: static;
  }

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

  .chat-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-page,
  .app-shell {
    padding: 12px;
  }

  .auth-hero,
  .auth-panel,
  .panel,
  .sidebar {
    border-radius: 20px;
    padding: 16px;
  }

  .auth-hero h1 {
    font-size: 34px;
  }

  .topbar h1 {
    font-size: 32px;
  }

  .panel-head h2,
  .modal-head h2 {
    font-size: 20px;
  }

  .demo-grid,
  .metrics-grid,
  .filter-bar,
  .call-summary-grid,
  .modal-form,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .modal-layer {
    align-items: start;
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 16px;
    border-radius: 20px;
  }

  .modal-head,
  .panel-head,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions,
  .panel-actions button {
    width: 100%;
  }

  .alert-card {
    grid-template-columns: 1fr;
  }

  .alert-card .link-btn {
    width: 100%;
  }

  .modal-actions button {
    width: 100%;
  }

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .topbar-actions button,
  .notification-shell,
  .table-tools,
  .table-tools input {
    width: 100%;
  }

  .table-tools,
  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .table-pagination button {
    width: 100%;
  }

  .notification-popover {
    left: 0;
    right: auto;
    width: 100%;
  }

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

  .row.head {
    display: none;
  }

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

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .message-bubble {
    width: 100%;
  }

  .stage-col {
    min-height: auto;
  }
}
