:root {
    --bg: #eef3ff;
    --ink: #172554;
    --muted: #5f6d87;
    --paper: #ffffff;
    --line: rgba(43, 56, 82, 0.12);
    --accent: #635bff;
    --accent-2: #0f1728;
    --shadow: 0 22px 54px rgba(57, 79, 130, 0.12);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(99, 91, 255, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(108, 153, 255, 0.12), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
    min-height: 100vh;
}

h1, h2, h3, .brand strong {
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.04em;
    font-weight: 800;
}

a { color: inherit; text-decoration: none; }
main { padding: 0 24px 48px; }
label { display: grid; gap: 8px; font-size: 0.95rem; color: var(--muted); }
input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    font: inherit;
    color: var(--ink);
}
textarea { resize: vertical; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.site-header, .hero, .section-grid, .page-head, .card-grid, .admin-grid, .crm-hero, .public-shell, .auth-shell, .flash-stack {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark,
.graphic-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
}

.brand-mark {
    flex: 0 0 52px;
}

.brand-mark img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
}

.graphic-mark {
    border-radius: 18px;
    background: linear-gradient(135deg, #635bff, #4f8cff);
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.brand small, .subtle { color: var(--muted); display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--accent); }

.flash-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.flash {
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    padding: 38px 0 34px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 700;
}

.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); line-height: 0.92; margin: 0 0 18px; }
.hero-text { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
}

.button-primary { background: var(--ink); color: #fff; }
.button-secondary { background: var(--accent); color: #fff; }
.button-ghost { background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); color: var(--ink); }
.button-danger { background: #7b261a; color: #fff; }
.button-inline { min-width: 0; padding: 10px 16px; }
.loading-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.button-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 999px;
    display: none;
    flex: 0 0 auto;
    animation: snapcrm-spin 0.8s linear infinite;
}
.loading-form.is-submitting .loading-submit-button {
    opacity: 0.92;
    cursor: wait;
}
.loading-form.is-submitting .loading-submit-button .button-spinner {
    display: inline-block;
}
.loading-form.is-submitting .loading-submit-button .button-label {
    white-space: nowrap;
}
@keyframes snapcrm-spin {
    to {
        transform: rotate(360deg);
    }
}
.button:disabled { opacity: 0.55; cursor: not-allowed; }

.hero-panel, .panel {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(43, 56, 82, 0.08);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-panel { min-height: 420px; overflow: hidden; padding: 28px; }
.hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
}
.hero-orb-a { width: 220px; height: 220px; background: rgba(99, 91, 255, 0.18); top: -20px; right: -40px; }
.hero-orb-b { width: 180px; height: 180px; background: rgba(79, 140, 255, 0.16); bottom: 10px; left: -40px; }
.demo-card { position: relative; z-index: 1; }
.feature-list { padding-left: 18px; color: var(--muted); line-height: 1.7; }

.stat-row, .section-grid, .card-grid, .admin-grid, .crm-summary-grid {
    display: grid;
    gap: 18px;
}

.stat-row { grid-template-columns: repeat(3, 1fr); margin-top: 26px; }
.stat-card, .crm-card { padding: 18px; }
.stat-card strong { display: block; font-size: 2rem; }
.section-grid { grid-template-columns: repeat(3, 1fr); padding-bottom: 28px; }
.panel { padding: 24px; }

.hero-public .hero-copy,
.section-grid-public .panel,
.hero-public .stat-card,
.hero-public .demo-card {
    color: var(--ink);
}

.hero-public .stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
    border: 1px solid rgba(99, 91, 255, 0.10);
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(57, 79, 130, 0.10);
}

.hero-public .demo-card {
    padding: 10px 2px 0;
}

.section-grid-public .panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 249, 255, 0.96) 100%);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    padding: 20px 0;
}

.card-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.crm-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.status-pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(21, 97, 109, 0.14);
    color: var(--accent-2);
    text-transform: capitalize;
}
.status-pill.paused { background: rgba(163, 123, 34, 0.15); color: #7a590f; }
.empty-card { text-align: center; }

.auth-shell { padding: 50px 0; }
.form-card { width: min(560px, 100%); margin: 0 auto; }
.form-grid, .compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.form-span { grid-column: 1 / -1; }
.checkline { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.checkline input { width: auto; }

.crm-hero { padding: 16px 0 26px; }
.crm-brand-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    margin-bottom: 18px;
    border-radius: 28px;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.crm-brand-card .graphic-mark { background: linear-gradient(135deg, var(--accent), #f3c46d); }
.crm-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }

.tab-shell {
    padding-top: 18px;
}

.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tab-toolbar .tab-bar {
    margin-bottom: 0;
}

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

.refresh-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.refresh-button {
    min-height: 40px;
}

.tab-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.74);
    color: var(--muted);
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tab-button.is-active {
    background: var(--ink);
    color: #fff;
    border-color: transparent;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.table-wrap { overflow-x: auto; }
.dense-table { font-size: 0.9rem; }
.dense-table textarea {
    min-width: 220px;
    padding: 10px 12px;
    border-radius: 12px;
}
.closeout-form {
    display: grid;
    gap: 8px;
}
.closeout-form .button {
    width: 100%;
}

.dataTables_wrapper {
    padding-top: 8px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin: 10px 0;
    color: var(--muted);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 999px !important;
    border: 1px solid var(--line) !important;
    background: rgba(255, 255, 255, 0.78) !important;
    margin-left: 4px;
}

.public-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    min-height: 100vh;
    align-items: center;
    padding: 28px 0;
}
.public-brand { padding: 20px 0; }
.public-brand h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin: 0 0 8px; }
.public-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); margin-top: 18px; }
.public-chat-entry {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}
.chat-auth-shell {
    align-items: start;
    padding-top: 56px;
}
.chat-shell {
    display: block;
    padding-top: 42px;
}
.chat-page-stack {
    display: grid;
    gap: 22px;
    width: min(980px, 100%);
    margin: 0 auto;
}
.chat-company-panel {
    padding: 24px 28px;
}
.chat-company-panel .public-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0;
}
.chat-company-panel .public-brand h1 {
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    line-height: 0.94;
    margin: 0;
    overflow-wrap: anywhere;
}
.chat-workspace {
    width: 100%;
    height: calc(100vh - 230px);
    min-height: 620px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-workspace-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.chat-workspace-actions {
    margin-top: 0;
    justify-content: flex-end;
}
.chat-order-panel {
    padding: 22px 24px;
}
.chat-order-list {
    display: grid;
    gap: 14px;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 4px;
}
.chat-order-card {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(99, 91, 255, 0.10);
    background: rgba(255, 255, 255, 0.72);
}
.chat-order-card h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}
.chat-order-card p {
    margin: 6px 0;
}
.chat-order-card-empty {
    color: var(--muted);
}
.chat-message-list {
    display: grid;
    gap: 14px;
    flex: 1 1 auto;
    min-height: 220px;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 18px;
}
.chat-bubble {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(99, 91, 255, 0.10);
}
.chat-bubble strong {
    display: block;
    margin-bottom: 6px;
}
.chat-bubble p {
    margin: 0;
    white-space: pre-wrap;
}
.chat-bubble-user {
    background: #eef3ff;
}
.chat-bubble-assistant {
    background: #ffffff;
}
.chat-orders-ledger {
    font-size: 0.92rem;
}
.chat-orders-ledger td,
.chat-orders-ledger th {
    min-width: 120px;
}
.chat-orders-ledger td:last-child,
.chat-orders-ledger th:last-child {
    min-width: 280px;
}
.chat-orders-ledger td {
    white-space: pre-wrap;
}
.chat-compose {
    display: grid;
    gap: 14px;
    flex: 0 0 auto;
}
.chat-compose textarea {
    min-height: 110px;
    max-height: 140px;
}
.chat-workspace .tab-toolbar {
    flex: 0 0 auto;
}
.chat-workspace .tab-panel.is-active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.chat-workspace .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
.admin-override-banner {
    margin-bottom: 18px;
}
.email-log-body {
    margin: 0;
    max-width: 520px;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.4;
}
.orders-detail-table .order-expand-button {
    min-width: 64px;
    padding: 8px 12px;
}
.order-detail-card {
    display: grid;
    gap: 8px;
    padding: 12px 16px;
    background: #f8faff;
    border: 1px solid rgba(99, 91, 255, 0.10);
    border-radius: 14px;
}
.order-detail-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}
.order-delete-form {
    margin: 0;
}
.order-modal-trigger {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 999px;
    font-size: 1.5rem;
    line-height: 1;
}
.modal-open {
    overflow: hidden;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 40, 0.45);
    z-index: 1000;
}
.modal-overlay.is-hidden {
    display: none;
}
.modal-form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    align-items: center;
}
.modal-card {
    width: min(780px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(43, 56, 82, 0.12);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(15, 23, 40, 0.25);
}
.modal-head {
    margin-bottom: 20px;
}
.modal-close-button {
    min-width: 92px;
}
.contact-profile-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}
.inline-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    margin: 0 0 16px;
    font-size: 0.92rem;
    font-weight: 600;
}
.inline-status-success {
    background: rgba(78, 122, 255, 0.12);
    color: var(--accent-strong);
}
.inline-status-warning {
    background: rgba(194, 120, 24, 0.14);
    color: #8a5a15;
}
.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
}
.chat-contact-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(248, 251, 255, 0.9);
}
.chat-contact-card p {
    margin: 0 0 8px;
}
.chat-contact-card p:last-child {
    margin-bottom: 0;
}
.danger-zone {
    margin-top: 22px;
    border: 1px solid rgba(123, 38, 26, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 246, 244, 0.98) 100%);
}
.danger-zone h3 {
    margin-bottom: 8px;
}

@media (max-width: 900px) {
    .hero, .public-shell, .section-grid, .admin-grid, .crm-summary-grid, .stat-row {
        grid-template-columns: 1fr;
    }
    .page-head, .site-header { align-items: start; flex-direction: column; }
    .form-grid, .compact-grid { grid-template-columns: 1fr; }
    .tab-toolbar { align-items: flex-start; flex-direction: column; }
    .chat-company-panel {
        padding: 20px 22px;
    }
    .chat-company-panel .public-brand {
        align-items: flex-start;
        flex-direction: column;
    }
    .chat-workspace-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .chat-workspace-actions {
        justify-content: flex-start;
    }
    .chat-workspace {
        height: auto;
        min-height: 0;
    }
    .chat-compose textarea {
        min-height: 96px;
        max-height: 132px;
    }
}

.app-shell-body {
    background: #f6f8fc;
}

.app-shell-body .graphic-mark {
    background: linear-gradient(135deg, #635bff, #2d7ff9);
    box-shadow: 0 12px 28px rgba(45, 72, 179, 0.16);
}

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

.app-sidebar {
    background: #ffffff;
    border-right: 1px solid rgba(31, 24, 19, 0.08);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 16px;
}

.app-brand small {
    display: block;
    color: #72809a;
}

.sidebar-section {
    display: grid;
    gap: 6px;
}

.sidebar-stretch {
    margin-top: auto;
}

.sidebar-label {
    margin: 0 0 4px;
    padding: 0 10px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #7a879e;
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    color: #5f6d87;
    font-weight: 600;
}

.sidebar-link:hover {
    background: rgba(99, 91, 255, 0.05);
    color: #2b3852;
}

.sidebar-link.is-active {
    background: rgba(99, 91, 255, 0.10);
    color: #635bff;
}

.sidebar-subnav {
    display: grid;
    gap: 6px;
    margin-top: 6px;
    padding-left: 10px;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    color: #2b3852;
    font-size: 0.94rem;
    line-height: 1.35;
}

.sidebar-sublink:hover {
    background: rgba(99, 91, 255, 0.05);
    color: #635bff;
}

.sidebar-sublink.is-active {
    background: rgba(99, 91, 255, 0.10);
    color: #635bff;
    font-weight: 700;
}

.app-main-shell {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    border-bottom: 1px solid rgba(31, 24, 19, 0.08);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
}

.app-topbar-search {
    min-height: 44px;
    min-width: 280px;
    max-width: 380px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(31, 24, 19, 0.08);
    background: #f3f6fb;
    color: #7a879e;
}

.app-topbar-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(31, 24, 19, 0.08);
    background: #ffffff;
    color: #667489;
    font-size: 0.92rem;
}

.app-main {
    padding: 28px;
}

.app-main .page-head,
.app-main .card-grid,
.app-main .admin-grid,
.app-main .crm-hero,
.app-main .flash-stack {
    width: auto;
    margin: 0;
}

.app-main .page-head {
    padding-top: 0;
}

.admin-overview-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

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

.admin-nav-tile {
    display: grid;
    gap: 8px;
    padding: 20px 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    border: 1px solid rgba(99, 91, 255, 0.10);
    box-shadow: 0 20px 42px rgba(57, 79, 130, 0.08);
    color: #2b3852;
    text-decoration: none;
}

.admin-nav-tile strong {
    font-size: 2rem;
    line-height: 1;
    color: #172554;
}

.admin-nav-tile span:last-child {
    color: #5f6d87;
}

.admin-nav-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(57, 79, 130, 0.12);
}

.admin-workspace-panel {
    width: auto;
    margin: 0;
}

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

.dashboard-inner-panel,
.dashboard-crm-grid .panel {
    box-shadow: none;
}

.crm-card-layout {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(280px, 1fr);
    gap: 24px;
    align-items: stretch;
}

.crm-card-main {
    min-width: 0;
}

.crm-share-card {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(99, 91, 255, 0.10);
    background: linear-gradient(180deg, #fbfcff 0%, #f3f7ff 100%);
}

.crm-share-card h4 {
    margin: 0;
}

.crm-share-card p:last-of-type {
    margin: 0;
    color: #5f6d87;
}

.crm-share-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.crm-share-input {
    min-width: 0;
    background: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
}

.copy-link-button {
    white-space: nowrap;
}

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

.panel-head h2 {
    margin-bottom: 0;
}

.admin-grid > .panel[id],
.panel[id] {
    scroll-margin-top: 88px;
}

.app-main .panel,
.app-main .hero-panel {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(31, 24, 19, 0.07);
    border-radius: 18px;
    box-shadow: 0 20px 44px rgba(38, 56, 88, 0.08);
}

.app-main .crm-brand-card {
    border-radius: 18px;
    background: linear-gradient(180deg, #eef6ff 0%, #f9fbff 100%);
}

.app-main .button-secondary {
    background: #635bff;
}

.app-main .button-primary {
    background: #0f1728;
}

.app-main .tab-bar {
    border-bottom: 1px solid rgba(31, 24, 19, 0.08);
    padding-bottom: 8px;
}

.app-main .tab-button {
    background: transparent;
    border: 1px solid transparent;
    color: #6f7d96;
}

.app-main .tab-button.is-active {
    background: rgba(99, 91, 255, 0.10);
    border-color: rgba(99, 91, 255, 0.18);
    color: #635bff;
}

.app-main .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.app-main .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: rgba(99, 91, 255, 0.10) !important;
    color: #635bff !important;
    border-color: rgba(99, 91, 255, 0.18) !important;
}

.app-flash-stack {
    width: auto;
    margin: 16px 28px 0;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(31, 24, 19, 0.08);
    }

    .app-topbar {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .app-topbar-search {
        min-width: 0;
        max-width: none;
    }

    .app-main {
        padding: 18px;
    }

    .app-flash-stack {
        margin: 16px 18px 0;
    }

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

    .dashboard-overview-tiles,
    .dashboard-focus-grid {
        grid-template-columns: 1fr;
    }

    .crm-card-layout,
    .crm-share-actions {
        grid-template-columns: 1fr;
    }

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