/* ================================
   THEME VARIABLES (Light default for first paint; JS/session set data-theme)
   ================================ */
:root {
    /* Light Theme (Default) - same teal accents */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    
    --border-color: #cbd5e1;
    --border-color-dark: #94a3b8;
    --card-border: #e2e8f0;
    
    --accent-primary: #14B8A6;
    --accent-hover: #0d9488;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-card: #1f2937;
    --bg-hover: #374151;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    
    --border-color: var(--text-secondary);
    --border-color-dark: #4b5563;
    --card-border: rgba(255, 255, 255, 0.1);
    
    --accent-primary: #14B8A6;
    --accent-hover: #0d9488;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    /* Light Theme - explicit (same as :root; teal accents) */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    
    --border-color: #cbd5e1;
    --border-color-dark: #94a3b8;
    --card-border: #e2e8f0;
    
    --accent-primary: #14B8A6;
    --accent-hover: #0d9488;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Hide main page scrollbar only; other scrollbars (tables, modals, etc.) stay visible */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar {
    display: none;
}
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
body::-webkit-scrollbar {
    display: none;
}

body {
    background: var(--bg-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.04) 0%, transparent 50%);
    z-index: -1;
}

[data-theme="dark"] body::before {
    background: 
        radial-gradient(circle at 20% 80%, rgba(20, 184, 166, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.05) 0%, transparent 50%);
}

header {
    background-color: #14B8A6;
    color: #fff;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999; /* Lower than sidebar to allow tooltips */
    height: 6rem;
}

/* Header toggle button (to open sidebar) - only visible when sidebar is closed */
.header-sidebar-toggle {
    background: transparent;
    border: none;
    border-radius: 0.25rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.header-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

.header-sidebar-toggle i {
    font-size: 1.5rem;
}

/* Hide header toggle when sidebar is active (on mobile) */
body:has(.sidebar.active) .header-sidebar-toggle {
    display: none;
}

.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo img {
    width: 12rem;
    height: auto;
    border-radius: 0.25rem;
    padding: 0.2rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.header-user span {
    font-size: 0.875rem;
}

.logout-button {
    background-color: #0D9488;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.logout-button:hover {
    background-color: #0F766E;
}

.login-container {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--card-border);
    width: 100%;
    max-width: 24rem;
    border: 1px solid var(--card-border);
    margin: 5rem auto 1rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.5), transparent);
}

.login-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.03) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.login-header {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.login-logo-wrapper {
    background: linear-gradient(135deg, #14B8A6, #0D9488);
    padding: 1.5rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header img {
    width: 8rem;
    height: auto;
    filter: brightness(1.1);
}

.login-container form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-container form input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--input-border);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.login-container form input::placeholder {
    color: var(--text-tertiary);
}

.login-container form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
    background: var(--input-bg);
}

.password-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 50px !important;
    margin-bottom: 0 !important;
}

.toggle-password {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 1.2rem !important;
    padding: 0 !important;
    width: 35px !important;
    height: 35px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    box-shadow: none !important;
    margin: 0 !important;
    min-width: auto !important;
    border-radius: 50% !important;
    color: var(--text-tertiary) !important;
}

.toggle-password:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #14B8A6 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.toggle-password:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
    background: transparent !important;
}

.toggle-password span {
    pointer-events: none;
}

.login-container form button {
    background: linear-gradient(135deg, #14B8A6, #0D9488);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3);
    margin-top: 0.5rem;
}

.login-container form button:hover {
    background: linear-gradient(135deg, #0D9488, #0F766E);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.4);
}

.login-container form button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.login-container p.error {
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
}

/* Sidebar Styles - Apex Send structure with NodeWatch theme */
.sidebar {
    width: 280px;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0; /* Default: visible on desktop */
    overflow: visible; /* Allow tooltips to extend beyond sidebar */
    z-index: 10000; /* High z-index for tooltips */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--card-border);
}

/* Collapsed state: narrower but still visible */
.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo-wrap {
    background-color: #14B8A6;
    padding: 10px 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header img {
    height: 46px;
    width: auto;
    transition: all 0.3s ease;
    display: block;
}

/* Icon logo: only visible when sidebar is collapsed (hide when expanded so it doesn’t sit over full logo) */
.sidebar-header .sidebar-logo-icon {
    display: none !important;
    position: absolute;
    pointer-events: none;
}
.sidebar:not(.collapsed) .sidebar-header .sidebar-logo-icon {
    visibility: hidden;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-header .sidebar-logo-full {
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
}

.sidebar.collapsed .sidebar-header .sidebar-logo-icon {
    display: block !important;
    visibility: visible;
    opacity: 1;
    height: 32px;
    width: 32px;
    object-fit: contain;
    position: relative;
    pointer-events: auto;
}

.sidebar.collapsed .sidebar-logo-wrap {
    padding: 8px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar collapse toggle button (inside sidebar, on the right edge) */
.sidebar-collapse-toggle {
    position: absolute;
    top: 50%;
    right: -24px;
    transform: translateY(-50%);
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: none;
    color: var(--text-primary);
    width: 24px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1004;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

/* Only show collapse toggle on desktop when sidebar is visible */
@media (max-width: 767px) {
    .sidebar-collapse-toggle {
        display: none;
    }
}

.sidebar-collapse-toggle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-hover));
}

.sidebar-collapse-toggle:hover {
    background: var(--bg-hover);
    width: 28px;
}

.sidebar-collapse-toggle i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-collapse-toggle i {
    transform: rotate(180deg);
}

.nav-sections-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible; /* Allow tooltips to show outside sidebar */
}

/* Only hide overflow-x when sidebar is expanded (to prevent horizontal scroll) */
.sidebar:not(.collapsed) .nav-sections-container {
    overflow-x: hidden;
}

/* Collapsed sidebar: no scrolling needed, all items visible */
.sidebar.collapsed .nav-sections-container {
    overflow-y: visible;
    overflow-x: visible;
}

.nav-section {
    margin: 20px 0;
}

.nav-section-title {
    padding: 0 20px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .nav-section-title {
    display: none;
    height: 0;
    padding: 0;
    margin: 0;
}

.sidebar.collapsed .nav-section {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    gap: 12px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-hover));
    color: white;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.sidebar:not(.collapsed) .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Override: collapsed active items don't show the left indicator, they show tooltip arrow instead */

.nav-item i {
    width: 20px;
    height: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
    display: inline-block;
    line-height: 1;
}

.nav-item span {
    transition: all 0.3s ease;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0;
    width: 80px;
    height: 52px; /* Fixed height for consistency */
    display: flex;
    align-items: center;
    margin: 0;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    margin: 0;
    display: none;
}

/* Tooltip for collapsed sidebar - DESKTOP ONLY */
@media (min-width: 769px) {
    .sidebar.collapsed .nav-item::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 90px; /* 80px sidebar width + 10px gap */
        top: 50%;
        transform: translateY(-50%);
        background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary));
        color: var(--text-primary);
        padding: 10px 14px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease, left 0.2s ease;
        z-index: 99999;
        box-shadow: var(--shadow-lg);
        pointer-events: none;
        border: 1px solid var(--card-border);
    }
    
    /* Tooltip arrow */
    .sidebar.collapsed .nav-item::before {
        content: '';
        position: absolute;
        left: 82px; /* 80px sidebar width + 2px */
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 6px 6px 6px 0;
        border-color: transparent var(--bg-secondary) transparent transparent;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        z-index: 99999;
        pointer-events: none;
    }
    
    .sidebar.collapsed .nav-item:hover::after {
        opacity: 1;
        visibility: visible;
        left: 95px; /* Slide in 5px on hover */
    }
    
    .sidebar.collapsed .nav-item:hover::before {
        opacity: 1;
        visibility: visible;
    }
}

/* Legacy support for old #sidebar ID - just make it work like .sidebar */
#sidebar {
    width: 280px;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-right: 1px solid var(--card-border);
    padding: 0;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    transition: left 0.3s ease;
    z-index: 1003;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
}

#sidebar.collapsed {
    width: 80px;
}

main {
    margin: 7rem 1rem 1rem 310px; /* Sidebar 280px + 30px spacing */
    padding: 0 1rem;
    max-width: calc(100% - 310px);
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
    transition: margin-left 0.3s ease, max-width 0.3s ease;
}

/* Adjust main content when sidebar is collapsed */
.sidebar.collapsed ~ main,
body:has(.sidebar.collapsed) main {
    margin-left: 110px; /* Collapsed 80px + 30px spacing */
    max-width: calc(100% - 110px);
}

.grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.card {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    flex: 0 1 18rem;
    max-width: 18rem;
    min-width: 12rem;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.2s;
    border: 1px solid var(--card-border);
}

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

.card h2 {
    font-size: 1.125rem;
    font-weight: bold;
    color: #0F766E;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.card small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.table-container {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    width: 100%;
    max-width: 80rem;
    margin: 1rem auto;
    box-sizing: border-box;
    border: 1px solid var(--card-border);
    transition: all 0.2s ease;
}

.table-container:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.table-container h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--accent-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

table th {
    padding: 0.75rem;
    background-color: var(--accent-primary);
    color: white;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid var(--accent-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
    background-color: transparent;
    color: var(--text-secondary);
}

table tbody tr:hover {
    background-color: var(--bg-hover);
}

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

footer {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #14B8A6, #0D9488);
    color: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0.5rem 0;
    font-weight: 600;
    color: #000000;
}

/* Dashboard Specific Styles */
.dashboard-stats {
    margin-bottom: 2rem;
}

.dashboard-section {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

.dashboard-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.dashboard-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Asset Type Distribution */
.asset-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.asset-type-card {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.2s ease;
    border: 1px solid var(--card-border);
}

.asset-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

.asset-type-card h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.asset-type-card p {
    color: #14B8A6;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* LDAP Sync Status */
.sync-status {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-top: 1rem;
}

.ldap-sync-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.ldap-info p {
    margin: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.ldap-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

.ldap-actions {
    display: flex;
    gap: 1rem;
}

/* Recent Assets Table */
.recent-assets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.recent-assets-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Agent Status */
.agent-status-content {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-top: 1rem;
    min-height: 200px;
}

.agent-status-content .text-center {
    padding: 2rem;
}

.agent-status-content p {
    margin: 1rem 0;
    font-size: 1rem;
    color: #6b7280;
}

.agent-status-content .text-sm {
    font-size: 0.875rem;
    color: #9ca3af;
}

.agent-status-content ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.agent-status-content li {
    margin: 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Enhanced Table Container */
.table-container {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
    overflow: hidden;
}

.table-container h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Status and Type Badges */
.status-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.online {
    background: #d1fae5;
    color: #059669;
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.status-badge.unknown {
    background: var(--bg-tertiary);
    color: #6b7280;
}

.type-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.type-badge.pc {
    background: #dbeafe;
    color: #1e40af;
}

.type-badge.laptop {
    background: #d1fae5;
    color: #047857;
}

.type-badge.server {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.type-badge.unknown {
    background: var(--bg-tertiary);
    color: #6b7280;
}

/* Text Color Utilities */
.text-green-600 {
    color: #059669;
}

.text-red-600 {
    color: #dc2626;
}

.text-orange-600 {
    color: #ea580c;
}

.text-gray-400 {
    color: var(--text-tertiary);
}

.text-gray-500 {
    color: var(--text-secondary);
}

.text-gray-600 {
    color: var(--text-secondary);
}

.text-sm {
    font-size: 0.875rem;
}

/* Settings page styles */
.settings-tabs {
    display: flex;
    border-bottom: 2px solid var(--accent-primary);
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 0.5rem 0.5rem 0 0;
    overflow: hidden;
}

.settings-tab {
    padding: 1rem 2rem;
    cursor: pointer;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: none;
    outline: none;
    font-weight: 500;
    transition: all 0.2s;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    margin-right: 0.25rem;
    position: relative;
}

.settings-tab.active, .settings-tab:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
}

.settings-tab-content {
    display: none;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--card-border);
}

.settings-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

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

.settings-form input, .settings-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color-dark);
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-form input:focus, .settings-form select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.settings-form button {
    background: var(--accent-primary);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.settings-form button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(20, 184, 166, 0.3);
}

.settings-form button:active {
    transform: translateY(0);
}

.settings-assets-list {
    list-style: disc inside;
    color: var(--text-secondary);
    margin-top: 1rem;
    line-height: 1.6;
}

.settings-assets-list li {
    margin-bottom: 0.5rem;
}

.settings-tab-content h3 {
    color: var(--text-primary);
}

.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-weight: 500;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border-left-color: #10b981;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.message.warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

.ldap-section {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-secondary);
}

.ldap-section h3 {
    color: #0F766E;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: 2px solid #B2F5EA;
    padding-bottom: 0.5rem;
}

.sync-status {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sync-status h4 {
    color: #0F766E;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.sync-status p {
    margin: 0.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.sync-status strong {
    color: var(--text-primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 0.375rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
    margin-bottom: 0;
    transform: scale(1.2);
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

/* Assets page specific styles */
.assets-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
}

.assets-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.assets-header .btn {
    background: var(--accent-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.assets-header .btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(20, 184, 166, 0.3);
}

.search-container {
    margin-bottom: 1.5rem;
}

.asset-search-input, #asset-search, #asset-search-modal {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--card-border);
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    border-radius: 6px;
    box-sizing: border-box;
}

.asset-search-input:focus, #asset-search:focus, #asset-search-modal:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.search-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--card-border);
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.search-container input::placeholder,
.asset-search-input::placeholder,
#asset-search::placeholder,
#asset-search-modal::placeholder {
    color: var(--text-tertiary);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.empty-state .btn {
    display: inline-block;
    background: #14B8A6;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.empty-state .btn:hover {
    background: #0D9488;
    transform: translateY(-1px);
}

/* Utility classes */
.text-turquoise-700 { color: #0F766E; }
.text-turquoise-600 { color: #0D9488; }
.text-turquoise-500 { color: #14B8A6; }
.bg-turquoise-500 { background-color: #14B8A6; }
.bg-turquoise-600 { background-color: #0D9488; }
.bg-turquoise-100 { background-color: #B2F5EA; }
.bg-turquoise-50 { background-color: #F0FDFA; }
.hidden { display: none !important; }

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

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 9999px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
}

#error-modal {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 24rem;
    width: 90%;
    color: #ff6b6b;
    z-index: 2000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

#error-modal.active { display: block; }

.modal-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-actions button {
    background: linear-gradient(135deg, #14B8A6, #0D9488);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.modal-actions button:hover {
    background: linear-gradient(135deg, #0D9488, #0F766E);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

/* Remote Management Styles */
.remote-controls {
    margin-bottom: 2rem;
}

.asset-selector {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
}

.asset-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.asset-selector select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color-dark);
    border-radius: 0.375rem;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.asset-selector select:focus {
    outline: none;
    border-color: #14B8A6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.remote-card {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.remote-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

.remote-card h2 {
    background: #14B8A6;
    color: white;
    padding: 1rem;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color-dark);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: 'Courier New', monospace;
}

.run-btn {
    background: #14B8A6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-bottom: 1rem;
}

.run-btn:hover {
    background: #0f8c7e;
}

.run-btn:active {
    background: #0e7c6f;
}

.console-output {
    background: var(--bg-tertiary);
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 1rem;
    min-height: 100px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow-y: auto;
}

.console-line {
    margin-bottom: 0.25rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.console-line:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.console-line.console-success {
    color: #059669;
    background: #d1fae5;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
}

.console-line.console-error {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
}

.console-line.console-loading {
    color: #7c3aed;
    background: #ede9fe;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
}

.console-line .timestamp {
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-content h3, .modal-content h2 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.modal-content p {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background: #14B8A6;
    color: white;
}

.btn-primary:hover {
    background: #0f8c7e;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

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

/* Page Header */
.page-header {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: 0;
}

/* Responsive Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Enhanced Button Styles - Global */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button Variants */
.btn-primary {
    background: #14B8A6;
    color: white;
}

.btn-primary:hover {
    background: #0f8c7e;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

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

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    color: #14B8A6;
    border: 2px solid #14B8A6;
}

.btn-outline:hover {
    background: #14B8A6;
    color: white;
}

/* Button Sizes */
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Button Icons */
.btn-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Action Button Groups */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-buttons-small {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 0.75rem;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.view-btn.active,
.view-btn:hover {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

/* Scan Management Styles */
.scan-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.scan-schedule,
.scan-actions {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
}

.scan-schedule h3,
.scan-actions h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.schedule-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.schedule-form label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.schedule-form select,
.schedule-form input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.schedule-form select:focus,
.schedule-form input:focus {
    outline: none;
    border-color: #14B8A6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Scan History */
.scan-history {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.scan-history h3, .section-header h3 {
    color: var(--text-primary);
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.data-table th {
    background: var(--accent-primary);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Shared main table styling (assets list, usb-devices, etc.): sticky header, theme-aware borders */
.table-container {
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    overflow: hidden;
    margin: 1rem 0;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
}
.table-container .data-table {
    margin: 0;
    border: none;
}
.table-container .data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-primary) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid var(--accent-primary);
}
.table-container .data-table thead th {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
    padding: 12px 0.75rem;
    font-weight: 600;
    border: none;
    border-bottom: none;
}
.table-container .data-table tbody td {
    border-bottom: 1px solid var(--card-border);
}
.table-container .data-table tbody tr:last-child td {
    border-bottom: none;
}

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

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-completed {
    background: #d1fae5;
    color: #059669;
}

.status-issues {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.status-running {
    background: #dbeafe;
    color: #2563eb;
}

.status-pending {
    background: rgba(124, 58, 237, 0.2);
    color: #7c3aed;
}

/* Type Badges */
.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.type-ou {
    background: #dbeafe;
    color: #1e40af;
}

.type-static {
    background: #d1fae5;
    color: #047857;
}

.type-dynamic {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

/* Scan Statistics */
.scan-stats {
    margin-bottom: 2rem;
}

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

.stat-card {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

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

.stat-card h4, .stat-content h4 {
    color: var(--text-primary);
}

.stat-card p, .stat-content p {
    color: var(--text-primary);
}

.stat-card small, .stat-content small {
    color: var(--text-tertiary);
}

.stat-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdfa;
    border-radius: 0.5rem;
}

.stat-content h4 {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

/* Stat Card Colors */
.stat-card:nth-child(1) .stat-number {
    color: #3b82f6; /* Blue for Total */
}

.stat-card:nth-child(2) .stat-number {
    color: #10b981; /* Green for Online */
}

.stat-card:nth-child(3) .stat-number {
    color: #f59e0b; /* Orange for Pending */
}

.stat-card:nth-child(4) .stat-number {
    color: #8b5cf6; /* Purple for Executing */
}

.stat-content small {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Collection Management Styles */
.collection-actions {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.collections-overview {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.collection-card {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary)) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.collection-card:hover {
    border-color: var(--accent-primary) !important;
    box-shadow: var(--shadow-lg) !important;
}

.collection-card h4 {
    color: var(--text-primary) !important;
}

.collection-card .stat span {
    color: var(--text-secondary) !important;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.collection-header h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.collection-type {
    background: var(--bg-tertiary);
    color: #6b7280;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.collection-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.collection-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Collections List View */
.collections-list.hidden {
    display: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile: sidebar hidden by default */
    .sidebar {
        left: -280px;
    }
    
    /* Mobile: .active class shows the sidebar */
    .sidebar.active {
        left: 0;
    }
    
    /* Mobile: ignore collapsed state, always show full width when active */
    .sidebar.collapsed {
        width: 280px;
    }
    
    .sidebar.collapsed .nav-item span,
    .sidebar.collapsed .nav-section-title,
    .sidebar.collapsed .sidebar-header .sidebar-logo-full {
        opacity: 1;
        width: auto;
        height: auto;
        display: block;
        position: relative;
    }
    .sidebar.collapsed .sidebar-header .sidebar-logo-icon {
        display: none !important;
    }
    
    .sidebar.collapsed .nav-item {
        justify-content: flex-start;
        padding: 12px 20px;
        width: 100%;
    }
    
    /* Mobile: hide tooltips (not needed on mobile) - keep this rule here */
    /* NOTE: Desktop tooltips are defined AFTER this media query to override */
    
    /* Mobile: main content always full width */
    main {
        margin-left: 0 !important;
        max-width: 100% !important;
        margin-right: 1rem;
    }
    
    .scan-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
}

@media (min-width: 769px) {
    /* Desktop: sidebar always visible, .active class has no effect */
    .sidebar {
        left: 0 !important;
    }
    
    /* Desktop: hide the header toggle button */
    .header-sidebar-toggle {
        display: none !important;
    }
    
    /* Desktop: main content adjusts to sidebar width with spacing */
    main {
        margin-left: 310px; /* Sidebar 280px + 30px spacing */
        max-width: calc(100% - 310px);
    }
    
    /* Desktop: when collapsed, adjust main content */
    .sidebar.collapsed ~ main,
    body:has(.sidebar.collapsed) main {
        margin-left: 110px; /* Collapsed 80px + 30px spacing */
        max-width: calc(100% - 110px);
    }

    .grid-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
        gap: 1rem;
        width: 100%;
        max-width: 80rem;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .table-container {
        width: 100%;
        max-width: 80rem;
        margin: 1rem auto;
        box-sizing: border-box;
    }

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

    .asset-type-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 767px) {
    .settings-tabs {
        flex-direction: column;
    }
    
    .settings-tab {
        border-radius: 0;
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .assets-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .card {
        min-width: 100%;
    }
}

/* Responsive adjustments for dashboard */
@media (max-width: 768px) {
    .ldap-sync-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .ldap-actions {
        width: 100%;
    }
    
    .ldap-actions .btn {
        width: 100%;
    }
    
    .asset-type-grid {
        grid-template-columns: 1fr;
    }
    
    .asset-type-card {
        padding: 1.5rem;
    }
    
    .table-container {
        padding: 1.5rem;
    }
    
    .dashboard-section {
        padding: 1.5rem;
    }
}

/* Asset Details View Styles */
.asset-details-container {
    max-width: 100%;
}

/* Asset Tabs */
.asset-tabs-container {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
    overflow: hidden;
}

.asset-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--card-border);
    overflow-x: auto;
}

.asset-tab {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.asset-tab:hover {
    color: #14B8A6;
    background: rgba(20, 184, 166, 0.05);
}

.asset-tab.active {
    color: var(--accent-primary);
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-bottom-color: var(--accent-primary);
}

/* Generic Tab Container (for health-dashboard and other pages) */
.tab-container {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
    overflow: hidden;
}

.tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--card-border);
    overflow-x: auto;
}

.tab {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    font-family: inherit;
}

.tab:hover {
    color: #14B8A6;
    background: rgba(20, 184, 166, 0.05);
}

.tab.active {
    color: var(--accent-primary);
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-bottom-color: var(--accent-primary);
}

/* Tab Content */
.tab-content {
    display: none;
    color: var(--text-primary);
    padding: 1.5rem 1.75rem;
}

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

.tab-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Asset detail sections: spacing between content and borders */
.asset-tabs-container .detail-section {
    margin-bottom: 1.5rem;
    padding: 0 0.25rem;
}
.asset-tabs-container .detail-section:last-child {
    margin-bottom: 0;
}

/* Settings tab: space between sections (System Users, Printers, Disk, etc.) */
.asset-tabs-container .info-section {
    margin-top: 2rem;
}
.asset-tabs-container .info-section:first-child {
    margin-top: 0;
}
.asset-tabs-container .info-section h3 {
    margin-bottom: 1rem;
}
.asset-tabs-container .info-section > *:not(h3):first-of-type {
    margin-top: 0;
}

/* Asset Overview */
.asset-overview {
    margin-bottom: 2rem;
}

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

.overview-card {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--card-border);
    transition: all 0.2s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.overview-card h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-value {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: right;
    max-width: 200px;
    word-wrap: break-word;
}

/* Asset details: dark theme – consistent card/field/table borders (no white borders) */
[data-theme="dark"] .asset-details-container .asset-tabs {
    border-bottom-color: var(--card-border);
}
[data-theme="dark"] .asset-details-container .overview-card h3 {
    border-bottom-color: var(--card-border);
}
[data-theme="dark"] .asset-details-container .info-item {
    border-color: var(--card-border);
}
[data-theme="dark"] .asset-details-container .card {
    border-color: var(--card-border);
}
[data-theme="dark"] .asset-details-container .stat-card,
[data-theme="dark"] .asset-details-container .update-card {
    border-color: var(--card-border) !important;
}
[data-theme="dark"] .asset-details-container .detail-table-wrap {
    border: 1px solid var(--card-border) !important;
}
[data-theme="dark"] .asset-details-container .data-table th,
[data-theme="dark"] .asset-details-container .data-table td {
    border-color: var(--card-border);
}
[data-theme="dark"] .asset-details-container .data-table thead {
    border-bottom-color: var(--card-border);
}
[data-theme="dark"] .asset-details-container input[type="text"],
[data-theme="dark"] .asset-details-container input[type="password"],
[data-theme="dark"] .asset-details-container select {
    border-color: var(--input-border) !important;
    background: var(--input-bg) !important;
}
[data-theme="dark"] .asset-details-container .timeline-item {
    border-left-color: var(--card-border) !important;
}
[data-theme="dark"] .asset-details-container .timeline-icon {
    border-color: var(--card-border) !important;
    background: var(--bg-secondary) !important;
}
[data-theme="dark"] .asset-details-container .info-item[style*="border-top"] {
    border-top-color: var(--card-border) !important;
}
[data-theme="dark"] .asset-details-container .quick-actions h3 {
    border-bottom-color: var(--card-border);
}
[data-theme="dark"] .asset-details-container .asset-history {
    border-color: var(--card-border);
}

/* Tab Placeholder */
.tab-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.tab-placeholder h3 {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.tab-placeholder p {
    margin: 0.5rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.tab-placeholder .text-sm {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Quick Actions */
.quick-actions {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.quick-actions h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Asset History */
.asset-history {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.asset-history h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    border-left: 3px solid var(--accent-primary);
}

.timeline-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    flex-shrink: 0;
}

.timeline-content h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.timeline-content p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.timeline-content small {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Responsive Design for Asset Details */
@media (max-width: 768px) {
    .asset-tabs {
        flex-wrap: wrap;
    }
    
    .asset-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .overview-card {
        padding: 1rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-value {
        text-align: left;
        max-width: none;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .quick-actions,
    .asset-history {
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* Agent Management Styles */
.agent-stats {
    margin-bottom: 2rem;
}

.agents-container,
.recent-commands {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.agents-container h3,
.recent-commands h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Agents Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.agent-card {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.agent-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
}

.agent-status.online .status-dot {
    background: #10b981;
}

.agent-status.offline .status-dot {
    background: #6b7280;
}

.agent-status.error .status-dot {
    background: #ef4444;
}

.agent-status.disabled .status-dot {
    background: #9ca3af;
}

.agent-info h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.agent-id {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: monospace;
    margin: 0 0 0.5rem 0;
}

.agent-type {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.os-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.agent-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

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

.detail-value {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: right;
}

.agent-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.agent-actions .btn {
    flex: 1;
    min-width: 80px;
}

/* Commands Table */
.commands-table {
    overflow-x: auto;
}

.agent-info-cell {
    display: flex;
    flex-direction: column;
}

.agent-info-cell strong {
    color: var(--text-primary);
    font-weight: 600;
}

.agent-info-cell small {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: monospace;
}

.command-type {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.command-data {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: monospace;
}

.agent-type {
    color: var(--text-secondary) !important;
}

.agent-meta, .agent-meta span, .agent-meta strong {
    color: var(--text-primary) !important;
}

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

/* Agent Actions */
.agent-actions {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.agent-actions h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Status Badge Colors */
.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.status-badge.executing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.status-badge.cancelled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Utility Classes */
.text-orange-600 {
    color: #ea580c;
}

.text-blue-600 {
    color: #2563eb;
}

/* Responsive Design for Agent Management */
@media (max-width: 768px) {
    .agents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .agent-card {
        padding: 1rem;
    }
    
    .agent-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .agent-actions {
        flex-direction: column;
    }
    
    .agent-actions .btn {
        width: 100%;
    }
    
    .commands-table {
        font-size: 0.875rem;
    }
    
    .command-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .command-actions .btn {
        width: 100%;
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

/* ==========================================
   TOOLTIP STYLES - DESKTOP ONLY
   Must be at END of file to override mobile rules
   ========================================== */
@media (min-width: 769px) {
    .sidebar.collapsed .nav-item::after {
        content: attr(data-tooltip) !important;
        display: block !important;
        position: absolute !important;
        left: 90px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary)) !important;
        color: var(--text-primary) !important;
        padding: 10px 14px !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.2s ease, visibility 0.2s ease, left 0.2s ease !important;
        z-index: 99999 !important;
        box-shadow: var(--shadow-lg) !important;
        pointer-events: none !important;
        border: 1px solid var(--card-border) !important;
    }
    
    /* Tooltip arrow */
    .sidebar.collapsed .nav-item::before {
        content: '' !important;
        display: block !important;
        position: absolute !important;
        left: 82px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 0 !important;
        height: 0 !important;
        border-style: solid !important;
        border-width: 6px 6px 6px 0 !important;
        border-color: transparent var(--bg-secondary) transparent transparent !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.2s ease, visibility 0.2s ease !important;
        z-index: 99999 !important;
        pointer-events: none !important;
    }
    
    .sidebar.collapsed .nav-item:hover::after {
        opacity: 1 !important;
        visibility: visible !important;
        left: 95px !important;
    }
    
    .sidebar.collapsed .nav-item:hover::before {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Force sidebar nav links to theme text colors only (override any global/cached link color) */
#sidebar a.nav-item,
#sidebar a.nav-item:hover,
#sidebar a.nav-item.active,
.sidebar a.nav-item,
.sidebar a.nav-item:hover,
.sidebar a.nav-item.active,
nav.sidebar a,
nav.sidebar a:hover,
nav.sidebar a.active,
nav#sidebar a,
nav#sidebar a:hover,
nav#sidebar a.active {
    color: inherit !important;
    text-decoration: none !important;
}
#sidebar a.nav-item:not(.active),
.sidebar a.nav-item:not(.active),
nav.sidebar a:not(.active),
nav#sidebar a:not(.active) {
    color: var(--text-secondary) !important;
}
#sidebar a.nav-item:hover:not(.active),
.sidebar a.nav-item:hover:not(.active),
nav.sidebar a:hover:not(.active),
nav#sidebar a:hover:not(.active) {
    color: var(--text-primary) !important;
}
#sidebar a.nav-item.active,
.sidebar a.nav-item.active,
nav.sidebar a.active,
nav#sidebar a.active {
    color: #fff !important;
}