:root {
    --pb-control-min-height: 32px;
    --pb-control-padding-y: 3px;
    --pb-control-padding-x: 10px;
    --pb-radius: 8px;
    --pb-radius-lg: 12px;
    --pb-border: rgba(15, 23, 42, 0.09);
    --pb-muted: #5f6b7a;
    --pb-surface: rgba(255, 255, 255, 0.94);
    --pb-surface-soft: rgba(249, 251, 254, 0.95);
    --pb-brand: #0f172a;
    --pb-accent: #635bff;
}

html,
body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    background:
        radial-gradient(1400px 840px at -10% -20%, rgba(99, 91, 255, 0.12), transparent 60%),
        radial-gradient(1200px 760px at 110% -5%, rgba(16, 185, 129, 0.08), transparent 58%),
        #f3f6fc;
    color: #1f2937;
}

.pb-dark {
    background:
        radial-gradient(1400px 840px at -10% -20%, rgba(99, 91, 255, 0.2), transparent 60%),
        radial-gradient(1200px 760px at 110% -5%, rgba(16, 185, 129, 0.1), transparent 58%),
        #0b1220;
    color: #e5e7eb;
}

.pb-shell-layout {
    min-height: 100vh;
}

.pb-appbar {
    height: 48px;
    backdrop-filter: blur(10px);
    background: linear-gradient(95deg, #0b2344, #0f2f57) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pb-shell-chip {
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #d8e3f8;
    background: rgba(255, 255, 255, 0.06);
}

.pb-brand {
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: 0.02em;
    font-weight: 500;
}

.pb-drawer {
    width: 252px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.96));
    border-right: 1px solid var(--pb-border);
}

.pb-dark .pb-drawer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 18, 32, 0.98));
    border-right-color: rgba(148, 163, 184, 0.24);
}

.pb-nav-menu {
    padding: 10px;
}

.pb-nav-section {
    color: #798395;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 10px 8px 4px;
}

.pb-dark .pb-nav-section {
    color: #8fa2c0;
}

.pb-nav-logout {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.pb-main-content {
    max-width: 1580px;
    margin: 0 auto;
    width: 100%;
}

.pb-dark .mud-main-content {
    background: transparent !important;
    color: #e5e7eb;
}

.pb-dark .mud-typography {
    color: inherit;
}

.pb-dark .mud-typography.mud-typography-body2,
.pb-dark .mud-typography.mud-typography-caption {
    color: #9fb0c8 !important;
}

.pb-dark .mud-drawer-content {
    background: transparent;
    color: #d7e0f0;
}

.pb-page-shell {
    padding: 12px 16px 20px;
}

.pb-page-hero {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.97), rgba(246, 250, 255, 0.97));
    border-radius: var(--pb-radius-lg);
}

.pb-dark .pb-page-hero {
    background: linear-gradient(140deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.95));
}

.pb-surface {
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-lg);
}

.pb-admin-page,
.pb-dashboard-page,
.pb-account-manage,
.pb-feature-list-page,
.pb-recycle-page,
.pb-feature-detail-page,
.pb-feature-form-page,
.pb-feature-edit-page {
    margin-top: 0;
}

.pb-feature-detail-page {
    padding-top: 8px;
}

.mud-paper {
    border-radius: var(--pb-radius);
    border: 1px solid var(--pb-border);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.pb-dark .mud-paper {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.mud-button-root {
    min-height: var(--pb-control-min-height);
    padding: var(--pb-control-padding-y) var(--pb-control-padding-x);
    font-size: 0.785rem;
    border-radius: 7px;
    font-weight: 600;
    text-transform: none;
}

.mud-icon-button {
    width: 32px;
    height: 32px;
    padding: 6px;
}

.mud-input-control {
    margin-top: 1px;
    margin-bottom: 1px;
}

.mud-input > .mud-input-control > .mud-input-control-input-container .mud-input-slot {
    min-height: 34px;
}

.mud-input-label,
.mud-input-helper,
.mud-typography-body2,
.mud-table-cell,
.mud-chip {
    font-size: 0.79rem;
}

.mud-nav-link {
    min-height: 34px;
    border-radius: 7px;
    margin-bottom: 2px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.mud-nav-link.active,
.mud-nav-link:hover {
    background: rgba(99, 91, 255, 0.1);
}

.pb-dark .mud-nav-link.active,
.pb-dark .mud-nav-link:hover {
    background: rgba(140, 132, 255, 0.18);
}

.mud-tabs-toolbar .mud-tab {
    min-height: 34px;
    padding-left: 10px;
    padding-right: 10px;
}

.mud-table-root .mud-table-head .mud-table-cell {
    font-weight: 700;
    background: rgba(15, 23, 42, 0.03);
    color: #334155;
}

.pb-dark .mud-table-root .mud-table-head .mud-table-cell {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
}

.mud-dialog .mud-dialog-title {
    border-bottom: 1px solid var(--pb-border);
}

.mud-dialog .mud-dialog-actions {
    border-top: 1px solid var(--pb-border);
}

.pb-auth-layout {
    padding: 1.25rem;
}

.pb-auth-container {
    max-width: 820px !important;
}

.pb-auth-card {
    background: rgba(255, 255, 255, 0.98);
}

.pb-auth-form .mud-grid {
    row-gap: 0.15rem;
}

.pb-filter-panel {
    background: var(--pb-surface-soft);
}

.pb-dark .pb-filter-panel {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.22);
}

.pb-dark .pb-filter-panel .mud-input-slot {
    background: rgba(15, 23, 42, 0.72);
    border-radius: 6px;
}

.pb-dark .pb-filter-panel .mud-input-label,
.pb-dark .pb-filter-panel .mud-input-helper-text,
.pb-dark .pb-filter-panel .mud-select-input,
.pb-dark .pb-filter-panel input,
.pb-dark .pb-filter-panel .mud-select .mud-input-slot {
    color: #cbd5e1 !important;
}

.pb-dark .pb-filter-panel .mud-input-adornment,
.pb-dark .pb-filter-panel .mud-select-icon {
    color: #9fb0c8 !important;
}

.pb-dark .pb-filter-panel .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.34) !important;
}

.pb-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.pb-kpi-card {
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    background: #fff;
}

.pb-dark .pb-kpi-card {
    background: #111827;
    border-color: rgba(148, 163, 184, 0.22);
}

.pb-kpi-label {
    color: var(--pb-muted);
    font-size: 0.74rem;
    margin-bottom: 2px;
}

.pb-dark .pb-kpi-label {
    color: #94a3b8;
}

.pb-kpi-value {
    font-weight: 700;
    font-size: 1.03rem;
}

.pb-catalog-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--pb-border);
    border-radius: 10px;
    background: #fff;
}

.pb-dark .pb-catalog-table-wrap {
    background: #111827;
    border-color: rgba(148, 163, 184, 0.2);
}

.pb-catalog-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.pb-catalog-table th,
.pb-catalog-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    text-align: left;
    vertical-align: top;
    font-size: 0.79rem;
}

.pb-dark .pb-catalog-table th,
.pb-dark .pb-catalog-table td {
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

.pb-catalog-table th {
    background: rgba(15, 23, 42, 0.03);
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #586275;
    font-weight: 700;
}

.pb-dark .pb-catalog-table th {
    background: rgba(148, 163, 184, 0.1);
    color: #93a4bc;
}

.pb-catalog-table tbody tr {
    cursor: pointer;
}

.pb-catalog-table tbody tr:hover {
    background: rgba(99, 91, 255, 0.04);
}

.pb-dark .pb-catalog-table tbody tr:hover {
    background: rgba(140, 132, 255, 0.12);
}

.pb-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.52rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.69rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.pb-mono {
    font-family: "IBM Plex Mono", monospace;
}

.file-upload-panel .pb-hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    padding: 0;
}

@media (max-width: 960px) {
    .pb-drawer {
        width: 232px !important;
    }

    .pb-page-shell {
        padding: 10px 10px 16px;
    }

    .pb-kpi-grid {
        grid-template-columns: 1fr;
    }
}
