:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --surface-3: #e2ebf3;
  --text: #14212f;
  --muted: #677487;
  --line: #dbe3ec;
  --brand: #126c75;
  --brand-2: #e44f2f;
  --accent: #d59b25;
  --green: #1f9d68;
  --amber: #cc8a14;
  --red: #d94a45;
  --shadow: 0 18px 45px rgba(24, 40, 58, 0.1);
}

:root.dark {
  color-scheme: dark;
  --bg: #101820;
  --surface: #172431;
  --surface-2: #203140;
  --surface-3: #2a3e50;
  --text: #eef5f8;
  --muted: #a9b7c4;
  --line: #2d4152;
  --brand: #2eb7bf;
  --brand-2: #ff765a;
  --accent: #f0bd4e;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 12%, rgba(228, 79, 47, 0.12), transparent 28%),
    linear-gradient(135deg, var(--bg), var(--surface-2));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::selection {
  background: color-mix(in srgb, var(--brand) 24%, transparent);
}

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

button {
  cursor: pointer;
}

button,
input,
select,
textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 2px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #10242c;
  color: #f6fbfc;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow: hidden;
}

.brand,
.topbar,
.panel-header,
.section-toolbar,
.topbar-actions,
.nav-item,
.primary-button,
.ghost-button,
.metric-card,
.contact-name,
.deal-footer,
.task-item,
.modal-header,
.calendar-actions,
.calendar-heading,
.outlook-status {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  padding: 0 8px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #38c3bd, #f0bd4e);
  color: #0b1f24;
  font-weight: 800;
}

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

.brand span {
  color: #9db2ba;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.nav-list::-webkit-scrollbar {
  width: 8px;
}

.nav-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.nav-item {
  width: 100%;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: #cfe0e5;
  text-align: left;
  min-height: 43px;
}

.nav-item svg,
.icon-button svg,
.primary-button svg,
.ghost-button svg,
.search svg {
  width: 18px;
  height: 18px;
}

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

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-panel p {
  margin: 10px 0 4px;
  color: #bdd0d6;
}

.pulse {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(240, 189, 78, 0.14);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  justify-content: space-between;
  gap: 20px;
  margin: -26px -26px 24px;
  padding: 22px 26px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
}

.topbar h1,
.section-toolbar h2,
.panel h2 {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
}

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

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

.search {
  min-width: min(420px, 48vw);
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.primary-button,
.ghost-button,
.icon-button {
  border-radius: 8px;
  border: 1px solid var(--line);
  min-height: 42px;
}

.primary-button,
.ghost-button {
  gap: 9px;
  padding: 0 14px;
}

.primary-button {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 700;
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24, 40, 58, 0.12);
}

.ghost-button,
.icon-button {
  background: var(--surface);
  color: var(--text);
}

.icon-button {
  width: 42px;
  display: inline-grid;
  place-items: center;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card,
.panel,
.campaign-card {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card,
.panel,
.campaign-card,
.resource-card,
.company-card,
.document-card,
.product-card,
.ticket-card,
.email-card,
.forecast-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.resource-card:hover,
.company-card:hover,
.document-card:hover,
.product-card:hover,
.ticket-card:hover,
.email-card:hover,
.forecast-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
}

.metric-card {
  min-height: 132px;
  padding: 18px;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
}

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

.metric-card strong {
  font-size: 30px;
}

.positive {
  color: var(--green) !important;
}

.warning {
  color: var(--amber) !important;
}

.dashboard-grid,
.reports-grid,
.task-layout,
.calendar-layout,
.automation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.panel {
  padding: 20px;
}

.panel-header,
.section-toolbar,
.deal-footer,
.modal-header {
  justify-content: space-between;
  gap: 14px;
}

.chart {
  height: 310px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 13px;
  align-items: end;
  padding-top: 24px;
}

.chart div {
  position: relative;
  min-height: 38px;
  height: var(--h);
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--brand), #8bc9c3);
}

.chart div:nth-child(even) {
  background: linear-gradient(180deg, var(--brand-2), #f4a18e);
}

.chart span {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
}

.timeline-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--brand-2);
}

.timeline-item p {
  margin: 0;
}

.timeline-item small {
  color: var(--muted);
}

.section-toolbar {
  margin-bottom: 16px;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented button {
  border: 0;
  border-radius: 7px;
  padding: 9px 13px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.segmented button.active {
  background: var(--brand);
  color: #ffffff;
}

.contact-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.contact-table th,
.contact-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.contact-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: var(--surface-2);
  position: sticky;
  top: 0;
}

.contact-table tbody tr {
  cursor: pointer;
}

.contact-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand) 7%, transparent);
}

.contact-name {
  gap: 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 13%, transparent);
  color: var(--brand);
  font-weight: 800;
  font-size: 12px;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.stage {
  min-height: 520px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

.stage:has(.deal-card:hover) {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.stage-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 800;
}

.deal-card {
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.deal-card h3,
.campaign-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.deal-card p,
.campaign-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.deal-footer {
  color: var(--muted);
  font-size: 13px;
}

.task-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

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

.task-item {
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.task-item input {
  width: 18px;
  height: 18px;
}

.task-item.done {
  opacity: 0.58;
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 15px 0;
}

.day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  min-height: 68px;
  font-weight: 800;
}

.day span {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.day.active {
  background: var(--brand-2);
  color: #ffffff;
}

.day.active span {
  color: #ffe6df;
}

.agenda p {
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 13px 0;
}

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

.calendar-layout {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.calendar-panel {
  min-width: 0;
}

.calendar-heading {
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-heading h2 {
  text-align: center;
}

.calendar-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-weekdays span {
  padding: 0 4px;
}

.month-grid {
  gap: 8px;
}

.calendar-cell {
  min-height: 122px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.calendar-cell:hover {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
}

.calendar-cell.muted-month {
  opacity: 0.45;
}

.calendar-cell.today {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.cell-day {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.event-chip {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 7px 8px;
  border: 0;
  border-left: 4px solid var(--brand);
  border-radius: 7px;
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  color: var(--text);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-chip.outlook {
  border-left-color: var(--brand-2);
  background: color-mix(in srgb, var(--brand-2) 12%, var(--surface));
}

.outlook-panel {
  display: grid;
  align-content: start;
  gap: 18px;
}

.outlook-status {
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.outlook-status p,
.outlook-steps p {
  margin: 4px 0 0;
  color: var(--muted);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--amber) 18%, transparent);
}

.outlook-status.connected .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--green) 18%, transparent);
}

.outlook-steps {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.outlook-steps code {
  color: var(--brand);
  font-weight: 800;
}

.today-events {
  display: grid;
  gap: 12px;
}

.agenda-event {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.agenda-event strong,
.agenda-event span {
  display: block;
}

.agenda-event span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

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

.campaign-card {
  padding: 16px;
}

.campaign-visual {
  height: 136px;
  border-radius: 8px;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.2) 0 2px, transparent 2px 12px),
    var(--brand);
}

.campaign-visual.email {
  background-color: var(--brand);
}

.campaign-visual.social {
  background-color: var(--brand-2);
}

.campaign-visual.nurture {
  background-color: var(--accent);
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.funnel {
  display: grid;
  gap: 10px;
}

.funnel div {
  width: var(--w);
  min-width: 170px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  font-weight: 800;
}

.health-list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.green { background: var(--green); }
.amber { background: var(--amber); }
.red { background: var(--red); }

dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(16, 24, 32, 0.55);
}

.lead-form {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.lead-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.lead-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface-2);
  color: var(--text);
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus,
.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}

.lead-form select,
.lead-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface-2);
  color: var(--text);
  resize: vertical;
}

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

.checkbox-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  color: var(--text) !important;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: 0;
}

.lead-form menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 10px 0 0;
}

.detail-body {
  display: grid;
  gap: 10px;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-line span {
  color: var(--muted);
}

.campaign-action {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 36px));
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 32, 0.72);
}

.auth-gate.show {
  display: grid;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.login-brand {
  color: var(--text);
  padding: 0;
}

.login-card h1 {
  margin: 0;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.login-card input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface-2);
  color: var(--text);
}

.resource-grid,
.company-board,
.asset-grid,
.security-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.security-board {
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  overflow-x: auto;
}

.resource-card,
.company-card,
.document-card,
.parameter-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.resource-card,
.company-card,
.document-card {
  padding: 16px;
}

.resource-card h3,
.company-card h3,
.document-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.resource-card p,
.company-card p,
.document-card p,
.parameter-card p {
  margin: 0;
  color: var(--muted);
}

.resource-meta,
.document-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.resource-meta span {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.company-card {
  display: grid;
  gap: 12px;
}

.company-score {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.company-score span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.document-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.catalog-layout,
.inbox-layout,
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
}

.document-list,
.parameter-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.document-card {
  display: grid;
  gap: 10px;
}

.document-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.document-actions .ghost-button,
.document-actions .primary-button {
  min-height: 36px;
}

.parameter-card {
  padding: 13px;
}

.parameter-card strong {
  display: block;
  margin-bottom: 4px;
}

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

.recommendation-grid,
.service-board,
.automation-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

.recommendation-card,
.ticket-card,
.automation-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.recommendation-card h3,
.ticket-card h3,
.automation-card h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.recommendation-card p,
.ticket-card p,
.automation-card p {
  margin: 0;
  color: var(--muted);
}

.recommendation-card button,
.ticket-card button {
  margin-top: 12px;
}

.service-board {
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  overflow-x: auto;
}

.ticket-queue-tabs,
.ticket-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.ticket-queue-tabs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.ticket-queue-tabs button.active {
  background: var(--brand);
  color: #ffffff;
}

.ticket-metric {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ticket-metric strong,
.ticket-metric span {
  display: block;
}

.ticket-metric span {
  color: var(--muted);
  font-size: 12px;
}

.ticket-column {
  min-height: 430px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

.ticket-column h3 {
  margin: 0 0 12px;
}

.ticket-card {
  margin-bottom: 10px;
  background: var(--surface);
}

.ticket-card.sla-breached {
  border-color: var(--red);
}

.ticket-card.sla-risk {
  border-color: var(--amber);
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.ticket-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.automation-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.automation-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.product-grid,
.quote-builder,
.email-template-list,
.audit-list,
.forecast-grid,
.command-list,
.notification-list,
.readiness-list,
.user-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

.product-card,
.quote-line,
.email-card,
.audit-item,
.forecast-card,
.command-item,
.notification-item,
.readiness-item,
.user-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.product-card h3,
.email-card h3,
.forecast-card h3,
.command-item h3,
.notification-item h3,
.readiness-item h3,
.user-card h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.product-card p,
.quote-line p,
.email-card p,
.audit-item p,
.forecast-card p,
.command-item p,
.notification-item p,
.readiness-item p,
.user-card p {
  margin: 0;
  color: var(--muted);
}

.product-card button,
.email-card button {
  margin-top: 12px;
}

.quote-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.audit-item {
  background: var(--surface);
}

.audit-item time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.saved-view-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.saved-view-bar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-modal {
  width: min(680px, calc(100vw - 28px));
}

.command-item,
.notification-item,
.readiness-item {
  text-align: left;
}

.command-item {
  cursor: pointer;
}

.command-item:hover {
  border-color: var(--brand);
}

.notification-item {
  background: var(--surface);
}

.readiness-item.pass {
  border-left: 4px solid var(--green);
}

.readiness-item.warn {
  border-left: 4px solid var(--amber);
}

.readiness-item.fail {
  border-left: 4px solid var(--red);
}

.user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 12px;
  align-items: center;
}

.user-card select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
}

.switch {
  width: 46px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: #ffffff;
  transition: transform 160ms ease;
}

.switch.active {
  background: var(--brand);
}

.switch.active::after {
  transform: translateX(20px);
}

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

  .brand div:not(.brand-mark),
  .nav-item span,
  .sidebar-panel {
    display: none;
  }

  .nav-list {
    min-height: 0;
  }

  .metrics-grid,
  .campaign-grid,
  .resource-grid,
  .company-board,
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .reports-grid,
  .task-layout,
  .calendar-layout,
  .document-layout,
  .automation-layout,
  .catalog-layout,
  .inbox-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .recommendation-grid,
  .product-grid,
  .forecast-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .nav-list {
    display: flex;
  }

  .workspace {
    padding: 18px;
  }

  .topbar {
    position: static;
    margin: -18px -18px 18px;
    padding: 16px 18px;
  }

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

  .topbar-actions,
  .search {
    width: 100%;
    min-width: 0;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions .primary-button,
  .topbar-actions .ghost-button {
    flex: 1 1 150px;
    justify-content: center;
  }

  .topbar-actions .badge {
    width: 100%;
    justify-content: center;
  }

  .metrics-grid,
  .campaign-grid,
  .resource-grid,
  .company-board,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-board {
    grid-template-columns: repeat(4, minmax(250px, 78vw));
  }

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

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

  .calendar-weekdays {
    display: none;
  }

  .calendar-cell {
    min-height: auto;
  }
}
