/* ========================================
   GLOBAL CSS FOR FAMILIEHANSEN.NU
   Modern Dashboard with Warm Colors
   Fully Responsive & Cross-Browser Compatible
   ======================================== */

/* ========================================
   CSS VARIABLES - WARM COLOR PALETTE
   ======================================== */
:root {
    /* Primary Warm Colors */
    --primary-orange: #ff6b35;
    --primary-yellow: #f4a261;
    --warm-cream: #fefae0;
    --warm-beige: #faedcd;
    
    /* Secondary Warm Colors */
    --warm-brown: #d4a574;
    --warm-tan: #e9c46a;
    --warm-peach: #ffb4a2;
    --warm-coral: #e76f51;
    
    /* Neutral Warm Colors */
    --warm-gray: #6b7280;
    --warm-light-gray: #f3f4f6;
    --warm-dark-gray: #374151;
    
    /* Background Colors */
    --bg-primary: #fefae0;
    --bg-secondary: #faedcd;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    /* Border Colors */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* Status Colors */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Shadow Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Spacing - Using rem for better scaling */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Touch Targets - Minimum 44px for mobile */
    --touch-target: 2.75rem;
    
    /* Typography Scale */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ========================================
   RESET AND BASE STYLES
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size for rem calculations */
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
/* Focus styles for keyboard navigation */
*:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-orange);
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: var(--z-tooltip);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: top 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.skip-link:focus {
    top: 6px;
    opacity: 1;
    pointer-events: auto;
}

/* ========================================
   CONTAINER AND LAYOUT
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    width: 100%;
}

/* ========================================
   HEADER STYLES
   ======================================== */
.header {
    background: var(--bg-header);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    min-height: var(--touch-target); /* Ensure touch-friendly height */
}

.logo h1 {
    color: var(--primary-orange);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fallback for browsers that don't support background-clip */
    @supports not (-webkit-background-clip: text) {
        color: var(--primary-orange);
    }
}

.logo p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */
.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
    min-height: var(--touch-target); /* Touch-friendly target */
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary-orange);
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-orange);
    background: rgba(255, 107, 53, 0.15);
    font-weight: 600;
}

/* ========================================
   MOBILE MENU TOGGLE
   ======================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.75rem;
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    justify-content: center;
    align-items: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    position: relative;
    z-index: var(--z-sticky);
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    background: rgba(255, 107, 53, 0.1);
    transform: scale(1.05);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-orange);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
    transform-origin: center;
}

/* Mobile menu active state */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Responsive Navigation Visibility */
@media (max-width: 768px) {
    .main-nav {
        display: none; /* Hide desktop nav on mobile */
    }
    .mobile-menu-toggle {
        display: flex; /* Show hamburger on mobile */
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none !important; /* Ensure mobile panel is hidden on desktop */
    }
    .mobile-menu-toggle {
        display: none !important; /* Hide hamburger on desktop */
    }
}

/* ========================================
   MOBILE NAVIGATION
   ======================================== */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff !important; /* Forcing solid white background */
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    transform: translateY(-100%);
    transition: transform 0.35s ease, opacity 0.35s ease;
    padding-top: 80px; /* Account for header height */
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity; /* Performance optimization */
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    flex-direction: column;
    padding: var(--spacing-md);
    gap: 0;
    list-style: none;
    margin: 0;
}

.mobile-nav .nav-link {
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    justify-content: flex-start;
    min-height: var(--touch-target);
    display: block;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid transparent;
}

.mobile-nav .nav-link:hover {
    background-color: var(--warm-light-gray);
    border-color: rgba(255, 107, 53, 0.2);
    transform: translateX(5px);
}

.mobile-nav .nav-link.active {
    background-color: var(--primary-orange);
    color: white;
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   MAIN CONTENT STYLES
   ======================================== */
.main-content {
    padding: var(--spacing-xl) 0;
}

/* ========================================
   WELCOME SECTION
   ======================================== */
.welcome-section {
    margin-bottom: var(--spacing-xl);
}

.welcome-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid rgba(255, 107, 53, 0.1);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-yellow), var(--warm-peach));
}

.welcome-card h2 {
    color: var(--text-primary);
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow), var(--warm-peach));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fallback for browsers that don't support background-clip */
    @supports not (-webkit-background-clip: text) {
        color: var(--primary-orange);
    }
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: var(--spacing-sm) 0;
}

.welcome-card h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-yellow));
    border-radius: 2px;
}

.welcome-card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--warm-peach), var(--primary-orange));
    border-radius: 1px;
}

.welcome-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
}

.welcome-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.stat-item {
    background: linear-gradient(135deg, var(--warm-cream), var(--warm-beige));
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 107, 53, 0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-size-sm);
}

/* ========================================
   DASHBOARD GRID
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* ========================================
   DASHBOARD CARDS
   ======================================== */
.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 107, 53, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-yellow));
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.dashboard-card h3 {
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.action-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
    position: relative;
    overflow: hidden;
    min-height: var(--touch-target); /* Touch-friendly target */
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    color: white;
    box-shadow: var(--shadow-md);
}

.action-btn.primary:hover,
.action-btn.primary:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.action-btn.secondary {
    background: var(--warm-cream);
    color: var(--text-primary);
    border: 2px solid var(--warm-brown);
}

.action-btn.secondary:hover,
.action-btn.secondary:focus {
    background: var(--warm-beige);
    transform: translateY(-2px);
    border-color: var(--primary-orange);
}

/* ========================================
   RECENT EVENTS
   ======================================== */
.event-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.event-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    background: var(--warm-cream);
    border: 1px solid rgba(255, 107, 53, 0.1);
    transition: all 0.3s ease;
    min-height: var(--touch-target); /* Touch-friendly target */
}

.event-item:hover {
    background: var(--warm-beige);
    transform: translateX(5px);
}

.event-date {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}

.event-date .day {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
}

.event-details h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: var(--font-size-base);
}

.event-details p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ========================================
   FAMILY MEMBERS
   ======================================== */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-sm);
    justify-items: center;
}

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    transition: all 0.3s ease;
}

.member-card:hover {
    transform: translateY(-2px);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.member-card:hover .member-avatar {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-orange);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.member-card h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-card p {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.2;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   RECENT PHOTOS
   ======================================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--spacing-sm);
}

.photo-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: var(--touch-target); /* Touch-friendly target */
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   FOOTER STYLES
   ======================================== */
.footer {
    background: var(--bg-header);
    border-top: 1px solid rgba(255, 107, 53, 0.1);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: var(--primary-orange);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: var(--font-size-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: var(--font-size-sm);
    padding: 0.25rem 0;
    display: inline-block;
}

.footer-section ul li a:hover,
.footer-section ul li a:focus {
    color: var(--primary-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 107, 53, 0.1);
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ======================================== */

/* Extra Small devices (phones, 320px and up) */
@media (min-width: 320px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .welcome-card {
        padding: var(--spacing-md);
    }
    
    .welcome-card h2 {
        font-size: var(--font-size-3xl);
    }
    
    .dashboard-card {
        padding: var(--spacing-md);
    }
    
    .member-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-nav {
        display: block;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .welcome-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .header-content {
        flex-direction: row;
        gap: 0;
    }
    
    .main-nav {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-nav {
        display: none;
    }
    
    .welcome-card h2 {
        font-size: var(--font-size-4xl);
    }
    
    .welcome-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .member-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .welcome-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* ========================================
   ANIMATIONS AND EFFECTS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-card,
.dashboard-card {
    animation: fadeInUp 0.6s ease-out;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }

.mobile-nav.active {
    animation: slideInFromTop 0.3s ease-out;
}

/* ========================================
   SCROLLBAR STYLING - CROSS BROWSER
   ======================================== */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--warm-coral), var(--primary-orange));
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-orange) var(--warm-light-gray);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .footer,
    .mobile-menu-toggle,
    .action-buttons {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .welcome-card,
    .dashboard-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ========================================
   HIGH CONTRAST MODE SUPPORT
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-orange: #d84315;
        --primary-yellow: #f57c00;
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-card: #ffffff;
        --bg-primary: #ffffff;
    }
    
    .dashboard-card,
    .welcome-card {
        border: 2px solid var(--text-primary);
    }
}

/* ========================================
   REDUCED MOTION SUPPORT
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .welcome-card,
    .dashboard-card {
        animation: none;
    }
}

/* ========================================
   CAR CHARGING PAGE STYLES
   ======================================== */

.charging-grid-layout {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .charging-grid-layout {
        display: grid;
        grid-template-columns: 2fr 1fr; /* 2/3 for log, 1/3 for actions */
        align-items: start;
    }
}

.log-start-info {
    background: var(--primary-orange);
    color: white;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
    font-family: monospace;
    word-break: break-all;
}

/* New Log Entry Styles */
.log-entries-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--warm-light-gray);
    font-size: var(--font-size-sm);
    gap: var(--spacing-sm);
}

.log-item:last-child {
    border-bottom: none;
}

.log-label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.log-value {
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.no-data p {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
}

/* Print Styles for Charging Page */
@media print {
    .mobile-menu-toggle,
    .action-buttons,
    .footer {
        display: none !important;
    }
    
    .charging-table {
        font-size: 12px;
        min-width: auto;
        width: 100%;
    }
    
    .charging-table th,
    .charging-table td {
        padding: 8px;
        max-width: none;
    }
    
    .dashboard-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Remove old table styles */
.table-container, .charging-table, .charging-table th, .charging-table td, .charging-table tr, .log-date-header, .log-entries-container > h4:first-of-type {
    /* These styles are no longer needed */
}

/* ========================================
   LOGIN PAGE STYLES - TWO COLUMN REDESIGN
   ======================================== */
body.login-page {
    overflow-x: hidden;
}

.login-section-container {
    display: flex;
    min-height: calc(100vh - 155px); /* Adjust based on header/footer height */
    width: 100%;
}

/* Left side showcase */
.login-showcase {
    flex: 1 1 55%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(0,0,0,0.05);
}

.login-showcase::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite;
}

.showcase-content {
    max-width: 450px;
    z-index: 1;
}

.showcase-content .logo h1 {
    font-size: var(--font-size-4xl);
    color: var(--primary-orange);
    margin-bottom: var(--spacing-sm);
}

.showcase-content .logo p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.showcase-illustration {
    max-width: 100%;
    height: auto;
    margin-bottom: var(--spacing-lg);
}

.showcase-features {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.feature-item span {
    font-size: 2rem;
}


/* Right side form */
.login-form-wrapper {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    background-color: var(--bg-card);
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.welcome-text h2 {
    font-size: var(--font-size-3xl);
    color: var(--text-primary);
}

.welcome-text p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* General login form styles from previous iteration can be kept, but simplified */
/* No need for complex headers or footers inside the form now */

/* Responsive adjustments */
@media (max-width: 992px) {
    .login-section-container {
        flex-direction: column;
    }

    .login-showcase {
        display: none; /* Hide the showcase on smaller screens to focus on login */
    }

    .login-form-wrapper {
        flex-basis: 100%;
        min-height: calc(100vh - 155px);
    }
}

/* ========================================
   ADMIN LOGIN PAGE STYLES
   ======================================== */
.admin-login-body {
    background: linear-gradient(135deg, var(--warm-light-gray), var(--warm-beige));
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--spacing-sm);
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
}

.login-box .logo {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.login-error {
    background: var(--warm-coral);
    color: white;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.login-form .form-group {
    margin-bottom: var(--spacing-md);
}

.login-form label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid #ddd;
    font-size: var(--font-size-base);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    outline: none;
}

.action-btn.full-width {
    width: 100%;
    padding: 0.85rem;
    font-size: var(--font-size-lg);
}

.login-footer {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.login-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--primary-orange);
    text-decoration: underline;
}

/* ========================================
   ADMIN DASHBOARD STYLES
   ======================================== */
.admin-body {
    background: var(--warm-light-gray);
    color: var(--text-primary);
}

.admin-header {
    background: var(--bg-header);
    box-shadow: var(--shadow-md);
    padding: 0 var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.admin-logo a {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-orange);
    text-decoration: none;
}

.admin-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: var(--spacing-md);
    transition: color 0.2s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}

.admin-main-content {
    padding: var(--spacing-lg);
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-welcome {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.admin-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.admin-card h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.admin-card p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: var(--spacing-md);
}

.admin-footer {
    text-align: center;
    padding: var(--spacing-md);
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* ========================================
   ADMIN TABLE & FORM STYLES
   ======================================== */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--warm-light-gray);
}

.admin-table th {
    background: var(--warm-light-gray);
    font-weight: 600;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background-color: var(--warm-cream);
}

.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-admin {
    background-color: var(--primary-orange);
    color: white;
}

.status-user {
    background-color: #ccc;
    color: var(--text-primary);
}

.actions a {
    text-decoration: none;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Admin Form */
.admin-form {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group small {
    margin-top: 0.25rem;
    color: var(--text-secondary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ========================================
   NEW MOBILE MENU - V2 (Jump-free)
   ======================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1;
}

.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-menu-nav li {
    margin-bottom: 2rem;
}

.mobile-menu-nav a {
    font-size: 2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

/* ========================================
   FOLD/UNFOLD FUNCTIONALITY FOR LOG ENTRIES
   ======================================== */
.log-entry {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    background: var(--bg-card);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    cursor: pointer;
    background: var(--bg-secondary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: background-color 0.2s ease;
}

.log-entry-header:hover {
    background: var(--warm-beige);
}

.log-entry-header h5 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.fold-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.fold-toggle:hover {
    background: var(--primary-orange);
    color: white;
    transform: scale(1.1);
}

.fold-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.fold-toggle.folded svg {
    transform: rotate(-90deg);
}

.log-entry-content {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
}

.log-entry-content.folded {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Mobile responsive adjustments for fold/unfold */
@media (max-width: 768px) {
    .fold-toggle {
        width: 28px;
        height: 28px;
    }
    
    .fold-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .log-entry-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .log-entry-content {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* ========================================
   CLEAN LOGIN PAGE STYLES
   ======================================== */

/* Login Section */
.login-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-light);
    animation: fadeInUp 0.6s ease-out;
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-logo {
    margin-bottom: var(--spacing-lg);
}

.logo-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--spacing-sm);
    animation: pulseLogin 2s ease-in-out infinite;
}

.login-logo h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: var(--spacing-xs);
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
}

/* Messages */
.message {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.message-icon {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.message-text {
    flex: 1;
}

/* Login Form */
.login-form {
    margin-bottom: var(--spacing-xl);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-height: var(--touch-target);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-error {
    color: #dc2626;
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    min-height: 1.2em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: var(--touch-target);
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-full {
    width: 100%;
}

.btn-text {
    flex: 1;
}

.btn-icon {
    flex-shrink: 0;
}

.btn-icon svg {
    width: 1.2em;
    height: 1.2em;
}

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
}

.login-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.link-secondary {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: color 0.2s ease;
}

.link-secondary:hover {
    color: var(--primary-orange);
}

.separator {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.login-info {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.login-info p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 600px) {
    .login-section {
        padding: var(--spacing-sm);
    }
    
    .login-card {
        padding: var(--spacing-lg);
    }
    
    .login-logo h1 {
        font-size: var(--font-size-2xl);
    }
    
    .logo-icon {
        font-size: 2.5rem;
    }
    
    .login-links {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: var(--spacing-md);
    }
    
    .form-input {
        padding: var(--spacing-sm);
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Animations */
@keyframes pulseLogin {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Remove old login-modern styles */
.login-modern-bg,
.login-modern-card,
.login-modern-header,
.login-modern-logo,
.login-modern-tagline,
.login-modern-error,
.login-modern-form,
.login-modern-group,
.login-modern-btn,
.login-modern-footer {
    display: none;
}

/* ========================================
   ENHANCED ADMIN FORM STYLES
   ======================================== */

/* Admin Page Header */
.admin-page-header {
    margin-bottom: var(--spacing-xl);
}

.admin-page-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-lg);
}

.admin-page-header .header-left h1 {
    font-size: var(--font-size-3xl);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.admin-page-header .page-description {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    margin: 0;
}

.admin-page-header .header-actions {
    flex-shrink: 0;
}

/* Enhanced Admin Card */
.admin-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.admin-card .card-header {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.admin-card .card-header h2 {
    font-size: var(--font-size-xl);
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

.user-meta {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.meta-item {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.meta-item strong {
    color: var(--text-primary);
}

/* Form Sections */
.form-section {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--primary-orange);
    display: inline-block;
}

/* Enhanced Form Groups */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.form-label .required {
    color: #dc2626;
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-height: var(--touch-target);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-help {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    line-height: 1.4;
}

.form-error {
    color: #dc2626;
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    min-height: 1.2em;
}

/* Password Input Group */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: var(--spacing-xs);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
    min-height: 2rem;
    min-width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background-color: var(--border-light);
}

.toggle-icon {
    font-size: var(--font-size-sm);
    user-select: none;
}

/* Enhanced Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
    margin-bottom: var(--spacing-xs);
}

.checkbox-label:hover {
    background-color: var(--border-light);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 1.25rem;
    width: 1.25rem;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    flex-shrink: 0;
    margin-top: 0.125rem;
    transition: all 0.2s ease;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 0.25rem;
    top: 0.125rem;
    width: 0.375rem;
    height: 0.625rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-text {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

/* Form Actions */
.form-actions {
    padding: var(--spacing-lg);
    background: var(--border-light);
    border-top: 1px solid var(--border-color);
}

.action-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: var(--touch-target);
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--warm-gray);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.btn-secondary:hover {
    background: var(--warm-dark-gray);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    flex-shrink: 0;
    font-size: var(--font-size-sm);
}

.btn-text {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-page-header .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .admin-page-header .header-actions {
        align-self: flex-start;
    }
    
    .form-section {
        padding: var(--spacing-md);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .user-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

@media (max-width: 480px) {
    .admin-card .card-header {
        padding: var(--spacing-md);
    }
    
    .form-section {
        padding: var(--spacing-sm);
    }
    
    .form-actions {
        padding: var(--spacing-md);
    }
    
    .form-input {
        padding: var(--spacing-sm);
    }
}

/* ========================================
   SMART HOME PAGE STYLES
   ======================================== */

/* Smart Home Grid Layout */
.smarthome-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

/* Quick Controls */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
}

/* Compact Temperature Grid - Smaller boxes for temperature sensors */
.control-grid.temperature-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--spacing-sm);
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
    text-decoration: none;
    color: var(--text-primary);
}

/* Compact temperature sensor buttons */
.control-btn.temperature-btn {
    min-height: 80px;
    padding: var(--spacing-sm);
}

.control-btn.temperature-btn .control-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.control-btn.temperature-btn .control-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.control-btn.temperature-btn .control-status {
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.control-btn:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.control-btn.inactive {
    opacity: 0.6;
    background: var(--border-light);
}

.control-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}

.control-label {
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-align: center;
}

.control-status {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Energy Monitoring */
.energy-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.energy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--border-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-orange);
}

.energy-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.energy-icon {
    font-size: var(--font-size-lg);
}

.energy-label {
    font-weight: 500;
    color: var(--text-primary);
}

.energy-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.energy-trend {
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.energy-trend.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.energy-trend.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Device Status */
.device-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.device-item:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-sm);
}

.device-item.offline {
    opacity: 0.6;
    background: var(--border-light);
}

.device-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.device-icon {
    font-size: var(--font-size-xl);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    border-radius: var(--radius-md);
}

.device-details h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.device-details p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
}

.device-status-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.status-dot.offline {
    background: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.status-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.status-dot.online + .status-text {
    color: #16a34a;
}

.status-dot.offline + .status-text {
    color: #dc2626;
}

/* Automation Rules */
.automation-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.automation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.automation-item.active {
    border-left: 4px solid #16a34a;
}

.automation-item.inactive {
    opacity: 0.6;
    background: var(--border-light);
}

.automation-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.automation-icon {
    font-size: var(--font-size-xl);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    border-radius: var(--radius-md);
}

.automation-details h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.automation-details p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* Automation Toggle */
.automation-toggle {
    position: relative;
    width: 3rem;
    height: 1.5rem;
    background: var(--border-color);
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.automation-toggle.active {
    background: var(--primary-orange);
}

.toggle-slider {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.automation-toggle.active .toggle-slider {
    transform: translateX(1.5rem);
}

/* Notifications */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-tooltip);
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.notification.success {
    border-left: 4px solid #16a34a;
}

.notification.info {
    border-left: 4px solid var(--primary-orange);
}

.notification-icon {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.notification-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .smarthome-grid {
        grid-template-columns: 1fr;
    }
    
    .control-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .control-grid.temperature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xs);
    }
    
    .energy-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .energy-value {
        font-size: var(--font-size-lg);
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .control-grid {
        grid-template-columns: 1fr;
    }
    
    .control-grid.temperature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .device-item,
    .automation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .device-status-indicator,
    .automation-controls {
        align-self: flex-end;
    }
}

/* ========================================
   PAGE MANAGEMENT STYLES
   ======================================== */

/* Page Items */
.page-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.page-item:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-md);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-lg);
    background: var(--border-light);
    border-bottom: 1px solid var(--border-color);
}

.page-info h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.page-file {
    font-family: monospace;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    margin: 0 0 var(--spacing-xs) 0;
    display: inline-block;
}

.page-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.page-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.control-group {
    display: flex;
    align-items: center;
}

.page-settings {
    padding: var(--spacing-lg);
}

/* Help Content */
.help-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.help-item {
    background: var(--border-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-orange);
}

.help-item h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.help-item p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .page-controls {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .help-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: var(--spacing-md);
    }
    
    .page-settings {
        padding: var(--spacing-md);
    }
    
    .page-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: space-between;
    }
}

/* ========================================
   MQTT TEST SECTION
   ======================================== */

.mqtt-test {
    max-width: 600px;
    margin: 0 auto;
}

.mqtt-test-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.mqtt-test-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.mqtt-test-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.mqtt-test-form .form-input {
    padding: var(--spacing-sm);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.mqtt-test-form .form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.mqtt-test-form .form-input::placeholder {
    color: var(--text-muted);
}

.mqtt-output {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    min-height: 60px;
}

.mqtt-success {
    color: var(--success-color);
}

.mqtt-success p {
    margin: var(--spacing-xs) 0;
}

.mqtt-error {
    color: var(--error-color);
}

.mqtt-error p {
    margin: var(--spacing-xs) 0;
}

.mqtt-status {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.mqtt-status p {
    margin: var(--spacing-xs) 0;
    font-size: var(--font-size-sm);
}

.mqtt-status p:first-child {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.mqtt-status ul {
    list-style: none;
    padding: 0;
    margin: var(--spacing-sm) 0;
}

.mqtt-status ul li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-light);
    font-size: var(--font-size-sm);
}

.mqtt-status ul li:last-child {
    border-bottom: none;
}

/* Enhanced notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--info-color);
}

.notification-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-text {
    font-size: 0.9rem;
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mqtt-test-form {
        gap: var(--spacing-sm);
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ========================================
   TABBED INTERFACE (FANEBLADE)
   ======================================== */

.tabs-section {
    margin: var(--spacing-lg) 0;
}

.tabs-container {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

/* Tab Navigation */
.tabs-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border-bottom: none;
    margin: 0 auto;
    padding: var(--spacing-md) 0 var(--spacing-xs) 0;
    position: relative;
    z-index: 2;
}

.tab-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.6rem 1.2rem;
    background: var(--white);
    border: none;
    border-radius: 2rem 2rem 0 0;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
    white-space: nowrap;
    position: relative;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255,107,53,0.04);
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(255,107,53,0.10);
}

.tab-button.active {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    border-bottom: 2px solid var(--accent-color);
    z-index: 3;
    box-shadow: 0 6px 24px rgba(255,107,53,0.10);
}

.tab-button.active::after {
    display: none;
}

.tab-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.tab-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Tab Content */
.tabs-content {
    padding: var(--spacing-lg);
    background: var(--card-bg);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    margin-top: -0.5rem;
    z-index: 1;
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive Tabs */
@media (max-width: 768px) {
    .tabs-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.25rem;
        padding: var(--spacing-xs) 0 0.25rem 0;
    }
    .tab-button {
        min-width: 90px;
        padding: 0.5rem 0.7rem;
        font-size: 0.9rem;
    }
    .tab-icon {
        font-size: 1.1rem;
    }
    .tab-text {
        font-size: 0.85rem;
    }
    .tabs-content {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .tab-button {
        min-width: 70px;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }
    .tab-icon {
        font-size: 1rem;
    }
    .tab-text {
        font-size: 0.7rem;
    }
    .tabs-content {
        padding: var(--spacing-sm);
    }
}

@media (hover: none) and (pointer: coarse) {
    .tab-button {
        min-height: 48px;
        padding: 0.7rem 1rem;
    }
    .tab-button:active {
        background: var(--accent-color);
        color: var(--white);
        transform: scale(0.98);
    }
} 

/* ========================================
   MQTT TEST STYLES
   ======================================== */
.mqtt-test {
    padding: var(--spacing-md);
}

.mqtt-test-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.mqtt-test-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mqtt-test-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.mqtt-test-form .form-input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-card);
}

.mqtt-test-form .form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.mqtt-test-form .form-input::placeholder {
    color: var(--text-light);
}

.button-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-sm);
}

.button-group .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.mqtt-output {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
}

.mqtt-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.mqtt-success p {
    margin: 0.25rem 0;
    color: var(--text-primary);
}

.mqtt-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.mqtt-error p {
    margin: 0.25rem 0;
    color: var(--text-primary);
}

.mqtt-status {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--info-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.mqtt-status p {
    margin: 0.25rem 0;
    color: var(--text-primary);
}

.mqtt-status p:first-child {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mqtt-status ul {
    margin: 0.5rem 0;
    padding-left: var(--spacing-md);
}

.mqtt-status ul li {
    margin: 0.25rem 0;
    color: var(--text-primary);
}

.mqtt-status ul li:last-child {
    margin-bottom: 0;
}

.mqtt-messages {
    margin-top: var(--spacing-sm);
}

.mqtt-message {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.mqtt-message:last-child {
    margin-bottom: 0;
}

.mqtt-message p {
    margin: 0.25rem 0;
    color: var(--text-primary);
}

.mqtt-message p:first-child {
    font-weight: 600;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

/* ========================================
   NOTIFICATION STYLES
   ======================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-tooltip);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--info-color);
}

.notification-icon {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.notification-text {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .mqtt-test-form {
        gap: var(--spacing-sm);
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        min-width: auto;
    }
}

/* ========================================
   SENSOR DISPLAY STYLES
   ======================================== */
.control-btn.sensor-display {
    cursor: default;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    opacity: 1;
    pointer-events: none;
}

.control-btn.sensor-display:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.control-btn.sensor-display:focus {
    outline: none;
    box-shadow: var(--shadow-md);
}

.control-btn.sensor-display .control-icon {
    opacity: 0.8;
}

.control-btn.sensor-display .control-status {
    font-weight: 600;
    color: var(--primary-orange);
    font-size: var(--font-size-lg);
}

/* ========================================
   CONNECTION STATUS STYLES
   ======================================== */
.connection-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.status-indicator {
    font-size: var(--font-size-lg);
    font-weight: bold;
}

.status-indicator.connected {
    color: var(--success-color);
    animation: pulse 2s infinite;
}

.status-indicator.disconnected {
    color: var(--error-color);
}

.status-indicator.connecting {
    color: var(--warning-color);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-left: var(--spacing-xs);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ========================================
   TEMPERATURE HISTORY STYLES
   ======================================== */

.temperature-history {
    max-width: 1200px;
    margin: 0 auto;
}

.history-controls {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    align-items: end;
}

.history-controls .form-group {
    flex: 1;
    min-width: 200px;
}

.temperature-history-output {
    margin-top: var(--spacing-lg);
}

.temperature-stats {
    background: var(--border-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.temperature-stats h4 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.stats-grid .stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.stats-grid .stat-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.stats-grid .stat-value {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.temperature-table {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.temperature-table h4 {
    margin: 0;
    padding: var(--spacing-md);
    background: var(--border-light);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.history-table th {
    background: var(--border-light);
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.history-table td {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.history-table tbody tr:hover {
    background: var(--border-light);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive design for temperature history */
@media (max-width: 768px) {
    .history-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .history-controls .form-group {
        min-width: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .history-table {
        font-size: var(--font-size-xs);
    }
    
    .history-table th,
    .history-table td {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* ========================================
   FAMILY PAGE STYLES
   ======================================== */

/* Family Member Cards */
.family-member-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.family-member-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.member-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--primary-orange);
    box-shadow: var(--shadow-md);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h3 {
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.member-role {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: 0.25rem;
}

.member-age {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.member-details {
    margin-bottom: var(--spacing-md);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.detail-value {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.member-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

.member-actions .action-btn {
    flex: 1;
    max-width: 120px;
}

/* Photo Overlay for Family Photos */
.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: var(--spacing-sm);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-caption {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Family Events Section */
.family-events-section {
    margin-top: var(--spacing-xl);
}

/* Family Photos Section */
.family-photos-section {
    margin-top: var(--spacing-xl);
}

/* Responsive design for family page */
@media (max-width: 768px) {
    .member-header {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .member-avatar {
        width: 60px;
        height: 60px;
    }
    
    .member-actions {
        flex-direction: column;
    }
    
    .member-actions .action-btn {
        max-width: none;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
}

/* ========================================
   PERSONAL PAGE STYLES
   ======================================== */

/* Personal Profile Card */
.personal-profile-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.personal-profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.profile-info {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid var(--primary-orange);
    box-shadow: var(--shadow-lg);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details {
    flex: 1;
}

/* Event Form Styles */
.create-event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.create-event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.event-form {
    margin-top: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-row .form-group {
    margin-bottom: var(--spacing-md);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
}

.form-input {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    user-select: none;
}

.checkbox-label:hover {
    color: var(--primary-orange);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-text {
    font-weight: 500;
}

/* Form Actions */
.form-actions {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

/* My Events Section */
.my-events-section {
    margin-top: var(--spacing-xl);
}

.no-events {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.no-events p {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
}

.events-list {
    margin-top: var(--spacing-md);
}

.events-list .event-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    background: var(--bg-card);
    transition: all 0.3s ease;
    cursor: pointer;
}

.events-list .event-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-orange);
}

.events-list .event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    background: var(--primary-orange);
    color: white;
    border-radius: var(--radius-md);
    font-weight: bold;
    text-align: center;
}

.events-list .event-date .day {
    font-size: var(--font-size-lg);
    line-height: 1;
}

.events-list .event-date .month {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    opacity: 0.9;
}

.events-list .event-details {
    flex: 1;
}

.events-list .event-details h4 {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.events-list .event-details p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

.event-type,
.event-location,
.event-visibility {
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.event-type {
    background: var(--primary-orange);
    color: white;
}

.event-location {
    background: var(--warm-light-gray);
    color: var(--text-secondary);
}

.event-visibility {
    background: var(--warm-beige);
    color: var(--text-secondary);
}

/* Responsive design for personal page */
@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .events-list .event-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .events-list .event-date {
        align-self: center;
    }
    
    .event-meta {
        justify-content: center;
    }
}

/* ========================================
   PROFESSIONAL DASHBOARD LAYOUT
   ======================================== */

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-yellow) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    padding: 4px;
    box-shadow: var(--shadow-md);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-status.admin .status-dot {
    background: var(--primary-orange);
}

.user-status.user .status-dot {
    background: var(--success-color);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.user-info h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-role {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.user-email {
    font-size: var(--font-size-base);
    opacity: 0.8;
}

.dashboard-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Statistics Overview */
.stats-overview {
    margin-bottom: var(--spacing-xl);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-yellow));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--warm-cream), var(--warm-beige));
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-content p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Dashboard Layout */
.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.dashboard-left {
    position: sticky;
    top: var(--spacing-lg);
}

.dashboard-right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Enhanced Dashboard Cards */
.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.card-header {
    background: linear-gradient(135deg, var(--warm-cream), var(--warm-beige));
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

/* Empty States */
.empty-state {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    font-size: var(--font-size-base);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Enhanced Form Styles */
.create-event-card {
    background: var(--bg-card);
}

.event-form {
    padding: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Enhanced Event Items */
.events-list {
    padding: var(--spacing-lg);
}

.event-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--warm-light-gray);
    margin-bottom: var(--spacing-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.event-item:hover {
    background: var(--warm-beige);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
    flex-shrink: 0;
}

.event-date .day {
    font-size: var(--font-size-xl);
    line-height: 1;
}

.event-date .month {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-details {
    flex: 1;
}

.event-details h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.event-details p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.event-type,
.event-owner,
.event-location,
.event-visibility,
.event-time,
.event-status {
    font-size: var(--font-size-xs);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--warm-cream);
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-status.past {
    background: var(--success-color);
    color: white;
}

.event-status.upcoming {
    background: var(--primary-orange);
    color: white;
}

.past-event {
    opacity: 0.7;
}

.past-event:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .dashboard-left {
        position: static;
        order: 2;
    }
    
    .dashboard-right {
        order: 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-header-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .user-welcome {
        flex-direction: column;
        text-align: center;
    }
    
    .dashboard-actions {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .stat-card {
        padding: var(--spacing-md);
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .event-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        padding: var(--spacing-lg) 0;
    }
    
    .user-info h1 {
        font-size: var(--font-size-2xl);
    }
    
    .stat-content h3 {
        font-size: var(--font-size-2xl);
    }
}

/* ========================================
   BILOPLADNING TEST PAGE STYLES
   ======================================== */

/* Filter Controls */
.filter-controls {
    margin-bottom: var(--spacing-lg);
}

.filter-controls h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-btn.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: white;
}

/* Sessions Container */
.sessions-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.session-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-orange);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-sm);
}

.session-info {
    flex: 1;
}

.session-date {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.session-id {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    font-family: monospace;
}

.session-duration {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.session-status {
    flex-shrink: 0;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-connected {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-disconnected {
    background: rgba(107, 114, 128, 0.1);
    color: var(--warm-gray);
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-unknown {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.status-waiting {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-charging {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-ready {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Session Details */
.session-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-weight: 600;
}

/* Status Overview */
.status-overview {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.status-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.status-count {
    background: var(--primary-orange);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

/* Status Timeline */
.status-timeline {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.status-timeline h5 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.timeline-time {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 60px;
    font-family: monospace;
}

.timeline-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

.timeline-kwh {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--warm-cream);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* Responsive Design for Bilopladning Test */
@media (max-width: 768px) {
    .filter-buttons {
        gap: var(--spacing-xs);
    }
    
    .filter-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-sm);
        min-height: 2.5rem;
    }
    
    .session-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .session-status {
        align-self: flex-start;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .status-overview {
        gap: var(--spacing-xs);
    }
    
    .status-item {
        padding: var(--spacing-xs);
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 480px) {
    .session-card {
        padding: var(--spacing-sm);
    }
    
    .session-date {
        font-size: var(--font-size-base);
    }
    
    .status-badge {
        font-size: var(--font-size-xs);
        padding: 0.2rem 0.5rem;
    }
    
    .detail-value {
        font-size: var(--font-size-sm);
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .timeline-time {
        min-width: auto;
    }
    
    .timeline-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
} 