﻿:root {
    --sidebar-width: 260px;
    --background-color: #f4f6fa;
    --surface-color: #ffffff;
    --sidebar-color: #14213b;
    --sidebar-hover-color: #223454;
    --primary-color: #315efb;
    --primary-hover-color: #2549d8;
    --text-color: #1f2937;
    --muted-color: #6b7280;
    --border-color: #e5e7eb;
    --shadow-color: rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--background-color);
    color: var(--text-color);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.app-layout {
    min-height: 100vh;
    display: flex;
}

.app-sidebar {
    width: var(--sidebar-width);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    background: var(--sidebar-color);
    color: #ffffff;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
    padding: 0 10px;
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.app-brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: #ffffff;
    color: var(--sidebar-color);
    font-size: 18px;
    font-weight: 800;
}

.app-environment {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 10px 24px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 12px;
}

.app-environment-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fbbf24;
}

.app-navigation {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.app-navigation a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #d8deeb;
    text-decoration: none;
    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.app-navigation a:hover,
.app-navigation a.active {
    background: var(--sidebar-hover-color);
    color: #ffffff;
}

.app-navigation a:hover {
    transform: translateX(2px);
}

.nav-icon {
    width: 20px;
    display: inline-grid;
    place-items: center;
    font-size: 16px;
}

.app-sidebar-footer {
    margin-top: auto;
    padding: 16px 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 12px;
}

.app-main {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.app-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 30px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(8px);
}

.app-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-header-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--muted-color);
    font-size: 12px;
}

.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #ffffff;
    font-size: 19px;
}

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

.app-user-avatar {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #e9efff;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 750;
}

.app-user strong,
.app-user small {
    display: block;
}

.app-user strong {
    font-size: 13px;
}

.app-user small {
    color: var(--muted-color);
    font-size: 11px;
}

.app-content {
    padding: 30px;
}

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

.page-intro h2 {
    margin: 0 0 5px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-intro p {
    margin: 0;
    color: var(--muted-color);
}

.page-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.btn-primary {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--primary-hover-color);
    background: var(--primary-hover-color);
}

.dashboard-summary,
.project-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.compact-summary .summary-card {
    min-height: 128px;
}

.summary-card,
.dashboard-panel,
.stakeholder-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 5px 18px var(--shadow-color);
}

.summary-card {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
}

.summary-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-color);
    font-size: 13px;
}

.summary-value {
    font-size: 31px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.summary-text {
    font-size: 18px;
}

.summary-caption {
    margin-top: 11px;
    color: var(--muted-color);
    font-size: 12px;
}

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

.content-grid {
    display: grid;
    gap: 22px;
}

.content-grid-form {
    grid-template-columns: minmax(0, 2fr) minmax(250px, 0.75fr);
}

.content-grid-baseline {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
}

.dashboard-panel {
    padding: 24px;
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

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

.panel-heading h2,
.helper-panel h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
}

.panel-heading p {
    margin: 0;
    color: var(--muted-color);
    font-size: 13px;
}

.panel-link {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.project-status,
.alert-item,
.detail-list-item {
    min-height: 66px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.project-status,
.detail-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.project-status-link {
    text-decoration: none;
}

.project-status-link:hover strong {
    color: var(--primary-color);
}

.project-status strong,
.project-status span,
.detail-list-item strong,
.detail-list-item span {
    display: block;
}

.project-status div > span,
.detail-list-item div > span {
    margin-top: 3px;
    color: var(--muted-color);
    font-size: 12px;
}

.project-status:last-child,
.alert-item:last-child,
.detail-list-item:last-child {
    border-bottom: 0;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 11px;
}

.alert-indicator {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #f59e0b;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: max-content;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-neutral {
    background: #eef2f7;
    color: #475569;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.filter-search {
    width: min(100%, 460px);
}

.filter-select {
    width: 200px;
}

.app-table {
    margin: 0;
}

.app-table thead th {
    padding: 15px 18px;
    border-bottom-width: 1px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-table tbody td {
    padding: 17px 18px;
    border-color: var(--border-color);
    vertical-align: middle;
}

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

.app-table strong,
.table-secondary-text {
    display: block;
}

.table-secondary-text {
    margin-top: 3px;
    color: var(--muted-color);
    font-size: 12px;
}

.record-code {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 7px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 750;
}

.app-progress {
    min-width: 110px;
    height: 18px;
    border-radius: 999px;
    background: #e8edf5;
}

.app-progress .progress-bar {
    border-radius: 999px;
    background: var(--primary-color);
    font-size: 10px;
    font-weight: 700;
}

.form-label {
    color: #374151;
    font-size: 13px;
    font-weight: 650;
}

.form-control,
.form-select {
    min-height: 43px;
    border-color: #dbe1ea;
    border-radius: 9px;
}

.form-control:focus,
.form-select:focus {
    border-color: #9db1ff;
    box-shadow: 0 0 0 0.2rem rgba(49, 94, 251, 0.12);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-note {
    color: var(--muted-color);
    font-size: 12px;
}

.helper-panel {
    align-self: start;
}

.process-list {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: process;
}

.process-list li {
    position: relative;
    min-height: 45px;
    padding: 3px 0 18px 38px;
    color: var(--muted-color);
    counter-increment: process;
}

.process-list li::before {
    content: counter(process);
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef2f7;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.process-list li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 27px;
    width: 1px;
    height: 17px;
    background: #dbe1ea;
}

.process-list li.active {
    color: var(--text-color);
    font-weight: 650;
}

.process-list li.active::before {
    background: var(--primary-color);
    color: #ffffff;
}

.empty-state {
    padding: 26px 0;
    color: var(--muted-color);
    text-align: center;
}

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

.stakeholder-card {
    padding: 22px;
}

.stakeholder-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.stakeholder-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #e9efff;
    color: var(--primary-color);
    font-weight: 800;
}

.stakeholder-header h3 {
    margin: 0 0 3px;
    font-size: 16px;
}

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

.stakeholder-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 0;
}

.stakeholder-metrics div {
    min-width: 0;
}

.stakeholder-metrics dt {
    margin-bottom: 3px;
    color: var(--muted-color);
    font-size: 11px;
    font-weight: 500;
}

.stakeholder-metrics dd {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
}

.baseline-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.baseline-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
}

.baseline-info strong,
.baseline-info span {
    display: block;
}

.baseline-info span {
    margin-top: 3px;
    color: var(--muted-color);
    font-size: 11px;
}

.validation-score {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 12px;
}

.validation-score strong {
    font-size: 29px;
    letter-spacing: -0.04em;
}

.validation-score span,
.helper-copy {
    color: var(--muted-color);
    font-size: 12px;
}

.large-progress {
    height: 20px;
}

.helper-copy {
    margin: 18px 0 0;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .dashboard-summary,
    .project-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-grid;
        place-items: center;
    }

    .app-header {
        padding: 14px 18px;
    }

    .app-content {
        padding: 22px 18px;
    }

    .app-user div {
        display: none;
    }

    .dashboard-grid,
    .stakeholder-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .page-intro,
    .filter-bar,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-summary,
    .project-overview {
        grid-template-columns: 1fr;
    }

    .filter-search,
    .filter-select {
        width: 100%;
    }

    .stakeholder-header {
        grid-template-columns: auto 1fr;
    }

    .stakeholder-header .status-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
