/* frontend/css/style.css */

/* Variables CSS */
:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --radius: 8px;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

/* Contenedor principal */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Contenedor de formularios */
.form-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

.form-container h1 {
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 30px;
    font-size: 2em;
}

/* Formularios */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.95em;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1em;
    transition: border-color 0.3s ease;
}

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

.form-group small {
    color: var(--medium-gray);
    font-size: 0.85em;
}

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

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

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

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

/* Mensajes */
.message {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer de formularios */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-container {
    background: var(--light-gray);
    min-height: 100vh;
}

.dashboard-header {
    background: white;
    box-shadow: var(--shadow);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: var(--dark-gray);
    font-size: 1.5em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info strong {
    color: var(--primary-color);
    font-size: 1.1em;
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.welcome-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.welcome-card h2 {
    color: var(--dark-gray);
    margin-bottom: 20px;
}

.user-details {
    margin-top: 30px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: var(--radius);
}

.info-grid {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

/* Tablas */
.users-section {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.users-section h3 {
    color: var(--dark-gray);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.table thead {
    background: var(--primary-color);
    color: white;
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: rgba(0,123,255,0.05);
}

/* Credenciales de demo */
.demo-credentials {
    margin-top: 30px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: var(--radius);
    border-left: 4px solid var(--info-color);
}

.demo-credentials h3 {
    color: var(--dark-gray);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.demo-credentials p {
    color: var(--medium-gray);
    margin-bottom: 8px;
    font-size: 0.9em;
}

.demo-credentials strong {
    color: var(--dark-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        margin: 10px;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .user-info {
        flex-direction: column;
    }
    
    .table {
        font-size: 0.85em;
    }
    
    .table th,
    .table td {
        padding: 10px;
    }
}