/* Zuriko Global Styles */
:root {
    --primary-500: #4F46E5;
    --primary-600: #4338CA;
    --secondary-500: #7C3AED;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #4F46E5, #7C3AED, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Font Weight Utilities */
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-medium { font-weight: 500 !important; }

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Loading Spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

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

/* Selection */
::selection {
    background: var(--primary-500);
    color: white;
}

/* Utility Classes */
.h-100 { height: 100%; }
.text-center { text-align: center; }

/* Public Header */
.public-header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9) !important;
}

/* Auth Layout */
.auth-layout {
    background: var(--gray-50);
}

/* ==================== WHITEBOARD TEMPLATE BACKGROUNDS ==================== */

/* Blank template (default) */
.whiteboard-template-blank {
    background: white;
}

/* Grid template - small squares */
.whiteboard-template-grid {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: white;
}

/* Lined paper template - horizontal lines */
.whiteboard-template-lined {
    background-image: repeating-linear-gradient(
        transparent,
        transparent 24px,
        #e0e0e0 24px,
        #e0e0e0 25px
    );
    background-color: white;
}

/* Graph paper template - major and minor grid */
.whiteboard-template-graph {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.15) 1px, transparent 1px),
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-color: white;
}

/* Dotted paper template */
.whiteboard-template-dotted {
    background-image: radial-gradient(circle, #ccc 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: white;
}

/* Cornell notes template */
.whiteboard-template-cornell {
    background-image:
        linear-gradient(90deg, transparent 75px, #d4a5a5 75px, #d4a5a5 76px, transparent 76px),
        linear-gradient(transparent 60px, #d4a5a5 60px, #d4a5a5 61px, transparent 61px),
        repeating-linear-gradient(transparent, transparent 24px, #e0e0e0 24px, #e0e0e0 25px);
    background-color: white;
}

/* Music staff template */
.whiteboard-template-music {
    background-image: repeating-linear-gradient(
        transparent,
        transparent 14px,
        #333 14px,
        #333 15px,
        transparent 15px,
        transparent 29px,
        #333 29px,
        #333 30px,
        transparent 30px,
        transparent 44px,
        #333 44px,
        #333 45px,
        transparent 45px,
        transparent 59px,
        #333 59px,
        #333 60px,
        transparent 60px,
        transparent 74px,
        #333 74px,
        #333 75px,
        transparent 75px,
        transparent 100px
    );
    background-color: white;
}

/* ==================== WHITEBOARD PAGE NAVIGATION ==================== */

.whiteboard-page-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
}

.whiteboard-page-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    max-width: 100%;
}

.page-thumbnail {
    width: 80px;
    height: 60px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: white;
    flex-shrink: 0;
}

.page-thumbnail:hover {
    border-color: var(--primary-500);
}

.page-thumbnail.active {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.page-thumbnail .page-number {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    padding: 0 4px;
    border-radius: 2px;
}

/* ==================== LASER POINTER STYLES ==================== */

.laser-pointer {
    position: absolute;
    pointer-events: none;
    z-index: 100;
}

.laser-dot {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(255, 0, 0, 1) 0%, rgba(255, 0, 0, 0) 70%);
    border-radius: 50%;
    animation: laser-pulse 1s ease-in-out infinite;
}

@keyframes laser-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.laser-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 0, 0, 0.5);
    border-radius: 50%;
    animation: laser-ripple 1.5s ease-out infinite;
}

@keyframes laser-ripple {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ==================== WHITEBOARD IMAGE UPLOAD ==================== */

.whiteboard-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.whiteboard-image-drop {
    border: 3px dashed var(--primary-500);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: white;
    background: rgba(79, 70, 229, 0.2);
}

.whiteboard-image-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-500);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 60;
}

.whiteboard-image-handle.nw { cursor: nw-resize; }
.whiteboard-image-handle.ne { cursor: ne-resize; }
.whiteboard-image-handle.sw { cursor: sw-resize; }
.whiteboard-image-handle.se { cursor: se-resize; }

/* ==================== EXPORT/SAVE MENU ==================== */

.whiteboard-export-menu {
    position: absolute;
    top: 48px;
    right: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 180px;
}

.whiteboard-export-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.whiteboard-export-menu-item:hover {
    background: var(--gray-100);
}

.whiteboard-export-menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.whiteboard-export-menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* ==================== ACCESSIBILITY STYLES ==================== */

/* High Contrast Mode */
.high-contrast-mode {
    --hc-background: #000000;
    --hc-surface: #1a1a1a;
    --hc-text: #ffffff;
    --hc-text-secondary: #ffff00;
    --hc-primary: #00ffff;
    --hc-accent: #ff00ff;
    --hc-success: #00ff00;
    --hc-warning: #ffff00;
    --hc-error: #ff0000;
    --hc-border: #ffffff;
}

.high-contrast-mode body,
.high-contrast-mode .mud-main-content {
    background-color: var(--hc-background) !important;
    color: var(--hc-text) !important;
}

.high-contrast-mode .mud-paper,
.high-contrast-mode .mud-card,
.high-contrast-mode .mud-dialog {
    background-color: var(--hc-surface) !important;
    border: 2px solid var(--hc-border) !important;
}

.high-contrast-mode .mud-button-filled {
    background-color: var(--hc-primary) !important;
    color: var(--hc-background) !important;
    border: 2px solid var(--hc-primary) !important;
}

.high-contrast-mode .mud-button-outlined {
    border: 2px solid var(--hc-text) !important;
    color: var(--hc-text) !important;
}

.high-contrast-mode .mud-button:focus,
.high-contrast-mode .mud-icon-button:focus,
.high-contrast-mode a:focus,
.high-contrast-mode button:focus {
    outline: 3px solid var(--hc-text-secondary) !important;
    outline-offset: 2px !important;
}

.high-contrast-mode .mud-input,
.high-contrast-mode .mud-input-control input,
.high-contrast-mode .mud-select {
    background-color: var(--hc-surface) !important;
    color: var(--hc-text) !important;
    border: 2px solid var(--hc-border) !important;
}

.high-contrast-mode .mud-typography {
    color: var(--hc-text) !important;
}

.high-contrast-mode .mud-typography-secondary {
    color: var(--hc-text-secondary) !important;
}

.high-contrast-mode a {
    color: var(--hc-primary) !important;
    text-decoration: underline !important;
}

.high-contrast-mode .mud-chip {
    border: 2px solid var(--hc-border) !important;
}

.high-contrast-mode .mud-alert {
    border: 2px solid var(--hc-border) !important;
}

.high-contrast-mode .mud-table th,
.high-contrast-mode .mud-table td {
    border: 1px solid var(--hc-border) !important;
}

/* Live Class High Contrast */
.high-contrast-mode .live-class-container {
    background-color: var(--hc-background) !important;
}

.high-contrast-mode .participant-video {
    border: 2px solid var(--hc-border) !important;
}

.high-contrast-mode .chat-message {
    border: 1px solid var(--hc-border) !important;
}

/* Reduced Motion */
.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

.reduce-motion .hover-lift:hover {
    transform: none !important;
}

/* Large Controls Mode */
.large-controls .mud-icon-button {
    width: 56px !important;
    height: 56px !important;
}

.large-controls .mud-icon-button .mud-icon-root {
    font-size: 28px !important;
}

.large-controls .mud-button {
    font-size: 18px !important;
    padding: 12px 24px !important;
}

.large-controls .control-bar .mud-icon-button {
    width: 64px !important;
    height: 64px !important;
}

/* Focus Visible - Enhanced focus indicators */
:focus-visible {
    outline: 3px solid var(--primary-500) !important;
    outline-offset: 2px !important;
}

.high-contrast-mode :focus-visible {
    outline: 3px solid var(--hc-text-secondary) !important;
}

/* Skip Links for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-500);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only - Visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Live Region for Announcements */
.live-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Caption Sizes */
.caption-size-small { --caption-font-size: 14px; }
.caption-size-medium { --caption-font-size: 18px; }
.caption-size-large { --caption-font-size: 24px; }
.caption-size-xlarge { --caption-font-size: 32px; }

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Respect user preference for high contrast */
@media (prefers-contrast: more) {
    :root {
        --mud-palette-primary: #0000ff;
        --mud-palette-text-primary: #000000;
        --mud-palette-background: #ffffff;
    }
}

/* ==================== LANDING PAGE ==================== */

html {
    scroll-behavior: smooth;
}

/* Hero animated glow orbs */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.hero-glow-1 {
    width: 600px;
    height: 600px;
    background: rgba(99, 102, 241, 0.15);
    top: -200px;
    right: -100px;
    animation: glowFloat 8s ease-in-out infinite;
}

.hero-glow-2 {
    width: 500px;
    height: 500px;
    background: rgba(168, 85, 247, 0.12);
    bottom: -150px;
    left: -100px;
    animation: glowFloat 10s ease-in-out infinite 2s;
}

.hero-glow-3 {
    width: 400px;
    height: 400px;
    background: rgba(236, 72, 153, 0.1);
    top: 30%;
    left: 50%;
    animation: glowFloat 12s ease-in-out infinite 4s;
}

@keyframes glowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    33% { transform: translate(30px, -20px) scale(1.05); opacity: 0.8; }
    66% { transform: translate(-20px, 15px) scale(0.95); opacity: 0.5; }
}

/* Hero CTA button glow on hover */
.hero-cta-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.2), 0 0 100px rgba(99, 102, 241, 0.15) !important;
}

/* Marquee animation */
.marquee-track {
    display: flex;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    align-items: center;
    animation: marqueeScroll 30s linear infinite;
    white-space: nowrap;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Bento card hover */
.bento-card:hover {
    border-color: rgba(99, 102, 241, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* Gradient border card hover - glowing border effect */
.gradient-border-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    filter: brightness(1.15);
}

/* Exam card hover */
.exam-hover-card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ==================== RESPONSIVE ==================== */

/* --- Tablet (1024px) --- */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .bento-grid > div:first-child,
    .bento-grid > div:nth-child(6) {
        grid-column: span 2 !important;
    }

    .exams-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-heading {
        font-size: 3.5rem !important;
    }

    .section-heading {
        font-size: 2.25rem !important;
    }

    .cta-heading {
        font-size: 2.5rem !important;
    }

    .footer-responsive-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 32px !important;
    }
}

/* --- Mobile (768px) --- */
@media (max-width: 768px) {
    /* Navbar */
    .landing-desktop-nav {
        display: none !important;
    }

    .landing-mobile-toggle {
        display: flex !important;
    }

    /* Hero */
    .hero-section-landing {
        padding: 110px 0 60px !important;
        min-height: auto !important;
    }

    .hero-heading {
        font-size: 2.5rem !important;
    }

    .hero-stats-row {
        gap: 20px !important;
    }

    /* Section headings */
    .section-heading {
        font-size: 1.85rem !important;
    }

    .cta-heading {
        font-size: 2rem !important;
    }

    /* Bento grid - single column */
    .bento-grid {
        grid-template-columns: 1fr !important;
    }

    .bento-grid > div {
        grid-column: span 1 !important;
    }

    /* Steps - single column */
    .steps-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .steps-connector-line {
        display: none !important;
    }

    /* Exams - 2 columns on tablet-ish mobile */
    .exams-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Testimonials - single column */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    .footer-responsive-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    /* Reduce section padding */
    #features,
    #how-it-works,
    #exams {
        padding: 64px 0 !important;
    }
}

/* --- Small Mobile (480px) --- */
@media (max-width: 480px) {
    .hero-section-landing {
        padding: 100px 0 48px !important;
    }

    .hero-heading {
        font-size: 2rem !important;
    }

    .section-heading {
        font-size: 1.6rem !important;
    }

    .cta-heading {
        font-size: 1.7rem !important;
    }

    .hero-stats-row {
        gap: 16px !important;
    }

    .hero-stats-row > div {
        min-width: 70px;
    }

    /* Exams single column on very small */
    .exams-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-responsive-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==================== APP AREA MOBILE RESPONSIVE ==================== */

/* --- App: Tablet (960px) --- */
@media (max-width: 960px) {
    /* Reduce container padding */
    .app-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Make tables horizontally scrollable */
    .mud-table,
    .mud-simple-table {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .mud-table .mud-table-container {
        overflow-x: auto !important;
    }

    /* Scale down large headings */
    .app-main-content .mud-typography-h4 {
        font-size: 1.5rem !important;
    }

    .app-main-content .mud-typography-h5 {
        font-size: 1.25rem !important;
    }

    .app-main-content .mud-typography-h6 {
        font-size: 1.1rem !important;
    }
}

/* --- App: Mobile (768px) --- */
@media (max-width: 768px) {
    /* Further reduce container padding */
    .app-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-top: 16px !important;
        padding-bottom: 16px !important;
    }

    /* Drawer overlay should cover full width */
    .mud-drawer {
        width: 260px !important;
    }

    /* Reduce MudPaper padding inside app */
    .app-main-content .mud-paper {
        padding: 12px !important;
    }

    /* Cards with pa-4 should reduce */
    .app-main-content .pa-6 {
        padding: 12px !important;
    }

    .app-main-content .pa-4 {
        padding: 10px !important;
    }

    /* MudStack row should wrap on mobile */
    .app-main-content .mud-stack-row {
        flex-wrap: wrap !important;
    }

    /* Table cells reduce padding */
    .mud-table-cell {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }

    .mud-table-head .mud-table-cell {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }

    /* MudChip smaller on mobile */
    .app-main-content .mud-chip {
        font-size: 0.75rem !important;
    }

    /* Touch-friendly buttons and interactive elements */
    .app-main-content .mud-button {
        min-height: 42px !important;
    }

    .app-main-content .mud-icon-button {
        min-width: 42px !important;
        min-height: 42px !important;
    }

    /* Nav links touch-friendly */
    .mud-nav-link {
        min-height: 44px !important;
    }

    /* MudAlert should stack content */
    .app-main-content .mud-alert {
        font-size: 0.85rem !important;
    }

    /* Progress circular - slightly smaller */
    .app-main-content .mud-progress-circular-large {
        width: 56px !important;
        height: 56px !important;
    }

    /* Fix VideoAvatarFeedback container for mobile */
    .app-main-content .mud-paper:first-child {
        border-radius: 8px !important;
    }

    /* Grid gap reduce */
    .app-main-content .mud-grid-spacing-xs-3 {
        margin: -8px !important;
    }

    .app-main-content .mud-grid-spacing-xs-3 > .mud-grid-item {
        padding: 8px !important;
    }

    .app-main-content .mud-grid-spacing-xs-4 {
        margin: -8px !important;
    }

    .app-main-content .mud-grid-spacing-xs-4 > .mud-grid-item {
        padding: 8px !important;
    }

    /* Fix MudDialog for mobile - full width */
    .mud-dialog {
        margin: 8px !important;
        max-height: calc(100vh - 16px) !important;
    }

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

    /* Speaking gym exercise grid fix */
    .exercise-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- App: Small Mobile (480px) --- */
@media (max-width: 480px) {
    /* Even tighter container */
    .app-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    /* Headings smaller */
    .app-main-content .mud-typography-h4 {
        font-size: 1.25rem !important;
    }

    .app-main-content .mud-typography-h5 {
        font-size: 1.1rem !important;
    }

    .app-main-content .mud-typography-h6 {
        font-size: 1rem !important;
    }

    .app-main-content .mud-typography-subtitle1 {
        font-size: 0.9rem !important;
    }

    /* Cards even tighter padding */
    .app-main-content .mud-paper {
        padding: 10px !important;
        border-radius: 8px !important;
    }

    /* Full-width buttons on very small screens */
    .app-main-content .mud-button-outlined,
    .app-main-content .mud-button-filled {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Stack horizontal stat rows */
    .app-main-content .d-flex.justify-space-between {
        gap: 4px;
    }

    /* MudChip group wrap */
    .app-main-content .mud-chipset {
        gap: 4px !important;
    }

    /* Dialog full-screen on small mobile */
    .mud-dialog {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }

    /* Reduce avatar sizes */
    .app-main-content .mud-avatar-large {
        width: 48px !important;
        height: 48px !important;
    }

    /* MudTabs scroll on mobile */
    .app-main-content .mud-tabs-header {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- App Bar mobile fix --- */
@media (max-width: 600px) {
    /* App bar title smaller */
    .mud-appbar .mud-typography-h6 {
        font-size: 1.1rem !important;
    }

    /* Notification badge position fix */
    .mud-appbar .mud-badge {
        margin-right: 0 !important;
    }
}
