html, body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── App shell ─────────────────────────────────────────────── */

.portal-app-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px);
}

.mud-theme-dark .portal-app-bar {
    background-color: rgba(10, 10, 10, 0.92) !important;
}

.mud-theme-light .portal-app-bar {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

.app-bar-logo-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.35);
    color: #00E676;
}

.app-bar-title {
    letter-spacing: -0.02em;
}

.portal-drawer {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.mud-theme-dark .portal-drawer {
    background-color: #000000 !important;
}

.drawer-user-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.main-content-area {
    min-height: calc(100dvh - 64px);
}

.mud-theme-dark .main-content-area {
    background: #0a0a0a;
}

.page-content {
    max-width: 1200px;
}

.drawer-status-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00E676;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
    flex-shrink: 0;
}

/* ── Navigation pills ──────────────────────────────────────── */

.nav-menu-root {
    padding-top: 8px !important;
}

.nav-section-label {
    padding: 12px 16px 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.nav-menu-root .mud-nav-link {
    border-radius: 9999px !important;
    margin: 2px 8px !important;
    padding: 10px 16px !important;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-menu-root .mud-nav-link:not(.mud-nav-link-active):hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.mud-theme-dark .nav-menu-root .mud-nav-link-active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.mud-theme-dark .nav-menu-root .mud-nav-link-active .mud-nav-link-icon {
    color: #00E676 !important;
}

/* ── Global cards & buttons ────────────────────────────────── */

.portal-card {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    background: var(--mud-palette-surface) !important;
}

.mud-theme-dark .portal-card {
    background: #141414 !important;
}

.devibot-manage-tabs .mud-tabs-toolbar {
    background: transparent !important;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.mud-theme-dark .mud-paper-outlined {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: #141414;
}

.mud-button-root.mud-button-filled,
.mud-button-root.mud-button-outlined {
    border-radius: 9999px;
    text-transform: none;
    font-weight: 600;
}

.mud-button-root.mud-button-filled-primary {
    color: #0a0a0a !important;
}

.mud-input-outlined-border {
    border-radius: 12px !important;
}

/* ── Page layout ───────────────────────────────────────────── */

.portal-page-header {
    margin-bottom: 24px;
}

.portal-page-title {
    letter-spacing: -0.03em;
    font-weight: 700 !important;
}

.portal-hero-banner {
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #0d2818 0%, #123d24 45%, #0a1a10 100%);
    border: 1px solid rgba(0, 230, 118, 0.2);
    position: relative;
    overflow: hidden;
}

.portal-hero-banner::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.portal-hero-banner__inner {
    position: relative;
    z-index: 1;
}

.portal-hero-banner__title {
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

.portal-hero-banner__text {
    color: rgba(255, 255, 255, 0.78) !important;
    max-width: 640px;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(0, 230, 118, 0.45);
    color: #00E676;
    background: rgba(0, 230, 118, 0.08);
}

.portal-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.portal-action-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    background: #141414;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.mud-theme-light .portal-action-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

.portal-action-card:hover {
    border-color: rgba(0, 230, 118, 0.35);
}

/* ── Auth layout ───────────────────────────────────────────── */

.auth-viewport.mud-layout-root {
    min-height: 100dvh;
}

.auth-shell {
    min-height: 100dvh;
    background-color: var(--mud-palette-background);
}

.auth-hero-column {
    background: linear-gradient(145deg, #0a1f14 0%, #0d3320 45%, #051410 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-hero-column::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(0, 230, 118, 0.15) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.auth-hero-inner {
    position: relative;
    z-index: 1;
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.35);
    backdrop-filter: blur(8px);
}

.auth-hero-icon {
    color: #00E676 !important;
}

.auth-hero-text {
    color: #fff !important;
}

.auth-hero-text-dim {
    color: rgba(255, 255, 255, 0.78) !important;
}

.auth-hero-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.25);
    flex-shrink: 0;
    color: #00E676;
}

.auth-preview-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px);
    border-radius: 16px !important;
}

.auth-preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.auth-preview-dot--green {
    background: #00E676;
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
}

.auth-preview-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.18);
}

.auth-preview-bar--full { width: 100%; }
.auth-preview-bar--three-quarters { width: 75%; }
.auth-preview-bar--half { width: 50%; }

.auth-form-card {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    background: var(--mud-palette-surface) !important;
}

.mud-theme-dark .auth-form-card {
    background: #141414 !important;
}

.mud-theme-dark .auth-shell .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ── Landing page ──────────────────────────────────────────── */

.landing-hero {
    min-height: calc(100dvh - 64px);
    display: flex;
    align-items: center;
}

.landing-hero-card {
    border-radius: 24px;
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, #141414 0%, #0a0a0a 100%);
    max-width: 720px;
}

.mud-theme-light .landing-hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f4f4f5 100%);
    border-color: rgba(0, 0, 0, 0.08);
}
