/* =========================================================
   Compact UI — denser shell, cards, tables, and landing
   Loaded last; overrides forge-redesign / main tokens.
   ========================================================= */
:root {
    --sidebar-w: 240px;
    --radius-xl: 16px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --shell-padding: 12px;
    --nav-item-height: 40px;
    --topbar-min-height: 56px;
    --forge-radius: 14px;
}

/* ---------- App shell ---------- */
.app-sidebar {
    gap: 10px !important;
    padding: 10px !important;
}

.sidebar-brand {
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: var(--radius-lg) !important;
}

.brand-mark {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    font-size: 1.2rem !important;
}

.brand-copy h1 {
    font-size: 0.98rem !important;
}

.brand-copy p {
    margin-top: 2px !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.14em !important;
}

.brand-chip-row {
    margin-top: 6px !important;
    gap: 4px !important;
}

.brand-chip {
    padding: 3px 7px !important;
    font-size: 9px !important;
}

.nav-group {
    padding: 8px !important;
    border-radius: var(--radius-lg) !important;
}

.nav-group-title {
    margin-bottom: 6px !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.14em !important;
}

.sidebar-nav {
    gap: 8px !important;
}

.sidebar-nav a,
.sidebar-action-link {
    min-height: var(--nav-item-height) !important;
    padding: 6px 10px !important;
    margin: 2px 0 !important;
    gap: 8px !important;
    border-radius: 10px !important;
    font-size: 0.84rem !important;
}

.sidebar-nav a svg {
    width: 15px !important;
    height: 15px !important;
}

.user-card {
    padding: 8px 10px !important;
    border-radius: var(--radius-lg) !important;
}

.user-card .relative.w-10,
.user-card .w-10 {
    width: 32px !important;
    height: 32px !important;
}

.user-card .meta .name {
    font-size: 0.8rem !important;
}

.user-card .meta .role {
    font-size: 0.68rem !important;
}

.user-menu-dropdown a,
.user-menu-dropdown button {
    padding: 8px 12px !important;
}

.app-main {
    padding: var(--shell-padding) !important;
}

.app-topbar,
.wow-blueprint-topbar {
    top: var(--shell-padding) !important;
    min-height: var(--topbar-min-height) !important;
    padding: 8px 14px !important;
    margin-bottom: 10px !important;
    gap: 10px !important;
    border-radius: var(--radius-xl) !important;
    align-items: center !important;
}

.topbar-identity {
    gap: 10px !important;
    min-width: 0 !important;
}

.topbar-brand-mark {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
}

.topbar-title .kicker {
    margin-bottom: 2px !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.16em !important;
}

.topbar-title h1 {
    font-size: 1.1rem !important;
    line-height: 1.15 !important;
}

.topbar-title p {
    display: none !important;
}

.topbar-actions {
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.topbar-actions button,
.topbar-actions a,
.topbar-actions .status-chip {
    min-height: 34px !important;
    min-width: 0 !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    font-size: 0.78rem !important;
}

.workspace-frame {
    border-radius: var(--radius-xl) !important;
}

.workspace-content {
    padding: 12px !important;
}

/* ---------- Section stat cards ---------- */
.workspace-content .grid.grid-cols-1.md\:grid-cols-3 {
    gap: 0.65rem !important;
    margin-bottom: 0.85rem !important;
}

.workspace-content .grid .h-28 {
    height: auto !important;
    min-height: 0 !important;
    padding: 0.65rem 0.75rem 0.65rem 0.85rem !important;
    border-radius: 10px !important;
}

.workspace-content .grid .h-28 .text-3xl {
    font-size: 1.35rem !important;
    line-height: 1.15 !important;
}

.workspace-content .grid .h-28 h3 {
    margin-bottom: 2px !important;
    font-size: 9px !important;
    letter-spacing: 0.12em !important;
}

.workspace-content .grid .h-28 .absolute.left-0 {
    top: 8px !important;
    bottom: 8px !important;
}

/* Section list panels */
.workspace-content > .bg-\[\#161b28\],
.workspace-content .bg-\[\#161b28\].border {
    border-radius: 10px !important;
}

.workspace-content .p-4.border-b {
    padding: 0.55rem 0.75rem !important;
}

/* Version tabs */
.workspace-content .flex.space-x-1.mb-6 {
    margin-bottom: 0.65rem !important;
}

.workspace-content .flex.space-x-1.mb-6 a {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.75rem !important;
}

/* Tables */
.workspace-content table thead th {
    padding: 0.4rem 0.65rem !important;
    font-size: 9px !important;
}

.workspace-content table tbody td {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.78rem !important;
}

.workspace-content .overflow-x-auto.max-h-\[540px\] {
    max-height: min(62vh, 520px) !important;
}

table {
    border-spacing: 0 4px !important;
}

tbody tr {
    border-radius: 8px !important;
}

/* Toolbar buttons in section headers */
.workspace-content .p-4.border-b button {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.68rem !important;
}

/* Alerts */
.workspace-content .mb-4.flex.items-center {
    padding: 0.45rem 0.65rem !important;
    margin-bottom: 0.55rem !important;
    font-size: 0.78rem !important;
}

/* ---------- Home / guest landing ---------- */
.guest-tools-page .max-w-7xl {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.guest-tools-page .mb-10 {
    margin-bottom: 1rem !important;
}

.guest-tools-page .p-7 {
    padding: 1rem 1.1rem !important;
}

.guest-tools-page h1.text-4xl {
    font-size: 1.65rem !important;
    margin-bottom: 0 !important;
}

.guest-tools-page .gap-6 {
    gap: 0.75rem !important;
}

.guest-tools-page .grid.lg\:grid-cols-4 > div,
.guest-tools-page .grid.md\:grid-cols-2 > div {
    border-radius: 12px !important;
}

.guest-tools-page .min-w-\[320px\] {
    min-width: 0 !important;
    padding: 0.75rem 1rem !important;
}

.guest-shell {
    padding: 1rem !important;
}

.login-box,
.auth-hero {
    padding: 1.25rem !important;
    border-radius: 14px !important;
}

/* ---------- Modals (slightly tighter) ---------- */
.fixed.inset-0 .relative {
    border-radius: 14px !important;
}

.fixed.inset-0 .relative .p-6 {
    padding: 1rem !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    :root {
        --sidebar-w: 260px;
    }

    .app-main {
        padding: 8px !important;
    }

    .app-topbar {
        padding: 8px 10px !important;
    }

    .topbar-actions button,
    .topbar-actions a {
        min-height: 32px !important;
        padding: 5px 10px !important;
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-w: 228px;
    }
}
