﻿:root {
    color-scheme: light;
    --navy: #101b32;
    --navy-light: #1b2b49;
    --gold: #d6ad60;
    --gold-light: #f6ecd7;
    --ink: #172033;
    --muted: #748096;
    --line: #e6eaf0;
    --surface: #ffffff;
    --page: #f5f7fb;
    --green: #168568;
    --red: #b54747;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-size: 14px;
    line-height: 1.5;
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

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

button:focus-visible,
a:focus-visible {
    outline: 3px solid #e7c47d;
    outline-offset: 3px;
}

.crm-shell {
    min-height: 100vh;
}

.crm-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 258px;
    padding: 28px 18px 20px;
    color: #e9edf5;
    background: var(--navy);
    overflow-y: auto;
}

.crm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 34px;
}

.crm-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--navy);
    background: var(--gold);
    border-radius: 12px;
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 700;
}

.crm-brand strong,
.crm-brand small {
    display: block;
    letter-spacing: 1.6px;
}

.crm-brand strong {
    font-size: 16px;
}

.crm-brand small {
    margin-top: 2px;
    color: #aeb9cc;
    font-size: 9px;
}

.sidebar-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 10px 10px;
    color: #93a0b6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.sidebar-section-label span {
    padding: 2px 7px;
    color: var(--gold);
    background: #29364c;
    border-radius: 8px;
    letter-spacing: 0;
}

.product-heading {
    margin-top: 30px;
}

.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #c6cede;
    background: transparent;
    text-align: left;
}

.nav-item:hover {
    background: #1a2943;
    color: white;
}

.nav-item.active {
    color: #fff;
    background: #263650;
    border-color: #394963;
    box-shadow: inset 3px 0 var(--gold);
}

.nav-icon {
    width: 22px;
    color: var(--gold);
    text-align: center;
    font-size: 18px;
}

.product-nav-button {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin: 3px 0;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #c6cede;
    background: transparent;
    text-align: left;
}

.product-nav-button:hover {
    color: white;
    background: #1a2943;
}

.product-nav-button.active {
    color: white;
    background: #263650;
    border-color: #394963;
}

.product-nav-mark {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    color: var(--gold);
    background: #344157;
    font-weight: 700;
}

.product-nav-copy {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.product-nav-copy strong,
.product-nav-copy small {
    display: block;
}

.product-nav-copy strong {
    font-size: 12px;
    font-weight: 600;
}

.product-nav-copy small {
    color: #9daac0;
    font-size: 10px;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 28px 8px 0;
}

.secure-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #aab6ca;
    font-size: 11px;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #45c39a;
}

.sidebar-bottom > a {
    display: block;
    color: #bdc7d7;
    font-size: 11px;
}

.sidebar-bottom > a:hover {
    color: var(--gold);
}

.crm-main {
    min-width: 0;
    min-height: 100vh;
    margin-left: 258px;
    padding: 0 34px;
}

.crm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 142px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 7px;
    color: #9b7a3d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.crm-topbar h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 31px);
    font-weight: 700;
    letter-spacing: -0.8px;
}

.crm-topbar > div:first-child > p:last-child {
    margin: 7px 0 0;
    color: var(--muted);
}

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

.access-label,
.live-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #53647c;
    font-size: 11px;
    white-space: nowrap;
}

.button {
    min-height: 39px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 600;
}

.button-secondary {
    color: #344158;
    background: white;
}

.button-secondary:hover {
    border-color: var(--gold);
    background: #fffdf8;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 30px 0 18px;
}

.section-heading h2,
.panel-heading h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.section-heading p,
.panel-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

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

.metric-card {
    position: relative;
    min-width: 0;
    padding: 21px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 3px 12px rgb(20 35 60 / 3%);
}

.metric-card::before {
    position: absolute;
    top: 0;
    left: 20px;
    width: 34px;
    height: 3px;
    background: var(--gold);
    content: "";
}

.metric-label,
.metric-card small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.metric-value {
    display: block;
    margin: 12px 0 7px;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 750;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 3px 12px rgb(20 35 60 / 3%);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.data-list {
    display: grid;
    gap: 0;
}

.data-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #eff1f5;
}

.data-row:last-child {
    border-bottom: 0;
}

.data-row-label {
    color: #526078;
    overflow-wrap: anywhere;
    text-transform: capitalize;
}

.data-row-value {
    color: var(--ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.payment-panel {
    margin-top: 20px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

th {
    padding: 12px 14px;
    color: #738096;
    background: #f8f9fc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

td {
    padding: 14px;
    border-bottom: 1px solid #edf0f4;
    color: #39465d;
    font-size: 12px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

td:last-child {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.product-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 30px;
}

.product-symbol {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border-radius: 13px;
    color: var(--navy);
    background: var(--gold-light);
    font-size: 25px;
    font-weight: 800;
}

.product-summary-copy {
    flex: 1;
    min-width: 0;
}

.product-summary-copy h2 {
    margin: 0;
    font-size: 21px;
}

.product-summary-copy > p:last-child {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.product-status {
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 20px;
    color: var(--green);
    background: #e6f7f0;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.product-metrics {
    margin-top: 20px;
}

.workspace-note {
    margin: 18px 2px;
    color: var(--muted);
    font-size: 11px;
}

.crm-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    color: #8590a2;
    font-size: 10px;
}

.muted {
    color: var(--muted);
}

.sidebar-message {
    padding: 0 10px;
    font-size: 11px;
}

.notice {
    margin-top: 20px;
    padding: 13px 16px;
    border: 1px solid #efc8c8;
    border-radius: 9px;
    color: var(--red);
    background: #fff4f4;
    font-size: 12px;
}

.hidden {
    display: none !important;
}

@media (max-width: 1150px) {
    .crm-sidebar {
        width: 225px;
    }

    .crm-main {
        margin-left: 225px;
        padding: 0 24px;
    }

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

    .crm-topbar {
        align-items: flex-start;
    }
}

@media (max-width: 760px) {
    .crm-sidebar {
        position: static;
        width: 100%;
        max-height: none;
        padding: 18px;
    }

    .crm-brand {
        padding-bottom: 12px;
    }

    .sidebar-bottom {
        padding-top: 18px;
    }

    .crm-main {
        margin-left: 0;
        padding: 0 16px;
    }

    .crm-topbar {
        flex-direction: column;
        min-height: auto;
        padding: 24px 0;
    }

    .topbar-actions {
        justify-content: flex-start;
    }

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

    .metric-grid {
        gap: 10px;
    }

    .metric-card {
        padding: 17px 14px;
    }

    .metric-card::before {
        left: 14px;
    }

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

    .product-summary {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 17px;
    }

    .product-summary-copy {
        flex-basis: calc(100% - 80px);
    }

    .product-status {
        margin-left: 76px;
    }

    .panel {
        padding: 17px;
    }
}

@media (max-width: 400px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }
}

/* Customer directory search and filters */
.customer-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(145px, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin: 18px 0;
}

.customer-filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.customer-filter-field label {
    color: var(--muted, #64748b);
    font-size: 0.78rem;
    font-weight: 600;
}

.customer-filter-field input,
.customer-filter-field select {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 9px;
    background: var(--surface, #fff);
    color: inherit;
    font: inherit;
}

.customer-filter-field input:focus,
.customer-filter-field select:focus {
    outline: 2px solid var(--accent, #c9a45c);
    outline-offset: 1px;
}

.customer-filter-actions {
    display: flex;
    align-items: end;
}

@media (max-width: 1050px) {
    .customer-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .customer-filter-grid {
        grid-template-columns: 1fr;
    }

    .customer-search-field {
        grid-column: auto;
    }
}

/* LOGOS PREMIUM CRM DESIGN V1 */
body:has(.crm-shell) {
    color-scheme: dark;
    --navy: #101b32;
    --navy-light: #1b2b49;
    --gold: #d8b56a;
    --gold-light: #f0d99b;
    --ink: #edf2fb;
    --muted: #aab6ca;
    --line: rgba(216, 181, 106, 0.20);
    --surface: rgba(22, 35, 58, 0.94);
    --page: #0a1223;
    --green: #54d6a5;
    --red: #ff9292;
    background:
        radial-gradient(ellipse at 85% 0%, rgba(43, 67, 105, 0.30), transparent 42%),
        linear-gradient(145deg, #0a1223 0%, #101b32 55%, #0b1426 100%);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body:has(.crm-shell) .crm-sidebar {
    background: linear-gradient(180deg, #101b32 0%, #0a1223 100%);
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.12);
}

body:has(.crm-shell) .crm-brand-mark {
    color: #101b32;
    background: linear-gradient(135deg, #f0d99b, #c99c4b);
    box-shadow: 0 5px 18px rgba(216, 181, 106, 0.18);
}

body:has(.crm-shell) .crm-brand strong {
    letter-spacing: 2px;
}

body:has(.crm-shell) .nav-item,
body:has(.crm-shell) .product-nav-button {
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

body:has(.crm-shell) .nav-item:hover,
body:has(.crm-shell) .product-nav-button:hover {
    background: rgba(216, 181, 106, 0.09);
    border-color: rgba(216, 181, 106, 0.16);
}

body:has(.crm-shell) .nav-item.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(216, 181, 106, 0.17), rgba(38, 54, 80, 0.85));
    border-color: rgba(216, 181, 106, 0.30);
    box-shadow: inset 3px 0 #d8b56a;
}

body:has(.crm-shell) .crm-main {
    min-width: 0;
}

body:has(.crm-shell) .crm-topbar {
    border-bottom: 1px solid rgba(216, 181, 106, 0.15);
}

body:has(.crm-shell) .crm-topbar h1,
body:has(.crm-shell) .section-heading h2,
body:has(.crm-shell) .panel h2,
body:has(.crm-shell) .panel h3 {
    color: #f4f6fb;
    letter-spacing: -0.025em;
}

body:has(.crm-shell) .crm-topbar p,
body:has(.crm-shell) .section-heading p,
body:has(.crm-shell) .panel p {
    color: var(--muted);
}

body:has(.crm-shell) .eyebrow {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 1.7px;
}

body:has(.crm-shell) .access-label,
body:has(.crm-shell) .live-label {
    color: #d8e1ef;
    background: rgba(22, 35, 58, 0.78);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
}

body:has(.crm-shell) .panel,
body:has(.crm-shell) .metric-card,
body:has(.crm-shell) .product-summary {
    color: var(--ink);
    background: linear-gradient(145deg, rgba(25, 40, 65, 0.97), rgba(16, 27, 50, 0.97));
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15);
}

body:has(.crm-shell) .metric-card {
    position: relative;
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body:has(.crm-shell) .metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 181, 106, 0.42);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

body:has(.crm-shell) .metric-card::before {
    background: linear-gradient(90deg, #d8b56a, #f0d99b);
    height: 3px;
    border-radius: 3px;
}

body:has(.crm-shell) .metric-card h3,
body:has(.crm-shell) .metric-card .metric-label {
    color: #aab6ca;
}

body:has(.crm-shell) .metric-card strong,
body:has(.crm-shell) .metric-value {
    color: #f6ecd7;
}

body:has(.crm-shell) .panel-heading {
    border-bottom-color: var(--line);
}

body:has(.crm-shell) table {
    color: var(--ink);
    border-collapse: separate;
    border-spacing: 0;
}

body:has(.crm-shell) th {
    color: #d8b56a;
    background: rgba(10, 18, 35, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

body:has(.crm-shell) th,
body:has(.crm-shell) td {
    border-bottom: 1px solid rgba(216, 181, 106, 0.12);
}

body:has(.crm-shell) td {
    color: #e1e8f3;
}

body:has(.crm-shell) tbody tr:hover {
    background: rgba(216, 181, 106, 0.055);
}

body:has(.crm-shell) .customer-filter-field label {
    color: #c2ccdc;
}

body:has(.crm-shell) .customer-filter-field input,
body:has(.crm-shell) .customer-filter-field select {
    color: #edf2fb;
    background: #0d182c;
    border-color: rgba(216, 181, 106, 0.24);
    border-radius: 10px;
}

body:has(.crm-shell) .customer-filter-field input::placeholder {
    color: #8d9bb2;
}

body:has(.crm-shell) .customer-filter-field select option {
    color: #edf2fb;
    background: #101b32;
}

body:has(.crm-shell) .button {
    border-radius: 10px;
    font-weight: 650;
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

body:has(.crm-shell) .button:hover {
    transform: translateY(-1px);
}

body:has(.crm-shell) .button-secondary {
    color: #f0d99b;
    background: rgba(216, 181, 106, 0.08);
    border: 1px solid rgba(216, 181, 106, 0.35);
}

body:has(.crm-shell) .button-secondary:hover {
    background: rgba(216, 181, 106, 0.15);
}

body:has(.crm-shell) .notice {
    color: #ffc4c4;
    background: rgba(126, 38, 48, 0.20);
    border-color: rgba(255, 146, 146, 0.35);
}

body:has(.crm-shell) .crm-footer {
    color: #9eabc0;
    border-top: 1px solid var(--line);
}

body:has(.crm-shell) .hidden {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body:has(.crm-shell) *,
    body:has(.crm-shell) *::before,
    body:has(.crm-shell) *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
/* END LOGOS PREMIUM CRM DESIGN V1 */

