@import '_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

/* ==========================================================================
   FARGO 3D - Modern Design System Stylesheet (Adaptive Light & Dark Modes)
   ========================================================================== */

:root {
    /* Modern Typography */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-family-mono: 'Cascadia Code', 'Fira Code', Consolas, 'Courier New', monospace;

    /* Fluent 2 Baseline Token Defaults (Light Mode) */
    --colorBrandBackground: #0284c7;
    --colorBrandBackgroundHover: #0369a1;
    --colorBrandBackgroundPressed: #075985;
    --colorBrandForeground1: #0284c7;
    --colorBrandForeground2: #0369a1;

    --colorNeutralBackground1: #f8fafc;
    --colorNeutralBackground2: #ffffff;
    --colorNeutralBackground3: #f1f5f9;
    --colorNeutralBackground4: #e2e8f0;

    --colorNeutralForeground1: #0f172a;
    --colorNeutralForeground2: #475569;
    --colorNeutralForeground3: #64748b;
    --colorNeutralForegroundDisabled: #94a3b8;

    --colorStroke1: rgba(0, 0, 0, 0.08);
    --colorStroke2: rgba(0, 0, 0, 0.14);
    --colorStrokeFocus2: #0284c7;

    /* Elevation & Shadows */
    --shadow2: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow4: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow8: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow16: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

    /* Border Radii */
    --borderRadiusSmall: 6px;
    --borderRadiusMedium: 12px;
    --borderRadiusLarge: 18px;
    --borderRadiusCircle: 9999px;

    /* Light Theme Glass & Ambient */
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-blur: blur(16px);
    --ambient-glow: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.04) 0%, transparent 60%);
}

/* ==========================================================================
   Dark Theme Overrides
   ========================================================================== */

[data-theme="dark"],
:root[style*="color-scheme: dark"] {
    --colorBrandBackground: #0284c7;
    --colorBrandBackgroundHover: #38bdf8;
    --colorBrandBackgroundPressed: #0369a1;
    --colorBrandForeground1: #38bdf8;
    --colorBrandForeground2: #60a5fa;

    --colorNeutralBackground1: #090d16;
    --colorNeutralBackground2: #0f172a;
    --colorNeutralBackground3: #131f37;
    --colorNeutralBackground4: #1e293b;

    --colorNeutralForeground1: #f8fafc;
    --colorNeutralForeground2: #94a3b8;
    --colorNeutralForeground3: #64748b;
    --colorNeutralForegroundDisabled: #475569;

    --colorStroke1: rgba(56, 189, 248, 0.14);
    --colorStroke2: rgba(56, 189, 248, 0.28);

    --shadow2: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow4: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 8px rgba(56, 189, 248, 0.06);
    --shadow8: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 18px rgba(56, 189, 248, 0.10);
    --shadow16: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 28px rgba(56, 189, 248, 0.15);

    --glass-bg: rgba(15, 23, 42, 0.88);
    --ambient-glow: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.12), transparent 70%), radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
}

/* ==========================================================================
   Global Reset & Base Typography
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-family-base);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--colorNeutralForeground1);
    background-color: var(--colorNeutralBackground1);
    background-image: var(--ambient-glow);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Remove focus rectangle on h1 from Blazor's FocusOnNavigate */
h1:focus,
h1:focus-visible,
.hero-title:focus,
.hero-title:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Minimalist Custom Scrollbars
   ========================================================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--colorNeutralForeground3);
    border-radius: var(--borderRadiusCircle);
    opacity: 0.5;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--colorBrandBackground);
}

/* ==========================================================================
   Fluent Layout & App Shell
   ========================================================================== */
.app-layout-root {
    width: 100%;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--colorNeutralBackground1);
    color: var(--colorNeutralForeground1);
}

/* Constrain FluentLayout container wrapper generated by FluentUI v5 */
.app-layout-root > [id$="-container"],
.app-layout-root [id$="-container"] {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.app-layout-root .fluent-layout {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    grid-template-areas:
        "header header header"
        "nav content aside"
        "footer footer footer" !important;
    overflow: hidden !important;
}

.app-layout-root .app-content-area,
.app-layout-root .fluent-layout-item[area="content"] {
    overflow-y: auto !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    grid-area: content !important;
}

.app-footer,
.app-layout-root .app-footer,
.app-layout-root .fluent-layout-item[area="footer"] {
    grid-area: footer !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    z-index: 85;
}

/* ==========================================================================
   Header & Top Navigation
   ========================================================================== */

fluent-layout-item[area="header"],
fluent-layout > [area="header"],
.app-header {
    background-color: var(--colorNeutralBackground1) !important;
    background: var(--colorNeutralBackground1) !important;
    border-bottom: 1px solid var(--colorStroke1) !important;
    box-shadow: var(--shadow2) !important;
    position: sticky;
    top: 0;
    z-index: 100;
}

:root[style*="color-scheme: dark"] fluent-layout-item[area="header"],
:root[style*="color-scheme: dark"] fluent-layout > [area="header"],
:root[style*="color-scheme: dark"] .app-header {
    background-color: var(--colorNeutralBackground1) !important;
    background: var(--colorNeutralBackground1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

.top-navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 58px;
    padding: 0 1.5rem;
    box-sizing: border-box;
    gap: 1.5rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.brand-badge {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

:root[style*="color-scheme: dark"] .brand-badge {
    background: transparent;
    border: none;
    box-shadow: none;
}

.brand-extruder-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(2, 132, 199, 0.6));
}

:root[style*="color-scheme: dark"] .brand-extruder-img {
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.75));
}

.brand-section:hover .brand-badge {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

.brand-title {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    color: var(--colorNeutralForeground1);
}

/* Top Nav Links */
.top-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.top-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.85rem;
    border-radius: var(--borderRadiusSmall);
    color: var(--colorNeutralForeground2);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.top-nav-item:hover:not(.active) {
    color: var(--colorNeutralForeground1);
    background-color: var(--colorNeutralBackground3);
}

:root[style*="color-scheme: dark"] .top-nav-item:hover:not(.active) {
    color: #f8fafc;
    background: rgba(56, 189, 248, 0.06);
    border-color: rgba(56, 189, 248, 0.15);
}

.top-nav-item.active {
    color: var(--colorBrandForeground1);
    background-color: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.25);
    font-weight: 600;
}

:root[style*="color-scheme: dark"] .top-nav-item.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.18);
}

/* Header Right Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.icon-btn-compact {
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mobile-nav-toggle {
    display: none !important;
}

@media (max-width: 900px) {
    .top-nav-links {
        display: none;
    }
    .mobile-nav-toggle {
        display: inline-flex !important;
    }
}

/* ==========================================================================
   Mobile Nav Drawer & Backdrop
   ========================================================================== */

.mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    background: var(--colorNeutralBackground2);
    border-left: 1px solid var(--colorStroke1);
    box-shadow: var(--shadow16);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    animation: slideInRight 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

:root[style*="color-scheme: dark"] .mobile-nav-drawer {
    background: #0f172a;
    border-left: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.15);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--colorStroke1);
    margin-bottom: 1rem;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    border-radius: var(--borderRadiusSmall);
    color: var(--colorNeutralForeground2);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.mobile-nav-item:hover {
    color: var(--colorNeutralForeground1);
    background: var(--colorNeutralBackground3);
}

.mobile-nav-item.active {
    color: var(--colorBrandForeground1);
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.25);
    font-weight: 600;
}

:root[style*="color-scheme: dark"] .mobile-nav-item.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.18);
}

/* ==========================================================================
   Content & Hero Section
   ========================================================================== */

.content {
    max-width: 1350px;
    margin: 0 auto;
    width: 100%;
}

.hero-banner {
    position: relative;
    padding: 3rem 2.5rem;
    border-radius: var(--borderRadiusLarge);
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.05) 0%, rgba(59, 130, 246, 0.03) 100%), var(--colorNeutralBackground2);
    border: 1px solid var(--colorStroke1);
    box-shadow: var(--shadow4);
    margin-bottom: 2.25rem;
    overflow: hidden;
}

:root[style*="color-scheme: dark"] .hero-banner {
    background: radial-gradient(ellipse at 50% -20%, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.95) 75%), #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 30px rgba(56, 189, 248, 0.10);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--colorBrandForeground1), transparent);
    opacity: 0.8;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 0.75rem 0;
    color: var(--colorNeutralForeground1);
}

.hero-gradient-text {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(2, 132, 199, 0.25));
}

:root[style*="color-scheme: dark"] .hero-gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #818cf8 100%);
    filter: drop-shadow(0 2px 14px rgba(56, 189, 248, 0.4));
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--colorNeutralForeground2);
    max-width: 680px;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.5rem;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    border-radius: var(--borderRadiusCircle);
    background-color: var(--colorNeutralBackground3);
    border: 1px solid var(--colorStroke1);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--colorNeutralForeground2);
}

:root[style*="color-scheme: dark"] .hero-chip {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.08);
}

/* ==========================================================================
   Feature Hub Cards Grid
   ========================================================================== */

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.25rem;
}

.hub-card {
    background: var(--colorNeutralBackground2);
    border: 1px solid var(--colorStroke1);
    border-radius: var(--borderRadiusMedium);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--colorNeutralForeground1);
    box-shadow: var(--shadow2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hub-card:hover {
    transform: translateY(-4px);
    border-color: var(--colorBrandForeground1);
    box-shadow: var(--shadow8);
    background: var(--colorNeutralBackground3);
}

:root[style*="color-scheme: dark"] .hub-card {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.14);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

:root[style*="color-scheme: dark"] .hub-card:hover {
    background: #131f37;
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 24px rgba(56, 189, 248, 0.22);
}

.hub-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--borderRadiusMedium);
    background: rgba(2, 132, 199, 0.1);
    color: var(--colorBrandForeground1);
    margin-bottom: 1.25rem;
    border: 1px solid rgba(2, 132, 199, 0.2);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

:root[style*="color-scheme: dark"] .hub-icon-wrapper {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   Getting Started 3-Step Container
   ========================================================================== */

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 1.25rem 0;
}

@media (max-width: 850px) {
    .steps-container {
        grid-template-columns: 1fr;
    }
}

.step-card {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--borderRadiusMedium);
    background-color: var(--colorNeutralBackground3);
    border: 1px solid var(--colorStroke1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

:root[style*="color-scheme: dark"] .step-card {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.14);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--borderRadiusCircle);
    background: linear-gradient(135deg, var(--colorBrandBackground), #0284c7);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

:root[style*="color-scheme: dark"] .step-number {
    background: linear-gradient(135deg, #2563eb, #0284c7);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--colorNeutralForeground1);
}

.step-desc {
    font-size: 0.875rem;
    color: var(--colorNeutralForeground2);
    margin: 0;
    line-height: 1.5;
}

fluent-card {
    background-color: var(--colorNeutralBackground2) !important;
    border: 1px solid var(--colorStroke1) !important;
    box-shadow: var(--shadow4) !important;
    border-radius: var(--borderRadiusMedium) !important;
}

:root[style*="color-scheme: dark"] fluent-card {
    background-color: #0f172a !important;
    border: 1px solid rgba(56, 189, 248, 0.14) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(56, 189, 248, 0.06) !important;
}

/* ==========================================================================
   Master-Detail Wiki Layout
   ========================================================================== */

.wiki-layout-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

.wiki-sidebar {
    width: 280px;
    min-width: 280px;
    background-color: var(--colorNeutralBackground2);
    border: 1px solid var(--colorStroke1);
    border-radius: var(--borderRadiusMedium);
    padding: 1.25rem;
    box-shadow: var(--shadow2);
    position: sticky;
    top: 75px;
}

.wiki-sidebar-section {
    margin-bottom: 1.5rem;
}

.wiki-sidebar-section:last-child {
    margin-bottom: 0;
}

.wiki-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--colorNeutralForeground2);
    margin-bottom: 0.65rem;
    padding: 0 0.25rem;
}

.wiki-link-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wiki-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.75rem;
    border-radius: var(--borderRadiusSmall);
    color: var(--colorNeutralForeground2);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.wiki-nav-link:hover {
    color: var(--colorNeutralForeground1);
    background-color: var(--colorNeutralBackground3);
}

.wiki-nav-link.active {
    color: var(--colorBrandForeground1);
    background-color: rgba(2, 132, 199, 0.1);
    font-weight: 600;
}

:root[style*="color-scheme: dark"] .wiki-nav-link.active {
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.wiki-content-pane {
    flex: 1;
    min-width: 0;
}

@media (max-width: 960px) {
    .wiki-layout-container {
        flex-direction: column;
    }

    .wiki-sidebar {
        width: 100%;
        min-width: 100%;
        position: static;
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==========================================================================
   Modern Calendar Styling
   ========================================================================== */

.calendar-container {
    border: 1px solid var(--colorStroke1);
    border-radius: var(--borderRadiusMedium);
    background-color: var(--colorNeutralBackground2);
    overflow: hidden;
    box-shadow: var(--shadow2);
}

.calendar-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--colorNeutralBackground3);
    border-bottom: 1px solid var(--colorStroke1);
}

.calendar-month-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--colorNeutralForeground1);
}

.calendar-weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: var(--colorNeutralBackground3);
    border-bottom: 1px solid var(--colorStroke1);
}

.calendar-weekday-cell {
    padding: 0.65rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--colorNeutralForeground2);
    border-right: 1px solid var(--colorStroke1);
}

.calendar-weekday-cell:last-child {
    border-right: none;
}

.calendar-grid-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(110px, 1fr);
}

.calendar-day-cell {
    padding: 0.5rem;
    min-height: 105px;
    border-right: 1px solid var(--colorStroke1);
    border-bottom: 1px solid var(--colorStroke1);
    background-color: var(--colorNeutralBackground2);
    display: flex;
    flex-direction: column;
    transition: background-color 0.15s ease;
}

.calendar-day-cell:nth-child(7n) {
    border-right: none;
}

.calendar-day-cell.other-month {
    background-color: var(--colorNeutralBackground3);
    opacity: 0.45;
}

.calendar-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.calendar-day-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--colorNeutralForeground2);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--borderRadiusCircle);
}

.calendar-day-number.today {
    background-color: var(--colorBrandBackground);
    color: white !important;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

.calendar-event-pill {
    width: 100%;
    text-align: left;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
    transition: transform 0.1s ease, filter 0.1s ease;
}

.calendar-event-pill:hover {
    transform: translateY(-1px);
    filter: brightness(1.15);
}

.calendar-more-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--colorBrandForeground1);
    padding-left: 4px;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .calendar-weekday-cell {
        font-size: 0.6875rem;
        padding: 0.4rem 0.2rem;
    }
    .calendar-grid-cells {
        grid-auto-rows: minmax(80px, 1fr);
    }
    .calendar-day-cell {
        min-height: 80px;
        padding: 0.25rem;
    }
    .calendar-event-pill {
        font-size: 0.6875rem;
        padding: 2px 4px;
    }
}

/* ==========================================================================
   Unsaved Changes Warning Banner
   ========================================================================== */

/* ==========================================================================
   Unsaved Changes Warning Banner & Message Bars (High Contrast)
   ========================================================================== */

/* Default / Light Mode Banner */
.unsaved-changes-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-radius: var(--borderRadiusMedium);
    background-color: #fef3c7 !important;
    border: 1px solid #d97706 !important;
    color: #78350f !important;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12);
}

.unsaved-text {
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    color: #78350f !important;
}

.unsaved-changes-banner fluent-button {
    font-weight: 600 !important;
    color: #78350f !important;
    border-color: #d97706 !important;
}

/* Dark Mode Banner */
[style*="color-scheme: dark"] .unsaved-changes-banner,
:root[style*="color-scheme: dark"] .unsaved-changes-banner {
    background-color: rgba(245, 158, 11, 0.18) !important;
    border: 1px solid rgba(245, 158, 11, 0.55) !important;
    color: #fef08a !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

[style*="color-scheme: dark"] .unsaved-text,
:root[style*="color-scheme: dark"] .unsaved-text {
    color: #fef08a !important;
}

[style*="color-scheme: dark"] .unsaved-changes-banner fluent-button,
:root[style*="color-scheme: dark"] .unsaved-changes-banner fluent-button {
    color: #fef08a !important;
    border-color: rgba(245, 158, 11, 0.55) !important;
}

/* Fluent Message Bar High-Contrast Overrides */

/* Light Mode Message Bars */
fluent-message-bar[intent="success"],
.fluent-message-bar[intent="success"] {
    background-color: #ecfdf5 !important;
    border: 1px solid #10b981 !important;
    color: #064e3b !important;
}

fluent-message-bar[intent="warning"],
.fluent-message-bar[intent="warning"] {
    background-color: #fffbeb !important;
    border: 1px solid #f59e0b !important;
    color: #78350f !important;
}

fluent-message-bar[intent="info"],
.fluent-message-bar[intent="info"] {
    background-color: #eff6ff !important;
    border: 1px solid #3b82f6 !important;
    color: #1e3a8a !important;
}

fluent-message-bar[intent="error"],
.fluent-message-bar[intent="error"] {
    background-color: #fef2f2 !important;
    border: 1px solid #ef4444 !important;
    color: #7f1d1d !important;
}

/* Dark Mode Message Bars */
[style*="color-scheme: dark"] fluent-message-bar[intent="success"],
[style*="color-scheme: dark"] .fluent-message-bar[intent="success"],
:root[style*="color-scheme: dark"] fluent-message-bar[intent="success"] {
    background-color: rgba(16, 185, 129, 0.18) !important;
    border: 1px solid rgba(16, 185, 129, 0.55) !important;
    color: #a7f3d0 !important;
}

[style*="color-scheme: dark"] fluent-message-bar[intent="warning"],
[style*="color-scheme: dark"] .fluent-message-bar[intent="warning"],
:root[style*="color-scheme: dark"] fluent-message-bar[intent="warning"] {
    background-color: rgba(245, 158, 11, 0.18) !important;
    border: 1px solid rgba(245, 158, 11, 0.55) !important;
    color: #fef08a !important;
}

[style*="color-scheme: dark"] fluent-message-bar[intent="info"],
[style*="color-scheme: dark"] .fluent-message-bar[intent="info"],
:root[style*="color-scheme: dark"] fluent-message-bar[intent="info"] {
    background-color: rgba(59, 130, 246, 0.18) !important;
    border: 1px solid rgba(59, 130, 246, 0.55) !important;
    color: #bfdbfe !important;
}

[style*="color-scheme: dark"] fluent-message-bar[intent="error"],
[style*="color-scheme: dark"] .fluent-message-bar[intent="error"],
:root[style*="color-scheme: dark"] fluent-message-bar[intent="error"] {
    background-color: rgba(239, 68, 68, 0.18) !important;
    border: 1px solid rgba(239, 68, 68, 0.55) !important;
    color: #fecaca !important;
}

/* ==========================================================================
   User Profile Pill & Header Actions Alignment
   ========================================================================== */

.user-header-pill {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-profile-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px !important;
    padding: 0 10px 0 6px !important;
    border-radius: var(--borderRadiusSmall) !important;
    text-decoration: none !important;
}

.user-profile-btn-content {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 100% !important;
    vertical-align: middle !important;
}

.user-profile-name {
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    color: var(--colorNeutralForeground1) !important;
    line-height: 1.2 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.admin-badge-btn {
    font-size: 0.8125rem !important;
    padding: 0.25rem 0.65rem !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   Admin Panel, FluentPaginator, FluentTabs & DataGrid Styling
   ========================================================================== */

/* Remove focus rings from tabs globally */
fluent-tab:focus,
fluent-tab:focus-visible,
fluent-tab[active]:focus,
fluent-tab[active]:focus-visible,
fluent-tabs fluent-tab:focus,
fluent-tabs fluent-tab:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Fluent Tabs Polish */
fluent-tabs {
    margin-bottom: 1rem;
}

fluent-tab {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--colorNeutralForeground2);
    padding: 0.5rem 1rem;
    transition: color 0.15s ease;
}

fluent-tab[active] {
    color: var(--colorBrandForeground1) !important;
}

/* ==========================================================================
   Fluent Paginator Styling (Fix Black Circles)
   ========================================================================== */

fluent-paginator {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--colorNeutralForeground1);
    font-size: 0.875rem;
}

/* Light Mode Paginator Buttons */
fluent-paginator fluent-button,
fluent-paginator button {
    background: #ffffff !important;
    border: 1px solid var(--colorStroke1) !important;
    color: #1e293b !important;
    border-radius: var(--borderRadiusSmall) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.15s ease;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

fluent-paginator fluent-button:hover:not([disabled]),
fluent-paginator button:hover:not(:disabled) {
    background: #f1f5f9 !important;
    border-color: var(--colorBrandBackground) !important;
    color: var(--colorBrandBackground) !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

fluent-paginator fluent-button[disabled],
fluent-paginator button:disabled {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    opacity: 0.6;
    box-shadow: none;
}

/* Dark Mode Paginator Buttons */
[style*="color-scheme: dark"] fluent-paginator fluent-button,
[style*="color-scheme: dark"] fluent-paginator button,
:root[style*="color-scheme: dark"] fluent-paginator fluent-button,
:root[style*="color-scheme: dark"] fluent-paginator button {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

[style*="color-scheme: dark"] fluent-paginator fluent-button:hover:not([disabled]),
[style*="color-scheme: dark"] fluent-paginator button:hover:not(:disabled),
:root[style*="color-scheme: dark"] fluent-paginator fluent-button:hover:not([disabled]),
:root[style*="color-scheme: dark"] fluent-paginator button:hover:not(:disabled) {
    background: #334155 !important;
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

[style*="color-scheme: dark"] fluent-paginator fluent-button[disabled],
[style*="color-scheme: dark"] fluent-paginator button:disabled,
:root[style*="color-scheme: dark"] fluent-paginator fluent-button[disabled],
:root[style*="color-scheme: dark"] fluent-paginator button:disabled {
    background: #0f172a !important;
    color: #64748b !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    opacity: 0.45;
    box-shadow: none;
}

/* ==========================================================================
   Fluent DataGrid Styling
   ========================================================================== */

fluent-data-grid {
    background-color: var(--colorNeutralBackground2);
    color: var(--colorNeutralForeground1);
    border-radius: var(--borderRadiusMedium);
    border: 1px solid var(--colorStroke1);
    box-shadow: var(--shadow2);
    overflow: hidden;
}

fluent-data-grid fluent-header-cell {
    font-weight: 700 !important;
    color: var(--colorNeutralForeground1) !important;
    background-color: var(--colorNeutralBackground3) !important;
    border-bottom: 2px solid var(--colorStroke1) !important;
    padding: 0.65rem 0.75rem !important;
    font-size: 0.875rem !important;
}

fluent-data-grid fluent-data-grid-row {
    border-bottom: 1px solid var(--colorStroke1) !important;
    transition: background-color 0.12s ease;
}

fluent-data-grid fluent-data-grid-row:hover {
    background-color: var(--colorNeutralBackground3) !important;
}

fluent-data-grid fluent-data-grid-cell {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.875rem !important;
    vertical-align: middle !important;
}

/* Admin Container */
.admin-container {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================================
   Events Filter Bar & Layout
   ========================================================================== */

.events-page-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}



.filter-apply-btn {
    height: 32px !important;
    min-height: 32px !important;
    min-width: 80px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1.25rem !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
    margin-bottom: 3px !important;
}

@media (max-width: 860px) {
    
}

@media (max-width: 520px) {
    
}

/* Event Tags Row */
.event-tags-input-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.tag-input-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* Events Filter Bar */
.events-filter-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--colorNeutralBackground2);
    border: 1px solid var(--colorStroke1);
    border-radius: var(--borderRadiusMedium);
    box-shadow: var(--shadow2);
    width: fit-content;
    max-width: 100%;
}

.events-filter-card .filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.events-filter-card .filter-item-duration {
    width: 90px;
}

.events-filter-card .filter-item-unit {
    width: 170px;
}

.events-filter-card .filter-item-autocomplete {
    width: 260px;
}

.events-filter-card .filter-item-btn {
    width: auto;
}

.events-filter-card .filter-item fluent-field,
.events-filter-card .filter-item fluent-text-input,
.events-filter-card .filter-item fluent-dropdown,
.events-filter-card .filter-item fluent-number-field {
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
}

.events-filter-card .filter-item fluent-dropdown::part(control),
.events-filter-card .filter-item fluent-text-input::part(control) {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.events-filter-card .filter-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--colorNeutralForeground1);
    user-select: none;
    line-height: 1;
    display: block;
}

.events-filter-card .filter-label-spacer {
    visibility: hidden;
}

.events-filter-card .filter-apply-btn {
    height: 32px !important;
    min-height: 32px !important;
    min-width: 80px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1.25rem !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
}

/* Standalone Event Tag Badges (immune to theme overrides) */
.event-tag-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 3px 10px !important;
    border-radius: 9999px !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
    user-select: none !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) !important;
}

.event-tag-badge.clickable {
    cursor: pointer !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
}

.event-tag-badge.clickable:hover {
    opacity: 0.85 !important;
    transform: scale(1.05) !important;
}


/* =========================================================================
   3D Fuel Partner Promo Banner on Home Page
   ========================================================================= */
.partner-promo-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 2.25rem 2.5rem;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, var(--colorNeutralBackground2) 0%, rgba(var(--colorBrandBackgroundRgb, 122, 46, 184), 0.08) 100%), var(--colorNeutralBackground2);
    border: 1px solid var(--colorStroke1);
    border-left: 4px solid var(--colorBrandBackground);
    border-radius: var(--borderRadiusLarge, 12px);
    box-shadow: var(--shadow4, 0 4px 16px rgba(0, 0, 0, 0.15));
    position: relative;
    overflow: hidden;
}

.partner-promo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--colorBrandBackground) 0%, transparent 70%);
    opacity: 0.08;
    pointer-events: none;
    border-radius: 50%;
}

.partner-promo-content {
    flex: 1;
    min-width: 0;
}

.partner-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.partner-perk-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: var(--colorBrandBackground);
    color: var(--colorNeutralForegroundOnBrand, #ffffff);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.partner-tag-subtle {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--colorNeutralForeground3);
}

.partner-promo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--colorNeutralForeground1);
    margin: 0 0 0.6rem 0;
    line-height: 1.3;
}

.partner-brand-highlight {
    color: var(--colorBrandForeground1);
    font-weight: 700;
}

.partner-promo-desc {
    font-size: 0.9375rem;
    color: var(--colorNeutralForeground2);
    line-height: 1.6;
    margin: 0 0 1.25rem 0;
    max-width: 720px;
}

.partner-perks-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.partner-perk-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--colorNeutralForeground1);
    background-color: var(--colorNeutralBackground3, rgba(255, 255, 255, 0.05));
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--colorStroke2);
}

/* Right Voucher & Action Box */
.partner-promo-action-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    padding: 1.5rem 1.75rem;
    background: var(--colorNeutralBackground1);
    border: 1px dashed var(--colorBrandBackground);
    border-radius: var(--borderRadiusMedium, 8px);
    box-shadow: var(--shadow2);
    text-align: center;
    position: relative;
    z-index: 1;
}

.promo-box-header {
    margin-bottom: 0.5rem;
}

.promo-box-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--colorNeutralForeground3);
    text-transform: uppercase;
}

.promo-code-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 12px;
    background-color: var(--colorNeutralBackground2);
    border: 2px solid var(--colorBrandBackground);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.35rem;
    width: 100%;
    box-sizing: border-box;
}

.promo-code-display:hover {
    background-color: var(--colorNeutralBackground3);
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(var(--colorBrandBackgroundRgb, 122, 46, 184), 0.25);
}

.promo-code-display.code-copied {
    border-color: var(--colorPaletteGreenBorderActive, #107c10);
    background-color: rgba(16, 124, 16, 0.1);
}

.promo-code-text {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--colorBrandForeground1);
}

.promo-copy-btn {
    min-width: auto !important;
    padding: 4px !important;
    height: auto !important;
}

.promo-copy-hint {
    font-size: 0.75rem;
    color: var(--colorNeutralForeground3);
    margin-bottom: 1rem;
}

.promo-copied-feedback {
    font-size: 0.75rem;
    font-weight: 700;
    color: #107c10;
    margin-bottom: 1rem;
    animation: fadeIn 0.2s ease-in;
}

.partner-shop-btn {
    width: 100% !important;
    font-weight: 700 !important;
    height: 38px !important;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .partner-promo-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.75rem;
    }

    .partner-promo-action-box {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}
