:root {
    --fk-navy: #10284a;
    --fk-navy-light: #1c3c68;
    --fk-green: #79c142;
    --fk-green-dark: #5da12e;

    --bs-primary: var(--fk-green);
    --bs-primary-rgb: 121, 193, 66;
    --bs-link-color: var(--fk-navy);
    --bs-link-hover-color: var(--fk-green-dark);
}

body {
    background-color: #f4f6f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding-bottom: 34px;
}

h1, h2, h3, .auth-brand, .navbar-brand {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

h1, h2, h3 {
    color: var(--fk-navy);
}

.text-navy {
    color: var(--fk-navy);
}

.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.35rem 1.25rem rgba(16, 40, 74, 0.06);
}

.navbar {
    background-color: var(--fk-navy) !important;
    box-shadow: 0 0.25rem 0.75rem rgba(16, 40, 74, 0.15);
}

.navbar-brand {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 42px;
    background: #fff;
    padding: 7px 14px;
    border-radius: 0.6rem;
}

.navbar .nav-link {
    font-weight: 500;
    border-radius: 0.5rem;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    transition: background-color .15s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

.btn {
    border-radius: 0.6rem;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--fk-green);
    border-color: var(--fk-green);
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--fk-green-dark) !important;
    border-color: var(--fk-green-dark) !important;
}

.btn-outline-secondary {
    color: var(--fk-navy);
    border-color: rgba(16, 40, 74, 0.25);
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: var(--fk-navy);
    border-color: var(--fk-navy);
    color: #fff;
}

.btn-outline-success {
    color: var(--fk-green-dark);
    border-color: var(--fk-green);
}
.btn-outline-success:hover {
    background-color: var(--fk-green);
    border-color: var(--fk-green);
}

.btn-outline-danger:hover {
    box-shadow: 0 0.35rem 0.85rem rgba(220, 53, 69, 0.25);
}

.form-control, .form-select {
    border-radius: 0.6rem;
    border-color: rgba(16, 40, 74, 0.15);
}
.form-control:focus, .form-select:focus {
    border-color: var(--fk-green);
    box-shadow: 0 0 0 0.2rem rgba(121, 193, 66, 0.2);
}
.form-control::placeholder {
    color: #b4bcc8;
    opacity: 1;
}

.dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 1.5rem rgba(16, 40, 74, 0.15);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--fk-green);
}

.badge.bg-success {
    background-color: var(--fk-green) !important;
}

a {
    color: var(--fk-navy);
}
a:hover {
    color: var(--fk-green-dark);
}

.print-only {
    display: none;
}

@media print {
    nav, .no-print {
        display: none !important;
    }
    .fila-no-seleccionada {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
    body {
        background: #fff !important;
        padding-bottom: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--fk-navy);
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 800;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}
.app-footer a:hover {
    color: #fff;
}

/* ---------- Componentes generales de la app privada ---------- */

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.page-header h1 {
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.page-header .text-muted {
    font-size: 0.95rem;
}

.stat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.25rem;
    transition: transform .15s ease, box-shadow .15s ease;
}

a.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 2rem rgba(16, 40, 74, 0.1);
}

.stat-card-icon {
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}

.stat-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--fk-navy);
    line-height: 1.1;
}

.stat-card-label {
    color: #8a93a3;
    font-size: 0.85rem;
    font-weight: 500;
}

.entity-card {
    transition: transform .15s ease, box-shadow .15s ease;
}
.entity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 2rem rgba(16, 40, 74, 0.1);
}

.entity-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #f7f9f6;
    padding: 4px;
}

.entity-logo-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--fk-navy), var(--fk-navy-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: #6b7686;
}

.empty-state > i {
    font-size: 2.5rem;
    color: var(--fk-green);
    margin-bottom: 1rem;
    display: inline-block;
}

.empty-state h2 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.section-title {
    font-weight: 700;
    color: var(--fk-navy);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title i {
    color: var(--fk-green-dark);
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.table thead th {
    background-color: rgba(16, 40, 74, 0.04);
    color: var(--fk-navy);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: none;
}

/* ---------- Páginas de autenticación (login / registro) ---------- */

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 12%, rgba(121, 193, 66, 0.16), transparent 42%),
        radial-gradient(circle at 92% 88%, rgba(16, 40, 74, 0.14), transparent 45%),
        linear-gradient(135deg, #f6f8f6 0%, #eef2ea 55%, #eaf3e5 100%);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 960px;
    background: #fff;
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    box-shadow: 0 1.5rem 3rem rgba(16, 40, 74, 0.12);
}

.auth-brand {
    flex: 0 0 42%;
    background:
        radial-gradient(circle at 30% 20%, rgba(121, 193, 66, 0.18), transparent 55%),
        linear-gradient(160deg, #fbfdfa 0%, #eef6e9 100%);
    border-right: 1px solid rgba(16, 40, 74, 0.06);
}

.auth-logo {
    max-width: 240px;
    width: 100%;
    height: auto;
}

.auth-logo-mobile {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.auth-tagline {
    color: var(--fk-navy);
    font-size: 1.05rem;
    font-weight: 500;
    max-width: 320px;
    opacity: 0.85;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    color: var(--fk-navy);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 50rem;
    box-shadow: 0 0.25rem 0.6rem rgba(16, 40, 74, 0.08);
}

.auth-pill i {
    color: var(--fk-green-dark);
}

.auth-form {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-form .form-control,
.auth-form .input-group-text {
    border-radius: 0.7rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    border-color: rgba(16, 40, 74, 0.15);
}

.auth-form .form-control:focus {
    border-color: var(--fk-green);
    box-shadow: 0 0 0 0.2rem rgba(121, 193, 66, 0.2);
}

.auth-form .input-group-text {
    background: #f7f9f6;
    color: var(--fk-navy);
}

.auth-form .btn-primary {
    border-radius: 0.7rem;
    padding: 0.65rem 1rem;
    font-weight: 600;
    box-shadow: 0 0.5rem 1rem rgba(121, 193, 66, 0.35);
}

.auth-title {
    color: var(--fk-navy);
    font-weight: 700;
}

.auth-subtitle {
    color: #6b7686;
}

.auth-footer-note {
    color: #8a93a3;
    font-size: 0.85rem;
}
