/* --- Variables de Identidad Corporativa --- */
:root {
    --primary-blue: #003865;    /* Azul del logo Nativo */
    --accent-green: #7cb837;    /* Verde del logo TI */
    --bg-light: #f8f9fa;
    --text-dark: #2c3e50;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

/* --- Estilos Base --- */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- Layout: Sidebar y Contenedor --- */

/* Ajuste para el Header de la Sidebar con Logo */
.sidebar-header { 
    padding: 25px 20px; 
    text-align: center; 
    background: #141a21; 
    border-bottom: 1px solid #2c3e50;
    display: flex; /* Activa alineación flexible */
    align-items: center; /* Centra verticalmente */
    justify-content: center; /* Centra horizontalmente */
    gap: 10px; /* Espacio entre imagen y texto */
}

.sidebar-header img {
    height: 30px; /* Se ajusta a la altura del texto del H2 */
    width: auto;
    border-radius: 4px; /* Opcional: suaviza bordes de la imagen */
}

.sidebar-header h2 { 
    margin: 0; 
    font-size: 22px; 
    color: white;
    letter-spacing: 1px;
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 20px 0;
    flex-shrink: 0;
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

/* --- Navegación --- */
.nav-link {
    display: block;
    padding: 12px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--accent-green);
    color: var(--white);
    padding-left: 35px;
}

/* --- Tarjetas y Contenedores --- */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
    border-top: 4px solid var(--accent-green);
}

/* --- Tablas (Estructura para Clientes y Cotizaciones) --- */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px;
    text-align: left;
    font-weight: 500;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background-color: #f1f4f8;
}

/* --- Formularios --- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="text"], 
input[type="email"], 
input[type="number"], 
select, 
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    box-sizing: border-box; /* Evita que rompa el layout */
}

input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(124, 184, 55, 0.2);
}

/* --- Botones --- */
.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s;
}

.btn-primary { background-color: var(--primary-blue); color: white; }
.btn-success { background-color: var(--accent-green); color: white; }
.btn-danger { background-color: #e74c3c; color: white; }

.btn:hover { opacity: 0.9; }

/* --- Alertas de Sistema --- */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 5px solid;
}

.alert-error {
    background-color: #fce4e4;
    color: #cc0000;
    border-color: #cc0000;
}

/* --- Footer --- */
.footer-global {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: auto;
}
/* ===============================
   LOGIN USUARIOS
   =============================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        #0a3554 0%,
        #06263f 100%
    );
}

.login-box {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    text-align: center;
}

.login-box h2 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 26px;
}

.login-box p {
    color: #5c6f7c;
    margin-bottom: 30px;
    font-size: 15px;
}

.login-box input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid #d0d7de;
    font-size: 15px;
}

.login-box button {
    width: 100%;
    padding: 14px;
    border-radius: 30px;
    border: none;
    background: var(--primary-blue);
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #06263f;
}

/* Botón volver */
.btn-back {
    display: inline-block;
    margin-top: 20px;
    font-size: 14px;
    text-decoration: none;
    color: var(--primary-blue);
}

.btn-back:hover {
    text-decoration: underline;
}
