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

:root {
    --bg: #f4f3ee;
    --surface: #ffffff;
    --surface-soft: #f8f7f2;
    --surface-deep: #edeae2;
    --ink: #1d241f;
    --muted: #737a74;
    --line: #e5e3dc;
    --accent: #496b55;
    --accent-deep: #2f4b39;
    --accent-soft: #e7efe9;
    --gold: #a98252;
    --danger: #a94f45;
    --warning: #a76d2c;
    --shadow-sm: 0 8px 24px rgba(35, 45, 38, 0.06);
    --shadow-md: 0 20px 50px rgba(35, 45, 38, 0.10);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 0%, rgba(73, 107, 85, 0.09), transparent 34%),
        var(--bg);
    color: var(--ink);
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

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

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

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 28px 20px 22px;
    overflow-y: auto;
    background: #1f2b23;
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 8px 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 15px;
    background: linear-gradient(145deg, #78917d, #405f4a);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.brand strong,
.brand span {
    display: block;
}

.brand strong {
    font-size: 14px;
    letter-spacing: 0.15em;
}

.brand span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
}

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

.nav-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-weight: 500;
    transition: 160ms ease;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(2px);
}

.nav-item.is-active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 3px 0 0 #95ab99;
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 24px;
    font-size: 17px;
    opacity: 0.9;
}

.nav-count {
    display: grid;
    place-items: center;
    min-width: 25px;
    height: 23px;
    padding: 0 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.nav-dot,
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b9d1bd;
    box-shadow: 0 0 0 4px rgba(185, 209, 189, 0.12);
}

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

.sync-card {
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
}

.sync-card p {
    margin: 8px 0 0 17px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
}

.user-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 11px;
    padding: 13px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: #f2eadc;
    color: #314337;
    font-size: 12px;
    font-weight: 700;
}

.user-meta {
    min-width: 0;
}

.user-meta strong,
.user-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta strong {
    font-size: 11px;
    font-weight: 600;
}

.user-meta span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 9px;
}

.icon-button {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dashboard {
    min-width: 0;
    padding: 34px 38px 46px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

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

.topbar h1,
.panel h2 {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.topbar h1 {
    font-size: clamp(28px, 3vw, 38px);
}

.subtitle {
    max-width: 660px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

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

.primary-button,
.secondary-button,
.text-button,
.round-button {
    border: 0;
    cursor: pointer;
    transition: 160ms ease;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 17px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 600;
}

.primary-button {
    background: var(--accent-deep);
    color: #fff;
    box-shadow: 0 10px 22px rgba(47, 75, 57, 0.22);
}

.primary-button:hover {
    background: #243d2e;
    transform: translateY(-1px);
}

.secondary-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.74);
    color: var(--ink);
}

.secondary-button:hover {
    background: #fff;
    border-color: #d6d3cb;
}

.notice-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
    align-items: center;
    gap: 26px;
    padding: 20px 22px;
    margin-bottom: 20px;
    border: 1px solid #d9e2da;
    border-radius: var(--radius-md);
    background:
        linear-gradient(110deg, rgba(230, 239, 232, 0.95), rgba(249, 248, 244, 0.95)),
        var(--surface);
    box-shadow: var(--shadow-sm);
}

.notice-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    margin-bottom: 8px;
    border-radius: 99px;
    background: rgba(73, 107, 85, 0.11);
    color: var(--accent-deep);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notice-card strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.notice-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 9px;
    font-size: 10px;
}

.progress-meta span {
    color: var(--muted);
}

.progress-meta strong {
    font-size: 11px;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(47, 75, 57, 0.10);
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #496b55, #86a18b);
}

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

.stat-card,
.panel {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.stat-card {
    min-width: 0;
    padding: 18px;
    border-radius: var(--radius-md);
    transition: 160ms ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.stat-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 14px;
    font-weight: 700;
}

.trend {
    padding: 5px 8px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 700;
}

.trend.positive {
    background: #eaf3ec;
    color: #4d7558;
}

.trend.neutral {
    background: #f2eee6;
    color: #866b47;
}

.stat-card p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.stat-card > strong {
    display: block;
    margin: 6px 0 5px;
    font-size: clamp(24px, 2vw, 31px);
    font-weight: 600;
    letter-spacing: -0.04em;
}

.stat-card small {
    display: block;
    color: #8b918c;
    font-size: 9px;
    line-height: 1.45;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 16px;
}

.panel {
    min-width: 0;
    padding: 20px;
    border-radius: var(--radius-md);
}

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

.panel h2 {
    font-size: 17px;
}

.text-button {
    padding: 7px 0;
    background: transparent;
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.text-button:hover {
    color: var(--accent-deep);
    transform: translateX(2px);
}

.round-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--accent-deep);
    color: #fff;
}

.round-button:hover {
    transform: rotate(6deg) scale(1.04);
}

.pipeline-list {
    display: grid;
    gap: 16px;
}

.pipeline-row {
    display: grid;
    grid-template-columns: 130px minmax(100px, 1fr) 30px 82px;
    align-items: center;
    gap: 13px;
    color: var(--muted);
    font-size: 10px;
}

.pipeline-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 500;
}

.stage-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
}

.stage-new {
    background: #78917d;
}

.stage-contacted {
    background: #b1976c;
}

.stage-offer {
    background: #9385aa;
}

.stage-negotiation {
    background: #c07c5e;
}

.pipeline-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #ecebe6;
}

.pipeline-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #496b55, #92aa97);
}

.pipeline-row strong {
    color: var(--ink);
    font-size: 11px;
}

.pipeline-row > span:last-child {
    text-align: right;
}

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

.task-item {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.task-item:last-child {
    border-bottom: 0;
}

.task-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.task-check {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid #c9cec9;
    border-radius: 7px;
    background: #fff;
    transition: 160ms ease;
}

.task-item input:checked + .task-check {
    border-color: var(--accent);
    background: var(--accent);
}

.task-item input:checked + .task-check::after {
    content: "✓";
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.task-item input:checked ~ .task-content {
    opacity: 0.48;
    text-decoration: line-through;
}

.task-content {
    min-width: 0;
}

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

.task-content strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-content small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.priority {
    padding: 5px 7px;
    border-radius: 99px;
    font-size: 8px;
    font-weight: 700;
}

.priority.high {
    background: #f7e9e7;
    color: var(--danger);
}

.priority.medium {
    background: #f5eee3;
    color: var(--warning);
}

.timeline {
    display: grid;
    gap: 20px;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
}

.timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 36px;
    bottom: -18px;
    left: 16px;
    width: 1px;
    background: var(--line);
}

.timeline-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--accent);
    font-size: 12px;
}

.timeline-item strong {
    display: block;
    font-size: 10px;
    font-weight: 600;
}

.timeline-item p {
    margin: 3px 0;
    color: var(--muted);
    font-size: 9px;
}

.timeline-item small {
    color: #a0a5a1;
    font-size: 8px;
}

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

.quick-grid button {
    display: grid;
    justify-items: start;
    min-height: 104px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    cursor: pointer;
    transition: 160ms ease;
}

.quick-grid button:hover {
    border-color: #ccd7ce;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.quick-grid button > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 14px;
}

.quick-grid strong,
.quick-grid small {
    display: block;
}

.quick-grid strong {
    font-size: 10px;
    font-weight: 600;
}

.quick-grid small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .dashboard {
        padding: 30px 26px 38px;
    }

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

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

@media (max-width: 820px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 18px;
    }

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

    .sidebar-footer {
        display: none;
    }

    .brand {
        padding-bottom: 16px;
    }

    .dashboard {
        padding: 24px 18px 34px;
    }

    .topbar {
        display: grid;
    }

    .topbar-actions {
        width: 100%;
    }

    .topbar-actions button {
        flex: 1;
    }

    .notice-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .sidebar-nav {
        grid-template-columns: 1fr;
    }

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

    .topbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .panel {
        padding: 17px;
    }

    .panel-header {
        align-items: center;
    }

    .pipeline-row {
        grid-template-columns: minmax(105px, 1fr) 44px 78px;
    }

    .pipeline-bar {
        display: none;
    }

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

    .notice-card {
        padding: 18px;
    }
}
