/* ============================================================
   Sistema Química Franklin — Estilos globales
   Paleta principal: #0984e3
   ============================================================ */

:root {
    --qf-primary:       #0984e3;
    --qf-primary-hover: #0773c5;
    --qf-dark:          #2d3436;
    --qf-gray:          #636e72;
    --qf-bg:            #f5f6fa;
    --qf-card-shadow:   0 2px 8px rgba(0, 0, 0, 0.08);
    --qf-section-bg:    #f0f6ff;
    --qf-input-focus:   rgba(9, 132, 227, 0.15);
}

/* ===== BASE ===== */
body {
    background-color: var(--qf-bg);
    font-family: Arial, sans-serif;
}

.cursor-pointer {
    cursor: pointer;
}

/* ===== BOTÓN PRIMARIO DEL SISTEMA ===== */
.btn-primary {
    background-color: var(--qf-primary);
    border-color: var(--qf-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--qf-primary-hover);
    border-color: var(--qf-primary-hover);
}

.btn-outline-primary {
    color: var(--qf-primary);
    border-color: var(--qf-primary);
}

.btn-outline-primary:hover {
    background-color: var(--qf-primary);
    border-color: var(--qf-primary);
}

/* ===== TABLAS ===== */
.table thead.table-dark th {
    background-color: var(--qf-dark);
}

/* ===== CARDS GENERALES ===== */
.qf-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--qf-card-shadow);
    padding: 32px;
}

/* ===== LOGIN ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0773c5 0%, #0984e3 50%, #38b2f5 100%);
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    max-width: 460px;
    width: 100%;
}

.login-banner {
    width: 100%;
    background: #fff;
    padding: 0;
    line-height: 0;
}

.login-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.login-body {
    padding: 28px 32px 32px;
}

.login-subtitle {
    text-align: center;
    color: var(--qf-gray);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.login-body .form-control:focus {
    border-color: var(--qf-primary);
    box-shadow: 0 0 0 0.2rem rgba(9, 132, 227, 0.15);
}

.login-body label {
    color: #455a64;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

/* ===== FORMULARIOS ===== */
.form-section {
    background: var(--qf-section-bg);
    border-left: 4px solid var(--qf-primary);
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.section-title {
    color: var(--qf-primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--qf-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.form-control,
.form-select {
    border-radius: 6px;
    border: 1.5px solid #dee2e6;
    font-size: 0.92rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--qf-primary);
    box-shadow: 0 0 0 3px var(--qf-input-focus);
    outline: none;
}

.form-control[readonly] {
    background-color: #e9ecef;
    color: var(--qf-gray);
    font-weight: 600;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .bi {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--qf-gray);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 5;
}

.input-with-icon .form-control,
.input-with-icon .form-select {
    padding-left: 32px;
}

.tax-box {
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
    height: 100%;
}

.tax-box.active,
.tax-box:has(.form-check-input:checked) {
    border-color: var(--qf-primary);
    background: var(--qf-section-bg);
}

.tax-box .form-check-input:checked {
    background-color: var(--qf-primary);
    border-color: var(--qf-primary);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    margin-top: 8px;
}

.form-footer .btn {
    min-width: 130px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
}

/* Tabla de productos en formularios */
.form-section .table thead th {
    background-color: var(--qf-dark);
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
}

.form-section .table tbody tr:hover {
    background-color: var(--qf-section-bg);
}

.form-section .table tfoot td {
    font-weight: 700;
    background-color: #f8f9fa;
}

/* ===== PAGE HEADER ===== */
.qf-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.qf-page-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--qf-dark);
}

/* ===== TABLE CARD ===== */
.qf-table-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.qf-table-card .table {
    margin-bottom: 0;
}

.qf-table-card .table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    white-space: nowrap;
    background-color: var(--qf-dark);
    color: #fff;
    border: none;
}

.qf-table-card .table tbody td {
    padding: 9px 14px;
    font-size: 0.88rem;
    white-space: nowrap;
    border-color: #f0f0f0;
    vertical-align: middle;
}

.qf-table-card .table tbody tr:hover {
    background-color: var(--qf-section-bg);
}

/* ===== INDEX / BIENVENIDA ===== */
.index-card {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--qf-card-shadow);
    padding: 32px;
    text-align: center;
}

.index-card h1 {
    color: var(--qf-dark);
    margin-bottom: 16px;
}

.index-card p {
    color: var(--qf-gray);
    margin-bottom: 24px;
}
