.vmsip-portal,
.vmsip-admin {
    color: #10233b;
}

.vmsip-portal {
    background: #ffffff;
    border: 1px solid #d7dee6;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(16, 35, 59, 0.06);
    padding: 24px;
}

.vmsip-portal__header h2,
.vmsip-admin-card__header h2,
.vmsip-chart-panel h3,
.vmsip-section-head h3 {
    margin: 0 0 6px;
    color: #10233b;
}

.vmsip-portal__header p,
.vmsip-chart-panel__caption,
.vmsip-projection-disclaimer,
.vmsip-admin-card__meta,
.vmsip-section-head p,
.vmsip-source-note,
.vmsip-upcoming-card__meta,
.vmsip-admin-metric__meta,
.vmsip-portal__intro {
    margin: 0;
    color: #516174;
}

.vmsip-portal__header {
    display: grid;
    gap: 8px;
}

.vmsip-spotlight,
.vmsip-chart-panel,
.vmsip-history,
.vmsip-upcoming {
    margin-top: 28px;
}

.vmsip-spotlight,
.vmsip-chart-panel,
.vmsip-upcoming-card {
    background: #f9fbfd;
    border: 1px solid #d7dee6;
    border-radius: 12px;
    padding: 18px;
}

.vmsip-spotlight__grid,
.vmsip-admin-auto-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 16px;
}

.vmsip-metric-card,
.vmsip-detail-item,
.vmsip-admin-metric {
    background: #ffffff;
    border: 1px solid #d7dee6;
    border-radius: 10px;
    padding: 14px;
}

.vmsip-metric-card__value,
.vmsip-admin-metric__actual {
    color: #10233b;
    font-size: 21px;
    font-weight: 600;
    margin: 0;
}

.vmsip-metric-card--negative .vmsip-metric-card__value {
    color: #7a1c1c;
}

.vmsip-metric-card--positive .vmsip-metric-card__value {
    color: #135c2a;
}

.vmsip-section-head {
    display: grid;
    gap: 4px;
}

.vmsip-section-separator,
.vmsip-admin-card__separator {
    color: #97a4b2;
    margin: 0 8px;
}

.vmsip-chart-panel__header {
    align-items: flex-end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.vmsip-metric-selector {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    gap: 6px;
    min-width: 220px;
}

.vmsip-chart-select,
.vmsip-admin-field input,
.vmsip-admin-field textarea,
.vmsip-admin-metric input {
    border: 1px solid #c5d0db;
    border-radius: 8px;
    box-sizing: border-box;
    font: inherit;
    padding: 10px 12px;
    width: 100%;
}

.vmsip-chart-shell,
.vmsip-table-wrap {
    overflow-x: auto;
}

.vmsip-chart {
    display: block;
    height: auto;
    min-width: 720px;
    width: 100%;
}

.vmsip-chart-legend,
.vmsip-chart-summary {
    color: #405261;
    font-size: 14px;
    margin-top: 10px;
}

.vmsip-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.vmsip-chart-legend-item {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.vmsip-chart-legend-line {
    background: #244260;
    display: inline-block;
    height: 3px;
    width: 24px;
}

.vmsip-chart-legend-line--projected {
    background: repeating-linear-gradient(
        90deg,
        #8a6b1f 0,
        #8a6b1f 6px,
        transparent 6px,
        transparent 10px
    );
}

.vmsip-table {
    border-collapse: collapse;
    min-width: 920px;
    width: 100%;
}

.vmsip-table th,
.vmsip-table td {
    border-bottom: 1px solid #d7dee6;
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
}

.vmsip-table th {
    color: #405261;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vmsip-net {
    border-radius: 999px;
    display: inline-block;
    font-weight: 600;
    padding: 6px 10px;
}

.vmsip-net--positive {
    background: #e6f4ea;
    color: #135c2a;
}

.vmsip-net--negative {
    background: #fff1f1;
    border: 1px solid #d34a4a;
    color: #7a1c1c;
}

.vmsip-net--neutral {
    background: #eef2f5;
    color: #405261;
}

.vmsip-details-toggle {
    background: #10233b;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    padding: 8px 12px;
}

.vmsip-details-toggle:hover,
.vmsip-details-toggle:focus {
    background: #193553;
}

.vmsip-details-row td {
    background: #f9fbfd;
}

.vmsip-details-panel {
    display: grid;
    gap: 18px;
}

.vmsip-details-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.vmsip-detail-item__label {
    color: #516174;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.vmsip-detail-item__value {
    margin: 0;
}

.vmsip-projected-block {
    border-top: 1px solid #d7dee6;
    padding-top: 16px;
}

.vmsip-source-warnings {
    display: grid;
    gap: 6px;
}

.vmsip-manual-block {
    border-top: 1px solid #d7dee6;
    padding-top: 16px;
}

.vmsip-projected-block h4 {
    margin: 0 0 10px;
}

.vmsip-manual-block h4 {
    margin: 0 0 10px;
}

.vmsip-projection-label {
    color: #8a6b1f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.vmsip-upcoming-list {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.vmsip-upcoming-card h4 {
    margin: 0 0 8px;
}

.vmsip-upcoming-card__meta {
    margin-bottom: 14px;
}

.vmsip-upcoming-card__notes,
.vmsip-upcoming-card__empty {
    color: #405261;
    margin: 12px 0 0;
}

.vmsip-portal--message,
.vmsip-empty {
    background: #f6f8fb;
    border: 1px solid #d7dee6;
    border-radius: 12px;
    padding: 16px;
}

.vmsip-admin-tabs {
    margin-top: 18px;
}

.vmsip-admin-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.vmsip-admin-card {
    background: #ffffff;
    border: 1px solid #d7dee6;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(16, 35, 59, 0.05);
    padding: 20px;
}

.vmsip-admin-card__header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.vmsip-admin-card__actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vmsip-admin-net-preview {
    text-align: right;
}

.vmsip-admin-section + .vmsip-admin-section {
    margin-top: 18px;
}

.vmsip-admin-section h3 {
    margin: 0 0 12px;
}

.vmsip-admin-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.vmsip-admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.vmsip-admin-field--full {
    margin-top: 6px;
}

.vmsip-admin-field textarea {
    min-height: 90px;
    resize: vertical;
}

.vmsip-admin-metric {
    display: grid;
    gap: 10px;
}

.vmsip-admin-metric__header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.vmsip-admin-metric__header h4 {
    margin: 0;
}

.vmsip-admin-metric__actual span {
    color: #516174;
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.vmsip-source-chip {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    white-space: nowrap;
}

.vmsip-source-chip--manual_override {
    background: #fff3dc;
    color: #7a5200;
}

.vmsip-source-chip--auto_actual {
    background: #e6f4ea;
    color: #135c2a;
}

.vmsip-source-chip--fallback {
    background: #eef4ff;
    color: #204a7a;
}

.vmsip-source-chip--not_available {
    background: #eef3f7;
    color: #405261;
}

.vmsip-admin-diagnostics {
    border-top: 1px solid #d7dee6;
    margin-top: 16px;
    padding-top: 14px;
}

.vmsip-admin-diagnostics summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 10px;
}

.vmsip-diagnostics-table-wrap {
    margin-top: 12px;
    overflow-x: auto;
}

.vmsip-diagnostics-table {
    min-width: 880px;
}

.vmsip-diagnostics-table code {
    display: inline-block;
    white-space: normal;
    word-break: break-word;
}

.vmsip-admin-projection {
    border-top: 1px solid #d7dee6;
    margin-top: 16px;
    padding-top: 14px;
}

.vmsip-admin-projection summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 10px;
}

.vmsip-admin-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.vmsip-admin-refresh-form {
    margin: 0;
}

@media (max-width: 782px) {
    .vmsip-portal,
    .vmsip-chart-panel,
    .vmsip-admin-card,
    .vmsip-spotlight,
    .vmsip-upcoming-card {
        padding: 16px;
    }

    .vmsip-chart-panel__header,
    .vmsip-admin-card__header {
        align-items: stretch;
        flex-direction: column;
    }

    .vmsip-admin-card__actions {
        align-items: flex-start;
    }

    .vmsip-metric-selector {
        min-width: 0;
    }

    .vmsip-table {
        min-width: 820px;
    }
}
