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

body {
    --body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
}

.navmenu-icon {
    display: none;
}

.main {
    min-height: calc(100dvh - 86px);
    color: var(--neutral-foreground-rest);
    align-items: stretch !important;
}

.body-content {
    align-self: stretch;
    height: calc(100dvh - 86px) !important;
    display: flex;
}

.content {
    padding: 0.5rem 1.5rem;
    align-self: stretch !important;
    width: 100%;
}

.manage {
    width: 100dvw;
}

footer {
    background: var(--neutral-layer-4);
    color: var(--neutral-foreground-rest);
    align-items: center;
    padding: 10px 10px;
}

    footer a {
        color: var(--neutral-foreground-rest);
        text-decoration: none;
    }

        footer a:focus {
            outline: 1px dashed;
            outline-offset: 3px;
        }

        footer a:hover {
            text-decoration: underline;
        }

.alert {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
    margin: 10px 0;
}

.alert-danger {
    border: 1px dashed var(--error);
}

.alert-success {
    border: 1px dashed var(--success);
}

.alert-warning {
    border: 1px dashed var(--warning);
}

#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;
    margin: 20px 0;
}

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

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI26My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2IDY2LjA1NDYgMjYzLjU4NiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::before {
        content: "An error has occurred. "
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

@media (max-width: 600px) {
    .header-gutters {
        margin: 0.5rem 3rem 0.5rem 1.5rem !important;
    }

    [dir="rtl"] .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 3rem !important;
    }

    .main {
        flex-direction: column !important;
        row-gap: 0 !important;
    }

    nav.sitenav {
        width: 100%;
        height: 100%;
    }

    #main-menu {
        width: 100% !important;
    }

        #main-menu > div:first-child:is(.expander) {
            display: none;
        }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

        #navmenu-toggle ~ nav {
            display: none;
        }

        #navmenu-toggle:checked ~ nav {
            display: block;
        }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: 20px;
        right: unset;
        width: 32px;
        height: 32px;
        border: none;
        background: var(--accent-fill-rest);
        border-radius: 6px;
        padding: 6px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
        transition: all 0.2s ease-in-out;
    }

    .navmenu-icon:hover {
        background: var(--accent-fill-hover);
        transform: scale(1.05);
    }

    .navmenu-icon fluent-icon,
    .navmenu-icon svg {
        color: white !important;
        fill: white !important;
        width: 20px !important;
        height: 20px !important;
    }

    [dir="rtl"] .navmenu-icon {
        left: unset;
        right: 20px;
    }
}

/* Table */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

    table td,
    table th {
        padding: var(--spacingVerticalS) var(--spacingHorizontalM);
        text-align: left;
        vertical-align: middle;
        border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
    }

/* ========================================
   RESPONSIVE GRID IMPROVEMENTS
   ======================================== */

/* Make FluentDataGrid scrollable horizontally */
fluent-data-grid {
    width: 100%;
    overflow-x: auto !important;
    display: block !important;
}

/* Ensure grid wrapper is scrollable */
.fluent-data-grid-wrapper,
fluent-data-grid-row,
fluent-data-grid-cell {
    min-width: fit-content;
}

/* Add custom wrapper class for better control */
.responsive-grid-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

    .responsive-grid-wrapper fluent-data-grid {
        min-width: 800px; /* Minimum width to show all columns */
    }

/* Scrollbar styling for better UX */
.responsive-grid-wrapper::-webkit-scrollbar {
    height: 8px;
}

.responsive-grid-wrapper::-webkit-scrollbar-track {
    background: var(--neutral-layer-2);
    border-radius: 4px;
}

.responsive-grid-wrapper::-webkit-scrollbar-thumb {
    background: var(--neutral-fill-stealth-rest);
    border-radius: 4px;
}

    .responsive-grid-wrapper::-webkit-scrollbar-thumb:hover {
        background: var(--neutral-fill-stealth-hover);
    }

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Reduce padding on mobile */
    .content {
        padding: 0.5rem 0.75rem;
    }

    /* Make cards more compact */
    fluent-card {
        padding: 12px !important;
    }

    /* Adjust stack gaps for mobile */
    fluent-stack {
        gap: 8px !important;
    }

    /* Make buttons full width on mobile when needed */
    .mobile-full-width {
        width: 100% !important;
    }

    /* Ensure grids are scrollable */
    .responsive-grid-wrapper {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        width: calc(100% + 1.5rem);
    }

    /* Hide less important columns on mobile */
    fluent-data-grid-cell:nth-child(n+5),
    fluent-data-grid-row > *:nth-child(n+5) {
        display: none;
    }

    /* Show scroll hint on mobile */
    .responsive-grid-wrapper::after {
        content: "← Swipe to see more →";
        display: block;
        text-align: center;
        font-size: 12px;
        color: var(--neutral-foreground-hint);
        padding: 8px 0;
        position: sticky;
        left: 0;
        background: var(--neutral-layer-1);
    }

    /* Adjust dialog size for mobile */
    fluent-dialog {
        max-width: 95vw !important;
        margin: 1rem !important;
    }

    /* Make search bars full width */
    fluent-search {
        width: 100% !important;
    }

    /* Adjust header for mobile */
    fluent-header {
        padding: 0 0.5rem !important;
    }

    fluent-header fluent-stack {
        gap: 8px !important;
    }

    /* Fix UserProfile menu visibility on mobile */
    fluent-header fluent-profile-menu {
        position: relative;
        z-index: 1000;
    }

    /* Adjust right side actions padding for mobile */
    fluent-header fluent-stack[style*="padding-right"] {
        padding-right: 8px !important;
    }

    /* Ensure profile menu is visible and clickable */
    fluent-profile-menu::part(control) {
        min-width: 40px !important;
        min-height: 40px !important;
    }

    /* Make sure logo and title don't take too much space */
    fluent-header fluent-stack[style*="min-width: 200px"] {
        min-width: auto !important;
        max-width: 120px !important;
        gap: 4px !important;
    }

    /* Adjust logo size on mobile */
    fluent-header img[alt="TaxJet Logo"] {
        width: 24px !important;
        height: 24px !important;
    }

    /* Adjust title font size on mobile */
    fluent-header fluent-label[typo="Header"] {
        font-size: 18px !important;
    }

    /* Hide search bar on very small screens */
    @media (max-width: 480px) {
        fluent-header fluent-search {
            display: none !important;
        }

        /* Give more space to profile menu */
        fluent-header fluent-stack[style*="gap: 12px"] {
            gap: 4px !important;
        }
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .content {
        padding: 0.75rem 1rem;
    }

    .responsive-grid-wrapper fluent-data-grid {
        min-width: 700px;
    }

    /* Hide scroll hint on tablet */
    .responsive-grid-wrapper::after {
        display: none;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .responsive-grid-wrapper::after {
        display: none;
    }
}

/* ========================================
   UTILITY CLASSES FOR RESPONSIVE
   ======================================== */

/* Show/Hide based on screen size */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-hide {
        display: none !important;
    }
}

/* Responsive text sizes */
@media (max-width: 768px) {
    h1, .typography-page-title {
        font-size: 20px !important;
    }

    h2, .typography-subject {
        font-size: 18px !important;
    }

    h3 {
        font-size: 16px !important;
    }
}

/* Fix for cards overflow */
fluent-card {
    overflow: visible !important;
}

/* Ensure tooltips work on mobile */
@media (max-width: 768px) {
    fluent-tooltip {
        display: none !important;
    }
}

/* ========================================
   ENHANCED FORM STYLING
   ======================================== */

/* Better form spacing */
fluent-text-field,
fluent-text-area,
fluent-select,
fluent-combobox,
fluent-date-picker,
fluent-number-field {
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Form groups */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* ========================================
   BUTTON IMPROVEMENTS
   ======================================== */

/* Button group spacing */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }

    .button-group fluent-button {
        width: 100% !important;
    }
}

/* ========================================
   CARD ENHANCEMENTS
   ======================================== */

/* Card hover effect */
fluent-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

fluent-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card with header */
.card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--neutral-stroke-divider-rest);
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1rem;
}

.card-footer {
    padding: 1rem;
    border-top: 1px solid var(--neutral-stroke-divider-rest);
    background: var(--neutral-layer-2);
}

/* ========================================
   BADGE STYLING
   ======================================== */

fluent-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Badge colors */
.badge-success {
    background-color: var(--success) !important;
    color: white !important;
}

.badge-warning {
    background-color: var(--warning) !important;
    color: black !important;
}

.badge-error {
    background-color: var(--error) !important;
    color: white !important;
}

.badge-info {
    background-color: var(--accent-fill-rest) !important;
    color: white !important;
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading-overlay {
    position: fixed;
    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: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--neutral-stroke-rest);
    border-top-color: var(--accent-fill-rest);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--neutral-layer-2) 25%, var(--neutral-layer-3) 50%, var(--neutral-layer-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--neutral-foreground-hint);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--neutral-foreground-rest);
}

.empty-state-description {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* ========================================
   PAGINATION IMPROVEMENTS
   ======================================== */

fluent-paginator {
    margin-top: 1rem;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    fluent-paginator {
        font-size: 0.875rem;
    }
}

/* ========================================
   SEARCH BAR ENHANCEMENTS
   ======================================== */

fluent-search {
    transition: all 0.2s ease-in-out;
}

fluent-search:focus-within {
    box-shadow: 0 0 0 2px var(--accent-fill-rest);
}

/* Search with filters layout */
.search-filters-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-filters-container fluent-search {
    flex: 1;
    min-width: 250px;
}

@media (max-width: 768px) {
    .search-filters-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-filters-container fluent-search {
        min-width: 100%;
    }
}

/* ========================================
   TOAST/NOTIFICATION POSITIONING
   ======================================== */

fluent-message-bar {
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* ========================================
   ACCORDION IMPROVEMENTS
   ======================================== */

fluent-accordion-item {
    margin-bottom: 0.5rem;
    border: 1px solid var(--neutral-stroke-divider-rest);
    border-radius: 4px;
}

/* ========================================
   DIALOG ENHANCEMENTS
   ======================================== */

fluent-dialog::part(overlay) {
    backdrop-filter: blur(2px);
}

fluent-dialog::part(control) {
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    fluent-dialog::part(control) {
        max-height: 95vh;
        margin: 0.5rem;
    }
}

/* ========================================
   TOOLBAR IMPROVEMENTS
   ======================================== */

fluent-toolbar {
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    background: var(--neutral-layer-2);
}

@media (max-width: 768px) {
    fluent-toolbar {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
}

/* ========================================
   STATISTICS CARDS
   ======================================== */

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

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    background: var(--neutral-layer-2);
    transition: all 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent-fill-rest);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--neutral-foreground-hint);
    font-weight: 500;
}

/* ========================================
   BREADCRUMB IMPROVEMENTS
   ======================================== */

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--neutral-foreground-hint);
}

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

.breadcrumb-item a {
    color: var(--accent-fill-rest);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--neutral-foreground-hint);
}

/* ========================================
   TABS ENHANCEMENTS
   ======================================== */

fluent-tabs {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    fluent-tabs {
        overflow-x: auto;
    }
}

/* ========================================
   SMOOTH ANIMATIONS
   ======================================== */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-in-out;
}

/* Scale in */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.2s ease-in-out;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid var(--accent-fill-rest);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-fill-rest);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

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

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    fluent-card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .main {
        min-height: auto;
    }

    .navmenu,
    footer,
    fluent-header {
        display: none !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.5rem !important; }
.pt-2 { padding-top: 1rem !important; }
.pt-3 { padding-top: 1.5rem !important; }
.pt-4 { padding-top: 2rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.5rem !important; }
.pb-2 { padding-bottom: 1rem !important; }
.pb-3 { padding-bottom: 1.5rem !important; }
.pb-4 { padding-bottom: 2rem !important; }

/* Text alignment */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Text utilities */
.text-muted { color: var(--neutral-foreground-hint) !important; }
.text-primary { color: var(--accent-fill-rest) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-error { color: var(--error) !important; }

.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flex utilities */
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }

/* Width utilities */
.w-100 { width: 100% !important; }
.w-75 { width: 75% !important; }
.w-50 { width: 50% !important; }
.w-25 { width: 25% !important; }

/* Border utilities */
.border-top { border-top: 1px solid var(--neutral-stroke-divider-rest) !important; }
.border-bottom { border-bottom: 1px solid var(--neutral-stroke-divider-rest) !important; }
.border-left { border-left: 1px solid var(--neutral-stroke-divider-rest) !important; }
.border-right { border-right: 1px solid var(--neutral-stroke-divider-rest) !important; }
.border-rounded { border-radius: 4px !important; }

/* Shadow utilities */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.shadow {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Cursor utilities */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* Overflow utilities */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* ========================================
   MOBILE HEADER FIXES
   ======================================== */

@media (max-width: 768px) {
    /* Ensure header doesn't overflow */
    fluent-header {
        overflow: visible !important;
    }

    /* Make header actions more compact */
    .header-actions {
        gap: 4px !important;
        padding-right: 4px !important;
    }

    /* Hide help button on very small screens */
    @media (max-width: 480px) {
        .help-button {
            display: none !important;
        }
    }

    /* Ensure profile menu is always visible */
    fluent-profile-menu {
        display: block !important;
        visibility: visible !important;
        position: relative !important;
    }

    /* Adjust profile menu button size */
    fluent-profile-menu::part(button) {
        min-width: 36px !important;
        min-height: 36px !important;
        padding: 4px !important;
    }

    /* Make sure dropdown menu is positioned correctly */
    fluent-profile-menu::part(menu) {
        position: fixed !important;
        right: 8px !important;
        top: 60px !important;
        left: auto !important;
        max-width: calc(100vw - 16px) !important;
        z-index: 10000 !important;
    }

    /* Adjust initials display */
    fluent-profile-menu::part(initials) {
        font-size: 14px !important;
    }
}

/* Additional fixes for very small screens */
@media (max-width: 375px) {
    /* Further reduce logo text */
    fluent-header fluent-label[typo="Header"] {
        font-size: 16px !important;
        max-width: 80px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* Hide notification badges text on very small screens */
    fluent-badge {
        font-size: 10px !important;
        padding: 2px 4px !important;
    }
}

/* ========================================
   CLIENTS GRID MOBILE OPTIMIZATIONS
   ======================================== */

/* Hide specific columns on mobile for clients grid */
@media (max-width: 768px) {
    .clients-grid .mobile-hide {
        display: none !important;
    }

    /* Make checkbox column narrower on mobile */
    .clients-grid .checkbox-column {
        width: 40px !important;
    }

    /* Adjust name columns for better fit */
    .clients-grid .name-column {
        font-size: 14px !important;
        max-width: 120px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* Make action buttons icon-only on mobile */
    .mobile-icon-only {
        min-width: 36px !important;
        padding: 6px !important;
    }

    /* Adjust grid for mobile - show only essential columns */
    .clients-grid {
        grid-template-columns: 40px 1fr 1fr 80px 100px !important;
        min-width: 100% !important;
        font-size: 14px !important;
    }

    /* Make badges smaller on mobile */
    .clients-grid fluent-badge {
        font-size: 11px !important;
        padding: 2px 6px !important;
    }

    /* Compact action buttons */
    .clients-grid fluent-button[appearance="Lightweight"] {
        min-width: 32px !important;
        min-height: 32px !important;
        padding: 4px !important;
    }
}

/* Very small mobile screens */
@media (max-width: 480px) {
    .clients-grid {
        grid-template-columns: 36px 1fr 1fr 70px 90px !important;
        font-size: 13px !important;
    }

    .clients-grid .name-column {
        font-size: 13px !important;
        max-width: 100px !important;
    }

    .clients-grid fluent-badge {
        font-size: 10px !important;
        padding: 2px 4px !important;
    }

    /* Make toolbar more compact */
    fluent-toolbar {
        padding: 8px 4px !important;
        gap: 4px !important;
    }

    fluent-toolbar fluent-button {
        font-size: 13px !important;
        padding: 6px 8px !important;
    }

    /* Stack search on its own line */
    fluent-toolbar fluent-search {
        width: 100% !important;
        margin-top: 8px !important;
    }
}

/* ========================================
   CLIENT MANAGEMENT CONTAINER
   ======================================== */

.client-management-container {
    padding: 1rem;
    width: 100%;
}

@media (max-width: 768px) {
    .client-management-container {
        padding: 0.5rem;
    }

    /* Make page title smaller on mobile */
    .client-management-container fluent-label[typo="PageTitle"] {
        font-size: 20px !important;
    }

    /* Hide body text on very small screens */
    @media (max-width: 480px) {
        .client-management-container fluent-label[typo="Body"] {
            display: none !important;
        }
    }
}
