/* ==========================================
   Dashboard Surface — Layout Only
   ==========================================
   v0.31.1: ZERO component CSS overrides.
   Only grid, flex, sizing, and spacing.
   All SDK components style themselves.
   ========================================== */

.ext-dashboard {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ── Topbar ──────────────────────────────── */

.ext-dashboard-topbar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 0 var(--sp-4);
    height: 44px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.ext-dashboard-topbar-back {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    color: var(--text-2);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
}

.ext-dashboard-topbar-back:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.ext-dashboard-topbar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.ext-dashboard-topbar-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
}

.ext-dashboard-topbar-spacer {
    flex: 1;
}

/* ── Body ────────────────────────────────── */

.ext-dashboard-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ── Sidebar ─────────────────────────────── */

.ext-dashboard-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    min-height: 0;
}

/* ── Main Content ────────────────────────── */

.ext-dashboard-main {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-5);
    min-width: 0;
}

.ext-dashboard-greeting {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--sp-1);
}

.ext-dashboard-subtitle {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: var(--sp-5);
}

.ext-dashboard-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}

.ext-dashboard-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Cards Grid ──────────────────────────── */

.ext-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-3);
}

.ext-dashboard-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    transition: border-color 0.15s;
}

.ext-dashboard-card:hover {
    border-color: var(--border-elevated);
}

.ext-dashboard-card-header {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.ext-dashboard-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ext-dashboard-card-meta {
    font-size: 11px;
    color: var(--text-3);
}

.ext-dashboard-card-desc {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.4;
}

.ext-dashboard-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--sp-1);
}

.ext-dashboard-empty {
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    padding: var(--sp-10) var(--sp-5);
}

/* ── Admin Section ───────────────────────── */

.ext-dashboard-admin-section {
    margin-top: var(--sp-6);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border);
}

.ext-dashboard-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--sp-3);
}
