.dashboard-suite-main {
    min-width: 0;
}

.dashboard-suite-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 32px;
}

.dashboard-commandbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-commandbar-title {
    min-width: 0;
}

.dashboard-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.dashboard-title-line h1 {
    margin: 2px 0 4px;
    font-size: clamp(1.45rem, 2.6vw, 2.1rem);
    line-height: 1.08;
}

.dashboard-commandbar-title p {
    margin: 0;
    color: var(--text-secondary);
    max-width: 72ch;
}

.dashboard-id-chip {
    flex: 0 0 auto;
    border: 1px solid var(--border-default);
    border-radius: 999px;
    padding: 4px 8px;
    font-family: var(--font-mono, monospace);
    font-size: .7rem;
    color: var(--text-muted);
    background: var(--surface-2);
}

.dashboard-period-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.dashboard-period-form label {
    display: grid;
    gap: 5px;
    font-size: .72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.dashboard-period-form .input {
    min-width: 148px;
}

.dashboard-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 5px;
    border: 1px solid var(--border-default);
    border-radius: 16px;
    background: var(--surface-1);
    scrollbar-width: none;
}

.dashboard-tabs::-webkit-scrollbar { display: none; }

.dashboard-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
}

.dashboard-tab i { width: 17px; height: 17px; }
.dashboard-tab:hover { background: var(--surface-2); color: var(--text-primary); }
.dashboard-tab.is-active { background: var(--surface-3); color: var(--color-primary); }

.dashboard-data-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: var(--text-muted);
    font-size: .76rem;
}

.dashboard-data-strip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dashboard-data-strip i { width: 14px; height: 14px; }

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

.dashboard-kpi {
    min-width: 0;
    border: 1px solid var(--border-default);
    border-radius: 18px;
    padding: 16px;
    background: var(--surface-1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 9px;
    outline: none;
}

.dashboard-kpi:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 25%, transparent); }

.dashboard-kpi-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-kpi-id {
    font-family: var(--font-mono, monospace);
    color: var(--text-muted);
    font-size: .67rem;
}

.dashboard-kpi h2 {
    margin: 2px 0 0;
    font-size: .86rem;
    line-height: 1.25;
}

.dashboard-kpi-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.dashboard-kpi-info {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: help;
}

.dashboard-kpi-info:hover,
.dashboard-kpi-info:focus-visible {
    color: var(--text-primary);
    background: var(--surface-2);
    outline: none;
}

.dashboard-kpi-info i { width: 14px; height: 14px; }

.dashboard-kpi-target-btn {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0;
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
}

.dashboard-kpi-target-btn:hover,
.dashboard-kpi-target-btn:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary) 45%, var(--border-default));
    color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.dashboard-kpi-target-btn i { width: 14px; height: 14px; }

.dashboard-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-muted) 12%, transparent);
}

.dashboard-kpi-green .dashboard-status-dot { background: var(--color-success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-success) 14%, transparent); }
.dashboard-kpi-amber .dashboard-status-dot { background: var(--color-warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-warning) 14%, transparent); }
.dashboard-kpi-red .dashboard-status-dot { background: var(--color-error); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-error) 14%, transparent); }
.dashboard-kpi-na { border-style: dashed; }

.dashboard-kpi-value {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.05;
    word-break: break-word;
}

.dashboard-kpi-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-muted);
    font-size: .7rem;
}

.dashboard-kpi > p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .76rem;
    line-height: 1.38;
    min-height: 2.1em;
}

.dashboard-kpi footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 9px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: .66rem;
}

.dashboard-quality {
    border-radius: 999px;
    padding: 3px 7px;
    background: var(--surface-2);
}

.dashboard-quality-validated { color: var(--color-success); }
.dashboard-quality-provisional { color: var(--color-warning); }
.dashboard-quality-missing { color: var(--text-muted); }
.dashboard-quality-failed { color: var(--color-error); }

.dashboard-insight {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--color-primary) 5%, var(--surface-1));
}

.dashboard-insight-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--color-primary);
}

.dashboard-insight-icon i { width: 18px; height: 18px; }
.dashboard-insight p { margin: 3px 0 0; color: var(--text-primary); font-weight: 600; }

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

.dashboard-panel {
    min-width: 0;
    overflow: hidden;
}

.dashboard-panel-wide { grid-column: 1 / -1; }
.dashboard-panel .card-header { gap: 12px; }

.dashboard-chart-body {
    height: 300px;
    min-height: 260px;
    position: relative;
}

.dashboard-table-card {
    overflow: hidden;
}

.dashboard-table-scroll {
    max-height: 410px;
    overflow: auto;
}

.dashboard-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-2);
}

.dashboard-alert-list {
    display: grid;
    gap: 8px;
}

.dashboard-alert {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 12px;
    background: var(--surface-2);
}

.dashboard-alert-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.dashboard-alert-green .dashboard-alert-marker { background: var(--color-success); }
.dashboard-alert-amber .dashboard-alert-marker { background: var(--color-warning); }
.dashboard-alert-red .dashboard-alert-marker { background: var(--color-error); }
.dashboard-alert p { margin: 3px 0 0; color: var(--text-secondary); font-size: .8rem; }
.dashboard-alert-owner { text-align: right; display: grid; gap: 3px; font-size: .74rem; }
.dashboard-alert-owner span { color: var(--text-muted); }

.dashboard-target-modal {
    z-index: 1080;
    padding: 22px;
    overflow-y: auto;
}

.dashboard-target-modal-box {
    width: min(680px, calc(100vw - 28px));
    max-width: 680px;
    max-height: min(760px, calc(100dvh - 36px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-default);
    border-radius: 20px;
    background: var(--surface-1);
    box-shadow: var(--shadow-xl, 0 24px 80px rgba(0,0,0,.35));
}

.dashboard-target-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.dashboard-target-modal-header h2 {
    margin: 3px 0 4px;
    font-size: 1.2rem;
}

.dashboard-target-modal-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: .8rem;
}

.dashboard-target-close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0;
    background: var(--surface-2);
    color: var(--text-secondary);
    cursor: pointer;
}

.dashboard-target-close:hover { color: var(--text-primary); background: var(--surface-3); }
.dashboard-target-close i { width: 17px; height: 17px; }

.dashboard-target-form {
    display: grid;
    gap: 16px;
    padding: 20px 22px 22px;
    overflow-y: auto;
}

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

.dashboard-target-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.dashboard-target-field > span {
    color: var(--text-secondary);
    font-size: .74rem;
    font-weight: 650;
}

.dashboard-target-field small {
    color: var(--text-muted);
    font-weight: 500;
}

.dashboard-target-notes {
    min-height: 86px;
    resize: vertical;
}

.dashboard-target-advanced {
    border: 1px solid var(--border-subtle);
    border-radius: 13px;
    padding: 11px 12px;
    background: var(--surface-2);
}

.dashboard-target-advanced summary {
    color: var(--text-secondary);
    font-size: .76rem;
    font-weight: 650;
    cursor: pointer;
}

.dashboard-target-advanced[open] summary { margin-bottom: 12px; }

.dashboard-target-feedback {
    min-height: 20px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: .76rem;
}

.dashboard-target-feedback.is-loading,
.dashboard-target-feedback.is-info,
.dashboard-target-feedback.is-success,
.dashboard-target-feedback.is-error { padding: 9px 11px; }
.dashboard-target-feedback.is-loading,
.dashboard-target-feedback.is-info { background: var(--surface-2); color: var(--text-secondary); }
.dashboard-target-feedback.is-success { background: color-mix(in srgb, var(--color-success) 12%, transparent); color: var(--color-success); }
.dashboard-target-feedback.is-error { background: color-mix(in srgb, var(--color-error) 12%, transparent); color: var(--color-error); }

.dashboard-target-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 4px;
}

@media (max-width: 1180px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .dashboard-commandbar { align-items: stretch; flex-direction: column; }
    .dashboard-period-form { width: 100%; }
    .dashboard-period-form label { flex: 1 1 0; }
    .dashboard-period-form .input { width: 100%; min-width: 0; }
    .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .dashboard-suite-content { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); gap: 12px; }
    .dashboard-commandbar-title p { display: none; }
    .dashboard-title-line h1 { font-size: 1.45rem; }
    .dashboard-period-form { display: grid; grid-template-columns: 1fr 1fr auto; }
    .dashboard-period-form .btn { width: 44px; min-width: 44px; padding: 0; }
    .dashboard-period-form .btn span { display: none; }
    .dashboard-tabs { margin-inline: -2px; }
    .dashboard-tab { min-height: 38px; padding: 0 11px; font-size: .82rem; }
    .dashboard-data-strip { gap: 6px 12px; }
    .dashboard-data-strip span:last-child { display: none; }
    .dashboard-kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .dashboard-kpi { padding: 13px; border-radius: 15px; }
    .dashboard-kpi-value { font-size: 1.35rem; }
    .dashboard-kpi-meta { display: grid; gap: 3px; }
    .dashboard-kpi > p { display: none; }
    .dashboard-kpi footer span:last-child { display: none; }
    .dashboard-visual-grid { grid-template-columns: 1fr; }
    .dashboard-panel-wide { grid-column: auto; }
    .dashboard-chart-body { height: 280px; }
    .dashboard-alert { grid-template-columns: 8px minmax(0, 1fr); }
    .dashboard-alert-owner { grid-column: 2; text-align: left; display: flex; gap: 8px; }
    .dashboard-target-modal { padding: 0; align-items: flex-end; }
    .dashboard-target-modal-box { width: 100%; max-width: none; max-height: calc(100dvh - 18px); border-radius: 20px 20px 0 0; }
    .dashboard-target-modal-header { padding: 17px 16px 14px; }
    .dashboard-target-form { padding: 16px; }
}

@media (max-width: 430px) {
    .dashboard-kpi-grid { grid-template-columns: 1fr; }
    .dashboard-period-form { grid-template-columns: 1fr 1fr; }
    .dashboard-period-form .btn { grid-column: 1 / -1; width: 100%; }
    .dashboard-period-form .btn span { display: inline; }
    .dashboard-target-grid { grid-template-columns: 1fr; }
    .dashboard-target-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
