/* ROOT VARIABLES - macOS CRYSTAL THEME */
:root {
    /* macOS Palette */
    --bg-wallpaper: #F5F5FA;
    /* Clean Light Gray/White base */
    --bg-acrylic: rgba(255, 255, 255, 0.65);
    /* Heavy Glass */
    --bg-acrylic-strong: rgba(255, 255, 255, 0.85);

    --primary: #5856D6;
    /* macOS Purple */
    --primary-gradient: linear-gradient(135deg, #5856D6 0%, #AF52DE 100%);
    --accent: #34C759;
    /* macOS Green */
    --blue-ios: #007AFF;
    --cyan-ios: #32ADE6;

    --text-primary: #1D1D1F;
    /* San Francisco Black */
    --text-secondary: #86868B;

    /* Effects */
    --shadow-window: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-float: 0 8px 16px rgba(0, 0, 0, 0.08);
    --backdrop-blur: blur(25px) saturate(180%);
    --border-light: 1px solid rgba(0, 0, 0, 0.05);

    /* Radius */
    --radius-window: 18px;
    --radius-btn: 10px;
}

/* GLOBAL RESETS & TYPOGRAPHY */
body {
    background-color: var(--bg-wallpaper);
    /* Abstract Mesh Gradient Background */
    background-image:
        radial-gradient(circle at 10% 10%, rgba(88, 86, 214, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(50, 173, 230, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* LAYOUT STRUCTURE - TOP NAV */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* MAC-STYLE COMPONENTS */

/* 1. The Glass Bar (Top Nav) */
.mac-nav-bar {
    position: sticky;
    top: 20px;
    margin: 0 auto;
    width: 90%;
    max-width: 1000px;
    height: 60px;
    background: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: var(--shadow-float);
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: transform 0.2s;
}

.mac-nav-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.nav-brand-logo-wrap {
    width: 220px !important;
    height: 52px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    overflow: visible !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto !important;
    position: relative;
}

.nav-brand-logo {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: left center !important;
    display: block !important;
    transform: translateY(0) !important;
}

/* 2. Window Containers */
.mac-window {
    background: var(--bg-acrylic);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--border-light);
    border-radius: var(--radius-window);
    box-shadow: var(--shadow-window);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mac-window-header {
    height: 50px;
    border-bottom: var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.4);
}

.traffic-lights {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.light.red {
    background: #FF5F57;
    border: 1px solid #E33E32;
}

.light.yellow {
    background: #FEBC2E;
    border: 1px solid #D6A125;
}

.light.green {
    background: #28C840;
    border: 1px solid #1DAB2F;
}

/* 3. Navigation Links (Toolbar Style) */
.nav-pills {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    font-weight: 600;
}

/* UTILS */
.text-gradient {
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-ios {
    background: var(--blue-ios);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    font-weight: 500;
    font-size: 0.9rem;
    transition: filter 0.2s;
}

.btn-ios:hover {
    filter: brightness(1.1);
}

/* BLAZOR OVERRIDES */
#blazor-error-ui {
    display: none;
}

.top-row {
    display: none;
}

.page-content-offset {
    /* Mirror Diagnostics spacing: 16px top margin + 24px inner top offset. */
    margin-top: 16px;
    padding-top: 24px;
}

.asset-type-picker {
    display: flex !important;
    flex-wrap: wrap;
    gap: 12px 14px !important;
    margin-top: 4px;
    margin-bottom: 6px;
    padding-inline: 0;
}

.asset-type-btn {
    text-align: left;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
    flex: 0 0 auto;
    min-height: 42px;
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.16s ease;
    margin: 0 !important;
}

.asset-type-btn:hover {
    transform: translateY(-1px);
}

.asset-type-label {
    font-weight: 500;
    letter-spacing: 0.1px;
}

.asset-type-btn.active {
    border-color: #6c757d !important;
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.asset-type-btn[aria-pressed="true"] {
    border-color: #6c757d !important;
    background-color: #6c757d !important;
    color: #ffffff !important;
}

@media (max-width: 992px) {
    .asset-type-picker {
        gap: 10px !important;
    }
}
