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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand .logo {
    height: 40px;
    width: auto;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: #667eea;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

/* Pages */
.page {
    display: none;
    padding-top: 80px;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Login/Register */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 2rem;
    color: #667eea;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Boutons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

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

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

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

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

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

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-info:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    color: white;
    font-size: 2rem;
}

.dashboard-header .btn {
    width: auto;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
}

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

.vps-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.vps-card:hover {
    transform: translateY(-5px);
}

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

.vps-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
}

.vps-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.vps-status.online {
    background: #d4edda;
    color: #155724;
}

.vps-status.offline {
    background: #f8d7da;
    color: #721c24;
}

.vps-status.booting {
    background: #fff3cd;
    color: #856404;
}

.vps-info {
    margin-bottom: 1rem;
}

.vps-info p {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.vps-info strong {
    color: #333;
}

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

.vps-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* VPS Form */
.vps-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.vps-form h2 {
    color: #667eea;
    margin-bottom: 2rem;
    text-align: center;
}

.price-display {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.price-display p {
    font-size: 1.25rem;
    color: #333;
}

.price-display span {
    color: #667eea;
    font-weight: bold;
    font-size: 1.5rem;
}

.vps-form .btn {
    margin-bottom: 0.5rem;
}

/* Settings */
.settings-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.settings-card h2 {
    color: #667eea;
    margin-bottom: 2rem;
}

/* Admin Panel */
.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.admin-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.user-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.user-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.user-card p {
    color: #666;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.user-card .user-role {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.user-card .user-role.admin {
    background: #d4edda;
    color: #155724;
}

.user-card .user-role.user {
    background: #cce5ff;
    color: #004085;
}

.user-card .user-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.user-card .user-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.vm-assignment {
    max-width: 600px;
}

.vm-checkbox-list {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.vm-checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

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

.vm-checkbox-item input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
}

.vm-checkbox-item label {
    flex: 1;
    cursor: pointer;
    color: #333;
}

.vm-checkbox-item .vm-info {
    font-size: 0.85rem;
    color: #666;
}

.admin-only {
    display: none !important;
}

.admin-only.visible {
    display: block !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

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

.modal-actions .btn {
    width: auto;
    min-width: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .vps-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 3000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #27ae60;
}

.notification.error {
    background: #e74c3c;
}

.notification.info {
    background: #3498db;
}

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

/* Terminal Modal */
.terminal-modal {
    z-index: 3000;
}

.terminal-content {
    max-width: 900px;
    width: 95%;
    padding: 0;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #1e1e1e;
    color: white;
    border-bottom: 1px solid #333;
}

.terminal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
}

.terminal-header .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.terminal-container {
    height: 500px;
    background: #1e1e1e;
    padding: 0;
}

.terminal-container .xterm {
    height: 100%;
    padding: 0.5rem;
}

.terminal-container .xterm-viewport {
    overflow-y: auto !important;
}
