/* Fryday CSS - Shadcn UI Design System */
/* ========================================= */
/* Complete design system with enhanced UX */

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core Color System */
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    
    /* Primary Brand Colors */
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --primary-hover: 221.2 83.2% 48%;
    --primary-active: 221.2 83.2% 43%;
    
    /* Secondary Colors */
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --secondary-hover: 210 40% 91%;
    --secondary-active: 210 40% 86%;
    
    /* Muted Colors */
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --muted-hover: 210 40% 91%;
    
    /* Accent Colors */
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --accent-hover: 210 40% 91%;
    
    /* Status Colors */
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --destructive-hover: 0 84.2% 55%;
    
    --success: 142 71% 45%;
    --success-foreground: 210 40% 98%;
    --success-hover: 142 71% 40%;
    
    --warning: 30 84% 52%;
    --warning-foreground: 210 40% 98%;
    --warning-hover: 30 84% 47%;
    
    --info: 200 100% 50%;
    --info-foreground: 210 40% 98%;
    --info-hover: 200 100% 45%;
    
    /* Border & Input */
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --input-hover: 214.3 31.8% 86%;
    --input-focus: var(--primary);
    --ring: 221.2 83.2% 53.3%;
    
    /* Spacing & Layout */
    --radius: 0.5rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

.dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 84% 4.9%;
    --primary-hover: 217.2 91.2% 64%;
    --primary-active: 217.2 91.2% 69%;
    
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --secondary-hover: 217.2 32.6% 22%;
    --secondary-active: 217.2 32.6% 27%;
    
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --muted-hover: 217.2 32.6% 22%;
    
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --accent-hover: 217.2 32.6% 22%;
    
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --destructive-hover: 0 62.8% 35%;
    
    --success: 142 71% 45%;
    --success-foreground: 210 40% 98%;
    --success-hover: 142 71% 50%;
    
    --warning: 30 84% 52%;
    --warning-foreground: 210 40% 98%;
    --warning-hover: 30 84% 57%;
    
    --info: 200 100% 50%;
    --info-foreground: 210 40% 98%;
    --info-hover: 200 100% 55%;
    
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --input-hover: 217.2 32.6% 22%;
    --input-focus: var(--primary);
    --ring: 224.3 76.3% 94.1%;
}

/* Base Styles */
body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: var(--font-sans);
    line-height: 1.6;
    letter-spacing: -0.01em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*:focus {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* Improved scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--muted));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.3);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.5);
}

/* Layout Principal */
.fryday-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: hsl(var(--background));
}

.fryday-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--background) / 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.75rem 0;
    transition: all var(--transition-base);
}

.fryday-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    position: relative;
}

/* Header right section containing navigation and user menu */
.fryday-header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: space-between;
    margin-left: 2rem;
}

/* Mobile menu toggle */
.fryday-mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.fryday-mobile-menu-toggle:hover {
    background-color: hsl(var(--muted) / 0.5);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: hsl(var(--foreground));
    transition: all var(--transition-fast);
    margin: 2px 0;
}

.fryday-mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.fryday-mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.fryday-mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Focus states for accessibility */
.fryday-mobile-menu-toggle:focus {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
}

.fryday-nav-link:focus {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
    background-color: hsl(var(--muted) / 0.3);
}

/* Smooth transitions for all interactive elements */
.fryday-header-right,
.fryday-navigation,
.fryday-nav-link,
.fryday-mobile-menu-toggle {
    transition: all var(--transition-base);
}

/* Desktop navigation styling improvements */
@media screen and (min-width: 769px) {
    .fryday-mobile-menu-toggle {
        display: none !important;
    }
    
    .fryday-header-right {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .fryday-navigation {
        order: 1;
        width: auto;
        padding: 0;
        border: none;
    }
    
    .fryday-nav-list {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .fryday-nav-link {
        width: auto;
        border-radius: var(--radius-md);
    }
    
    .fryday-user-menu {
        order: 2;
        padding: 0;
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
    
    .fryday-user-info {
        align-items: flex-end;
        gap: 0.25rem;
        padding: 0;
        border: none;
    }
    
    .fryday-user-actions {
        align-self: auto;
    }
    
    .fryday-user-actions .fryday-btn {
        width: auto;
        text-align: left;
        padding: 0.5rem 1rem;
    }
}

/* Header: logo area */
.fryday-logo-wrap {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.fryday-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.fryday-logo-img {
    display: block;
    height: 4vh !important;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.fryday-user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.fryday-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: hsl(var(--foreground));
}

.user-role {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* When WP admin bar is visible, offset the sticky header */
body.admin-bar .fryday-header {
    top: 32px;
}

@media (max-width: 782px) {
    /* WP switches admin bar height on smaller screens */
    body.admin-bar .fryday-header {
        top: 46px;
    }
}

.fryday-navigation {
    background: none;
    border: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.fryday-nav-content {
    max-width: none;
    margin: 0;
    padding: 0;
}

.fryday-nav-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.fryday-nav-link {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.fryday-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--accent) / 0.1));
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
}

.fryday-nav-link:hover::before,
.fryday-nav-link.active::before {
    opacity: 1;
}

.fryday-nav-link:hover,
.fryday-nav-link.active {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.fryday-nav-link.active {
    font-weight: 600;
    color: hsl(var(--primary));
}

.fryday-main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    width: 100%;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fryday-footer {
    border-top: 1px solid hsl(var(--border));
    padding: 2rem 1.5rem;
    text-align: center;
    background-color: hsl(var(--muted) / 0.3);
    color: hsl(var(--muted-foreground));
}

.fryday-footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========================================= */
/* COMPONENT SYSTEM - Buttons */
/* ========================================= */

.fryday-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    line-height: 1.25;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.fryday-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.fryday-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.fryday-btn:hover::before {
    opacity: 1;
}

.fryday-btn:active {
    transform: translateY(1px);
}

/* Primary Button */
.fryday-btn-primary {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-hover)));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
    box-shadow: var(--shadow-sm);
}

.fryday-btn-primary:hover {
    background: linear-gradient(135deg, hsl(var(--primary-hover)), hsl(var(--primary-active)));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Secondary Button */
.fryday-btn-secondary {
    background: linear-gradient(135deg, hsl(var(--secondary)), hsl(var(--secondary-hover)));
    color: hsl(var(--secondary-foreground));
    border-color: hsl(var(--border));
    box-shadow: var(--shadow-sm);
}

.fryday-btn-secondary:hover {
    background: linear-gradient(135deg, hsl(var(--secondary-hover)), hsl(var(--secondary-active)));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Outline Button */
.fryday-btn-outline {
    border: 2px solid hsl(var(--border));
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: all var(--transition-base);
}

.fryday-btn-outline:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* Status Buttons */
.fryday-btn-danger {
    background: linear-gradient(135deg, hsl(var(--destructive)), hsl(var(--destructive-hover)));
    color: hsl(var(--destructive-foreground));
    box-shadow: var(--shadow-sm);
}

.fryday-btn-danger:hover {
    background: linear-gradient(135deg, hsl(var(--destructive-hover)), hsl(var(--destructive)));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.fryday-btn-warning {
    background: linear-gradient(135deg, hsl(var(--warning)), hsl(var(--warning-hover)));
    color: hsl(var(--warning-foreground));
    box-shadow: var(--shadow-sm);
}

.fryday-btn-warning:hover {
    background: linear-gradient(135deg, hsl(var(--warning-hover)), hsl(var(--warning)));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.fryday-btn-success {
    background: linear-gradient(135deg, hsl(var(--success)), hsl(var(--success-hover)));
    color: hsl(var(--success-foreground));
    box-shadow: var(--shadow-sm);
}

.fryday-btn-success:hover {
    background: linear-gradient(135deg, hsl(var(--success-hover)), hsl(var(--success)));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.fryday-btn-info {
    background: linear-gradient(135deg, hsl(var(--info)), hsl(var(--info-hover)));
    color: hsl(var(--info-foreground));
    box-shadow: var(--shadow-sm);
}

.fryday-btn-info:hover {
    background: linear-gradient(135deg, hsl(var(--info-hover)), hsl(var(--info)));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Button Sizes */
.fryday-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.fryday-btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

/* Icon-only buttons */
.fryday-btn-icon {
    padding: 0.75rem;
    border-radius: var(--radius);
    aspect-ratio: 1;
}

.fryday-btn-icon.fryday-btn-small {
    padding: 0.5rem;
}

.fryday-btn-icon.fryday-btn-large {
    padding: 1rem;
}

/* ========================================= */
/* COMPONENT SYSTEM - Cards */
/* ========================================= */

.fryday-card {
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border));
    background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--card) / 0.95));
    color: hsl(var(--card-foreground));
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
    overflow: hidden;
    position: relative;
}

.fryday-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.fryday-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: hsl(var(--border) / 0.8);
}

.fryday-card:hover::before {
    opacity: 1;
}

.fryday-card-header {
    padding: 1.5rem 1.5rem 0;
}

.fryday-card-content {
    padding: 1.5rem;
}

.fryday-card-footer {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid hsl(var(--border) / 0.5);
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Special card variants */
.fryday-card.success {
    border-color: hsl(var(--success) / 0.3);
    background: linear-gradient(135deg, hsl(var(--success) / 0.05), hsl(var(--card)));
}

.fryday-card.warning {
    border-color: hsl(var(--warning) / 0.3);
    background: linear-gradient(135deg, hsl(var(--warning) / 0.05), hsl(var(--card)));
}

.fryday-card.danger {
    border-color: hsl(var(--destructive) / 0.3);
    background: linear-gradient(135deg, hsl(var(--destructive) / 0.05), hsl(var(--card)));
}

.fryday-card.info {
    border-color: hsl(var(--info) / 0.3);
    background: linear-gradient(135deg, hsl(var(--info) / 0.05), hsl(var(--card)));
}

/* ========================================= */
/* LAYOUT COMPONENTS - Grids & Stats */
/* ========================================= */

.fryday-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.fryday-stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border));
    background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--card) / 0.95));
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.fryday-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, hsl(var(--primary)), hsl(var(--accent)));
    opacity: 0.6;
    transition: opacity var(--transition-base);
}

.fryday-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: hsl(var(--primary) / 0.3);
}

.fryday-stat-card:hover::before {
    opacity: 1;
}

.fryday-stat-card.success::before {
    background: linear-gradient(180deg, hsl(var(--success)), hsl(var(--success-hover)));
}

.fryday-stat-card.warning::before {
    background: linear-gradient(180deg, hsl(var(--warning)), hsl(var(--warning-hover)));
}

.fryday-stat-card.danger::before {
    background: linear-gradient(180deg, hsl(var(--destructive)), hsl(var(--destructive-hover)));
}

.fryday-stat-card.info::before {
    background: linear-gradient(180deg, hsl(var(--info)), hsl(var(--info-hover)));
}

.stat-icon {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform var(--transition-base);
}

.fryday-stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    color: hsl(var(--foreground));
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-content p {
    color: hsl(var(--muted-foreground));
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    font-size: 1.1rem;
}

.stat-detail {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground) / 0.8);
    font-weight: 400;
}

/* Status indicators */
.stat.completed {
    color: hsl(var(--success));
    font-weight: 600;
}

.stat.in-progress {
    color: hsl(var(--warning));
    font-weight: 600;
}

.stat.pending {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

.stat.danger {
    color: hsl(var(--destructive));
    font-weight: 600;
}

/* ========================================= */
/* PAGE COMPONENTS - Headers & Sections */
/* ========================================= */

.fryday-page-header {
    margin-bottom: 3rem;
    position: relative;
    padding: 2rem 0;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.fryday-page-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: "white";
    border-radius: var(--radius);
}

.fryday-page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: "white";
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.fryday-page-header p {
    color: "white";
    font-size: 1.25rem;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

.header-content,
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-actions {
    margin-bottom: 0;
    gap: 0.75rem;
}

/* Section styling */
.fryday-section {
    margin-bottom: 4rem;
    position: relative;
}

.fryday-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: hsl(var(--foreground));
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
}

.section-description {
    color: hsl(var(--muted-foreground));
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Project cards */
.fryday-project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.fryday-project-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.fryday-project-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.fryday-project-card p {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

/* Villa/Bloc grids */
.fryday-villas-grid,
.fryday-blocs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.fryday-villa-card,
.fryday-bloc-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.villa-header,
.bloc-header {
    margin-bottom: 1rem;
}

.villa-header h3,
.bloc-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.villa-client {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.bloc-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.villa-progress,
.bloc-progress {
    margin: 1rem 0;
}

.progress-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat.completed {
    color: hsl(142 71% 45%);
}

.stat.in-progress {
    color: hsl(30 84% 52%);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: hsl(var(--muted));
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: hsl(var(--primary));
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.villa-actions,
.bloc-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Travaux */
.fryday-travaux-list {
    display: grid;
    gap: 1rem;
}

.fryday-travail-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.fryday-travail-card.unassigned {
    border-left: 4px solid hsl(var(--muted-foreground));
}

.fryday-travail-card.assigned {
    border-left: 4px solid hsl(var(--primary));
}

.travail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.travail-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.status-in_progress {
    background-color: hsl(30 84% 52% / 0.2);
    color: hsl(30 84% 52%);
}

.status-validated {
    background-color: hsl(142 71% 45% / 0.2);
    color: hsl(142 71% 45%);
}

.status-unassigned {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item .label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.info-item .value {
    font-weight: 500;
}

.travail-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Compact Travaux Table */
.fryday-travaux-table-container {
    background-color: hsl(var(--card));
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border));
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.fryday-travaux-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.fryday-travaux-table thead {
    background: linear-gradient(135deg, hsl(var(--muted) / 0.8) 0%, hsl(var(--muted) / 0.5) 100%);
    border-bottom: 2px solid hsl(var(--border));
}

.fryday-travaux-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    border-bottom: 1px solid hsl(var(--border));
    white-space: nowrap;
}

.fryday-travaux-table tbody tr {
    border-bottom: 1px solid hsl(var(--border));
    transition: all 0.2s ease;
}

.fryday-travaux-table tbody tr:hover {
    background-color: hsl(var(--muted) / 0.3);
}

.fryday-travaux-table tbody tr.assigned {
    border-left: 4px solid hsl(var(--primary));
}

.fryday-travaux-table tbody tr.unassigned {
    border-left: 4px solid hsl(var(--muted-foreground));
}

.fryday-travaux-table td {
    padding: 0.875rem 0.75rem;
    vertical-align: top;
    border-bottom: inherit;
}

/* Table Columns */
.travail-name {
    min-width: 250px;
}

.travail-name .name-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.travail-name strong {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.travail-title-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border-radius: var(--radius);
    padding: 0.125rem 0.25rem;
    margin: -0.125rem -0.25rem;
    display: inline-block;
}

.travail-title-link:hover {
    color: hsl(var(--primary));
    background-color: hsl(var(--primary) / 0.1);
    text-decoration: none;
}

.travail-title-link:active {
    background-color: hsl(var(--primary) / 0.15);
    transform: translateY(1px);
}

.travail-title-link strong {
    color: inherit;
}

.description-tooltip {
    margin-top: 0.25rem;
}

.description-preview {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    font-style: italic;
    line-height: 1.3;
}

.travail-status {
    min-width: 120px;
}

.travail-progress {
    min-width: 140px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: hsl(var(--muted));
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.8) 100%);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
}

.travail-duration {
    min-width: 80px;
    text-align: right;
}

.travail-actions {
    min-width: 120px;
    text-align: right;
}

.travail-actions .fryday-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius);
}

.text-muted {
    color: hsl(var(--muted-foreground));
    font-style: italic;
}

/* Responsive behavior for the table */
@media (max-width: 1024px) {
    .fryday-travaux-table-container {
        overflow-x: auto;
    }
    
    .fryday-travaux-table {
        min-width: 800px;
    }
}

@media (max-width: 768px) {
    .fryday-travaux-table th,
    .fryday-travaux-table td {
        padding: 0.5rem 0.375rem;
        font-size: 0.85rem;
    }
    
    .travail-name {
        min-width: 200px;
    }
    
    .description-preview {
        display: none;
    }
    
    .progress-container {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    
    .progress-bar {
        width: 100%;
    }
}

/* Work detail */
.fryday-work-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.timer-controls,
.step-controls {
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.timer-display {
    text-align: center;
    margin: 1rem 0;
}

.timer-display #currentTime {
    font-size: 2rem;
    font-weight: 700;
    font-family: monospace;
}

/* Timer display in work details */
.detail-item .value#currentTime {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: monospace;
    color: hsl(var(--primary));
    background: hsl(var(--muted));
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid hsl(var(--border));
}

.timer-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Enhanced Workflow UI - Two Column Layout */
.fryday-workflow-section {
    margin: 2rem 0;
    background-color: hsl(var(--card));
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border));
    overflow: hidden;
}

.fryday-workflow-section h3 {
    padding: 1.5rem;
    margin: 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--primary) / 0.05) 100%);
    border-bottom: 1px solid hsl(var(--border));
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.workflow-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    min-height: 500px;
}

/* Left Column - Steps Navigation */
.workflow-navigation {
    background-color: hsl(var(--muted) / 0.3);
    border-right: 1px solid hsl(var(--border));
}

.steps-sidebar {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.step-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    background-color: hsl(var(--card));
}

.step-nav-item:hover {
    background-color: hsl(var(--accent-hover));
    border-color: hsl(var(--border));
    transform: translateX(2px);
}

.step-nav-item.completed {
    background: linear-gradient(135deg, hsl(var(--success) / 0.1) 0%, hsl(var(--success) / 0.05) 100%);
    border-color: hsl(var(--success) / 0.3);
}

.step-nav-item.current {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--primary) / 0.1) 100%);
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.step-nav-item.pending {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

/* Special pending state for reserves (still editable) */
.step-nav-item.pending-reserves {
    background: linear-gradient(135deg, #ffedd5 0%, #ffe4c7 100%);
    border: 1px solid #fbbf24;
    color: #92400e;
}

.step-nav-item.pending-reserves:hover {
    background: linear-gradient(135deg, #ffe4c7 0%, #ffd9ad 100%);
    border-color: #f59e0b;
}

.step-nav-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.step-nav-item.completed .step-nav-icon {
    background-color: hsl(var(--success));
    color: white;
}

.step-nav-item.current .step-nav-icon {
    background-color: hsl(var(--primary));
    color: white;
}

.step-nav-item.pending .step-nav-icon {
    background-color: hsl(var(--muted-foreground) / 0.2);
    color: hsl(var(--muted-foreground));
}

.step-nav-item.pending-reserves .step-nav-icon {
    background-color: #f59e0b;
    color: #ffffff;
}

.check-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.step-nav-content {
    flex: 1;
    min-width: 0;
}

.step-nav-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.step-nav-status {
    font-size: 0.8rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.status-success {
    background-color: hsl(var(--success) / 0.15);
    color: hsl(var(--success));
}

.status-badge.status-current {
    background-color: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
}

.status-badge.status-pending {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

/* Specific pending state for reserves (orange tone) */
.status-badge.status-pending-reserves {
    background-color: #ffecd1; /* light orange */
    color: #d97706; /* medium orange */
}

/* Right Column - Step Details */
.workflow-details {
    padding: 1.5rem;
    background-color: hsl(var(--card));
}

.step-detail-panel {
    animation: fadeIn var(--transition-base);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.step-detail-header h4 {
    font-size: 1.375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 0;
}

.step-detail-header .step-status {
    background-color: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.step-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-instruction {
    color: hsl(var(--muted-foreground));
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.step-completion-info {
    background-color: hsl(var(--muted) / 0.3);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid hsl(var(--border));
}

.completion-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.completion-item:last-child {
    margin-bottom: 0;
}

.completion-item strong {
    color: hsl(var(--foreground));
    min-width: 120px;
    flex-shrink: 0;
}

.text-success {
    color: hsl(var(--success));
}

.text-warning {
    color: hsl(var(--warning));
}

.text-muted {
    color: hsl(var(--muted-foreground));
    font-size: 0.85rem;
}

.step-warning {
    background-color: hsl(var(--warning) / 0.1);
    border: 1px solid hsl(var(--warning) / 0.3);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.step-warning strong {
    color: hsl(var(--warning));
}

.step-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Reserves Summary */
.reserves-summary {
    margin-top: 1rem;
}

.reserves-summary h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: hsl(var(--foreground));
}

.reserve-summary-item {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.reserve-summary-item.resolved {
    background-color: hsl(var(--success) / 0.05);
    border-color: hsl(var(--success) / 0.2);
}

.reserve-summary-item.unresolved {
    background-color: hsl(var(--warning) / 0.05);
    border-color: hsl(var(--warning) / 0.2);
}

.reserve-content {
    font-size: 0.9rem;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.reserve-meta {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}

/* Responsive Design */
@media (max-width: 1024px) {
    .workflow-container {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 768px) {
    .workflow-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .workflow-navigation {
        border-right: none;
        border-bottom: 1px solid hsl(var(--border));
    }
    
    .steps-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .step-nav-item {
        min-width: 200px;
        flex-shrink: 0;
    }
}

/* Legacy compatibility with old steps styling */
.steps-list {
    display: grid;
    gap: 0.5rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.step-item.completed {
    background-color: hsl(142 71% 45% / 0.1);
    border-color: hsl(142 71% 45%);
}

.step-item.current {
    background-color: hsl(var(--primary) / 0.1);
    border-color: hsl(var(--primary));
}

.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step-item.completed .step-number {
    background-color: hsl(142 71% 45%);
    color: white;
}

.step-item.current .step-number {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

/* Reserves Enhancement */
.reserves-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background-color: hsl(var(--muted));
}

.stat-item.text-warning {
    background-color: hsl(var(--warning) / 0.1);
    color: hsl(var(--warning));
}

.stat-item.text-success {
    background-color: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
}

.reserve-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reserve-severity {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.reserve-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.resolved-indicator {
    font-size: 0.8rem;
    color: hsl(var(--success));
    font-weight: 500;
}

.fryday-empty-state {
    text-align: center;
    padding: 2rem;
    color: hsl(var(--muted-foreground));
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

/* Files */
.files-list {
    display: grid;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

.file-name {
    font-weight: 500;
    color: hsl(var(--foreground));
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.file-size,
.file-date {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.file-type-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
    text-transform: uppercase;
}

.file-type-plan {
    background-color: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

.file-type-pv {
    background-color: hsl(var(--blue) / 0.1);
    color: hsl(var(--blue));
}

.file-type-document {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

/* Image file indicators */
.file-item:has(.file-name) {
    position: relative;
}

/* Add a small image icon for image files */
.file-item[data-is-image="true"] .file-name::before {
    content: "🖼️ ";
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

/* Highlight image files slightly */
.file-item[data-is-image="true"] {
    background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--muted) / 0.3));
    border-left: 3px solid hsl(var(--primary) / 0.3);
}

.file-description {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    font-style: italic;
}

.files-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.files-stats .stat-item {
    font-size: 0.875rem;
}

.image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    text-align: center;
}

.image-error p {
    margin: 0;
    color: hsl(var(--destructive));
}

.error-details {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--muted) / 0.3);
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    max-width: 400px;
    word-break: break-word;
}

.text-primary {
    color: hsl(var(--primary));
}

.text-info {
    color: hsl(var(--blue));
}

.file-size,
.file-date {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

/* Step Files Summary */
.step-files-summary {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    background-color: hsl(var(--muted) / 0.5);
    border: 1px solid hsl(var(--border));
}

.step-files-summary h5 {
    margin-bottom: 0.75rem;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-weight: 600;
}

.step-files-summary .files-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.step-files-summary .file-item {
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    border-radius: var(--radius);
}

.step-files-summary .file-name {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.step-files-summary .file-meta {
    gap: 0.375rem;
}

.step-files-summary .file-type-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
}

.step-files-summary .fryday-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* ========================================= */
/* LOGIN & AUTHENTICATION - ShadCN UI Style */
/* ========================================= */

/* Auth Container - Full Screen Layout */
.fryday-auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: hsl(var(--background));
    overflow: hidden;
}

/* Background Elements */
.fryday-auth-background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.fryday-auth-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, hsl(var(--border)) 1px, transparent 1px),
        linear-gradient(to bottom, hsl(var(--border)) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

.fryday-auth-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        800px circle at 50% 200px,
        hsl(var(--primary) / 0.15),
        transparent 50%
    );
}

/* Main Content */
.fryday-auth-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

/* Brand Section */
.fryday-auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.fryday-auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.fryday-auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.fryday-auth-subtitle {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin: 0;
}

/* Auth Card */
.fryday-auth-card {
    background: hsl(var(--card) / 0.95);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
}

.fryday-auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.fryday-auth-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.fryday-auth-header p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

/* Alert Messages */
.fryday-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid;
    animation: slideInDown 0.3s ease-out;
}

.fryday-alert-icon {
    flex-shrink: 0;
}

.fryday-alert-error {
    background: hsl(var(--destructive) / 0.1);
    border-color: hsl(var(--destructive) / 0.2);
    color: hsl(var(--destructive));
}

.fryday-alert-success {
    background: hsl(var(--success) / 0.1);
    border-color: hsl(var(--success) / 0.2);
    color: hsl(var(--success));
}

/* Form Styles */
.fryday-auth-form {
    display: block;
}

.fryday-form-group {
    margin-bottom: 1rem;
}

.fryday-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.fryday-form-required {
    color: hsl(var(--destructive));
    margin-left: 0.25rem;
}

.fryday-form-input-container {
    position: relative;
}

.fryday-form-input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
    z-index: 2;
    pointer-events: none;
}

.fryday-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    line-height: 1.5;
    transition: var(--transition-base);
    outline: none;
}

.fryday-form-input::placeholder {
    color: hsl(var(--muted-foreground));
}

.fryday-form-input:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.fryday-form-input:invalid:not(:placeholder-shown) {
    border-color: hsl(var(--destructive));
    box-shadow: 0 0 0 2px hsl(var(--destructive) / 0.2);
}

/* Password Toggle */
.fryday-form-input-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    z-index: 2;
}

.fryday-form-input-toggle:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted) / 0.5);
}

.fryday-form-input-toggle:focus {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* Checkbox Styles */
.fryday-form-checkbox-group {
    margin: 1.5rem 0;
}

.fryday-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    user-select: none;
}

.fryday-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.fryday-checkbox-checkmark {
    position: relative;
    width: 1rem;
    height: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-sm);
    background: hsl(var(--background));
    transition: var(--transition-base);
    flex-shrink: 0;
}

.fryday-checkbox-checkmark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.375rem;
    height: 0.625rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    transition: var(--transition-base);
}

.fryday-checkbox-input:checked ~ .fryday-checkbox-checkmark {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
}

.fryday-checkbox-input:checked ~ .fryday-checkbox-checkmark::after {
    transform: translate(-50%, -60%) rotate(45deg) scale(1);
}

.fryday-checkbox-input:focus ~ .fryday-checkbox-checkmark {
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.fryday-checkbox-label {
    color: hsl(var(--foreground));
    line-height: 1.5;
}

/* Enhanced Button Styles */
.fryday-btn-loading {
    position: relative;
    overflow: hidden;
}

.fryday-btn-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition-base);
}

.fryday-btn-loading:disabled .fryday-btn-text {
    opacity: 0;
}

.fryday-btn-loading:disabled .fryday-btn-spinner {
    opacity: 1;
}

.fryday-btn-loading:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Footer */
.fryday-auth-footer {
    text-align: center;
    margin-top: 2rem;
}

.fryday-auth-footer p {
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    margin: 0;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 640px) {
    .fryday-auth-content {
        padding: 1rem;
    }
    
    .fryday-auth-card {
        padding: 1.5rem;
    }
    
    .fryday-auth-title {
        font-size: 1.75rem;
    }
    
    .fryday-auth-header h2 {
        font-size: 1.25rem;
    }
}

/* Dark Mode Enhancements */
.dark .fryday-auth-card {
    background: hsl(var(--card) / 0.9);
    border-color: hsl(var(--border));
}

.dark .fryday-auth-grid {
    opacity: 0.3;
}

.dark .fryday-auth-gradient {
    background: radial-gradient(
        800px circle at 50% 200px,
        hsl(var(--primary) / 0.1),
        transparent 50%
    );
}

/* Focus visible for accessibility */
.fryday-form-input:focus-visible,
.fryday-btn:focus-visible,
.fryday-form-input-toggle:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .fryday-auth-card {
        border-width: 2px;
    }
    
    .fryday-form-input {
        border-width: 2px;
    }
    
    .fryday-alert {
        border-width: 2px;
    }
}

/* Modals */
.fryday-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Empty states */
.fryday-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: hsl(var(--muted-foreground));
}

.fryday-empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

/* Activity */
.fryday-activity-list {
    display: grid;
    gap: 0.75rem;
}

.fryday-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.activity-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.activity-action {
    color: hsl(var(--muted-foreground));
}

.activity-project {
    background-color: hsl(var(--muted));
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
}

.activity-time {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* Actions */
.fryday-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.fryday-admin-links {
    display: flex;
    gap: 1rem;
}

/* Global stats */
.fryday-global-stats {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.global-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.global-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

.stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Logements */
.logements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.logement-card {
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    text-align: center;
}

.logement-card h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.logement-card p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .fryday-header-content { flex-direction: column; gap: 0.75rem; }
    .fryday-logo-img { height: 28px; }
    
    .fryday-nav-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .fryday-work-controls {
        grid-template-columns: 1fr;
    }
    
    .timer-buttons {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Reserve-specific styles */
.reserve-item {
    position: relative;
}

.reserve-item.resolved {
    opacity: 0.7;
    background-color: hsl(var(--muted));
}

.reserve-item.unresolved {
    border-left: 4px solid hsl(var(--destructive));
}

.severity-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.severity-low {
    background-color: hsl(142, 76%, 36%);
    color: white;
}

.severity-medium {
    background-color: hsl(45, 93%, 47%);
    color: white;
}

.severity-high {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.resolved-indicator {
    color: hsl(142, 76%, 36%);
    font-size: 0.875rem;
    font-weight: 500;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.fryday-btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Step indicators for workflow */
.step-item.current {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.step-item.completed {
    background-color: hsl(142, 76%, 36%);
    color: white;
}

.step-item {
    transition: all 0.2s ease;
}

/* ========================================= */
/* ENHANCED MODAL SYSTEM */
/* ========================================= */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: hsl(var(--card));
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-xl);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal-small { width: 400px; }
.modal-medium { width: 600px; }
.modal-large { width: 800px; }
.modal-xl { width: 1000px; }

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: hsl(var(--muted) / 0.3);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
    opacity: 0.6;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    transition: all var(--transition-fast);
    border-radius: var(--radius);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.modal-close:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted));
}

.modal-content {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    color: hsl(var(--foreground));
    line-height: 1.6;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid hsl(var(--border));
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: hsl(var(--muted) / 0.2);
}

/* Modal Variants */
.modal-danger .modal-header::after {
    background: linear-gradient(90deg, hsl(var(--destructive)), hsl(var(--destructive-hover)));
}

.modal-success .modal-header::after {
    background: linear-gradient(90deg, hsl(var(--success)), hsl(var(--success-hover)));
}

.modal-warning .modal-header::after {
    background: linear-gradient(90deg, hsl(var(--warning)), hsl(var(--warning-hover)));
}

.modal-info .modal-header::after {
    background: linear-gradient(90deg, hsl(var(--info)), hsl(var(--info-hover)));
}

/* Form Modal Styles */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-form .form-group {
    margin: 0;
}

.modal-form .form-label {
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    display: block;
}

.modal-form .form-input,
.modal-form .form-textarea,
.modal-form .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius-md);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.modal-form .form-input:focus,
.modal-form .form-textarea:focus,
.modal-form .form-select:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.modal-form .form-textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-form .form-error {
    color: hsl(var(--destructive));
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.modal-form .form-help {
    color: hsl(var(--muted-foreground));
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Confirmation Modal Content */
.confirmation-content {
    text-align: center;
    padding: 1rem 0;
}

.confirmation-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.confirmation-message {
    font-size: 1.1rem;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.confirmation-details {
    font-size: 0.9rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

/* Loading Modal */
.modal-loading {
    text-align: center;
    padding: 2rem 1rem;
}

.modal-loading .loading-spinner {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border: 3px solid hsl(var(--border));
    border-top: 3px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.modal-loading .loading-text {
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
}

/* File Upload Modal */
.upload-area {
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.05);
}

.upload-area.dragover {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 2.5rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.upload-text {
    color: hsl(var(--foreground));
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
}

.upload-format-hint {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
    font-weight: 500;
}

.file-type-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--primary) / 0.1);
    border: 1px solid hsl(var(--primary) / 0.2);
    border-radius: var(--radius);
    color: hsl(var(--primary));
    font-weight: 500;
    font-size: 0.9rem;
}

.upload-progress {
    margin-top: 1rem;
    display: none;
}

.upload-progress.active {
    display: block;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--primary-hover)));
    transition: width 0.3s ease;
    border-radius: inherit;
}

.upload-progress-text {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    text-align: center;
}

/* File Preview Components */
.upload-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.preview-files-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all var(--transition-base);
}

.preview-file-item:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary) / 0.3);
}

.preview-file-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    flex-shrink: 0;
}

.preview-file-info {
    flex: 1;
    min-width: 0;
}

.preview-file-name {
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.preview-file-size {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}

.preview-file-remove {
    width: 2rem;
    height: 2rem;
    border: none;
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.preview-file-remove:hover {
    background: hsl(var(--destructive-hover));
    transform: scale(1.05);
}

.preview-file-remove:active {
    transform: scale(0.95);
}

/* Resolution Comment Styling */
.resolution-comment {
    margin-top: 0.5rem !important;
    padding: 0.75rem !important;
    background: hsl(var(--success) / 0.1) !important;
    border: 1px solid hsl(var(--success) / 0.2) !important;
    border-radius: var(--radius) !important;
    font-size: 0.9rem !important;
    line-height: 1.4;
}

.resolution-comment strong {
    color: hsl(var(--success));
    display: block;
    margin-bottom: 0.5rem;
}

/* Resolution Attachments Styling */
.resolution-attachments {
    margin-top: 0.75rem !important;
    padding: 0.75rem;
    background: hsl(var(--success) / 0.05);
    border-radius: var(--radius);
    border: 1px solid hsl(var(--success) / 0.1);
}

.resolution-attachment-item {
    border: 1px solid hsl(var(--success) / 0.3) !important;
    background: hsl(var(--success) / 0.1) !important;
    padding: 4px 6px !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: all var(--transition-base);
}

.resolution-attachment-item:hover {
    background: hsl(var(--success) / 0.2) !important;
    border-color: hsl(var(--success) / 0.4) !important;
}

/* Modal Form Enhancements */
.modal-form .form-group {
    margin-bottom: 1.5rem;
}

.modal-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.modal-form .form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.9rem;
    transition: all var(--transition-base);
    resize: vertical;
    min-height: 2.5rem;
}

.modal-form .form-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.modal-form .form-input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Modal Design */
@media (max-width: 768px) {
    .modal {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-small,
    .modal-medium,
    .modal-large,
    .modal-xl {
        width: 100%;
    }
    
    .modal-header,
    .modal-content,
    .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .modal-backdrop {
        padding: 1rem;
    }
}

/* ========================================= */
/* Image Viewer Modal Styles */
/* ========================================= */

.fryday-image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fryday-image-viewer-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.image-viewer-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    margin: 5% auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.image-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: hsl(var(--muted));
    border-bottom: 1px solid hsl(var(--border));
}

.image-viewer-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: hsl(var(--foreground));
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-viewer-actions {
    display: flex;
    gap: 0.5rem;
}

.image-viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: hsl(var(--muted) / 0.3);
    overflow: auto;
}

.image-viewer-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.image-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: hsl(var(--muted-foreground));
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid hsl(var(--muted));
    border-top: 3px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-icon {
    font-size: 3rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Viewer Responsive Styles */
@media (max-width: 768px) {
    .image-viewer-container {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }
    
    .image-viewer-header {
        padding: 0.75rem 1rem;
    }
    
    .image-viewer-header h3 {
        font-size: 1rem;
        max-width: 50%;
    }
    
    .image-viewer-actions .fryday-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ========================================= */
/* Reserve Form Inline Styles */
/* ========================================= */

.fryday-reserve-form {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: hsl(var(--card));
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.fryday-reserve-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, hsl(var(--warning)), hsl(var(--warning-hover)));
}

.fryday-reserve-form:hover {
    border-color: hsl(var(--border) / 0.8);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.fryday-reserve-form h5 {
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reserve-inline-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.reserve-inline-form .form-group {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reserve-inline-form .form-label {
    font-weight: 600;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.25;
}

.reserve-inline-form .form-label .text-muted {
    color: hsl(var(--muted-foreground));
    font-weight: 400;
    font-size: 0.8rem;
}

.reserve-inline-form .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius-md);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    font-family: inherit;
    line-height: 1.5;
}

.reserve-inline-form .form-input::placeholder {
    color: hsl(var(--muted-foreground));
    opacity: 0.8;
}

.reserve-inline-form .form-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
    background: hsl(var(--background));
}

.reserve-inline-form .form-input:hover:not(:focus) {
    border-color: hsl(var(--border) / 0.8);
}

.reserve-inline-form textarea.form-input {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.6;
}

.reserve-inline-form select.form-input {
    cursor: pointer;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.reserve-inline-form .form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.reserve-inline-form .form-hint {
    color: hsl(var(--muted-foreground));
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.reserve-inline-form .form-hint::before {
    content: 'ℹ️';
    font-size: 0.75rem;
    margin-top: 0.05rem;
    flex-shrink: 0;
}

/* File input styling */
.reserve-inline-form .form-input[type="file"] {
    padding: 0.5rem;
    background: hsl(var(--muted) / 0.3);
    border-style: dashed;
    cursor: pointer;
    transition: all var(--transition-base);
}

.reserve-inline-form .form-input[type="file"]:hover {
    background: hsl(var(--muted) / 0.5);
    border-color: hsl(var(--primary));
}

.reserve-inline-form .form-input[type="file"]:focus {
    background: hsl(var(--background));
    border-style: solid;
}

/* Attachment preview styling */
.attachment-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem;
    background: hsl(var(--muted) / 0.2);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.attachment-preview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: hsl(var(--foreground));
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.attachment-preview-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.attachment-preview-item .file-icon {
    font-size: 1rem;
}

.attachment-preview-item .remove-btn {
    background: none;
    border: none;
    color: hsl(var(--destructive));
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: all var(--transition-fast);
}

.attachment-preview-item .remove-btn:hover {
    background: hsl(var(--destructive) / 0.1);
    transform: scale(1.1);
}

/* Responsive design for reserve form */
@media (max-width: 768px) {
    .fryday-reserve-form {
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .reserve-inline-form .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reserve-inline-form .form-actions .fryday-btn {
        width: 100%;
        justify-content: center;
    }
    
    .attachment-preview-list {
        gap: 0.5rem;
    }
    
    .attachment-preview-item {
        min-width: 0;
        flex: 1;
    }
}

/* Enhanced focus states for accessibility */
.reserve-inline-form .form-input:focus-visible {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Form validation states */
.reserve-inline-form .form-input:invalid {
    border-color: hsl(var(--destructive));
}

.reserve-inline-form .form-input:invalid:focus {
    border-color: hsl(var(--destructive));
    box-shadow: 0 0 0 3px hsl(var(--destructive) / 0.1);
}

/* Loading state for form */
.reserve-inline-form.loading {
    pointer-events: none;
    opacity: 0.7;
}

.reserve-inline-form.loading .fryday-btn {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

/* Character count display */
.form-char-count {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--background) / 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid hsl(var(--border) / 0.5);
}

.form-group {
    position: relative;
}

/* Success animation for form submission */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.reserve-inline-form.success {
    animation: successPulse 0.3s ease-in-out;
}

/* Enhanced file input styling */
.reserve-inline-form .form-input[type="file"]::file-selector-button {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    margin-right: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.reserve-inline-form .form-input[type="file"]::file-selector-button:hover {
    background: hsl(var(--primary-hover));
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.reserves-list {
    margin-top: 16px;
}

.reserves-list h5 {
    margin-bottom: 12px;
    color: hsl(var(--foreground));
    font-weight: 600;
}

/* Tabs Component */
.fryday-tabs {
    width: 100%;
    margin-top: 2rem;
}

.fryday-tabs-nav {
    display: flex;
    border-bottom: 1px solid hsl(var(--border));
    margin-bottom: 1.5rem;
    gap: 0;
}

.fryday-tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    position: relative;
}

.fryday-tab-btn:hover {
    color: hsl(var(--foreground));
    background-color: hsl(var(--muted));
}

.fryday-tab-btn.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
    background-color: hsl(var(--background));
}

.fryday-tab-content {
    display: none;
    animation: fadeIn 0.2s ease-in;
}

.fryday-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Appartement Detail Page */
.fryday-appartement-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.fryday-appartement-detail .fryday-page-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.fryday-appartement-detail .fryday-page-header h1 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.fryday-appartement-detail .header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fryday-appartement-info {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.appartement-details .details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.appartement-details .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--radius-sm);
    border: 1px solid hsl(var(--border));
}

.appartement-details .detail-item.description {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.appartement-details .detail-item .label {
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.appartement-details .detail-item .value {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.appartement-details .detail-item .value a {
    color: hsl(var(--primary));
    text-decoration: none;
}

.appartement-details .detail-item .value a:hover {
    text-decoration: underline;
}

/* Summary Statistics */
.fryday-travaux-summary {
    background: hsl(var(--muted) / 0.3);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.fryday-travaux-summary h3 {
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.summary-stats .stat-item {
    text-align: center;
    padding: 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-sm);
}

.summary-stats .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--primary));
    margin-bottom: 0.25rem;
}

.summary-stats .stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

/* Empty State Enhanced */
.empty-state-actions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: hsl(var(--muted) / 0.5);
    border-radius: var(--radius-sm);
    border-left: 4px solid hsl(var(--primary));
}

.empty-state-actions ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.empty-state-actions li {
    margin: 0.5rem 0;
    color: hsl(var(--muted-foreground));
}

/* Responsive Design for Appartement Detail */
@media (max-width: 768px) {
    .fryday-appartement-detail .fryday-page-header .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fryday-appartement-detail .fryday-page-header h1 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .fryday-appartement-detail .header-actions {
        width: 100%;
    }
    
    .appartement-details .details-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
}

/* Appartement Etage Sections */
.appartement-etage-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border));
}

.etage-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid hsl(var(--primary));
    display: flex;
    align-items: center;
}

.etage-header:before {
    content: "🏢";
    margin-right: 0.5rem;
    font-size: 1.1em;
}

/* Keep existing type sections for backwards compatibility */
.appartement-type-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border));
}

.type-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid hsl(var(--primary));
}

/* Enhanced Type Display */
.type-value {
    font-weight: 700;
    color: hsl(var(--foreground));
    background: hsl(var(--secondary));
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* Appartement Type Badges */
.appartement-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.appartement-type-badge.type-f3 {
    background-color: hsl(142 71% 45% / 0.2);
    color: hsl(142 71% 45%);
}

.appartement-type-badge.type-f4 {
    background-color: hsl(30 84% 52% / 0.2);
    color: hsl(30 84% 52%);
}

.appartement-type-badge.type-f5 {
    background-color: hsl(0 84.2% 60.2% / 0.2);
    color: hsl(0 84.2% 60.2%);
}

/* Enhanced Appartement Info Display */
.area-value {
    font-weight: 700;
    color: hsl(var(--primary));
    font-size: 1rem;
}

.etage-value {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.status-libre {
    color: hsl(142 71% 45%);
    font-weight: 600;
}

.status-occupé {
    color: hsl(30 84% 52%);
    font-weight: 600;
}

.status-en_travaux {
    color: hsl(0 84.2% 60.2%);
    font-weight: 600;
}

/* Appartements Grid */
.fryday-appartements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fryday-appartement-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    transition: all var(--transition-base);
    position: relative;
}

.fryday-appartement-card:hover {
    box-shadow: var(--shadow-md);
    border-color: hsl(var(--border));
}

.appartement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.appartement-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 0;
}

.appartement-number {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.appartement-info {
    margin-bottom: 1.5rem;
}

.appartement-info .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.appartement-info .info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.appartement-info .info-item:first-child {
    padding-top: 0;
}

.appartement-info .label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

.appartement-info .value {
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    font-weight: 600;
}

.appartement-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fryday-appartements-section .section-description {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Responsive Design for Tabs */
@media (max-width: 768px) {
    .fryday-tabs-nav {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .fryday-tabs-nav::-webkit-scrollbar {
        display: none;
    }
    
    .fryday-tab-btn {
        white-space: nowrap;
        min-width: 120px;
    }
    
    .fryday-appartements-grid {
        grid-template-columns: 1fr;
    }
    
    .appartement-actions {
        flex-direction: column;
    }
}

/* ============================================= */
/* INTELLIGENT DASHBOARD STYLES */
/* ============================================= */

/* Enhanced Header */
.fryday-page-header {
    background: "white";
    color: "white";
    border-radius: 1rem;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
}

.fryday-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="20" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.header-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.header-info p {
    margin: 0 0 1rem 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsl(var(--success));
    animation: pulse 2s infinite;
}

.status-indicator.live {
    background: hsl(var(--success));
    box-shadow: 0 0 8px hsl(var(--success));
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Enhanced KPI Overview */
.fryday-kpi-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.kpi-card.primary::before { background: hsl(var(--primary)); }
.kpi-card.success::before { background: hsl(var(--success)); }
.kpi-card.warning::before { background: hsl(var(--warning)); }
.kpi-card.danger::before { background: hsl(var(--destructive)); }
.kpi-card.critical::before { background: #dc2626; }
.kpi-card.info::before { background: hsl(var(--info)); }

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px hsl(var(--shadow) / 0.15);
}

.kpi-card:hover::before {
    height: 6px;
}

.kpi-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.kpi-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: hsl(var(--foreground));
}

.kpi-content p {
    margin: 0 0 0.75rem 0;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

.kpi-sub {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.kpi-visual {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.progress-ring-svg {
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    fill: none;
    stroke: hsl(var(--muted));
    stroke-width: 3;
}

.progress-ring-circle {
    fill: none;
    stroke: hsl(var(--primary));
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-top: 0.75rem;
}

.kpi-trend.positive {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
}

.kpi-trend.negative {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
}

.kpi-trend.neutral {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

/* Smart Layout Grid */
.fryday-dashboard-grid.smart-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: row dense;
    grid-auto-rows: auto;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start;
    width: 100%;
}

/* Prevent intrinsic min-width from forcing line breaks in grid items */
.fryday-dashboard-grid.smart-layout > * {
    min-width: 0;
}

.dashboard-panel {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: fit-content;
    min-height: 200px;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-panel:hover {
    border-color: hsl(var(--primary) / 0.3);
    box-shadow: 0 4px 20px hsl(var(--shadow) / 0.1);
}

/* Grid Column Assignments - Optimized for side-by-side display */
.analytics-panel { 
    grid-column: span 8; 
    min-height: 350px;
}

.work-types-panel { 
    grid-column: span 4; 
    min-height: 350px;
}

.team-panel { 
    grid-column: span 6; 
    min-height: 300px;
}

.quick-actions-panel { 
    grid-column: span 6; 
    min-height: 300px;
}

.activity-panel { 
    grid-column: span 8; 
    min-height: 400px;
}

.alerts-panel { 
    grid-column: span 4; 
    min-height: 400px;
}

.status-monitor-panel { 
    grid-column: span 12; 
    min-height: 200px;
}

/* Fallback for browsers not applying CSS Grid properly */
@supports not (display: grid) {
    .fryday-dashboard-grid.smart-layout {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    .fryday-dashboard-grid.smart-layout > * { box-sizing: border-box; }
    .analytics-panel { width: 66.666%; }
    .work-types-panel { width: 31.333%; }
    .team-panel { width: 48.5%; }
    .quick-actions-panel { width: 48.5%; }
    .activity-panel { width: 66.666%; }
    .alerts-panel { width: 31.333%; }
    .status-monitor-panel { width: 100%; }
    .alerts-panel.priority { width: 100%; }
}

/* Priority alerts take full width when they exist */
.alerts-panel.priority {
    grid-column: span 12;
    order: -1;
    min-height: 250px;
    grid-row: 1;
}

/* Fallback layout adjustments without :has() selector for better browser support */
body.has-priority-alerts .analytics-panel {
    grid-column: span 6;
}

body.has-priority-alerts .work-types-panel {
    grid-column: span 6;
}

body.has-priority-alerts .activity-panel {
    grid-column: span 12;
}

/* Let auto-placement manage rows in fallback */

/* Modern browser support with :has() selector */
@supports selector(:has(*)) {
    .fryday-dashboard-grid.smart-layout:has(.alerts-panel.priority) .analytics-panel {
        grid-column: span 6;
    }

    .fryday-dashboard-grid.smart-layout:has(.alerts-panel.priority) .work-types-panel {
        grid-column: span 6;
    }

    .fryday-dashboard-grid.smart-layout:has(.alerts-panel.priority) .activity-panel {
        grid-column: span 12;
    }

    /* Rows will be determined by auto-placement */
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.panel-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.panel-link {
    color: hsl(var(--primary));
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.panel-link:hover {
    text-decoration: underline;
}

.panel-content {
    padding: 1.5rem;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 200px;
    margin-bottom: 1rem;
}

.chart-legend {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.completed { background: rgb(34, 197, 94); }
.legend-color.duration { background: rgb(59, 130, 246); }

/* Work Types Grid */
.work-types-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.work-type-card {
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.work-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0.75rem 0.75rem 0 0;
}

.work-type-card.excellent::before { background: hsl(var(--success)); }
.work-type-card.good::before { background: hsl(var(--info)); }
.work-type-card.average::before { background: hsl(var(--warning)); }
.work-type-card.poor::before { background: hsl(var(--destructive)); }

.work-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.work-type-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.completion-badge {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.work-type-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.metric {
    text-align: center;
}

.metric .value {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

.metric .label {
    display: block;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

.metric.warning .value {
    color: hsl(var(--warning));
}

.work-type-progress {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: hsl(var(--muted));
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Team Performance */
.team-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-member-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.team-member-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    transform: translateY(-1px);
}

.team-member-card.rank-1 {
    background: linear-gradient(135deg, hsl(var(--warning) / 0.05), hsl(var(--card)));
    border-color: hsl(var(--warning) / 0.3);
}

.member-rank {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--primary));
    min-width: 2rem;
    text-align: center;
}

.member-info {
    flex: 1;
}

.member-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.member-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.stat.completed {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
}

.stat.active {
    background: hsl(var(--warning) / 0.1);
    color: hsl(var(--warning));
}

.stat.duration {
    background: hsl(var(--info) / 0.1);
    color: hsl(var(--info));
}

.member-score {
    text-align: center;
}

.score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

.score-label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    text-decoration: none;
    color: hsl(var(--foreground));
    transition: all 0.3s ease;
    background: hsl(var(--card));
}

.quick-action-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px hsl(var(--shadow) / 0.1);
    text-decoration: none;
    color: hsl(var(--foreground));
}

.quick-action-card.actionable {
    cursor: pointer;
    border: none;
    background: hsl(var(--card));
}

.action-icon {
    font-size: 1.5rem;
    min-width: 2rem;
    text-align: center;
}

.action-content {
    flex: 1;
}

.action-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.action-content p {
    margin: 0;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.action-arrow {
    color: hsl(var(--primary));
    font-weight: 600;
}

/* Enhanced Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.activity-timeline::-webkit-scrollbar {
    width: 4px;
}

.activity-timeline::-webkit-scrollbar-track {
    background: hsl(var(--muted));
    border-radius: 2px;
}

.activity-timeline::-webkit-scrollbar-thumb {
    background: hsl(var(--primary));
    border-radius: 2px;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.activity-item:hover {
    border-color: hsl(var(--primary) / 0.3);
    background: hsl(var(--muted) / 0.3);
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 0.75rem 0.75rem 0;
}

.activity-item.started::before { background: hsl(var(--info)); }
.activity-item.ended::before { background: hsl(var(--warning)); }
.activity-item.validated::before { background: hsl(var(--success)); }
.activity-item.reserve::before { background: hsl(var(--destructive)); }
.activity-item.file::before { background: hsl(var(--primary)); }
.activity-item.default::before { background: hsl(var(--muted-foreground)); }

.activity-timeline-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: hsl(var(--muted));
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.activity-user {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.activity-action {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.status-badge.status-validated {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
}

.status-badge.status-in_progress {
    background: hsl(var(--warning) / 0.1);
    color: hsl(var(--warning));
}

.status-badge.status-not_started {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.activity-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.work-name {
    font-weight: 500;
    color: hsl(var(--foreground));
}

.project-name {
    color: hsl(var(--primary));
}

.separator {
    color: hsl(var(--muted-foreground));
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.activity-link {
    color: hsl(var(--primary));
    text-decoration: none;
    font-weight: 500;
}

.activity-link:hover {
    text-decoration: underline;
}

.activity-empty {
    text-align: center;
    padding: 2rem;
    color: hsl(var(--muted-foreground));
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Smart Alerts */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.alert-group h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid;
    transition: all 0.3s ease;
}

.alert-item.critical {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

.alert-item.warning {
    border-color: hsl(var(--warning));
    background: hsl(var(--warning) / 0.05);
}

.alert-item.info {
    border-color: hsl(var(--info));
    background: hsl(var(--info) / 0.05);
}

.alert-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsl(var(--shadow) / 0.1);
}

.alert-severity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 4rem;
}

.severity-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.severity-indicator.critical { background: #dc2626; }
.severity-indicator.high { background: hsl(var(--destructive)); }
.severity-indicator.medium { background: hsl(var(--warning)); }
.severity-indicator.unassigned { background: hsl(var(--info)); }

.days-overdue {
    font-weight: 700;
    color: #dc2626;
    font-size: 0.75rem;
}

.severity-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: hsl(var(--foreground));
}

.alert-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.25rem;
}

.alert-description {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.25rem;
}

.alert-assignee {
    font-size: 0.75rem;
    color: hsl(var(--primary));
}

.alert-actions {
    display: flex;
    gap: 0.5rem;
}

.alert-action {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alert-action.primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.alert-action.primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.alert-action.secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.alert-action.secondary:hover {
    background: hsl(var(--secondary) / 0.8);
}

.alert-summary {
    display: flex;
    gap: 0.5rem;
}

.alert-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

.alert-count.critical {
    background: #dc2626;
    color: white;
}

.alert-count.warning {
    background: hsl(var(--warning));
    color: white;
}

.alert-count.info {
    background: hsl(var(--info));
    color: white;
}

/* Status Monitor */
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.monitor-item {
    text-align: center;
    padding: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    background: hsl(var(--muted) / 0.3);
}

.monitor-item h4 {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
}

.activity-pulse {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsl(var(--success));
    animation: pulse 2s infinite;
}

.users-count .count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

.users-count .label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.performance-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.performance-score {
    font-size: 2rem;
    font-weight: 700;
}

.performance-indicator.excellent .performance-score {
    color: hsl(var(--success));
}

.performance-indicator.good .performance-score {
    color: hsl(var(--info));
}

.performance-indicator.needs-attention .performance-score {
    color: hsl(var(--warning));
}

.performance-trend {
    font-size: 1.25rem;
}

/* Form Controls */
.fryday-select-small {
    padding: 0.375rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
}

.fryday-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background: hsl(var(--background));
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: all 0.3s ease;
}

.fryday-btn-icon:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
}

/* Responsive Design for Mobile - Enhanced */
@media (min-width: 1401px) {
    /* Large screens - maintain 12-column grid */
    .fryday-dashboard-grid.smart-layout {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
}

@media (max-width: 1400px) and (min-width: 1201px) {
    /* Medium-large screens - adjust ratios */
    .analytics-panel { grid-column: span 7; }
    .work-types-panel { grid-column: span 5; }
    .team-panel { grid-column: span 6; }
    .quick-actions-panel { grid-column: span 6; }
    .activity-panel { grid-column: span 7; }
    .alerts-panel { grid-column: span 5; }
}

@media (max-width: 1200px) and (min-width: 769px) {
    /* Tablets - force 2-column layout */
    .fryday-dashboard-grid.smart-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    /* Let items auto-place to avoid forced stacking on tablets */
    .fryday-dashboard-grid.smart-layout .dashboard-panel { grid-row: auto !important; }
    .analytics-panel { grid-column: span 1; }
    .work-types-panel { grid-column: span 1; }
    .team-panel { grid-column: span 1; }
    .quick-actions-panel { grid-column: span 1; }
    .activity-panel { grid-column: span 2; }
    .alerts-panel { grid-column: span 2; }
    .status-monitor-panel { grid-column: span 2; }
    
    .alerts-panel.priority {
        grid-column: span 2;
        grid-row: auto !important;
    }
}

@media (max-width: 768px) {
    /* Mobile - single column */
    .fryday-kpi-overview {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .fryday-dashboard-grid.smart-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-panel {
        grid-column: span 1 !important;
        min-height: auto;
        grid-row: auto !important;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .work-type-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .monitor-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-item {
        flex-direction: column;
        text-align: left;
    }
    
    .activity-timeline-marker {
        align-self: flex-start;
    }
    
    .team-member-card {
        flex-direction: column;
        text-align: center;
    }
    
    .alert-item {
        flex-direction: column;
        text-align: left;
    }
    
    .chart-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .fryday-kpi-overview {
        grid-template-columns: 1fr;
    }
    
    .kpi-card {
        padding: 1rem;
    }
    
    .kpi-content h3 {
        font-size: 2rem;
    }
    
    .panel-content {
        padding: 1rem;
    }
    
    .panel-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .header-info h1 {
        font-size: 1.5rem;
    }
    
    .activity-timeline {
        max-height: 300px;
    }
}

/* Compact View Toggle */
.dashboard-compact .fryday-kpi-overview {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.dashboard-compact .kpi-card {
    padding: 1rem;
}

.dashboard-compact .kpi-content h3 {
    font-size: 1.75rem;
}

.dashboard-compact .panel-content {
    padding: 1rem;
}

.dashboard-compact .dashboard-panel {
    border-radius: 0.5rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid hsl(var(--muted));
    border-top: 2px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Debug helpers for grid layout (remove in production) */
.debug-grid .fryday-dashboard-grid.smart-layout {
    outline: 2px dashed #ff6b6b;
}

.debug-grid .dashboard-panel {
    outline: 1px solid #4ecdc4;
    position: relative;
}

.debug-grid .dashboard-panel::before {
    content: attr(class);
    position: absolute;
    top: 0;
    left: 0;
    background: #ff6b6b;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    z-index: 1000;
}

/* Ensure proper box-sizing for all dashboard elements */
.fryday-dashboard *,
.fryday-dashboard *::before,
.fryday-dashboard *::after {
    box-sizing: border-box;
}

/* Additional grid stability fixes */
.fryday-dashboard-grid.smart-layout {
    contain: layout;
    isolation: isolate;
}

.dashboard-panel {
    contain: layout style;
    will-change: transform;
}

/* Force hardware acceleration for smoother interactions */
.kpi-card,
.dashboard-panel,
.quick-action-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Print Styles */
@media print {
    .fryday-dashboard {
        background: white;
        color: black;
    }
    
    .header-actions,
    .panel-controls,
    .alert-actions {
        display: none;
    }
    
    .dashboard-panel {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .fryday-dashboard-grid.smart-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-panel {
        grid-column: span 1 !important;
    }
}
