/* Modern Next.js-style CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Dark Theme Color Scheme */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --success-glow: rgba(34, 197, 94, 0.3);
    --warning-color: #eab308;
    --warning-glow: rgba(234, 179, 8, 0.3);
    --danger-color: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --info-color: #06b6d4;
    --info-glow: rgba(6, 182, 212, 0.3);

    /* Dark theme colors - Refined */
    --background: #09090b;
    --background-secondary: #18181b;
    --background-tertiary: #27272a;
    --surface: rgba(24, 24, 27, 0.8);
    --surface-solid: #18181b;
    --surface-hover: rgba(39, 39, 42, 0.8);
    --surface-elevated: rgba(39, 39, 42, 0.6);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: rgba(63, 63, 70, 0.5);
    --border-light: rgba(82, 82, 91, 0.5);
    --border-subtle: rgba(39, 39, 42, 0.8);

    /* Enhanced shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);

    /* Radii */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 500px;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

/* Login Page */
.login-page {
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(99, 102, 241, 0.2), transparent),
        radial-gradient(ellipse 40% 30% at 80% 80%, rgba(139, 92, 246, 0.1), transparent);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.login-form .form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: var(--background-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.login-form .form-group input::placeholder {
    color: var(--text-muted);
}

.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--background);
}

.btn-block {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Alert */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    color: #fde047;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: #67e8f9;
}

/* Navigation */
.navbar {
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.nav-brand a {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.02em;
}

.nav-brand a::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-glow);
}

.nav-brand a:hover {
    text-decoration: none;
    color: var(--text-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    transition: all var(--transition-base);
    font-size: 0.875rem;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--text-primary);
    background: var(--surface-hover);
}

/* User Menu */
.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    background: var(--surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.user-menu-btn:hover {
    background: var(--surface-elevated);
    border-color: var(--border-light);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
    animation: dropdownFade 0.15s ease-out;
}

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

.user-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-secondary);
}

.user-dropdown-header .user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.user-dropdown-header .user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.125rem;
}

.user-dropdown-menu {
    list-style: none;
    padding: 0.5rem;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.user-dropdown-menu a:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.user-dropdown-menu .divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.user-dropdown-menu .logout-link {
    color: var(--danger-color);
}

.user-dropdown-menu .logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--primary-color);
    color: white;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 2px 8px var(--success-glow);
}

.btn-success:hover {
    box-shadow: 0 4px 12px var(--success-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px var(--danger-glow);
}

.btn-danger:hover {
    box-shadow: 0 4px 12px var(--danger-glow);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ca8a04 100%);
    color: white;
    box-shadow: 0 2px 8px var(--warning-glow);
}

.btn-warning:hover {
    box-shadow: 0 4px 12px var(--warning-glow);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 2px 8px var(--info-glow);
}

.btn-info:hover {
    box-shadow: 0 4px 12px var(--info-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--radius);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.type-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.type-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.type-badge.gpu {
    background: rgba(236, 72, 153, 0.15);
    color: #f9a8d4;
    border-color: rgba(236, 72, 153, 0.2);
}
.type-badge.cpu {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.2);
}
.type-badge.motherboard {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.2);
}
.type-badge.ram {
    background: rgba(234, 179, 8, 0.15);
    color: #fde047;
    border-color: rgba(234, 179, 8, 0.2);
}
.type-badge.disk {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.2);
}
.type-badge.psu {
    background: rgba(249, 115, 22, 0.15);
    color: #fdba74;
    border-color: rgba(249, 115, 22, 0.2);
}
.type-badge.other {
    background: rgba(113, 113, 122, 0.15);
    color: #d4d4d8;
    border-color: rgba(113, 113, 122, 0.2);
}

.status-badge.available {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.status-badge.in_use {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.status-badge.defective {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-badge.retired {
    background: rgba(113, 113, 122, 0.15);
    color: #d4d4d8;
    border: 1px solid rgba(113, 113, 122, 0.2);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.role-badge.admin {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.role-badge.manager {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.2);
}
.role-badge.operator {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.role-badge.viewer {
    background: rgba(113, 113, 122, 0.15);
    color: #d4d4d8;
    border: 1px solid rgba(113, 113, 122, 0.2);
}

.test-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.test-status-badge.passed {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.test-status-badge.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.test-status-badge.warning {
    background: rgba(234, 179, 8, 0.15);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--surface-hover);
    color: var(--text-secondary);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Cards */
.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
}

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

.card-header h2,
.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-secondary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Dashboard */
.dashboard .page-header {
    margin-bottom: 1.5rem;
}

.dashboard .page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

.stat-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

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

.dashboard-section {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all var(--transition-base);
}

.dashboard-section:hover {
    border-color: var(--border-light);
}

.dashboard-section h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.type-list,
.status-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.type-item,
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.type-item:hover,
.status-item:hover {
    background: var(--surface-hover);
    border-color: var(--border-color);
    text-decoration: none;
    transform: translateX(4px);
}

.type-count,
.status-count {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.test-summary {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.test-stat {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    min-width: 100px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    flex: 1;
}

.test-stat:hover {
    transform: translateY(-2px);
}

.test-stat.passed {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}
.test-stat.passed:hover {
    box-shadow: 0 4px 12px var(--success-glow);
}

.test-stat.failed {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}
.test-stat.failed:hover {
    box-shadow: 0 4px 12px var(--danger-glow);
}

.test-stat.warning {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.2);
}
.test-stat.warning:hover {
    box-shadow: 0 4px 12px var(--warning-glow);
}

.test-status {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.375rem;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.test-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Tables */
.table-container {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--background-secondary);
    font-weight: 600;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr {
    transition: all var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--surface-hover);
}

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

.data-table .actions {
    display: flex;
    gap: 0.5rem;
}

.data-table a {
    color: var(--primary-light);
    font-weight: 500;
}

.data-table a:hover {
    color: var(--primary-color);
}

/* Make table rows clickable */
.data-table tbody tr[onclick] {
    cursor: pointer;
}

/* Filters */
.filters {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.filter-group label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    min-width: 160px;
    background: var(--background-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.results-info {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Forms */
.form-page {
    max-width: 900px;
    margin: 0 auto;
}

.form-section {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.form-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--background-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--background);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--background-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group .form-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--primary-color);
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    margin-top: 1.5rem;
}

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

.hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.375rem;
}

/* Component Page */
.component-page {
    max-width: 1200px;
    margin: 0 auto;
}

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

.component-section {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.component-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.info-list,
.spec-list {
    display: grid;
    gap: 0.625rem;
}

.info-list dt,
.spec-list dt {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-list dd,
.spec-list dd {
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
}

.inventory-tag {
    font-family: 'SF Mono', 'JetBrains Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
}

.notes-content {
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    padding: 0.75rem;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    max-width: 100%;
}

.test-results-section {
    margin-top: 1rem;
}

.test-row.passed {
    border-left: 3px solid var(--success-color);
    background: rgba(34, 197, 94, 0.05);
}
.test-row.failed {
    border-left: 3px solid var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}
.test-row.warning {
    border-left: 3px solid var(--warning-color);
    background: rgba(234, 179, 8, 0.05);
}

/* Test Results Grid - for GPU stress tests etc */
.test-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all var(--transition-base);
}

.result-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.result-card h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-list .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}

.result-list .result-label {
    color: var(--text-muted);
    font-weight: 500;
}

.result-list .result-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'SF Mono', 'JetBrains Mono', Monaco, monospace;
}

.result-list .result-value.success {
    color: var(--success-color);
}

.result-list .result-value.warning {
    color: var(--warning-color);
}

.result-list .result-value.danger {
    color: var(--danger-color);
}

/* Test metadata section */
.test-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

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

.test-meta .meta-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.test-meta .meta-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Logs section */
.logs-section {
    margin-top: 1rem;
}

.logs-section h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logs-section .log-output {
    max-height: 250px;
}

/* Search */
.search-page {
    max-width: 1200px;
    margin: 0 auto;
}

.search-form {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    background: var(--background-secondary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--background);
}

.search-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-results {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--background-secondary);
    border-bottom: 1px solid var(--border-color);
}

.results-header h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.result-count {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.search-hints {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.search-hints h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.search-hints ul {
    list-style: none;
}

.search-hints li {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.search-hints li:last-child {
    border-bottom: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow: auto;
}

.modal-content {
    background-color: var(--surface-solid);
    margin: 5% auto;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.2s ease-out;
}

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

.close {
    position: absolute;
    right: 1rem;
    top: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.close:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.log-output {
    background: var(--background);
    color: var(--text-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: 'SF Mono', 'JetBrains Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.8125rem;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state a {
    color: var(--primary-light);
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--surface-solid);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: auto;
}

/* User Management Page */
.users-page {
    max-width: 1000px;
    margin: 0 auto;
}

.user-form-page {
    max-width: 600px;
    margin: 0 auto;
}

/* Profile Page */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Active/Inactive Status */
.status-active {
    color: var(--success-color);
}

.status-inactive {
    color: var(--danger-color);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: toastSlide 0.3s ease-out;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

.toast.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.toast.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.toast.warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fde047;
}

.toast.info {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 0.75rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .nav-user {
        width: 100%;
        justify-content: center;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .header-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .component-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.8125rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.625rem 0.75rem;
    }

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 1.5rem;
    }

    .test-summary {
        flex-direction: column;
    }

    .test-stat {
        min-width: 100%;
    }
}

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

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

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

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

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

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
