.footer-style{
     color: var(--gray);
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
}

/* new.css - Professional EC2 Dashboard */
        .login-page {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            background: linear-gradient(135deg, #0b1220 0%, #1e1b4b 100%);
            padding: 20px;
        }
        
        .login-container {
            background: rgba(15, 23, 42, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 16px;
            padding: 48px 40px;
            width: 100%;
            max-width: 440px;
            border: 1px solid #1e293b;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            text-align: center;
            animation: slideUp 0.5s ease;
        }
        
        .login-logo {
            margin-bottom: 32px;
        }
        
        .logo-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            font-size: 36px;
            color: white;
        }
        
        .login-title {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 8px;
            background: linear-gradient(90deg, #6366f1 0%, #0ea5e9 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .login-subtitle {
            color: #64748b;
            font-size: 16px;
            margin-bottom: 40px;
            font-weight: 400;
        }
        
        .login-button {
            width: 100%;
            padding: 18px;
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
        }
        
        .login-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
        }
        
        .login-button:active {
            transform: scale(0.98);
        }
        
        .login-features {
            margin-top: 40px;
            padding-top: 32px;
            border-top: 1px solid #1e293b;
        }
        
        .features-title {
            font-size: 14px;
            color: #64748b;
            margin-bottom: 20px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .feature-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .feature-item {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #cbd5e1;
            font-size: 14px;
        }
        
        .feature-icon {
            width: 24px;
            height: 24px;
            background: rgba(99, 102, 241, 0.1);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6366f1;
            font-size: 12px;
        }
        
        .login-footer {
            margin-top: 32px;
            font-size: 13px;
            color: #64748b;
        }
        
        .security-note {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 16px;
        }
        
        @media (max-width: 480px) {
            .login-container {
                padding: 32px 24px;
            }
            
            .logo-icon {
                width: 64px;
                height: 64px;
                font-size: 28px;
            }
            
            .login-title {
                font-size: 24px;
            }
        }
        /* Simple Footer Styles */
.simple-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    height: 50px;
}

.light-theme .simple-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: var(--transition);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--light);
    background: rgba(255, 255, 255, 0.1);
}

.light-theme .footer-link:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.footer-link i {
    font-size: 12px;
}

.copyright {
    color: var(--gray);
    font-size: 12px;
    font-weight: 400;
}

.light-theme .copyright {
    color: #6b7280;
}

/* Settings Styles */
.settings-section {
    margin-bottom: 20px;
}

.settings-section h4 {
    color: var(--light);
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 600;
}

.light-theme .settings-section h4 {
    color: #1f2937;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--light);
    font-size: 14px;
}

.light-theme .setting-item label {
    color: #1f2937;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}


/* Responsive footer */
@media (max-width: 768px) {
    .simple-footer {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .footer-left, .footer-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .copyright {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }    
   
}

@media (max-width: 480px) {
    .footer-link {
        font-size: 12px;
        padding: 4px 6px;
    }
    
    .footer-link span {
        display: none;
    }
    
    .footer-link i {
        font-size: 14px;
    }
}
 






:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #1e293b;
    --card-bg: rgba(15, 23, 42, 0.9);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --transition: all 0.3s ease;
    --glass: rgba(15, 23, 42, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    padding: 20px 20px 0px 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Dark Theme (Default) */
.dark-theme {
    background: linear-gradient(135deg, var(--darker) 0%, #1e1b4b 100%);
    color: var(--light);
}

.dark-theme body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    z-index: -1;
}

/* Light Theme - Pure White Background */
.light-theme {
    background: #ffffff !important;
    color: #1f2937;
}

.light-theme body::before {
    display: none;
}

/* Header Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 90;
}

.dark-theme .dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.light-theme .dashboard-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.light-theme .dashboard-header::before {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.header-content {
    flex: 1;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    color: var(--gray);
    font-size: 14px;
    font-weight: 400;
}

.light-theme .header-subtitle {
    color: #6b7280;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative; /* Add this */
    z-index: 100; /* Add this, lower than dropdown */
}

/* Theme Switcher */
.theme-switcher {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 4px;
}

.light-theme .theme-switcher {
    background: #ffffff;
    border: 1px solid #d1d5db;
}

.theme-toggle {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2px;
}

.light-theme .theme-toggle {
    background: #f3f4f6;
}

.theme-toggle input[type="radio"] {
    display: none;
}

.theme-option {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    min-width: 80px;
    justify-content: center;
}

.light-theme .theme-option {
    color: #6b7280;
}

.theme-option.dark {
    background: var(--primary);
    color: white;
}

.theme-toggle input[type="radio"]:checked + .theme-option {
    background: var(--primary);
    color: white;
}

.theme-toggle input[type="radio"]:checked + .theme-option.dark {
    background: var(--primary);
}

.theme-toggle input[type="radio"]:checked + .theme-option.light {
    background: var(--warning);
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.light-theme .theme-option:hover {
    background: #e5e7eb;
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.light-theme .user-profile {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.light-theme .user-profile:hover {
    background: #f3f4f6;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--gray);
}

.light-theme .user-role {
    color: #6b7280;
}

/* Statistics Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.light-theme .stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.light-theme .stat-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.linux {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.stat-icon.windows {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.stat-icon.mac {
    background: linear-gradient(135deg, #18181b 0%, #3f3f46 100%);
}

.stat-icon.keypair {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-content {
    flex: 1;
}

.stat-count {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--light);
}

.light-theme .stat-count {
    color: #1f2937;
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
    font-weight: 500;
}

.light-theme .stat-label {
    color: #6b7280;
}

/* Keypair Panel */
.keypair-panel {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.light-theme .keypair-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border);
}

.light-theme .panel-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.light-theme .panel-header h3 {
    color: #1f2937;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
    position: relative;
}

.status-dot.available::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--success);
    top: -3px;
    left: -3px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

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

.status-text {
    font-weight: 500;
    font-size: 14px;
}

.light-theme .status-text {
    color: #1f2937;
}

.panel-body {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.keypair-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.action-btn.generate {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.action-btn.download {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    opacity: 0.9;
}

.keypair-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.light-theme .keypair-info {
    background: #f9fafb;
    color: #1f2937;
}

.keypair-info i {
    color: var(--secondary);
}

/* OS Cards Container */
.os-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.os-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.light-theme .os-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.light-theme .os-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.os-card-header {
    padding: 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
}

.os-card-header.linux {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.os-card-header.windows {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.os-card-header.mac {
    background: linear-gradient(135deg, #18181b 0%, #3f3f46 100%);
}

.os-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.os-title h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.os-title p {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}

.os-actions {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.action-button {
    padding: 12px 8px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 60px;
}

.action-button i {
    font-size: 16px;
}

.action-button:active {
    transform: scale(0.98);
}

.action-button.create {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.action-button.start {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.action-button.stop {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.action-button.terminate {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.action-button.view {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.action-button.refresh {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.action-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.os-output {
    padding: 0 20px 20px 20px;
}

.output-panel {
    height: 260px;
    overflow: auto;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.light-theme .output-panel {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

/* Custom Scrollbar */
.output-panel::-webkit-scrollbar {
    width: 6px;
}

.output-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.light-theme .output-panel::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.output-panel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.output-panel::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Destroy Resources Button */
.destroy-button {
    position: fixed;
    bottom: 50px;
    right: 30px;
    padding: 16px 28px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--danger) 0%, #be123c 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.destroy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.6);
}

.destroy-button:active {
    transform: scale(0.98);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.light-theme .modal-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

.modal-header {
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 8px;
}

.light-theme .modal-header h3 {
    color: #1f2937;
}

.modal-body {
    margin-bottom: 24px;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--light);
    font-size: 14px;
    transition: var(--transition);
    margin-bottom: 16px;
}

.light-theme .form-input {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #1f2937;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Instance List */
.instance-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.instance-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.light-theme .instance-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.instance-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.light-theme .instance-item:hover {
    background: #f3f4f6;
}

.instance-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.instance-info {
    flex: 1;
}

.instance-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--light);
}

.light-theme .instance-name {
    color: #1f2937;
}

.instance-id {
    font-size: 12px;
    color: var(--gray);
    font-family: monospace;
}

.instance-state {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.state-running {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.state-stopped {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.state-terminated {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Instance Detail Card */
.instance-detail-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    margin-top: -30px;
    border: 1px solid var(--border);
}

.light-theme .instance-detail-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.instance-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.instance-title {
    color: var(--light);
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.light-theme .instance-title {
    color: #1f2937;
}

.instance-id {
    font-size: 12px;
    color: var(--gray);
    font-family: monospace;
}

.instance-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

.detail-value {
    font-size: 12px;
    color: var(--light);
    font-family: monospace;
}

.light-theme .detail-value {
    color: #1f2937;
}

.instance-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: -18px;
}

.copy-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--light);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.light-theme .copy-btn {
    background: #f1f5f9;
    border: 1px solid #d1d5db;
    color: #1f2937;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
}

.light-theme .copy-btn:hover {
    background: #e5e7eb;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.light-theme .modal-actions {
    border-top: 1px solid #e5e7eb;
}

.modal-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 100px;
}

.modal-button.confirm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.modal-button.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border: 1px solid var(--border);
}

.light-theme .modal-button.cancel {
    background: #f1f5f9;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.modal-button.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #be123c 100%);
    color: white;
}

.modal-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.modal-button:active {
    transform: scale(0.98);
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray);
}

.light-theme .loading {
    color: #6b7280;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

.light-theme .loading::after {
    border: 3px solid rgba(31, 41, 55, 0.1);
    border-top-color: var(--primary);
}

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

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray);
    text-align: center;
    padding: 40px 20px;
}

.light-theme .empty-state {
    color: #6b7280;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--light);
}

.light-theme .empty-state h4 {
    color: #1f2937;
}

.empty-state p {
    font-size: 14px;
    opacity: 0.7;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 2001;
    max-width: 350px;
}

.light-theme .notification-toast {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.notification-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.notification-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.notification-icon.info {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
}

.notification-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--light);
}

.light-theme .notification-text h4 {
    color: #1f2937;
}

.notification-text p {
    font-size: 13px;
    color: var(--gray);
}

.light-theme .notification-text p {
    color: #6b7280;
}

/* Theme persistence */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dashboard-header,
.stat-card,
.keypair-panel,
.os-card,
.modal-container,
.notification-toast {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .os-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .os-cards-container {
        grid-template-columns: 1fr;
    }
    
    .os-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-right {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .theme-switcher {
        order: 2;
    }
    
    .user-profile {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .panel-body {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .keypair-actions {
        justify-content: center;
    }
    
    .keypair-info {
        justify-content: center;
        text-align: center;
    }
    
    .destroy-button {
        bottom: 20px;
        right: 20px;
        padding: 14px 20px;
        font-size: 13px;
    }
    
    .theme-option {
        min-width: 70px;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .instance-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .stat-count {
        font-size: 28px;
    }
    
    .os-card-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .os-actions {
        grid-template-columns: 1fr;
    }
    
    .action-button {
        min-height: auto;
        padding: 14px;
    }
    
    .action-btn {
        min-width: 100px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .modal-container {
        padding: 24px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-button {
        width: 100%;
    }
    
    .theme-toggle {
        flex-direction: column;
        gap: 4px;
    }
    
    .theme-option {
        min-width: 100%;
        justify-content: center;
    }
}


/* User Profile Dropdown */
/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
    z-index: 1000; /* Added this */
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    z-index: 1002; /* Added this */
}

.light-theme .user-profile-trigger {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

.user-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.light-theme .user-profile-trigger:hover {
    background: #f3f4f6;
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--gray);
    transition: var(--transition);
}

.user-profile-trigger:hover .dropdown-arrow {
    color: var(--primary);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px); /* Reduced from 10px to 5px */
    right: 0;
    width: 280px;
    background: var(--dark);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1003; /* Ensure this is higher than wrapper */
    pointer-events: none; /* Added */
}

.light-theme .user-dropdown-menu {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto; /* Added */
}

.dropdown-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border);
}

.light-theme .dropdown-header {
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: white;
}

.dropdown-user-info {
    flex: 1;
}

.dropdown-username {
    font-weight: 600;
    font-size: 15px;
    color: var(--light);
    margin-bottom: 4px;
}

.light-theme .dropdown-username {
    color: #1f2937;
}

.dropdown-email {
    font-size: 13px;
    color: var(--gray);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--light);
    transition: var(--transition);
    cursor: pointer;
}

.light-theme .dropdown-item {
    color: #1f2937;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.light-theme .dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--gray);
    font-size: 16px;
}

.dropdown-item:hover i {
    color: var(--primary);
}

.dropdown-item.logout {
    color: var(--danger);
}

.dropdown-item.logout i {
    color: var(--danger);
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.light-theme .dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: var(--radius) var(--radius) 0 0;
        transform: translateY(100%);
    }
    
    .user-dropdown-menu.show {
        transform: translateY(0);
    }
    
    .header-right {
        width: 100%;
    }
    
    .user-profile-dropdown {
        width: 100%;
    }
    
    .user-profile-trigger {
        width: 100%;
        justify-content: space-between;
    }
}

/* Simple Footer Styles */
.simple-footer {
    /* position: fixed; */
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    height: 50px;
}

.light-theme .simple-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: var(--transition);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--light);
    background: rgba(255, 255, 255, 0.1);
}

.light-theme .footer-link:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.footer-link i {
    font-size: 12px;
}

.copyright {
    color: var(--gray);
    font-size: 12px;
    font-weight: 400;
}

.light-theme .copyright {
    color: #6b7280;
}

/* Settings Styles */
.settings-section {
    margin-bottom: 20px;
}

.settings-section h4 {
    color: var(--light);
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 600;
}

.light-theme .settings-section h4 {
    color: #1f2937;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--light);
    font-size: 14px;
}

.light-theme .setting-item label {
    color: #1f2937;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}


/* Responsive footer */
@media (max-width: 768px) {
    .simple-footer {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .footer-left, .footer-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .copyright {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }    
   
}

@media (max-width: 480px) {
    .footer-link {
        font-size: 12px;
        padding: 4px 6px;
    }
    
    .footer-link span {
        display: none;
    }
    
    .footer-link i {
        font-size: 14px;
    }
}
/* Add to new.css - Secret field styles */
.secret {
    font-family: monospace;
    /* letter-spacing: 1px; */
    margin-left: -17px;
    user-select: text;
    cursor: text;
    padding: 2px 6px;
    /* background: rgba(255, 255, 255, 0.05); */
    border-radius: 4px;
    border: 1px solid var(--border);
    /* min-width: 100px; */
    display: inline-block;
}

.light-theme .secret {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.toggle-secret {
    margin-left: 8px;
    cursor: pointer;
    color: var(--primary);
    font-size: 14px;
    transition: var(--transition);
}

.toggle-secret:hover {
    color: var(--secondary);
    transform: scale(1.1);
}

/* Add some spacing between the label and secret field */
div[style*="font-size:13px; display: flex; align-items: center;"] strong {
    min-width: 90px;
}

/* Make the secret field responsive */
@media (max-width: 768px) {
    .secret {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Add to new.css for keypair error modal */
#keypairErrorModal .modal-container {
    animation: modalSlideIn 0.3s ease;
}

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

#keypairErrorModal .modal-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#keypairErrorModal .modal-body {
    padding: 10px 0;
}

#keypairErrorModal .modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

#keypairErrorModal .modal-actions .modal-button {
    width: 100%;
    justify-content: center;
}

/* For light theme */
.light-theme #keypairErrorModal .modal-header {
    border-bottom: 1px solid #e5e7eb;
}

.light-theme #keypairErrorModal .modal-body ol {
    color: #6b7280;
}

.light-theme #keypairErrorModal .modal-actions {
    border-top: 1px solid #e5e7eb;
}
