* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Login y Registro */
.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    max-width: 450px;
    margin: 50px auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-card h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-card h2 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 20px;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-renovar {
    background: #ed8936;
    color: white;
}

.btn-renovar:hover {
    background: #dd6b20;
}

.btn-eliminar {
    background: #f56565;
    color: white;
}

.btn-eliminar:hover {
    background: #e53e3e;
}

.btn-logout {
    background: #a0aec0;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    margin: 0 5px;
}

/* Header */
.header {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    color: #667eea;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Dashboard */
.dashboard {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.add-domain-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.add-domain-section h2, .domains-list h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.add-domain-form {
    margin-top: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Tabla de dominios */
.table-responsive {
    overflow-x: auto;
}

.domains-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.domains-table th,
.domains-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.domains-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

.domains-table tr:hover {
    background: #f7fafc;
}

/* Estados */
.estado-peligro {
    background-color: #fff5f5;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-warning {
    background: #feebc8;
    color: #7c2d12;
}

.badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.text-center {
    text-align: center;
    margin-top: 20px;
}

.text-center a {
    color: #667eea;
    text-decoration: none;
}

.text-center a:hover {
    text-decoration: underline;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #a0aec0;
    font-size: 16px;
}

/* Acciones */
.actions {
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .login-card {
        margin: 20px auto;
        padding: 25px;
    }
    
    .dashboard {
        padding: 20px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: auto;
    }
    
    .domains-table,
    .domains-table thead,
    .domains-table tbody,
    .domains-table th,
    .domains-table td,
    .domains-table tr {
        display: block;
    }
    
    .domains-table thead tr {
        display: none;
    }
    
    .domains-table tr {
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 10px;
    }
    
    .domains-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .domains-table td:last-child {
        border-bottom: none;
    }
    
    .domains-table td:before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        color: #4a5568;
    }
    
    .actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .btn-small {
        flex: 1;
        text-align: center;
    }
}


/* Estilos adicionales para el formulario */
.form-text {
    display: block;
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

.add-domain-form .form-group {
    position: relative;
}

/* Validación visual */
.form-group input:invalid {
    border-color: #f56565;
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #48bb78;
}

/* Animación para mensajes de alerta */
.alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}