:root {
    --navy: #071A33;
    --blue: #0B5CAB;
    --sf-blue: #0176D3;
    --light-blue: #EAF4FF;
    --bg: #F4F6F9;
    --card: #FFFFFF;
    --border: #D8DDE6;
    --text: #172033;
    --muted: #5F6B7A;
    --green: #15803D;
    --green-bg: #ECFDF3;
    --red: #DC2626;
    --red-bg: #FEF2F2;
    --orange: #EA580C;
    --orange-bg: #FFF7ED;
    --purple: #7C3AED;
    --purple-bg: #F5F3FF;
    --gold: #B7791F;
    --gold-bg: #FFFBEB;
    --shadow: 0 8px 28px rgba(15, 23, 42, .08);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Uniform Pro Ivoclar Lgt", "Salesforce Sans", "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 72px;
}

a {
    color: var(--sf-blue);
    text-decoration: none;
}

.workspace-header {
    min-height: 96px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
    border-bottom: 1px solid var(--border);
    padding: 14px 22px;
    display: grid;
    grid-template-columns: 1.3fr .8fr 1fr;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 20;
}

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

.sf-cloud {
    width: 96px;
    height: 58px;
    background: #00A1E0;
    color: white;
    border-radius: 50px;
    display: grid;
    place-items: center;
    font-size: 16px;
    letter-spacing: -.5px;
    box-shadow: inset 0 -8px 16px rgba(0,0,0,.08);
}

.brand-area h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.05;
    color: #101A39;
}

.brand-area p {
    margin: 6px 0 0;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .08em;
    color: #101A39;
}

.rep-area {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: center;
}

.avatar {
    width: 56px;
    height: 56px;
    border: 2px solid #1D4ED8;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #1D4ED8;
    font-size: 22px;
    background: white;
}

.rep-area strong,
.rep-area span,
.rep-area small {
    display: block;
}

.rep-area strong {
    color: #064DCC;
    font-size: 15px;
}

.rep-area span {
    font-weight: 700;
    margin-top: 2px;
}

.rep-area small {
    color: var(--muted);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.header-actions label {
    display: grid;
    gap: 4px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.header-actions input {
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 10px;
    background: white;
}

.outline-button,
.icon-button {
    height: 36px;
    border: 1px solid #2F6BFF;
    background: white;
    color: #174CFF;
    border-radius: 8px;
    padding: 0 14px;
    font-weight: 800;
    cursor: pointer;
}

.icon-button {
    width: 38px;
    padding: 0;
    color: #30445F;
    border-color: var(--border);
}

.workspace {
    max-width: 1500px;
    margin: 0 auto;
    padding: 18px;
}

.kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.kpi-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
}

.kpi-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.kpi-card strong {
    display: block;
    margin-top: 4px;
    font-size: 26px;
    color: #101A39;
}

.three-column-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.board-column {
    min-width: 0;
}

.column-title {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.column-title h2 {
    margin: 0;
    font-size: 19px;
    color: #101A39;
}

.column-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.dashboard-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-panel.theme-hot {
    border-color: rgba(220, 38, 38, .28);
}

.dashboard-panel.theme-targeting {
    border-color: rgba(234, 88, 12, .30);
}

.dashboard-panel.theme-retention {
    border-color: rgba(37, 99, 235, .24);
}

.dashboard-panel.theme-progress {
    border-color: rgba(21, 128, 61, .28);
}

.dashboard-panel.theme-opportunity {
    border-color: rgba(183, 121, 31, .34);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #FCFDFF;
}

.theme-hot .panel-header {
    background: var(--red-bg);
}

.theme-targeting .panel-header {
    background: var(--orange-bg);
}

.theme-retention .panel-header {
    background: var(--light-blue);
}

.theme-progress .panel-header {
    background: var(--green-bg);
}

.theme-opportunity .panel-header {
    background: var(--gold-bg);
}

.panel-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

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

.panel-header a {
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.mini-table {
    display: grid;
}

.mini-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr 18px;
    gap: 8px;
    align-items: center;
    min-height: 50px;
    padding: 10px 12px;
    border-bottom: 1px solid #EEF1F6;
}

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

.mini-main {
    min-width: 0;
}

.mini-account {
    display: block;
    font-weight: 900;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-main span,
.mini-meta span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-meta {
    min-width: 0;
    text-align: right;
}

.chevron {
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
}

.overdue-row {
    background: linear-gradient(90deg, rgba(254,242,242,.96), rgba(255,255,255,.94));
}

.danger-text {
    color: var(--red) !important;
    font-weight: 900;
}

.priority-pill,
.stage-pill,
.time-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 900;
    background: #EEF2FF;
    color: #1D4ED8;
}

.stage-pill {
    background: #EFF6FF;
    color: #075985;
}

.time-pill {
    background: #ECFDF3;
    color: var(--green);
}

.time-danger {
    background: var(--red-bg);
    color: var(--red);
}

.work-list {
    padding: 12px;
    display: grid;
    gap: 10px;
}

.work-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    padding: 12px;
}

.work-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.work-top strong,
.work-top span {
    display: block;
}

.work-top strong {
    font-size: 14px;
}

.work-top span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.work-card p {
    margin: 10px 0;
    font-size: 13px;
    font-weight: 800;
}

.work-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.work-meta span {
    background: #F8FAFC;
    color: var(--muted);
    font-size: 12px;
    border-radius: 999px;
    padding: 4px 8px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn {
    border: 1px solid transparent;
    border-radius: 8px;
    background: white;
    min-height: 30px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.btn-green {
    color: var(--green);
    border-color: rgba(21,128,61,.35);
    background: var(--green-bg);
}

.btn-blue {
    color: #1D4ED8;
    border-color: rgba(29,78,216,.30);
    background: #EEF2FF;
}

.btn-light {
    color: #1D4ED8;
    border-color: rgba(29,78,216,.28);
    background: white;
}

.btn-red {
    color: var(--red);
    border-color: rgba(220,38,38,.35);
    background: white;
}

.pipeline-summary {
    padding: 12px;
    display: grid;
    gap: 8px;
}

.pipeline-summary div {
    display: grid;
    grid-template-columns: 1fr 32px auto;
    gap: 8px;
    align-items: center;
    border: 1px solid #F0E2B8;
    border-radius: 12px;
    padding: 10px;
    background: white;
}

.pipeline-summary span {
    font-weight: 900;
    font-size: 13px;
}

.pipeline-summary strong {
    color: var(--gold);
    text-align: center;
}

.pipeline-summary small {
    color: var(--muted);
    text-align: right;
}

.detail-header {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin-bottom: 14px;
}

.back-link {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 900;
}

.detail-header h2 {
    margin: 0;
    font-size: 24px;
}

.detail-header p {
    margin: 5px 0 0;
    color: var(--muted);
}

.data-table-wrap {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: auto;
}

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

.data-table th {
    background: linear-gradient(180deg, #073B79, #052B5F);
    color: white;
    text-align: left;
    padding: 14px 12px;
    font-size: 12px;
    border-right: 1px solid rgba(255,255,255,.28);
}

.data-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #E9EDF4;
    font-size: 13px;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.account-link {
    font-weight: 900;
}

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

.empty-state {
    color: var(--muted);
    padding: 16px;
    text-align: center;
    font-weight: 800;
}

.mobile-top-nav,
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1100px) {
    .workspace-header {
        grid-template-columns: 1fr;
        position: relative;
    }

    .rep-area {
        justify-self: start;
    }

    .header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .three-column-board {
        grid-template-columns: 1fr;
    }

    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    body {
        padding-bottom: 76px;
    }

    .workspace-header {
        padding: 12px;
        gap: 12px;
    }

    .brand-area {
        gap: 10px;
    }

    .sf-cloud {
        width: 64px;
        height: 40px;
        font-size: 12px;
    }

    .brand-area h1 {
        font-size: 20px;
    }

    .brand-area p {
        font-size: 11px;
    }

    .rep-area {
        background: white;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 10px;
        width: 100%;
    }

    .avatar {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .header-actions {
        display: none;
    }

    .mobile-top-nav {
        display: flex;
        gap: 8px;
        padding: 10px 12px;
        overflow-x: auto;
        background: white;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 19;
    }

    .mobile-top-nav a {
        flex: 0 0 auto;
        background: #F1F5F9;
        color: #334155;
        border-radius: 999px;
        padding: 8px 12px;
        font-size: 12px;
        font-weight: 900;
    }

    .mobile-top-nav a.active {
        background: #DBEAFE;
        color: #1D4ED8;
    }

    .workspace {
        padding: 12px;
    }

    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .kpi-card {
        padding: 12px;
    }

    .kpi-card strong {
        font-size: 22px;
    }

    .column-title {
        margin-top: 10px;
    }

    .column-title h2 {
        font-size: 17px;
    }

    .panel-header {
        padding: 11px 12px;
    }

    .mini-row {
        grid-template-columns: 1.15fr .95fr 14px;
        padding: 9px 10px;
    }

    .work-list {
        padding: 10px;
    }

    .data-table-wrap {
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .data-table {
        min-width: 0;
        display: block;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: white;
        border: 1px solid var(--border);
        border-radius: 14px;
        margin-bottom: 10px;
        padding: 8px;
        box-shadow: var(--shadow);
    }

    .data-table td {
        border: 0;
        padding: 7px 8px;
    }

    .data-table td:first-child {
        font-size: 16px;
    }

    .row-actions {
        margin-top: 6px;
    }

    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: white;
        border-top: 1px solid var(--border);
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        z-index: 50;
    }

    .mobile-bottom-nav a {
        display: grid;
        place-items: center;
        gap: 2px;
        color: #64748B;
        font-size: 18px;
        font-weight: 900;
        padding: 7px 0;
    }

    .mobile-bottom-nav a span {
        font-size: 10px;
    }

    .mobile-bottom-nav a.active {
        color: var(--sf-blue);
    }
}
