@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #00194f;
  --primary-dark: #001038;
  --primary-soft: #eef2f9;
  --accent: #930dcf;
  --accent-dark: #7607aa;
  --accent-soft: #f8edff;
  --success: #047857;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --warning: #d97706;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f8fafc;
  --sidebar: #00153f;
  --sidebar-muted: #a9b9d2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
  --radius: 12px;
  --sidebar-width: 248px;
  font-family: "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--text); font-size: 15px; line-height: 1.45; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(147, 13, 207, .3); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .55; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: 20px; color: var(--ink); line-height: 1.2; }
h2 { margin-bottom: 6px; font-size: 24px; line-height: 1.2; color: var(--ink); }
h3 { margin-bottom: 3px; font-size: 16px; color: var(--ink); }
p { margin-bottom: 0; color: var(--muted); }
svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; left: 12px; top: -50px; z-index: 200; padding: 10px 14px; background: white; color: var(--primary); border-radius: 8px; box-shadow: var(--shadow-md); }
.skip-link:focus { top: 12px; }

.app-shell { min-height: 100vh; display: block; }
.sidebar { position: sticky; inset: 0 0 auto 0; z-index: 50; width: 100%; height: 64px; display: flex; flex-direction: row; align-items: stretch; background: white; color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(15,23,42,.04); }
.brand { width: 220px; min-height: 64px; padding: 8px 14px; display: flex; align-items: center; gap: 11px; border-right: 1px solid var(--line); }
.brand-logo-wrap { width: 174px; height: 46px; padding: 7px 8px; display: flex; align-items: center; flex: 0 0 auto; border-radius: 10px; background: white; }
.brand-logo-wrap img { width: 100%; height: auto; display: block; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; }
.brand span { color: var(--muted); font-size: 12px; }
.sidebar-close { display: none !important; margin-left: auto; color: white !important; }
.main-nav { min-width: 0; flex: 1; padding: 0 8px; display: flex; align-items: stretch; overflow-x: auto; overflow-y: hidden; }
.nav-label { display: none; }
.nav-item { width: auto; min-width: max-content; min-height: 64px; margin: 0; padding: 0 11px; display: flex; align-items: center; gap: 7px; color: #475569; background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; text-align: left; font-size: 13px; font-weight: 500; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.nav-item:hover { background: #f8fafc; color: var(--ink); }
.nav-item.is-active { color: var(--primary); background: #f8fbff; border-bottom-color: var(--primary); box-shadow: none; }
.nav-item svg { display: none; width: 18px; height: 18px; }
.nav-item span { flex: 1; }
.nav-item b { min-width: 22px; height: 20px; display: grid; place-items: center; border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); font-size: 10px; }
.super-admin-item { color: var(--accent-dark); }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.12); }
.sidebar-footer { margin-left: auto; padding: 8px 12px; display: flex; align-items: center; border-left: 1px solid var(--line); }
.workspace-card { padding: 5px 7px; display: flex; align-items: center; gap: 9px; border: 1px solid transparent; background: transparent; border-radius: 10px; }
.workspace-card:hover { border-color: var(--line); background: #f8fafc; }
.workspace-card > div { min-width: 0; flex: 1; }
.workspace-card strong, .workspace-card span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-card strong { font-size: 12px; }.workspace-card span { color: var(--sidebar-muted); font-size: 11px; }
.workspace-avatar { width: 32px; height: 32px; display: block !important; overflow: hidden; flex: 0 0 auto; border-radius: 9px; background: white; box-shadow: 0 0 0 1px rgba(147,13,207,.14); }
.workspace-avatar img { width: 135px; height: 32px; max-width: none; display: block; object-fit: contain; object-position: left center; }

.app-area { width: 100%; min-height: calc(100vh - 64px); margin-left: 0; }
.topbar { position: sticky; top: 64px; z-index: 40; height: 62px; padding: 0 22px; display: flex; align-items: center; gap: 18px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.page-title { flex: 1; }.page-title > span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.menu-toggle { display: none !important; }
.demo-badge { padding: 6px 10px; display: flex; align-items: center; gap: 7px; border: 1px solid #fde68a; border-radius: 999px; background: #fffbeb; color: #92400e; font-size: 12px; font-weight: 600; }
.demo-badge i { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-button { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 9px; color: var(--muted); background: transparent; transition: background .18s ease, color .18s ease; }
.icon-button:hover { color: var(--ink); background: #f1f5f9; }
.icon-button.primary-soft { color: var(--primary); background: var(--primary-soft); }
.has-notification { position: relative; }.has-notification::after { content: ""; position: absolute; right: 8px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 2px solid white; }
.profile-button { min-height: 42px; padding: 4px 8px 4px 5px; display: flex; align-items: center; gap: 8px; border: 1px solid transparent; background: transparent; border-radius: 10px; text-align: left; }
.profile-button:hover { background: #f8fafc; border-color: var(--line); }
.profile-button > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--ink); font-size: 12px; font-weight: 700; }
.profile-button strong, .profile-button small { display: block; line-height: 1.2; }.profile-button strong { color: var(--ink); font-size: 12px; }.profile-button small { color: var(--muted); font-size: 10px; }.profile-button > svg { width: 14px; }
.prototype-note { min-height: 38px; padding: 8px 22px; display: flex; align-items: center; gap: 8px; color: var(--primary); background: var(--primary-soft); border-bottom: 1px solid #d9e1ef; font-size: 12px; }
.prototype-note > svg { width: 16px; }.prototype-note button { width: 28px; height: 28px; margin-left: auto; display: grid; place-items: center; border: 0; background: transparent; color: var(--primary); border-radius: 7px; }.prototype-note button:hover { background: #dce4f1; }

.view { display: none; min-height: calc(100vh - 164px); }.view.is-visible { display: block; }
.content-page { padding: 24px; max-width: 1550px; margin: 0 auto; }
.section-header { margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.button { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; border: 1px solid transparent; font-size: 13px; font-weight: 600; transition: .18s ease; }
.button svg { width: 16px; height: 16px; }.button.primary { color: white; background: var(--primary); }.button.primary:hover { background: var(--primary-dark); transform: translateY(-1px); }.button.secondary { color: var(--text); border-color: var(--line); background: white; }.button.secondary:hover { color: var(--ink); border-color: #cbd5e1; background: #f8fafc; }.button.tertiary { padding-inline: 9px; color: var(--primary); background: transparent; }.button.tertiary:hover { background: var(--primary-soft); }.button.light { color: #312e81; background: white; box-shadow: var(--shadow-sm); }.button.light:hover { transform: translateY(-1px); }
.card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.search-field { min-height: 38px; padding: 0 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: white; transition: border .18s, box-shadow .18s; }.search-field:focus-within { border-color: #b86ae0; box-shadow: 0 0 0 3px var(--accent-soft); }.search-field svg { width: 16px; color: var(--muted); }.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }.grow { flex: 1; }
.filter-bar { margin-bottom: 14px; display: flex; gap: 8px; }

/* Inbox */
.inbox-layout { height: calc(100vh - 164px); display: grid; grid-template-columns: 330px minmax(380px, 1fr) 286px; background: white; }
.conversation-list { min-width: 0; border-right: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.queue-tabs { padding: 12px 12px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-bottom: 1px solid var(--line); }.queue-tab { min-height: 38px; padding: 0 8px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; font-weight: 600; }.queue-tab:hover { color: var(--ink); }.queue-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }.queue-tab b { margin-left: 3px; padding: 2px 6px; border-radius: 999px; background: #e2e8f0; font-size: 10px; }.queue-tab.is-active b { color: var(--accent-dark); background: var(--accent-soft); }
.list-toolbar { padding: 10px 12px; display: flex; gap: 6px; border-bottom: 1px solid var(--line); }.list-toolbar .search-field { flex: 1; }
.conversation-items { overflow-y: auto; }.conversation-item { width: 100%; padding: 13px 14px; display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; border: 0; border-bottom: 1px solid #f1f5f9; background: white; text-align: left; transition: background .16s ease; }.conversation-item:hover { background: #f8fafc; }.conversation-item.is-active { background: #eff6ff; box-shadow: inset 3px 0 var(--primary); }.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: white; background: #475569; font-size: 12px; font-weight: 700; }.avatar.blue { background: #2563eb; }.avatar.green { background: #059669; }.avatar.purple { background: #7c3aed; }.avatar.orange { background: #ea580c; }.conversation-copy { min-width: 0; }.conversation-copy strong, .conversation-copy span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.conversation-copy strong { margin-bottom: 3px; color: var(--ink); font-size: 13px; }.conversation-copy span { color: var(--muted); font-size: 12px; }.conversation-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; color: var(--muted); font-size: 10px; }.unread-count { min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; color: white; background: var(--primary); font-weight: 700; }.team-chip { margin-top: 7px; padding: 2px 7px; display: inline-flex !important; width: auto; border-radius: 999px; color: #475569 !important; background: #f1f5f9; font-size: 10px !important; }
.chat-panel { min-width: 0; display: flex; flex-direction: column; background: #f8fafc; }.chat-header { min-height: 68px; padding: 10px 16px; display: flex; align-items: center; gap: 10px; background: white; border-bottom: 1px solid var(--line); }.chat-person { flex: 1; min-width: 0; }.chat-person strong, .chat-person span { display: block; }.chat-person strong { color: var(--ink); }.chat-person span { color: var(--muted); font-size: 11px; }.chat-actions { display: flex; gap: 3px; }.status-pill { padding: 4px 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-size: 10px; font-weight: 700; }.status-pill i { width: 6px; height: 6px; border-radius: 50%; }.status-pill.success { color: #047857; background: #ecfdf5; }.status-pill.success i { background: #10b981; }.status-pill.warning { color: #92400e; background: #fffbeb; }.status-pill.warning i { background: #f59e0b; }
.messages { flex: 1; padding: 22px 22px 12px; overflow-y: auto; }.message-row { margin-bottom: 13px; display: flex; }.message-row.out { justify-content: flex-end; }.message-bubble { max-width: min(72%, 620px); padding: 10px 12px 7px; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px; background: white; box-shadow: var(--shadow-sm); }.message-row.out .message-bubble { border-color: #bfdbfe; border-radius: 13px 4px 13px 13px; background: #dbeafe; }.message-bubble p { color: var(--text); white-space: pre-line; }.message-info { margin-top: 5px; display: flex; justify-content: flex-end; gap: 5px; color: var(--muted); font-size: 9px; }.message-info svg { width: 12px; height: 12px; color: var(--primary); }.day-divider { margin: 8px 0 18px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }.day-divider::before, .day-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }.system-message { max-width: 500px; margin: 10px auto 18px; padding: 6px 10px; border-radius: 999px; color: #475569; background: #e2e8f0; text-align: center; font-size: 10px; }
.typing-status { padding: 0 24px 7px; color: var(--muted); font-size: 11px; }.typing-status span { width: 4px; height: 4px; margin-right: 2px; display: inline-block; border-radius: 50%; background: #94a3b8; animation: typing 1s infinite alternate; }.typing-status span:nth-child(2) { animation-delay: .2s; }.typing-status span:nth-child(3) { animation-delay: .4s; }
.composer { min-height: 64px; padding: 9px 12px; display: flex; align-items: flex-end; gap: 7px; background: white; border-top: 1px solid var(--line); }.composer-tools { display: flex; }.composer textarea { flex: 1; max-height: 120px; min-height: 40px; padding: 9px 11px; resize: none; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); }.composer textarea:focus { border-color: #b86ae0; box-shadow: 0 0 0 3px var(--accent-soft); }.send-button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; color: white; background: var(--primary); }.send-button:hover { background: var(--primary-dark); }
.contact-panel { overflow-y: auto; border-left: 1px solid var(--line); background: white; }.contact-profile { padding: 20px 16px 16px; text-align: center; border-bottom: 1px solid var(--line); }.contact-profile .avatar { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 16px; }.contact-profile h3 { margin: 0 0 3px; }.contact-profile p { font-size: 12px; }.contact-actions { margin-top: 13px; display: flex; justify-content: center; gap: 6px; }.detail-section { padding: 15px 16px; border-bottom: 1px solid var(--line); }.detail-section h4 { margin: 0 0 11px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }.detail-list { display: grid; gap: 9px; }.detail-row { display: flex; align-items: flex-start; gap: 8px; }.detail-row svg { width: 15px; color: var(--muted); }.detail-row span { display: block; color: var(--muted); font-size: 10px; }.detail-row strong { display: block; color: var(--text); font-size: 12px; }.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }.tag { padding: 4px 7px; border-radius: 6px; color: #1e40af; background: #dbeafe; font-size: 10px; font-weight: 600; }.tag.green { color: #065f46; background: #d1fae5; }.tag.orange { color: #9a3412; background: #ffedd5; }

/* Tables and pages */
.table-card { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }table { width: 100%; border-collapse: collapse; }th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }th { color: var(--muted); background: #f8fafc; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }td { color: var(--text); font-size: 12px; }tbody tr:last-child td { border-bottom: 0; }tbody tr:hover { background: #fafcff; }.contact-cell { display: flex; align-items: center; gap: 9px; }.contact-cell .avatar { width: 34px; height: 34px; border-radius: 9px; }.contact-cell strong, .contact-cell span { display: block; }.contact-cell span { color: var(--muted); font-size: 10px; }.table-action { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }.table-action:hover { background: #f1f5f9; color: var(--ink); }

/* CRM */
.eyebrow, .modal-eyebrow { color: var(--primary); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.crm-summary { margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }.summary-chip { padding: 8px 12px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); font-size: 11px; }.summary-chip strong { color: var(--ink); font-size: 13px; }.kanban { padding-bottom: 12px; display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 12px; overflow-x: auto; }.kanban-column { min-width: 260px; padding: 10px; align-self: start; border: 1px solid var(--line); border-radius: var(--radius); background: #f1f5f9; }.column-header { margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }.column-header i { width: 8px; height: 8px; border-radius: 50%; }.column-header strong { flex: 1; color: var(--ink); font-size: 12px; }.column-header span { color: var(--muted); font-size: 10px; }.kanban-cards { min-height: 90px; }.kanban-card { margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow-sm); cursor: grab; }.kanban-card:active { cursor: grabbing; }.kanban-card.dragging { opacity: .55; }.kanban-card .tag { display: inline-block; margin-bottom: 8px; }.kanban-card h3 { margin-bottom: 4px; font-size: 13px; }.kanban-card p { font-size: 11px; }.card-value { margin-top: 11px; display: flex; align-items: center; justify-content: space-between; }.card-value strong { color: var(--ink); font-size: 12px; }.mini-avatar { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: white; background: #475569; font-size: 8px; font-weight: 700; }.new-kanban-card { width: 100%; min-height: 36px; border: 1px dashed #cbd5e1; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; }.new-kanban-card:hover { color: var(--primary); border-color: #93c5fd; background: var(--primary-soft); }

/* Reports */
.metric-grid { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }.metric-card { padding: 16px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }.metric-top { display: flex; justify-content: space-between; align-items: center; }.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }.metric-icon.green { color: var(--accent); background: var(--accent-soft); }.metric-icon.orange { color: var(--warning); background: #fffbeb; }.metric-card strong { margin-top: 14px; display: block; color: var(--ink); font-size: 24px; }.metric-card > span { color: var(--muted); font-size: 11px; }.delta { color: var(--accent); font-size: 10px; font-weight: 700; }.report-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }.chart-card { grid-row: span 2; }.trend { padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; }.trend.positive { color: #047857; background: #ecfdf5; }.bar-chart { height: 230px; padding-top: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 9px; border-bottom: 1px solid var(--line); background-image: linear-gradient(#f1f5f9 1px, transparent 1px); background-size: 100% 25%; }.bar-group { height: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; position: relative; }.bar { width: 28%; min-width: 6px; border-radius: 4px 4px 0 0; transition: height .3s ease; }.bar.new { background: #60a5fa; }.bar.done { background: #34d399; }.bar-group label { position: absolute; bottom: -20px; color: var(--muted); font-size: 9px; }.chart-legend { margin-top: 28px; display: flex; gap: 16px; color: var(--muted); font-size: 10px; }.chart-legend span { display: flex; align-items: center; gap: 5px; }.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }.legend-blue { background: #60a5fa; }.legend-green { background: #34d399; }.team-performance { display: grid; gap: 13px; }.performance-row > div { display: flex; justify-content: space-between; color: var(--text); font-size: 11px; }.performance-row b { color: var(--ink); }.progress { height: 6px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }.progress span { height: 100%; display: block; border-radius: inherit; background: var(--primary); }.response-time { display: flex; align-items: center; gap: 20px; }.radial { width: 112px; height: 112px; flex: 0 0 auto; display: grid; place-content: center; text-align: center; border-radius: 50%; background: radial-gradient(circle at center, white 55%, transparent 57%), conic-gradient(var(--primary) 0 72%, #e2e8f0 72%); }.radial strong { color: var(--ink); font-size: 16px; }.radial span { color: var(--muted); font-size: 10px; }.response-list { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }.response-list b { color: var(--ink); }

/* Channels, team, admin */
.channel-overview { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: white; }.channel-overview > div { padding: 15px 17px; border-right: 1px solid var(--line); }.channel-overview > div:last-child { border-right: 0; }.channel-overview strong, .channel-overview span { display: block; }.channel-overview strong { color: var(--ink); font-size: 20px; }.channel-overview span { color: var(--muted); font-size: 10px; }.success-text { color: var(--accent) !important; }.channel-grid { margin-bottom: 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }.channel-card { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }.provider-header { display: flex; align-items: center; gap: 10px; }.provider-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: white; background: #10b981; }.provider-icon.evolution { background: #7c3aed; }.provider-header > div { flex: 1; }.provider-header strong, .provider-header span { display: block; }.provider-header span { color: var(--muted); font-size: 10px; }.provider-meta { margin: 16px 0; padding: 12px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-block: 1px solid var(--line); }.provider-meta span, .provider-meta strong { display: block; }.provider-meta span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }.provider-meta strong { margin-top: 3px; color: var(--text); font-size: 11px; }.channel-actions { display: flex; justify-content: space-between; align-items: center; }.integration-flow { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.integration-flow > div { display: flex; align-items: center; gap: 13px; }.integration-flow > div > svg { width: 34px; height: 34px; padding: 7px; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }.settings-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; }.people-list, .department-list, .tenant-list { display: grid; gap: 4px; }.person-row, .department-row, .tenant-row { padding: 10px; display: flex; align-items: center; gap: 10px; border-radius: 9px; }.person-row:hover, .department-row:hover, .tenant-row:hover { background: #f8fafc; }.person-row .avatar { width: 34px; height: 34px; border-radius: 9px; }.person-copy, .department-copy, .tenant-copy { flex: 1; min-width: 0; }.person-copy strong, .person-copy span, .department-copy strong, .department-copy span, .tenant-copy strong, .tenant-copy span { display: block; }.person-copy span, .department-copy span, .tenant-copy span { color: var(--muted); font-size: 10px; }.role-badge { padding: 4px 7px; border-radius: 6px; color: #475569; background: #f1f5f9; font-size: 9px; font-weight: 600; }.department-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-weight: 700; }.admin-hero { margin: -24px -24px 18px; padding: 28px 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; color: white; background: radial-gradient(circle at 85% 10%, rgba(139,92,246,.45), transparent 32%), linear-gradient(135deg, #0f172a, #312e81); }.admin-hero h2 { color: white; font-size: 30px; }.admin-hero p { color: #cbd5e1; max-width: 650px; }.admin-kicker { margin-bottom: 8px; display: inline-flex; align-items: center; gap: 6px; color: #c4b5fd; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.admin-kicker svg { width: 15px; }.admin-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }.health-list { display: grid; gap: 5px; }.health-list > div { padding: 10px; display: flex; justify-content: space-between; border-radius: 8px; background: #f8fafc; color: var(--muted); font-size: 11px; }.health-list b { color: var(--ink); }.tenant-row { border-bottom: 1px solid #f1f5f9; border-radius: 0; }.tenant-logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: white; background: #334155; font-size: 10px; font-weight: 700; }

/* Modal and toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 20px; display: grid; place-items: center; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }.modal-backdrop[hidden] { display: none; }.modal { width: min(560px, 100%); max-height: min(760px, 92vh); overflow: auto; border-radius: 15px; background: white; box-shadow: 0 30px 80px rgba(15,23,42,.28); animation: modal-in .2s ease; }.modal > header { padding: 18px 20px 14px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }.modal > header h2 { margin: 3px 0 0; font-size: 20px; }.modal-body { padding: 18px 20px; }.modal > footer { padding: 13px 20px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.field { display: grid; gap: 5px; }.field.full { grid-column: 1 / -1; }.field label { color: var(--text); font-size: 11px; font-weight: 600; }.field input, .field select, .field textarea { width: 100%; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--ink); background: white; }.field textarea { min-height: 85px; resize: vertical; }.field input:focus, .field select:focus, .field textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }.provider-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.provider-option { padding: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; text-align: left; }.provider-option:hover, .provider-option.is-selected { border-color: #93c5fd; background: var(--primary-soft); }.provider-option strong, .provider-option span { display: block; }.provider-option span { color: var(--muted); font-size: 10px; }.architecture-list { display: grid; gap: 9px; }.architecture-step { padding: 11px; display: flex; align-items: center; gap: 10px; border-radius: 9px; background: #f8fafc; }.architecture-step b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: white; background: var(--primary); font-size: 10px; }.architecture-step strong, .architecture-step span { display: block; }.architecture-step span { color: var(--muted); font-size: 10px; }.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; }.toast { min-width: 280px; max-width: 380px; padding: 12px 14px; display: flex; align-items: center; gap: 9px; border: 1px solid #bbf7d0; border-radius: 10px; color: #065f46; background: #f0fdf4; box-shadow: var(--shadow-md); animation: toast-in .2s ease; }.toast svg { width: 18px; }.toast span { flex: 1; font-size: 12px; }

@keyframes typing { to { transform: translateY(-3px); opacity: .5; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } }

@media (max-width: 1180px) {
  .inbox-layout { grid-template-columns: 300px 1fr; }.contact-panel { display: none; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.channel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; height: 100vh; flex-direction: column; align-items: stretch; color: white; background: var(--sidebar); border-right: 1px solid rgba(255,255,255,.06); transform: translateX(-100%); transition: transform .2s ease; box-shadow: 18px 0 50px rgba(15,23,42,.24); }.sidebar.is-open { transform: translateX(0); }.brand { width: auto; min-height: 72px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); }.brand strong { color: white; }.brand span { color: var(--sidebar-muted); }.sidebar-close { color: white !important; }.main-nav { padding: 14px 10px; display: block; overflow-y: auto; }.nav-label { display: block; padding: 16px 12px 7px; color: #64748b; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }.nav-item { width: 100%; min-height: 42px; margin: 2px 0; padding: 0 11px; color: #cbd5e1; border: 0; border-radius: 9px; font-size: 13px; font-weight: 400; }.nav-item:hover { color: white; background: rgba(255,255,255,.06); }.nav-item.is-active { color: white; background: rgba(37,99,235,.2); border: 0; box-shadow: inset 3px 0 var(--primary); }.nav-item svg { display: block; }.nav-item b { color: #bfdbfe; background: rgba(37,99,235,.28); }.super-admin-item { color: #c4b5fd; }.sidebar-footer { margin-top: auto; margin-left: 0; padding: 12px; border-left: 0; border-top: 1px solid rgba(255,255,255,.07); }.workspace-card { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }.workspace-card:hover { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.07); }.workspace-card strong { color: white; }.workspace-card span { color: var(--sidebar-muted); }.sidebar-close, .menu-toggle { display: inline-grid !important; }.app-area { width: 100%; min-height: 100vh; margin-left: 0; }.topbar { top: 0; padding-inline: 14px; }.demo-badge { display: none; }.profile-button div, .profile-button > svg { display: none; }.content-page { padding: 18px; }.view { min-height: calc(100vh - 100px); }.inbox-layout { height: calc(100vh - 100px); grid-template-columns: 290px 1fr; }.report-grid, .settings-grid, .admin-grid { grid-template-columns: 1fr; }.chart-card { grid-row: auto; }.admin-hero { margin: -18px -18px 16px; }
}
@media (max-width: 700px) {
  .topbar { height: 64px; }.prototype-note { padding-inline: 12px; }.page-title > span { display: none; }.page-title h1 { font-size: 17px; }.topbar-actions > .icon-button { display: none; }.view { min-height: calc(100vh - 102px); }.inbox-layout { height: calc(100vh - 102px); display: block; }.conversation-list { height: 100%; border-right: 0; }.chat-panel { display: none; position: absolute; inset: 102px 0 0; z-index: 20; }.inbox-layout.chat-open .conversation-list { display: none; }.inbox-layout.chat-open .chat-panel { display: flex; }.chat-header::before { content: "‹"; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--primary); background: var(--primary-soft); font-size: 25px; cursor: pointer; }.section-header { display: block; }.section-header .button-row, .section-header > .button { margin-top: 14px; }.filter-bar { flex-wrap: wrap; }.filter-bar .search-field { flex-basis: 100%; }.metric-grid { grid-template-columns: 1fr 1fr; }.channel-overview { grid-template-columns: 1fr 1fr; }.channel-overview > div:nth-child(2) { border-right: 0; }.channel-overview > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.integration-flow { display: block; }.integration-flow .button { margin-top: 14px; }.admin-hero { display: block; padding: 24px 20px; }.admin-hero .button { margin-top: 16px; }.form-grid { grid-template-columns: 1fr; }.provider-choice { grid-template-columns: 1fr; }.field.full { grid-column: auto; }
}
@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }.channel-overview { grid-template-columns: 1fr; }.channel-overview > div { border-right: 0; border-bottom: 1px solid var(--line); }.channel-overview > div:last-child { border-bottom: 0; }.content-page { padding: 14px; }.admin-hero { margin: -14px -14px 14px; }.message-bubble { max-width: 86%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Production authentication and states */
[hidden] { display: none !important; }
.auth-shell { min-height: 100vh; padding: 28px; display: grid; place-items: center; background: radial-gradient(circle at 15% 15%, rgba(147,13,207,.18), transparent 30%), radial-gradient(circle at 85% 80%, rgba(0,25,79,.16), transparent 28%), #f8fafc; }
.login-card { width: min(430px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 28px 70px rgba(15,23,42,.14); }
.login-brand { min-height: 58px; margin-bottom: 30px; display: flex; align-items: center; }
.login-brand img { width: min(260px, 78vw); height: auto; display: block; }
.login-copy h1 { margin: 7px 0 7px; color: var(--ink); font-size: 28px; }
.login-copy p { margin: 0 0 24px; }
.login-form { display: grid; gap: 14px; }
.login-form .field span { color: var(--text); font-size: 11px; font-weight: 600; }
.login-submit { width: 100%; min-height: 44px; margin-top: 3px; justify-content: center; }
.form-error { padding: 10px 12px; border: 1px solid #fecaca; border-radius: 8px; color: #991b1b; background: #fef2f2; font-size: 11px; }
.login-status { margin: 18px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.demo-badge.production { color: #047857; background: #ecfdf5; }
.production-note { color: var(--primary); background: var(--primary-soft); border-bottom-color: #d9e1ef; }
.empty-state { padding: 32px 18px; color: var(--muted); font-size: 12px; text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }
.loading-state { padding: 24px; color: var(--muted); text-align: center; }
.message-bubble .message-error { display: block; margin-top: 4px; color: #b91c1c; font-size: 9px; }
.status-pill.error { color: #991b1b; background: #fef2f2; }
.button.danger { color: #fff; background: var(--danger); }
.toast.error { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.toast.warning { color: #92400e; border-color: #fde68a; background: #fffbeb; }

@media (max-width: 520px) {
  .auth-shell { padding: 16px; }
  .login-card { padding: 24px 20px; border-radius: 14px; }
  .login-copy h1 { font-size: 24px; }
  .login-form input { font-size: 16px; }
}

/* Rebecca brand identity */
.nav-item.is-active { background: var(--primary-soft); }
.conversation-item.is-active { background: var(--primary-soft); }
.avatar.blue { background: var(--primary); }
.avatar.purple { background: var(--accent); }
.unread-count { background: var(--accent); }
.message-row.out .message-bubble { border-color: #e2c5f2; background: var(--accent-soft); }
.tag { color: var(--accent-dark); background: var(--accent-soft); }
.new-kanban-card:hover { border-color: #b86ae0; }
.metric-icon.green { color: var(--success); background: var(--success-soft); }
.delta, .success-text { color: var(--success) !important; }
.bar.new, .legend-blue { background: var(--accent); }
.bar.done, .legend-green { background: #34d399; }
.provider-icon.evolution { background: var(--accent); }
.admin-hero { background: radial-gradient(circle at 85% 10%, rgba(147,13,207,.55), transparent 34%), linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.admin-kicker { color: #edc9ff; }
.button.light { color: var(--primary); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #b86ae0; box-shadow: 0 0 0 3px var(--accent-soft); }
.provider-option:hover, .provider-option.is-selected { border-color: #b86ae0; }

@media (max-width: 900px) {
  .nav-item { min-height: 44px; }
  .nav-item.is-active { background: rgba(147,13,207,.22); }
  .nav-item b { color: #f0d4ff; background: rgba(147,13,207,.3); }
  .brand-logo-wrap { width: 182px; }
  .workspace-avatar { box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
}

@media (max-width: 520px) {
  .auth-shell { min-height: 100dvh; }
  .login-brand img { width: min(230px, 76vw); }
}
