/* assets/css/style.css */

/* --- GENERAL --- */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background-color: #f0f2f5; 
    margin: 0;
    color: #333;
}

/* --- UTILIDADES DE FLEXBOX (Para centrar login) --- */
.flex-center-screen {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    width: 100%;
}

/* --- LOGIN BOX --- */
.login-box { 
    background: white; 
    padding: 2.5rem; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
    width: 100%;
    max-width: 350px; 
}

.login-box h2 { 
    text-align: center; 
    color: #333; 
    margin-bottom: 1.5rem; 
    margin-top: 0;
}

.login-footer { 
    text-align: center; 
    margin-top: 1.5rem; 
    font-size: 0.8rem; 
    color: #888; 
}

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

label { 
    display: block; 
    margin-bottom: 0.5rem; 
    color: #666; 
    font-size: 0.9rem; 
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    box-sizing: border-box; 
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus { 
    border-color: #007bff; 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* --- BOTONES --- */
button, .btn { 
    width: 100%; 
    padding: 12px; 
    background: #007bff; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover, .btn:hover { 
    background: #0056b3; 
}

/* --- MENSAJES DE ESTADO --- */
.error { 
    background: #fee2e2; 
    color: #dc2626; 
    padding: 12px; 
    border-radius: 6px; 
    font-size: 0.9em; 
    margin-bottom: 20px; 
    text-align: center;
    border: 1px solid #fca5a5;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9em;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #86efac;
}
/* --- AÑADIR AL FINAL DE STYLE.CSS --- */

/* HEADER & NAV */
.main-header {
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    background: #e6f0ff;
    color: #007bff;
}

.btn-logout {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 15px;
}

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

/* DASHBOARD CARDS */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1.5rem;
    border: 1px solid #eee;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-stat {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-stat.clients { background: #e0f2fe; color: #0284c7; }
.icon-stat.projects { background: #f3e8ff; color: #9333ea; }
.icon-stat.money { background: #dcfce7; color: #166534; }

.info-stat h4 { margin: 0; color: #666; font-size: 0.9rem; font-weight: normal; }
.info-stat .number { margin: 5px 0 0 0; font-size: 1.8rem; font-weight: bold; color: #333; }

/* --- AÑADIR AL FINAL DE assets/css/style.css --- */

/* TABLAS DE DATOS */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow-x: auto; /* Para móviles */
    border: 1px solid #eee;
}

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

.data-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.data-table th {
    text-align: left;
    padding: 15px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    color: #333;
}

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

.data-table tr:hover {
    background-color: #f8faff;
}

/* Estado visual (badges) */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-gray { background: #f3f4f6; color: #4b5563; }

/* Botón pequeño para tablas */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}