:root {
    --bg: #f6f7fb;
    --bg-soft: #f1f3ff;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-muted: #f8f8ff;
    --sidebar: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 244, 255, 0.96));
    --ink: #2f3349;
    --muted: #79819a;
    --line: rgba(115, 103, 240, 0.1);
    --brand: #7367f0;
    --brand-strong: #6258d8;
    --brand-soft: rgba(115, 103, 240, 0.14);
    --cyan: #16c3f2;
    --cyan-soft: rgba(22, 195, 242, 0.12);
    --success: #28c76f;
    --success-soft: rgba(40, 199, 111, 0.14);
    --warning: #ff9f43;
    --warning-soft: rgba(255, 159, 67, 0.14);
    --danger: #ea5455;
    --danger-soft: rgba(234, 84, 85, 0.12);
    --shadow-lg: 0 30px 60px rgba(47, 51, 73, 0.12);
    --shadow-md: 0 18px 40px rgba(47, 51, 73, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(115, 103, 240, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(22, 195, 242, 0.16), transparent 24%),
        linear-gradient(180deg, #fbfbff 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

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

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

h1,
h2,
h3,
h4,
strong {
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.section-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
}

.helper-text,
small {
    color: var(--muted);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
}

.pill--neutral {
    background: rgba(115, 103, 240, 0.08);
    color: var(--brand);
}

.pill--success {
    background: var(--success-soft);
    color: var(--success);
}

.alert {
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-md);
}

.alert--error {
    background: #fff5f6;
    border-color: rgba(234, 84, 85, 0.18);
    color: var(--danger);
}

.alert--success {
    background: #f2fff8;
    border-color: rgba(40, 199, 111, 0.2);
    color: #15914a;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background: linear-gradient(135deg, var(--brand), #8d7cf6);
    color: #fff;
    box-shadow: 0 16px 30px rgba(115, 103, 240, 0.26);
}

.button--ghost {
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    border: 1px solid rgba(115, 103, 240, 0.12);
    box-shadow: none;
}

.button--full {
    width: 100%;
}

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

.field span {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--ink);
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid rgba(115, 103, 240, 0.12);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: rgba(115, 103, 240, 0.38);
    box-shadow: 0 0 0 4px rgba(115, 103, 240, 0.12);
}

.field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--brand) 50%), linear-gradient(135deg, var(--brand) 50%, transparent 50%);
    background-position: calc(100% - 22px) calc(50% - 3px), calc(100% - 16px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

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

.stack-md {
    display: grid;
    gap: 18px;
}

.card,
.glass-card,
.banner-card,
.metric-tile,
.chart-card,
.status-card,
.table-panel,
.overview-card,
.form-panel,
.conversation-panel,
.chat-shell,
.sidebar-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

.card,
.glass-card,
.banner-card,
.metric-tile,
.chart-card,
.status-card,
.table-panel,
.overview-card,
.form-panel,
.conversation-panel,
.chat-shell,
.sidebar-card {
    border-radius: var(--radius-xl);
}

.app-screen {
    min-height: 100vh;
}

.app-layout {
    min-height: 100vh;
    display: block;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 284px;
    height: 100vh;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow-y: auto;
    background: var(--sidebar);
    border-right: 1px solid rgba(115, 103, 240, 0.08);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.7);
    z-index: 40;
}

.app-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 10px;
}

.app-sidebar__brand strong {
    display: block;
    font-size: 1.6rem;
}

.app-sidebar__brand span:last-child {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand-soft), rgba(22, 195, 242, 0.2));
    color: var(--brand);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-nav__caption {
    padding: 0 12px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #a3a9be;
    font-weight: 800;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 600;
    transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.sidebar-link:hover,
.sidebar-link--active {
    background: linear-gradient(135deg, rgba(115, 103, 240, 0.14), rgba(115, 103, 240, 0.06));
    color: var(--brand);
    transform: translateX(2px);
}

.sidebar-card {
    margin-top: auto;
    padding: 20px;
    display: grid;
    gap: 14px;
}

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

.sidebar-card p {
    color: var(--muted);
}

.app-frame {
    margin-left: 284px;
    width: calc(100% - 284px);
    padding: 24px 28px 20px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 20px;
    min-width: 0;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    flex: 1;
    padding: 0 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(115, 103, 240, 0.1);
    box-shadow: var(--shadow-md);
}

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

.search-field input::placeholder {
    color: #a0a8c2;
}

.app-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.top-pill,
.user-chip {
    min-height: 56px;
    padding: 0 16px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(115, 103, 240, 0.1);
    box-shadow: var(--shadow-md);
}

.top-pill {
    color: var(--muted);
    font-weight: 700;
}

.top-pill .material-symbols-outlined {
    color: var(--brand);
}

.top-pill--accent .material-symbols-outlined {
    color: var(--success);
}

.top-pill--icon {
    width: 56px;
    min-width: 56px;
    justify-content: center;
    padding: 0;
}

.top-pill--icon .material-symbols-outlined {
    color: var(--danger);
}

.user-chip {
    padding-right: 18px;
}

.user-chip__avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), #9f96ff);
    color: #fff;
    font-weight: 800;
}

.user-chip strong,
.user-chip span {
    display: block;
}

.user-chip span {
    color: var(--muted);
    font-size: 0.78rem;
}

.app-content {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 8px 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.dashboard-layout,
.companies-layout,
.inbox-layout {
    display: grid;
    gap: 24px;
}

.banner-card {
    padding: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 24px;
    overflow: hidden;
    position: relative;
}

.banner-card::before {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(115, 103, 240, 0.12), transparent 70%);
}

.banner-card__copy {
    display: grid;
    gap: 16px;
}

.banner-card__copy h1,
.overview-card--hero h1,
.page-toolbar h1,
.auth-showcase h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
}

.banner-card__copy p,
.overview-card--hero p,
.page-toolbar p,
.auth-showcase p,
.auth-panel__header p {
    max-width: 66ch;
    color: var(--muted);
    line-height: 1.7;
}

.button-row,
.scope-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.scope-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(115, 103, 240, 0.12);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.scope-pill:hover,
.scope-pill--active {
    background: var(--brand-soft);
    color: var(--brand);
    transform: translateY(-1px);
}

.banner-card__visual {
    position: relative;
    min-height: 260px;
    display: grid;
    place-items: center;
}

.visual-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
}

.visual-orb--primary {
    inset: 8% auto auto 12%;
    width: 92px;
    height: 92px;
    background: linear-gradient(135deg, rgba(115, 103, 240, 0.24), rgba(159, 150, 255, 0.08));
}

.visual-orb--secondary {
    inset: auto 12% 8% auto;
    width: 76px;
    height: 76px;
    background: linear-gradient(135deg, rgba(22, 195, 242, 0.26), rgba(255, 255, 255, 0.08));
}

.visual-device {
    position: relative;
    z-index: 1;
    width: min(100%, 280px);
    padding: 26px;
    display: grid;
    gap: 14px;
    text-align: center;
    border-radius: 26px;
    background: linear-gradient(180deg, #ffffff, rgba(244, 246, 255, 0.92));
    box-shadow: 0 24px 40px rgba(115, 103, 240, 0.16);
}

.visual-device .material-symbols-outlined {
    font-size: 52px;
    color: var(--brand);
}

.metric-grid,
.overview-grid,
.detail-grid {
    display: grid;
    gap: 20px;
}

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

.metric-tile {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

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

.metric-tile strong,
.overview-card strong,
.detail-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.8rem;
}

.metric-tile__icon,
.detail-card .material-symbols-outlined,
.overview-card > .material-symbols-outlined {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
}

.metric-tile__icon--primary,
.overview-card > .material-symbols-outlined {
    background: var(--brand-soft);
    color: var(--brand);
}

.metric-tile__icon--success {
    background: var(--success-soft);
    color: var(--success);
}

.metric-tile__icon--accent {
    background: var(--warning-soft);
    color: var(--warning);
}

.metric-tile__icon--info,
.detail-card .material-symbols-outlined {
    background: var(--cyan-soft);
    color: var(--cyan);
}

.dashboard-columns,
.companies-grid,
.inbox-grid {
    display: grid;
    gap: 24px;
}

.dashboard-columns {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.75fr);
}

.chart-card,
.status-card,
.table-panel,
.form-panel,
.conversation-panel,
.chat-shell {
    padding: 26px;
}

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

.section-head h2 {
    font-size: 1.55rem;
}

.section-head--compact h2 {
    font-size: 1.28rem;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot--inbound {
    background: var(--brand);
}

.legend-dot--outbound {
    background: var(--cyan);
}

.chart-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
    min-height: 320px;
}

.chart-bars__item {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.chart-bars__columns {
    width: 100%;
    min-height: 250px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(121, 129, 154, 0.18);
}

.chart-bar {
    width: 18px;
    min-height: 8px;
    height: var(--bar-size);
    border-radius: 999px;
    transition: transform 220ms ease, opacity 220ms ease;
}

.chart-bar:hover {
    transform: translateY(-4px);
}

.chart-bar--inbound {
    background: linear-gradient(180deg, #8c83ff, var(--brand));
}

.chart-bar--outbound {
    background: linear-gradient(180deg, #72e3ff, var(--cyan));
}

.chart-bars__item strong {
    font-size: 0.92rem;
}

.status-stack {
    display: grid;
    gap: 24px;
}

.progress-ring {
    --progress: 0%;
    width: 188px;
    height: 188px;
    margin: 12px auto 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--brand) var(--progress), rgba(115, 103, 240, 0.12) 0);
    position: relative;
}

.progress-ring::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff, #f4f6ff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.progress-ring > div {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    justify-items: center;
}

.progress-ring strong {
    font-size: 2.1rem;
}

.progress-ring span {
    color: var(--muted);
    font-weight: 700;
}

.stat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.stat-list li,
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(121, 129, 154, 0.12);
}

.stat-list li:last-child,
.detail-row:last-child {
    border-bottom: 0;
}

.stat-list span,
.detail-row span {
    color: var(--muted);
}

.status-card__menu {
    color: #b2b8ce;
}

.table-panel {
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(121, 129, 154, 0.12);
    vertical-align: top;
    text-align: left;
}

.data-table th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table td strong,
.data-table td small {
    display: block;
}

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

.detail-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(248, 249, 255, 0.96);
    display: grid;
    gap: 12px;
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.line-admin-card {
    gap: 18px;
}

.line-admin-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.line-admin-card__actions,
.line-admin-card__toggle-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.line-admin-card__checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    color: var(--muted);
}

.line-admin-create {
    padding: 24px;
}

.overview-grid {
    grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.6fr));
}

.overview-card {
    padding: 24px;
    display: grid;
    gap: 16px;
}

.overview-card--hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.overview-card__badge {
    min-width: 158px;
    min-height: 124px;
    border-radius: 24px;
    padding: 18px;
    display: grid;
    place-items: center;
    gap: 8px;
    background: linear-gradient(180deg, rgba(115, 103, 240, 0.1), rgba(22, 195, 242, 0.08));
    text-align: center;
}

.companies-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

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

.page-toolbar {
    display: grid;
    gap: 10px;
    max-width: 980px;
}

.page-toolbar__eyebrow {
    display: block;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 600;
}

.inbox-grid {
    grid-template-columns: minmax(320px, 380px) minmax(0, 920px);
    align-items: start;
    justify-content: start;
}
.inbox-grid--single {
    grid-template-columns: minmax(320px, 520px);
}

.conversation-panel,
.chat-shell {
    min-height: 0;
}

.inbox-drawer {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 70;
}

.inbox-drawer__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.28);
    opacity: 0;
    transition: opacity 180ms ease;
}

.inbox-drawer__panel {
    position: relative;
    width: min(760px, calc(100vw - 24px));
    height: calc(100vh - 24px);
    margin: 12px;
    padding: 22px;
    overflow: auto;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.96));
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
    transform: translateX(104%);
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
}

.inbox-drawer--open {
    pointer-events: auto;
}

.inbox-drawer--open .inbox-drawer__backdrop {
    opacity: 1;
}

.inbox-drawer--open .inbox-drawer__panel,
.inbox-drawer--entering .inbox-drawer__panel {
    transform: translateX(0);
    opacity: 1;
}

.inbox-drawer--leaving .inbox-drawer__panel {
    transform: translateX(64px);
    opacity: 0;
}

.inbox-drawer--leaving .inbox-drawer__backdrop {
    opacity: 0;
}

.conversation-list {
    display: grid;
    gap: 12px;
    max-height: 560px;
    overflow: auto;
    padding-right: 4px;
}
.conversation-list--compact {
    gap: 10px;
    max-height: none;
}
.record-group {
    display: grid;
    gap: 12px;
}
.record-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.record-group__list {
    display: grid;
    gap: 10px;
}

.crm-record-form {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(248, 249, 255, 0.88);
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.crm-record-form__grid,
.crm-record-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

.crm-record-hero__tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 249, 255, 0.92), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.crm-record-hero__tile .material-symbols-outlined {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand);
}

.crm-record-hero__tile strong,
.crm-record-hero__tile small {
    display: block;
}

.conversation-item {
    display: grid;
    gap: 8px;
    padding: 18px;
    .conversation-item--record,
    .conversation-item--compact {
        padding: 14px 16px;
        border-radius: 18px;
    }
    .conversation-item--compact .conversation-item__top {
        align-items: flex-start;
    }
    border-radius: 20px;
    background: rgba(248, 249, 255, 0.94);
    border: 1px solid rgba(115, 103, 240, 0.08);
    border-left: 4px solid var(--conversation-accent, var(--brand));
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.conversation-item:hover {
    border-color: rgba(115, 103, 240, 0.22);
    background: linear-gradient(180deg, rgba(115, 103, 240, 0.08), rgba(255, 255, 255, 0.96));
}

.conversation-item--active {
    border-color: color-mix(in srgb, var(--conversation-accent, var(--brand)) 42%, rgba(115, 103, 240, 0.18));
    background: linear-gradient(180deg, color-mix(in srgb, var(--conversation-accent, var(--brand)) 14%, #ffffff), rgba(255, 255, 255, 0.98));
    transform: translateX(4px);
}

.conversation-item--active .conversation-line,
.conversation-item--active small,
.conversation-item--active > span {
    color: color-mix(in srgb, var(--conversation-accent, var(--brand)) 48%, var(--ink));
}

.conversation-item--active .pill--neutral {
    background: color-mix(in srgb, var(--conversation-accent, var(--brand)) 16%, #ffffff);
    color: color-mix(in srgb, var(--conversation-accent, var(--brand)) 68%, var(--ink));
}

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

.conversation-item__meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.conversation-item__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.conversation-unread-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
}

.conversation-line {
    font-size: 0.76rem;
    color: var(--muted);
}

.chat-shell {
    display: grid;
    .crm-record-form--modal {
        margin-bottom: 0;
        padding: 0;
        background: transparent;
        border: 0;
    }
    .crm-record-modal {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: grid;
        place-items: center;
    }
    .crm-record-modal__backdrop {
        position: absolute;
        inset: 0;
        border: 0;
        background: rgba(15, 23, 42, 0.4);
    }
    .crm-record-modal__dialog {
        position: relative;
        width: min(560px, calc(100vw - 32px));
        padding: 24px;
        border-radius: 24px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.96));
        box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
        border: 1px solid rgba(115, 103, 240, 0.08);
    }
    .crm-record-modal__actions {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
    }
    body.has-record-modal {
        overflow: hidden;
    }
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    align-content: start;
}

.whatsapp-drawer {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    min-height: 100%;
}

.whatsapp-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.chat-shell__contact-meta,
.chat-shell__header-actions,
.conversation-history-item__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chat-shell__header-actions {
    justify-content: flex-end;
}

.inbox-drawer__close {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.inbox-drawer__close:hover {
    background: rgba(241, 245, 249, 0.96);
}

.inbox-drawer__close--inline {
    display: none;
}

.inbox-drawer__close--hidden {
    display: none;
}

.chat-shell__crm,
.ai-summary-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(248, 249, 255, 0.88);
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.chat-shell__crm {
    display: grid;
    gap: 14px;
}

.chat-shell__crm-form {
    display: grid;
    grid-template-columns: minmax(180px, 240px) auto;
    gap: 16px;
    align-items: end;
}

.chat-shell__crm-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-summary-card {
    display: grid;
    gap: 14px;
}

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

.ai-summary-card__grid strong,
.ai-summary-card__grid small {
    display: block;
}

.conversation-actions-list,
.conversation-history-list {
    display: grid;
    gap: 12px;
}

.conversation-action-card,
.conversation-history-item {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.conversation-history-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand);
}

.conversation-action-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tasks-layout {
    display: grid;
    gap: 24px;
}

.tasks-toolbar,
.tasks-grid,
.task-detail-card,
.task-list-card,
.task-comment-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
    border-radius: var(--radius-xl);
}

.tasks-toolbar {
    padding: 22px;
}

.tasks-toolbar__form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.tasks-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
    gap: 0;
    overflow: hidden;
}

.task-list-card,
.task-detail-card {
    padding: 22px;
}

.task-list-card {
    border-right: 1px solid rgba(115, 103, 240, 0.1);
}

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

.task-item {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(115, 103, 240, 0.1);
}

.task-item--active {
    border-color: rgba(115, 103, 240, 0.34);
    box-shadow: 0 14px 28px rgba(115, 103, 240, 0.12);
}

.task-item__meta,
.task-detail-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.task-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(115, 103, 240, 0.08);
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
}

.task-chip .material-symbols-outlined {
    font-size: 1rem;
}

.task-chip--priority {
    background: rgba(255, 159, 67, 0.14);
    color: #b86b19;
}

.task-chip--status {
    background: rgba(115, 103, 240, 0.08);
    color: var(--brand);
}

.task-detail-card {
    display: grid;
    gap: 20px;
}

.task-detail-card__section {
    display: grid;
    gap: 12px;
}

.task-detail-card__form {
    display: grid;
    gap: 14px;
}

.task-detail-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

.task-history-item {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.task-history-item__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.task-history-item__icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(115, 103, 240, 0.08);
    color: var(--brand);
    flex: 0 0 auto;
}

.task-history-item__head strong,
.task-history-item__head small {
    display: block;
}

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

.task-board-item {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(115, 103, 240, 0.1);
}

.task-board-item__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.task-ai-lockup {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(115, 103, 240, 0.06);
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.app-modal {
    width: min(720px, calc(100vw - 32px));
    max-width: 720px;
    border: 0;
    padding: 0;
    background: transparent;
}

.app-modal::backdrop {
    background: rgba(47, 51, 73, 0.34);
    backdrop-filter: blur(8px);
}

.app-modal__surface {
    display: grid;
    gap: 18px;
    padding: 26px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 30px 60px rgba(47, 51, 73, 0.18);
}

.app-modal__surface--notification {
    justify-items: center;
    text-align: center;
    padding: 34px 30px;
}

.app-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.app-modal__close {
    border: 0;
    background: rgba(115, 103, 240, 0.08);
    color: var(--brand);
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.app-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.app-modal__actions--center {
    justify-content: center;
}

.pill--danger {
    background: var(--danger-soft);
    color: var(--danger);
}

@media (max-width: 1100px) {
    .tasks-toolbar__form,
    .task-detail-card__grid,
    .tasks-grid {
        grid-template-columns: 1fr;
    }

    .task-list-card {
        border-right: 0;
        border-bottom: 1px solid rgba(115, 103, 240, 0.1);
    }
}

.chat-shell__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.chat-shell__header h2 {
    font-size: 1.35rem;
}

.message-stream {
    display: grid;
    gap: 16px;
    align-content: start;
    min-height: 420px;
    max-height: 62vh;
    overflow: auto;
    padding-right: 8px;
}

.message-day-divider {
    display: flex;
    justify-content: center;
    margin: 6px 0 2px;
}

.message-day-divider span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(115, 103, 240, 0.1);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
}

.message-bubble {
    max-width: min(72%, 680px);
    padding: 16px 18px;
    border-radius: 22px;
    display: grid;
    gap: 8px;
    animation: fadeUp 360ms ease both;
    box-shadow: none;
}

.message-bubble--inbound {
    background: rgba(248, 249, 255, 0.98);
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.message-bubble--outbound {
    margin-left: auto;
    background: linear-gradient(135deg, #1d8791, #156f76);
    color: #fff;
}

.message-bubble--media {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    gap: 10px;
}

.message-bubble--media .message-meta {
    padding: 0 4px;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.78rem;
    opacity: 0.72;
}

.message-meta time {
    white-space: nowrap;
}

.message-text {
    line-height: 1.55;
}

.message-bubble--media .message-text {
    display: block;
    margin: 0;
    padding: 16px 18px;
    border-radius: 22px;
}

.message-bubble--media.message-bubble--inbound .message-text {
    background: rgba(248, 249, 255, 0.98);
    border: 1px solid rgba(115, 103, 240, 0.08);
}

.message-bubble--media.message-bubble--outbound .message-text {
    background: linear-gradient(135deg, #1d8791, #156f76);
    color: #fff;
}

.message-bubble strong,
.message-bubble em,
.message-bubble s,
.message-bubble code {
    color: inherit;
}

.message-bubble code {
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(17, 20, 31, 0.08);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
}

.message-bubble--outbound code {
    background: rgba(255, 255, 255, 0.14);
}

.message-link {
    color: inherit;
    text-decoration: underline;
}

.message-media {
    display: grid;
    gap: 10px;
}

.message-media-thumb {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.message-media--image img {
    width: min(100%, 100px);
    max-height: 320px;
    object-fit: cover;
    border-radius: 18px;
    display: block;
}

.audio-player {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: min(100%, 360px);
    padding: 12px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.message-bubble--inbound .audio-player {
    background: rgba(115, 103, 240, 0.06);
    border-color: rgba(115, 103, 240, 0.12);
}

.audio-player audio {
    display: none;
}

.audio-player__toggle {
    position: relative;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
    color: currentColor;
    cursor: pointer;
}

.message-bubble--inbound .audio-player__toggle {
    background: linear-gradient(135deg, rgba(115, 103, 240, 0.18), rgba(115, 103, 240, 0.08));
    color: var(--brand);
}

.audio-player__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity var(--transition), transform var(--transition);
}

.audio-player__icon--play {
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid currentColor;
    margin-left: 2px;
}

.audio-player__icon--pause {
    width: 12px;
    height: 14px;
    opacity: 0;
}

.audio-player__icon--pause::before,
.audio-player__icon--pause::after {
    content: '';
    position: absolute;
    top: 0;
    width: 4px;
    height: 14px;
    border-radius: 999px;
    background: currentColor;
}

.audio-player__icon--pause::before {
    left: 0;
}

.audio-player__icon--pause::after {
    right: 0;
}

.audio-player--playing .audio-player__icon--play {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

.audio-player--playing .audio-player__icon--pause {
    opacity: 1;
}

.audio-player__body {
    display: grid;
    gap: 8px;
}

.audio-player__wave {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4px;
    align-items: end;
    height: 20px;
}

.audio-player__wave span {
    display: block;
    width: 100%;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.18;
}

.audio-player__wave span:nth-child(1),
.audio-player__wave span:nth-child(7) { height: 7px; }
.audio-player__wave span:nth-child(2),
.audio-player__wave span:nth-child(10) { height: 11px; }
.audio-player__wave span:nth-child(3),
.audio-player__wave span:nth-child(11) { height: 15px; }
.audio-player__wave span:nth-child(4),
.audio-player__wave span:nth-child(8) { height: 9px; }
.audio-player__wave span:nth-child(5),
.audio-player__wave span:nth-child(12) { height: 17px; }
.audio-player__wave span:nth-child(6),
.audio-player__wave span:nth-child(9) { height: 13px; }

.audio-player--playing .audio-player__wave span {
    opacity: 0.42;
}

.audio-player__seek {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    margin: 0;
    border-radius: 999px;
    background: linear-gradient(to right, currentColor 0 var(--audio-progress, 0%), rgba(255, 255, 255, 0.2) var(--audio-progress, 0%) 100%);
    outline: none;
}

.message-bubble--inbound .audio-player__seek {
    background: linear-gradient(to right, var(--brand) 0 var(--audio-progress, 0%), rgba(115, 103, 240, 0.14) var(--audio-progress, 0%) 100%);
}

.audio-player__seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.message-bubble--inbound .audio-player__seek::-webkit-slider-thumb {
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.16);
}

.audio-player__seek::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.message-bubble--inbound .audio-player__seek::-moz-range-thumb {
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.16);
}

.audio-player__times {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.76rem;
    opacity: 0.78;
}

.message-media--document a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.message-media-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: min(100%, 320px);
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    text-decoration: none;
}

.message-media-card__icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(115, 103, 240, 0.16);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.message-media-card__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: underline;
}

.media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 28px;
}

.media-lightbox[hidden] {
    display: none;
}

.media-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(17, 20, 31, 0.78);
}

.media-lightbox__dialog {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 1080px);
    max-height: 88vh;
    padding: 18px;
    border-radius: 24px;
    background: rgba(20, 24, 36, 0.94);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.media-lightbox__dialog img {
    display: block;
    max-width: 100%;
    max-height: calc(88vh - 36px);
    border-radius: 18px;
}

.media-lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

body.has-lightbox {
    overflow: hidden;
}

.chat-form {
    display: grid;
    gap: 14px;
}

.chat-form textarea {
    width: 100%;
    min-height: 116px;
    resize: vertical;
    border-radius: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(115, 103, 240, 0.12);
    background: rgba(255, 255, 255, 0.96);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-form textarea:focus {
    border-color: rgba(115, 103, 240, 0.38);
    box-shadow: 0 0 0 4px rgba(115, 103, 240, 0.12);
}

.chat-form button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.chat-attachment {
    display: grid;
    gap: 10px;
    color: var(--muted);
    cursor: pointer;
}

.chat-attachment > span:first-child {
    font-weight: 700;
}

.chat-attachment__picker {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px dashed rgba(115, 103, 240, 0.24);
    background: linear-gradient(180deg, rgba(248, 249, 255, 0.98), rgba(243, 244, 255, 0.92));
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.chat-attachment:hover .chat-attachment__picker {
    border-color: rgba(115, 103, 240, 0.4);
    box-shadow: 0 14px 26px rgba(115, 103, 240, 0.12);
    transform: translateY(-1px);
}

.chat-attachment__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(115, 103, 240, 0.14), rgba(141, 124, 246, 0.18));
    color: var(--brand);
    font-weight: 800;
}

.chat-attachment__meta {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.chat-attachment__meta strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.96rem;
    color: var(--ink);
}

.chat-attachment__meta small {
    font-size: 0.82rem;
}

.chat-attachment input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chat-shortcuts {
    font-size: 0.84rem;
    color: var(--muted);
}

.empty-state {
    min-height: 460px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    text-align: center;
    color: var(--muted);
}

.empty-state .material-symbols-outlined {
    font-size: 58px;
    color: var(--brand);
}

.auth-screen,
.minimal-screen {
    min-height: 100vh;
    padding: 28px;
}

.auth-screen {
    display: grid;
    grid-template-rows: 1fr auto;
}

.auth-layout {
    width: min(1320px, 100%);
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.8fr);
    gap: 28px;
    align-items: stretch;
}

.auth-showcase,
.auth-panel,
.minimal-layout .card {
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

.auth-showcase {
    padding: 40px;
    display: grid;
    gap: 28px;
    align-content: space-between;
}

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

.glass-card {
    padding: 22px;
}

.glass-card--soft {
    display: grid;
    gap: 14px;
}

.glass-card .material-symbols-outlined {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(115, 103, 240, 0.12);
    color: var(--brand);
}

.auth-panel {
    padding: 34px;
    display: grid;
    gap: 22px;
    align-content: start;
}

.auth-panel__header {
    display: grid;
    gap: 10px;
}

.auth-panel__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.minimal-layout {
    min-height: calc(100vh - 88px);
    display: grid;
    place-items: center;
}

.card--narrow {
    max-width: 460px;
    padding: 36px;
    display: grid;
    gap: 18px;
}

.app-animate {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 460ms ease forwards;
}

.app-animate--delay-1 {
    animation-delay: 70ms;
}

.app-animate--delay-2 {
    animation-delay: 120ms;
}

.app-animate--delay-3 {
    animation-delay: 170ms;
}

.app-animate--delay-4 {
    animation-delay: 220ms;
}

.app-animate--delay-5 {
    animation-delay: 270ms;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

@media (max-width: 1320px) {
    .metric-grid,
    .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .overview-card--hero {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1180px) {
    .app-layout,
    .dashboard-columns,
    .companies-grid,
    .inbox-grid,
    .auth-layout,
    .banner-card {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        height: auto;
        z-index: auto;
    }

    .app-frame {
        margin-left: 0;
        width: 100%;
    }

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

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

    .inbox-grid {
        justify-content: stretch;
    }

    .crm-record-hero {
        grid-template-columns: 1fr;
    }
    .inbox-grid--single {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .app-header,
    .app-header__actions,
    .chat-shell__header,
    .section-head,
    .section-head--compact,
    .overview-card--hero,
    .conversation-item__top {
        flex-direction: column;
        align-items: flex-start;
    }

    .metric-grid,
    .overview-grid,
    .detail-grid,
    .form-grid,
    .chart-bars,
    .crm-record-form__grid,
    .ai-summary-card__grid,
    .chat-shell__crm-form {
        grid-template-columns: 1fr;
    }

    .chart-bars__columns {
        min-height: 120px;
    }

    .message-bubble {
        max-width: 100%;
    }

    .inbox-drawer__panel {
        width: min(100vw - 16px, 100%);
        height: calc(100vh - 16px);
        margin: 8px;
        padding: 18px;
        border-radius: 24px;
    }
}

@media (max-width: 640px) {
    .auth-screen,
    .minimal-screen,
    .app-frame,
    .app-sidebar {
        padding: 18px;
    }

    .banner-card,
    .chart-card,
    .status-card,
    .table-panel,
    .form-panel,
    .conversation-panel,
    .chat-shell,
    .auth-showcase,
    .auth-panel,
    .card--narrow,
    .sidebar-card,
    .overview-card,
    .metric-tile {
        padding: 20px;
        border-radius: 22px;
    }

    .top-pill,
    .user-chip,
    .search-field {
        width: 100%;
    }

    .app-header__actions {
        width: 100%;
    }

    .inbox-drawer__panel {
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 18px;
        border-radius: 0;
    }
}
