:root {
    --bg: #eef3fb;
    --sidebar-top: #102642;
    --sidebar-bottom: #0d2039;
    --card: #ffffff;
    --card-soft: #f8fbff;
    --border: #dce6f4;
    --text: #1a2649;
    --muted: #70839d;
    --primary: #4d8cff;
    --primary-dark: #245fbe;
    --success: #2fb9ac;
    --danger: #c04d57;
    --shadow: 0 18px 45px rgba(16, 38, 66, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

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

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d9e4f3;
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
    color: var(--text);
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    padding: 0;
    justify-self: start;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.errorlist {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    color: var(--danger);
    font-size: 13px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px 1fr;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
    background: linear-gradient(180deg, var(--sidebar-top), var(--sidebar-bottom));
    color: #edf5ff;
}

.page-header h2,
.card-header h3 {
    margin: 0;
}

.page-header p,
.muted,
.activity-copy p,
.setting-copy p,
.schedule-row p {
    margin: 0;
    color: var(--muted);
}

.brand-logo {
    display: block;
    width: min(176px, 100%);
    height: auto;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(7, 16, 31, 0.22);
}

.brand-logo--auth {
    width: min(220px, 100%);
    margin-bottom: 14px;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    padding: 15px 18px;
    border-radius: 18px;
    font-weight: 700;
    color: #edf5ff;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.08);
}

.workspace-chip {
    margin-top: auto;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.workspace-label {
    display: block;
    font-size: 12px;
    color: #9cafcb;
    margin-bottom: 6px;
}

.content-area {
    padding: 28px 34px;
}

.page-header,
.card-header,
.meta-line,
.pipeline-row,
.prospect-top,
.card-actions,
.activity-row,
.schedule-row,
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.page-header {
    margin-bottom: 22px;
}

.page-header h2 {
    font-size: 34px;
}

.header-actions,
.form-actions,
.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card,
.stat-card,
.soft-card,
.job-card,
.pipeline-card,
.note-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.soft-card,
.pipeline-card,
.note-box {
    background: var(--card-soft);
}

.card,
.job-card {
    padding: 24px;
}

.soft-card,
.pipeline-card {
    padding: 18px;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.message {
    padding: 14px 16px;
    border-radius: 14px;
    background: #ecf4ff;
    border: 1px solid #d8e8ff;
    color: var(--primary-dark);
}

.stats-grid,
.board-grid,
.highlight-grid {
    display: grid;
    gap: 18px;
}

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

.stat-card {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-card p {
    margin: 0 0 6px;
    color: #5e738f;
}

.stat-card strong {
    font-size: 26px;
}

.stat-icon,
.pipeline-icon,
.avatar-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef5ff;
    color: var(--primary-dark);
    font-weight: 700;
}

.dashboard-grid,
.split-grid {
    display: grid;
    gap: 18px;
}

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

.dashboard-main,
.dashboard-side,
.stack-section,
.stack-list {
    display: grid;
    gap: 18px;
}

.chart-grid {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 18px;
    align-items: stretch;
}

.chart-axis {
    display: grid;
    gap: 28px;
    align-content: space-between;
    color: var(--muted);
    font-size: 13px;
    padding-top: 10px;
}

.chart-bars {
    min-height: 280px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 14px;
    align-items: end;
    padding: 16px 0 4px;
    border-bottom: 1px solid #e5edf8;
}

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

.chart-bar-wrap {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: end;
}

.chart-bar {
    width: 100%;
    border-radius: 16px 16px 8px 8px;
    background: #dbe6f8;
}

.chart-bar.is-highlighted {
    background: var(--primary);
}

.progress-track {
    width: 100%;
    height: 10px;
    background: #e2ebf7;
    border-radius: 999px;
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.visual-block,
.feature-hero {
    border-radius: 22px;
    background: linear-gradient(135deg, var(--color-a), var(--color-b));
    display: flex;
    align-items: end;
    justify-content: start;
    padding: 16px;
    color: var(--text);
    font-weight: 700;
}

.visual-block {
    width: 94px;
    min-width: 94px;
    height: 74px;
}

.feature-hero {
    min-height: 132px;
    margin-bottom: 16px;
}

.feature-hero--small {
    min-height: 110px;
    margin-bottom: 14px;
}

.activity-copy,
.setting-copy {
    flex: 1;
}

.activity-meta,
.feature-copy,
.prospect-card,
.job-card,
.metric-row {
    display: grid;
    gap: 10px;
}

.chip,
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #edf3fb;
    border: 1px solid #dce7f5;
    color: #6c809b;
}

.pipeline-card--highlight {
    background: linear-gradient(135deg, rgba(47, 185, 172, 0.1), rgba(47, 185, 172, 0.04));
}

.jobs-grid,
.split-grid,
.form-grid {
    display: grid;
    gap: 18px;
}

.jobs-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.highlight-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

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

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

.field-help {
    color: var(--muted);
    font-size: 12px;
}

.setting-row {
    align-items: flex-start;
}

.setting-control {
    min-width: 240px;
}

.ghost-button,
.primary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 11px 16px;
    border: 1px solid #d9e4f3;
    cursor: pointer;
    font-weight: 700;
}

.ghost-button {
    background: #f8fbff;
    color: var(--text);
}

.primary-button {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.danger-button {
    background: #fff1f1;
    border-color: #f2cfd2;
    color: var(--danger);
}

.small {
    padding: 8px 12px;
    font-size: 13px;
}

.link-inline {
    color: var(--primary-dark);
    font-weight: 700;
}

.strong {
    color: #5d708b;
    font-weight: 700;
}

.note-box {
    padding: 14px 16px;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
    background: radial-gradient(circle at top left, #ffffff 0%, #eef3fb 45%, #dbe6f8 100%);
}

.auth-card {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 22px 60px rgba(16, 38, 66, 0.18);
}

.auth-card--wide {
    width: min(1080px, 100%);
}

.auth-copy {
    padding: 42px;
    background: linear-gradient(160deg, #102642, #17324d 60%, #214468);
    color: #edf5ff;
}

.auth-copy p {
    color: #b9c8de;
}

.auth-form {
    padding: 42px;
    display: grid;
    gap: 16px;
}

.auth-form-stack {
    display: grid;
    gap: 16px;
}

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

    .sidebar {
        gap: 18px;
    }

    .stats-grid,
    .dashboard-grid,
    .board-grid,
    .split-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .content-area {
        padding: 22px 18px;
    }

    .page-header,
    .card-header,
    .activity-row,
    .schedule-row,
    .setting-row {
        align-items: flex-start;
        flex-direction: column;
    }

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