/*!
 * HonduFuturo Custom Theme for Bootstrap 5
 * Copyright 2025 Fundación HonduFuturo
 * Built on Bootstrap 5.3.8
 */

/* ================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ================================================ */

:root {
    /* HonduFuturo Brand Colors */
    --hf-primary: #043A52;        /* Dark Blue - Main brand color */
    --hf-primary-light: #1a5468;  /* Lighter shade for hover states */
    --hf-primary-dark: #033951;   /* Darker shade for active states */

    /* HonduFuturo Accent & Gray - Main UI Colors */
    --hf-accent: #FCC022;         /* HonduFuturo Gold - Primary accent */
    --hf-accent-dark: #E0A61D;    /* Accent hover/dark state */
    --hf-gold: #FCC022;           /* HonduFuturo Gold - Primary accent */
    --hf-gold-hover: #E0A61D;     /* Gold hover state */
    --hf-gold-light: #fff9e6;     /* Light gold background */
    --hf-dark-gray: #58595B;      /* Dark Gray - Primary text/navbar */
    --hf-dark-gray-dark: #3d3e40; /* Darker gray for gradients */
    --hf-dark-gray-light: #6e6f71; /* Lighter gray for hover */

    --hf-secondary: #858796;      /* Gray */
    --hf-success: #1cc88a;        /* Green */
    --hf-info: #36b9cc;           /* Cyan */
    --hf-warning: #f6c23e;        /* Yellow */
    --hf-danger: #e74a3b;         /* Red */

    /* Layout Colors */
    --hf-bg: #EDF4F8;             /* Page background */
    --hf-surface: #FFFFFF;        /* Card/panel surface */
    --hf-border: #DCE8F0;         /* Border color */

    /* Text Colors */
    --hf-text-dark: #043A52;      /* Dark text */
    --hf-text-light: #FFFFFF;     /* Light text */

    /* Neutral Colors */
    --hf-white: #ffffff;
    --hf-gray-100: #f8f9fc;
    --hf-gray-200: #eaecf4;
    --hf-gray-300: #dddfeb;
    --hf-gray-400: #d1d3e2;
    --hf-gray-500: #b7b9cc;
    --hf-gray-600: #858796;
    --hf-gray-700: #6e707e;
    --hf-gray-800: #5a5c69;
    --hf-gray-900: #3a3b45;
    --hf-black: #000000;

    /* Sidebar */
    --hf-sidebar-width: 14rem;
    --hf-sidebar-collapsed-width: 6.5rem;

    /* Shadows */
    --hf-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --hf-shadow: 0 0.15rem 1.75rem rgba(0, 0, 0, 0.15);
    --hf-shadow-lg: 0 0.5rem 2rem rgba(0, 0, 0, 0.2);

    /* Borders */
    --hf-border-color: var(--hf-border);
    --hf-border-radius: 0.35rem;

    /* Transitions */
    --hf-transition: all 0.2s ease-in-out;
}

/* Override Bootstrap 5 Variables */
.btn-primary {
    --bs-btn-bg: var(--hf-primary);
    --bs-btn-border-color: var(--hf-primary);
    --bs-btn-hover-bg: var(--hf-primary-light);
    --bs-btn-hover-border-color: var(--hf-primary-light);
    --bs-btn-active-bg: var(--hf-primary-dark);
    --bs-btn-active-border-color: var(--hf-primary-dark);
}

/* ================================================
   GLOBAL STYLES
   ================================================ */

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--hf-gray-700);
    background-color: var(--hf-gray-100);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--hf-gray-800);
}

a {
    color: var(--hf-primary);
    text-decoration: none;
    transition: var(--hf-transition);
}

a:hover {
    color: var(--hf-primary-light);
}

/* ================================================
   PAGE LAYOUT
   ================================================ */

#wrapper {
    display: flex;
}

#page-top {
    height: 100vh;
}

/* ================================================
   SIDEBAR NAVIGATION
   ================================================ */

.sidebar {
    width: var(--hf-sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, var(--hf-primary) 10%, var(--hf-primary-dark) 100%);
    box-shadow: var(--hf-shadow);
    flex-shrink: 0;
}

.sidebar.toggled {
    width: var(--hf-sidebar-collapsed-width);
}

.sidebar .nav-item {
    position: relative;
}

.sidebar .nav-item .nav-link {
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    transition: var(--hf-transition);
    display: flex;
    align-items: center;
}

.sidebar .nav-item .nav-link:hover,
.sidebar .nav-item .nav-link:focus {
    color: var(--hf-white);
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item .nav-link.active {
    color: var(--hf-white);
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

.sidebar .nav-item .nav-link i {
    margin-right: 0.5rem;
    font-size: 0.85rem;
    width: 1.5rem;
    text-align: center;
}

.sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    color: var(--hf-white);
    font-size: 1rem;
    font-weight: 600;
    padding: 1.5rem 1rem;
    text-align: center;
    letter-spacing: 0.05rem;
    transition: var(--hf-transition);
}

.sidebar-brand:hover {
    color: var(--hf-white);
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0 1rem;
}

.sidebar-heading {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

#sidebarToggle {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--hf-white);
    cursor: pointer;
    transition: var(--hf-transition);
}

#sidebarToggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Sidebar Logo */
.sidebar-logo {
    max-height: 40px;
    width: auto;
    transition: var(--hf-transition);
}

.sidebar.toggled .sidebar-logo {
    max-height: 30px;
}

/* Sidebar Collapsed State */
.sidebar.toggled .sidebar-heading,
.sidebar.toggled .nav-item .nav-link span,
.sidebar.toggled .collapse-inner {
    display: none;
}

.sidebar.toggled .nav-item .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.toggled .nav-item .nav-link i {
    margin-right: 0;
    font-size: 1rem;
}

.sidebar.toggled .nav-link[data-bs-toggle="collapse"]::after {
    display: none;
}

.sidebar.toggled .sidebar-brand span {
    display: none;
}

/* Collapse Inner (Sub-navigation) */
.collapse-inner {
    padding: 0.5rem 0;
    min-width: 10rem;
    margin: 0 0.5rem;
    border-radius: var(--hf-border-radius);
    background-color: rgba(255, 255, 255, 0.08);
}

.collapse-item {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--hf-transition);
    white-space: nowrap;
}

.collapse-item:hover,
.collapse-item:focus {
    color: var(--hf-white);
    background-color: rgba(255, 255, 255, 0.1);
}

.collapse-item.active {
    color: var(--hf-white);
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.15);
}

.collapse-header {
    display: block;
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1rem;
}

/* Chevron Arrow for Collapsible Nav Links */
.sidebar .nav-link[data-bs-toggle="collapse"] {
    position: relative;
}

.sidebar .nav-link[data-bs-toggle="collapse"]::after {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.65rem;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Nav Link Highlight (Gestion de Beneficiario) */
.nav-link-highlight {
    background: linear-gradient(135deg, rgba(252, 192, 34, 0.2) 0%, rgba(252, 192, 34, 0.1) 100%) !important;
    border-left: 3px solid var(--hf-gold) !important;
    color: var(--hf-gold) !important;
    font-weight: 600 !important;
}

.nav-link-highlight:hover {
    background: linear-gradient(135deg, rgba(252, 192, 34, 0.3) 0%, rgba(252, 192, 34, 0.15) 100%) !important;
}

.nav-link-highlight i {
    color: var(--hf-gold) !important;
}

/* Sidebar Badges */
.sidebar .badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    vertical-align: middle;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1050;
    }

    .sidebar.toggled {
        width: var(--hf-sidebar-width);
        overflow-y: auto;
    }

    /* Overlay when sidebar is open on mobile */
    body.sidebar-toggled::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
}

/* ================================================
   TOPBAR / NAVBAR
   ================================================ */

.topbar {
    height: 4.375rem;
    background-color: var(--hf-white);
    border-bottom: 1px solid var(--hf-border-color);
}

.topbar .nav-item {
    position: relative;
}

.topbar .nav-link {
    padding: 0.75rem 1rem;
    color: var(--hf-gray-600);
    transition: var(--hf-transition);
}

.topbar .nav-link:hover {
    color: var(--hf-gray-800);
}

.topbar .dropdown-menu {
    border: 1px solid var(--hf-border-color);
    box-shadow: var(--hf-shadow);
}

.topbar .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    color: var(--hf-gray-700);
    transition: var(--hf-transition);
}

.topbar .dropdown-item:hover {
    background-color: var(--hf-gray-100);
    color: var(--hf-gray-800);
}

#sidebarToggleTop {
    height: 2.5rem;
    width: 2.5rem;
    color: var(--hf-gray-600);
}

#sidebarToggleTop:hover {
    background-color: var(--hf-gray-200);
    color: var(--hf-gray-800);
}

/* ================================================
   CONTENT WRAPPER
   ================================================ */

#content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-x: hidden;
    background-color: var(--hf-gray-100);
}

#content {
    flex: 1 0 auto;
    padding-top: 1.5rem;
}

.container,
.container-fluid {
    padding: 0 1.5rem;
}

/* ================================================
   CARDS & PANELS
   ================================================ */

.card {
    border: 1px solid var(--hf-border-color);
    border-radius: var(--hf-border-radius);
    box-shadow: var(--hf-shadow-sm);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: var(--hf-gray-100);
    border-bottom: 1px solid var(--hf-border-color);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--hf-primary);
}

/* Card with gold accent */
.card-header-gold,
.card-header.bg-warning {
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    color: var(--hf-dark-gray-dark);
    border-bottom: none;
}

/* Card with dark gray header */
.card-header-dark {
    background: linear-gradient(135deg, var(--hf-dark-gray) 0%, var(--hf-dark-gray-dark) 100%);
    color: var(--hf-white);
    border-bottom: 2px solid var(--hf-gold);
}

.card-header-dark i {
    color: var(--hf-gold);
}

.card-body {
    padding: 1.25rem;
}

/* Panel Headers with Company Color */
h5[style*="color: #1329a9"],
h5[style*="color:#1329a9"] {
    color: var(--hf-primary) !important;
}

/* Background Colors */
.bg-gradient-primary {
    background: linear-gradient(180deg, var(--hf-primary) 10%, var(--hf-primary-dark) 100%);
}

.bg-gray-100 { background-color: var(--hf-gray-100) !important; }
.bg-gray-200 { background-color: var(--hf-gray-200) !important; }
.bg-gray-300 { background-color: var(--hf-gray-300) !important; }

/* ================================================
   FORMS
   ================================================ */

.form-control,
.form-select {
    border-color: var(--hf-gray-400);
    color: var(--hf-gray-700);
    font-size: 0.9rem;
    border-radius: var(--hf-border-radius);
    transition: var(--hf-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--hf-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(0, 61, 82, 0.25);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23003D52' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

label {
    font-weight: 600;
    color: var(--hf-gray-800);
    margin-bottom: 0.5rem;
}

/* Form Check (Checkboxes & Radio Buttons) */
.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.125rem;
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.125em;
    margin-left: -1.5em;
    vertical-align: top;
    background-color: var(--hf-white);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid var(--hf-gray-400);
    border-radius: 0.25em;
    appearance: none;
    transition: var(--hf-transition);
    cursor: pointer;
}

.form-check-input[type="checkbox"] {
    border-radius: 0.25em;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:focus {
    border-color: var(--hf-primary-light);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 61, 82, 0.25);
}

.form-check-input:checked {
    background-color: var(--hf-primary);
    border-color: var(--hf-primary);
}

.form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input:disabled {
    pointer-events: none;
    filter: none;
    opacity: 0.5;
}

.form-check-label {
    cursor: pointer;
    color: var(--hf-gray-700);
    font-weight: 400;
}

/* Form Switch (Toggle) */
.form-switch {
    padding-left: 2.5em;
}

.form-switch .form-check-input {
    width: 2em;
    margin-left: -2.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28134, 135, 150, 0.25%29'/%3e%3c/svg%3e");
    background-position: left center;
    border-radius: 2em;
    transition: background-position 0.15s ease-in-out;
}

.form-switch .form-check-input:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23003D52'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* ASP.NET CheckBox Compatibility */
input[type="checkbox"].form-check-input {
    display: inline-block;
    margin-right: 0.5rem;
}

/* Fix ASP.NET CheckBox rendering inside form-check */
.form-check input[type="checkbox"].form-check-input {
    float: left;
    margin-left: 0;
    margin-right: 0.5rem;
}

.form-check label {
    display: inline-block;
    padding-left: 0;
    cursor: pointer;
}

/* Ensure ASP.NET generated labels work with checkboxes */
.form-check-input + label {
    padding-left: 0.25rem;
    margin-bottom: 0;
    cursor: pointer;
}

/* Inline Checkboxes */
.form-check-inline {
    display: inline-block;
    margin-right: 1rem;
}

/* Additional ASP.NET CheckBox fixes */
.form-check span {
    display: inline-block;
    vertical-align: middle;
}

/* Fix for checkboxes without wrapper - Force proper styling */
input[type="checkbox"].form-check-input:not(.form-check input[type="checkbox"]) {
    width: 1.25em !important;
    height: 1.25em !important;
    margin-top: 0.125em;
    vertical-align: top;
    background-color: var(--hf-white) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    border: 1px solid var(--hf-gray-400) !important;
    border-radius: 0.25em !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    transition: var(--hf-transition);
    cursor: pointer;
}

input[type="checkbox"].form-check-input:not(.form-check input[type="checkbox"]):checked {
    background-color: var(--hf-primary) !important;
    border-color: var(--hf-primary) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

input[type="checkbox"].form-check-input:not(.form-check input[type="checkbox"]):focus {
    border-color: var(--hf-primary-light) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 61, 82, 0.25) !important;
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
    font-weight: 600;
    border-radius: var(--hf-border-radius);
    transition: var(--hf-transition);
    padding: 0.5rem 1rem;
}

.btn-primary {
    background-color: var(--hf-primary);
    border-color: var(--hf-primary);
    color: var(--hf-white);
}

.btn-primary:hover {
    background-color: var(--hf-primary-light);
    border-color: var(--hf-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--hf-shadow-sm);
}

.btn-primary:active {
    background-color: var(--hf-primary-dark);
    border-color: var(--hf-primary-dark);
}

.btn-secondary {
    background-color: var(--hf-gray-600);
    border-color: var(--hf-gray-600);
}

.btn-secondary:hover {
    background-color: var(--hf-gray-700);
    border-color: var(--hf-gray-700);
}

.btn-info {
    background-color: var(--hf-info);
    border-color: var(--hf-info);
}

.btn-info:hover {
    background-color: #2c9faf;
    border-color: #2c9faf);
}

.btn-success {
    background-color: var(--hf-success);
    border-color: var(--hf-success);
}

.btn-warning {
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    border-color: var(--hf-gold);
    color: var(--hf-dark-gray-dark);
    font-weight: 600;
}

.btn-warning:hover,
.btn-warning:focus {
    background: linear-gradient(135deg, var(--hf-gold-hover) 0%, #d9a01a 100%);
    border-color: var(--hf-gold-hover);
    color: var(--hf-dark-gray-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(254, 194, 33, 0.35);
}

.btn-warning:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(254, 194, 33, 0.25);
}

.btn-outline-warning {
    color: var(--hf-gold);
    border-color: var(--hf-gold);
    background-color: transparent;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
    background-color: var(--hf-gold);
    border-color: var(--hf-gold);
    color: var(--hf-dark-gray-dark);
}

.btn-danger {
    background-color: var(--hf-danger);
    border-color: var(--hf-danger);
}

/* ================================================
   TABLES
   ================================================ */

.table {
    color: var(--hf-gray-700);
}

.table thead th {
    background-color: var(--hf-gray-100);
    border-color: var(--hf-border-color);
    font-weight: 600;
    color: var(--hf-gray-800);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05rem;
}

.table-responsive {
    border-radius: var(--hf-border-radius);
    box-shadow: var(--hf-shadow-sm);
}

.table-hover tbody tr:hover {
    background-color: var(--hf-gray-100);
    cursor: pointer;
}

/* Table warning header - HonduFuturo Gold */
.table-warning,
.table > thead.table-warning > tr > th,
.table-warning > th,
.table-warning > td {
    background-color: var(--hf-gold-light) !important;
    color: var(--hf-dark-gray-dark);
    border-color: rgba(254, 194, 33, 0.3);
}

.table > thead.table-warning {
    border-bottom: 2px solid var(--hf-gold);
}

/* ================================================
   MODALS
   ================================================ */

.modal-content {
    border: none;
    border-radius: var(--hf-border-radius);
    box-shadow: var(--hf-shadow-lg);
}

.modal-header {
    background-color: var(--hf-gray-100);
    border-bottom: 1px solid var(--hf-border-color);
    border-radius: var(--hf-border-radius) var(--hf-border-radius) 0 0;
}

.modal-title {
    color: var(--hf-primary);
    font-weight: 600;
}

.modal-footer {
    background-color: var(--hf-gray-100);
    border-top: 1px solid var(--hf-border-color);
    border-radius: 0 0 var(--hf-border-radius) var(--hf-border-radius);
}

/* ================================================
   ALERTS
   ================================================ */

.alert {
    border-radius: var(--hf-border-radius);
    border: none;
    box-shadow: var(--hf-shadow-sm);
}

.alert-danger {
    background-color: #fef5f4;
    color: var(--hf-danger);
    border-left: 4px solid var(--hf-danger);
}

.alert-warning {
    background: linear-gradient(135deg, var(--hf-gold-light) 0%, #fff5d6 100%);
    color: var(--hf-dark-gray-dark);
    border-left: 4px solid var(--hf-gold);
}

.alert-warning .alert-heading,
.alert-warning strong {
    color: var(--hf-dark-gray-dark);
}

.alert-success {
    background-color: #f0fdf9;
    color: #0e9f6e;
    border-left: 4px solid var(--hf-success);
}

.alert-info {
    background-color: #f0f9ff;
    color: #0284c7;
    border-left: 4px solid var(--hf-info);
}

/* ================================================
   FOOTER
   ================================================ */

.footer {
    background-color: var(--hf-white);
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid var(--hf-border-color);
}

.sticky-footer {
    flex-shrink: 0;
}

.copyright {
    color: var(--hf-gray-600);
    font-size: 0.85rem;
}

/* ================================================
   SCROLL TO TOP BUTTON
   ================================================ */

.scroll-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    background-color: var(--hf-primary);
    color: var(--hf-white);
    border-radius: var(--hf-border-radius);
    display: none;
    opacity: 0;
    text-align: center;
    line-height: 2.75rem;
    box-shadow: var(--hf-shadow);
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out;
    z-index: 1000;
}

.scroll-to-top:hover {
    background-color: var(--hf-primary-light);
    color: var(--hf-white);
    transform: translateY(-2px);
}

.scroll-to-top i {
    font-weight: 600;
}

/* ================================================
   UTILITY CLASSES
   ================================================ */

.rounded {
    border-radius: var(--hf-border-radius) !important;
}

.shadow-sm {
    box-shadow: var(--hf-shadow-sm) !important;
}

.shadow {
    box-shadow: var(--hf-shadow) !important;
}

.shadow-lg {
    box-shadow: var(--hf-shadow-lg) !important;
}

.text-primary {
    color: var(--hf-primary) !important;
}

.text-gray-600 {
    color: var(--hf-gray-600) !important;
}

.text-gray-700 {
    color: var(--hf-gray-700) !important;
}

.text-gray-800 {
    color: var(--hf-gray-800) !important;
}

/* ================================================
   REUSABLE PAGE COMPONENTS
   Used across content pages (search, form review, etc.)
   ================================================ */

/* --- Page Header --- */
.page-header {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    color: var(--hf-white);
    padding: 1.15rem 1.5rem;
    border-radius: 0.625rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header .header-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--hf-primary-dark);
    flex-shrink: 0;
}

.page-header .header-text h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hf-white);
}

.page-header .header-text p {
    margin: 0;
    font-size: 0.78rem;
    opacity: 0.8;
}

/* --- Search Section --- */
.search-section {
    background: var(--hf-gray-100);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--hf-gold);
}

.search-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hf-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-section-title i {
    color: var(--hf-gold);
    font-size: 1rem;
}

.field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--hf-primary);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-search {
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    color: var(--hf-primary-dark);
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(252, 192, 34, 0.25);
    transition: all 0.2s ease;
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(252, 192, 34, 0.35);
    color: var(--hf-primary-dark);
}

/* --- Results Section --- */
.results-section {
    background: var(--hf-white);
    border-radius: 0.625rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--hf-border);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--hf-gray-200);
}

.results-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hf-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-title i {
    color: var(--hf-gold);
}

.results-badge {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-light) 100%);
    color: var(--hf-white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
}

/* --- Data Table --- */
.table-hf {
    font-size: 0.83rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
}

.table-hf thead th {
    background: var(--hf-primary);
    color: var(--hf-white);
    font-weight: 700;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.7rem 0.75rem;
    border: none;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-hf thead th:first-child {
    border-radius: 0.4rem 0 0 0;
}

.table-hf thead th:last-child {
    border-radius: 0 0.4rem 0 0;
}

.table-hf tbody td {
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--hf-gray-200);
    color: var(--hf-dark-gray);
}

.table-hf tbody tr:hover {
    background-color: rgba(4, 58, 82, 0.04);
}

.table-hf tbody tr:last-child td {
    border-bottom: none;
}

/* Action button inside table */
.table-hf .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    border: 1px solid var(--hf-primary);
    color: var(--hf-primary);
    background: transparent;
    transition: all 0.15s ease;
}

.table-hf .btn-action:hover {
    background: var(--hf-primary);
    color: var(--hf-white);
    transform: scale(1.05);
}

/* Pager row */
.table-hf .pager-row td {
    padding: 0.75rem;
    border-top: 2px solid var(--hf-gray-200);
    border-bottom: none;
    background: var(--hf-gray-100);
    border-radius: 0 0 0.4rem 0.4rem;
}

.table-hf .pager-row a,
.table-hf .pager-row span {
    display: inline-block;
    min-width: 2rem;
    height: 2rem;
    line-height: 2rem;
    text-align: center;
    border-radius: 0.375rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0 0.125rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.table-hf .pager-row a {
    color: var(--hf-primary);
    background: var(--hf-white);
    border: 1px solid var(--hf-gray-300);
}

.table-hf .pager-row a:hover {
    background: var(--hf-primary);
    color: var(--hf-white);
    border-color: var(--hf-primary);
}

.table-hf .pager-row span {
    background: var(--hf-primary);
    color: var(--hf-white);
}

/* --- User Info Card (for detail/review pages) --- */
.user-info-card {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    color: var(--hf-white);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(4, 58, 82, 0.2);
}

.user-info-card .user-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--hf-primary-dark);
}

.user-info-card .user-details {
    font-size: 0.8rem;
}

.user-info-card .user-id {
    font-weight: 600;
    opacity: 0.9;
}

.user-info-card .user-name {
    font-weight: 700;
}

/* --- Accordion Menu (for sidebar in detail pages) --- */
.accordion-hf .accordion-item {
    border: none;
    margin-bottom: 0.2rem;
    border-radius: 0.375rem !important;
    overflow: hidden;
}

.accordion-hf .accordion-button {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    color: var(--hf-white);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.7rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.accordion-hf .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    color: var(--hf-white);
    box-shadow: none;
}

.accordion-hf .accordion-button:focus {
    box-shadow: none;
}

.accordion-hf .accordion-button::after {
    filter: brightness(0) invert(1);
}

/* Accordion nav links */
.nav-link-section {
    font-size: 0.8rem;
    color: var(--hf-dark-gray);
    padding: 0.6rem 1rem 0.6rem 1.5rem;
    display: block;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.nav-link-section:hover {
    background-color: var(--hf-gray-100);
    color: var(--hf-primary);
    border-left-color: var(--hf-gold);
}

.nav-link-section.active {
    font-weight: 700;
    background: linear-gradient(90deg, rgba(252,192,34,0.12) 0%, transparent 100%);
    border-left-color: var(--hf-gold);
    color: var(--hf-primary);
}

/* --- Mobile Menu Toggle (detail pages) --- */
.mobile-menu-toggle {
    display: none;
    width: 100%;
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    color: var(--hf-white);
    border: none;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, var(--hf-primary-light) 0%, var(--hf-primary) 100%);
}

/* --- Status Legend (for grids with colored row states) --- */
.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--hf-gray-100);
    border-radius: 0.5rem;
    border: 1px solid var(--hf-gray-200);
}

.status-legend-title {
    width: 100%;
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--hf-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.7rem;
    background: var(--hf-white);
    border-radius: 0.375rem;
    font-size: 0.73rem;
    font-weight: 500;
    color: var(--hf-dark-gray);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.status-legend-item .legend-indicator {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Status Row Colors (left border accent + subtle background) */
.E1 { background-color: #f8f9fa !important; border-left: 4px solid #adb5bd !important; }
.E2 { background-color: rgba(255, 117, 24, 0.08) !important; border-left: 4px solid #ff7518 !important; }
.E3 { background-color: rgba(254, 240, 138, 0.3) !important; border-left: 4px solid #eab308 !important; }
.E4 { background-color: rgba(30, 64, 175, 0.08) !important; border-left: 4px solid #1e40af !important; }
.E5 { background-color: rgba(22, 163, 74, 0.08) !important; border-left: 4px solid #16a34a !important; }
.E6 { background-color: rgba(220, 38, 38, 0.08) !important; border-left: 4px solid #dc2626 !important; }

/* Status Pill Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.73rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-sin-revisar { background-color: #e9ecef; color: #495057; }
.status-en-proceso { background: linear-gradient(135deg, #ff7518, #e56610); color: white; }
.status-devuelto { background: linear-gradient(135deg, #fef08a, #fde047); color: #854d0e; }
.status-reenviado { background: linear-gradient(135deg, #3b82f6, #1e40af); color: white; }
.status-aprobado { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.status-rechazado { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }

/* --- Review Panel (sticky form review/action panel) --- */
.review-panel {
    background: var(--hf-white);
    border-radius: 0.5rem;
    border: 2px solid var(--hf-gold);
    box-shadow: 0 4px 16px rgba(252, 192, 34, 0.15);
    margin-bottom: 1rem;
    overflow: hidden;
}

.review-panel-header {
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    color: var(--hf-primary-dark);
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
}

.review-panel-header .toggle-icon {
    transition: transform 0.2s ease;
}

.review-panel.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.review-panel-body {
    padding: 0.75rem 1rem;
}

.review-panel.collapsed .review-panel-body {
    display: none;
}

.review-compact-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.review-obs-col { flex: 1; min-width: 0; }

.review-actions-col {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex-shrink: 0;
}

.review-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--hf-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.review-label i { color: var(--hf-gold); font-size: 0.65rem; }

.review-textarea {
    border: 1px solid var(--hf-gray-300);
    border-radius: 0.375rem;
    padding: 0.5rem;
    font-size: 0.8rem;
    transition: border-color 0.2s ease;
    resize: none;
}

.review-textarea:focus {
    border-color: var(--hf-gold);
    box-shadow: 0 0 0 3px rgba(252, 192, 34, 0.15);
    outline: none;
}

/* Compact Radio Button List */
.RBL-compact {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.RBL-compact label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: var(--hf-primary);
    font-size: 0.7rem;
    cursor: pointer;
    white-space: nowrap;
}

.RBL label {
    display: inline;
    font-weight: 600;
    color: var(--hf-primary);
    font-size: 0.75rem;
}

.RBL td {
    text-align: left;
    padding: 0.25rem 0.75rem 0.25rem 0;
}

/* --- Action Buttons (review panel, inline actions) --- */
.btn-action-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: none;
    color: var(--hf-white);
}

.btn-action-sm:hover { transform: translateY(-1px); color: var(--hf-white); }
.btn-action-sm i { font-size: 0.75rem; }

.btn-save { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.btn-save:hover { background: linear-gradient(135deg, #0284c7, #0369a1); color: white; }
.btn-reject { background: linear-gradient(135deg, #ef4444, #dc2626); }
.btn-reject:hover { background: linear-gradient(135deg, #dc2626, #b91c1c); color: white; }
.btn-correct { background: linear-gradient(135deg, var(--hf-gold), var(--hf-gold-hover)); color: var(--hf-primary-dark); }
.btn-correct:hover { background: linear-gradient(135deg, var(--hf-gold-hover), #d4a01a); color: var(--hf-primary-dark); }
.btn-approve { background: linear-gradient(135deg, #22c55e, #16a34a); }
.btn-approve:hover { background: linear-gradient(135deg, #16a34a, #15803d); color: white; }

/* Alert Modern */
.alert-modern {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-modern.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}
.alert-modern.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
}
.alert-modern.alert-warning {
    background: linear-gradient(135deg, #FEC221 0%, #fcd34d 100%);
    border-left: 4px solid #d97706;
}
.alert-modern .alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}
.alert-modern.alert-success .alert-icon { color: #059669; }
.alert-modern.alert-danger .alert-icon { color: #dc2626; }
.alert-modern.alert-warning .alert-icon { color: #92400e; }

/* --- Responsive: Review Panel --- */
@media (min-width: 992px) {
    .review-panel-sticky {
        position: sticky;
        top: 0.5rem;
        z-index: 100;
    }
}

@media (max-width: 991.98px) {
    .review-compact-row { flex-direction: column; }
    .review-obs-col { width: 100%; }
    .review-actions-col {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 0.5rem;
    }
    .btn-action-sm { flex: 1; min-width: 120px; }
    .status-legend { justify-content: center; }
}

@media (max-width: 575.98px) {
    .review-actions-col { flex-direction: column; }
    .btn-action-sm { width: 100%; }
}

/* --- Responsive: Page Components --- */
@media (max-width: 991.98px) {
    .page-header {
        padding: 1rem;
    }

    .page-header .header-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .page-header .header-text h4 {
        font-size: 0.95rem;
    }
}

@media (max-width: 767.98px) {
    .page-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .search-section {
        padding: 1rem;
    }

    .btn-search { width: 100%; }

    .results-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .sidebar-wrapper {
        position: static !important;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .user-info-card {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Data Section (Seleccion module cards) --- */
.data-section {
    background: white;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}
.data-section-header {
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.data-section-header i {
    font-size: 1.1rem;
    color: var(--hf-primary-dark);
}
.data-section-header .section-label {
    font-weight: 700;
    color: var(--hf-primary-dark);
    font-size: 0.9rem;
}
.data-section-body {
    padding: 1.25rem;
}

/* --- Indicators Panel --- */
.indicators-panel {
    background: linear-gradient(135deg, rgba(252,192,34,0.1) 0%, rgba(252,192,34,0.05) 100%);
    border: 2px solid var(--hf-gold);
    border-radius: 0.5rem;
    padding: 1rem;
}
.indicators-panel label {
    font-size: 0.8rem;
    color: var(--hf-primary-dark);
    margin-bottom: 0.25rem;
    display: block;
}

/* --- Modal Styling (dark header) --- */
.modal-header-modern {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    color: white;
    border-bottom: none;
}
.modal-header-modern .btn-close {
    filter: brightness(0) invert(1);
}
.modal-header-modern i {
    color: var(--hf-gold);
}
.modal-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hf-primary-dark);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--hf-gold);
}

/* --- Export Card --- */
.export-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.export-card-header {
    background: linear-gradient(135deg, rgba(252,192,34,0.1) 0%, rgba(252,192,34,0.05) 100%);
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--hf-gold);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.export-card-header i {
    color: var(--hf-gold);
    font-size: 1.25rem;
}
.export-card-header h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hf-primary-dark);
}
.export-card-body {
    padding: 1.25rem;
}

/* --- Export Button --- */
.btn-export {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
    transition: all 0.2s ease;
}
.btn-export:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
    color: white;
}
.btn-export i { margin-right: 0.5rem; }

/* --- Save Button (gold) --- */
.btn-save-modern {
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    color: var(--hf-primary-dark);
    border: none;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-save-modern:hover {
    background: linear-gradient(135deg, var(--hf-gold-hover) 0%, #d9a01b 100%);
    color: var(--hf-primary-dark);
}

/* --- Add Button (green) --- */
.btn-add-modern {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
    transition: all 0.2s ease;
}
.btn-add-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
    color: white;
}

/* --- Generate Button (gold, same as search) --- */
.btn-generate {
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    color: var(--hf-primary-dark);
    border: none;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(252, 192, 34, 0.3);
    transition: all 0.2s ease;
}
.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 192, 34, 0.4);
    color: var(--hf-primary-dark);
}

/* --- Section Card (white card with header) --- */
.section-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}
.section-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hf-primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-card-title i { color: var(--hf-gold); }

/* --- Table Container (scrollable) --- */
.table-container {
    max-height: 500px;
    overflow-y: auto;
}

/* --- Section Title in Modal --- */
.section-title-modal {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hf-primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.section-title-modal i { color: var(--hf-gold); }

/* --- Stats Cards (grid) --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.stat-card {
    background: linear-gradient(135deg, var(--hf-light-gray, #f5f7fa) 0%, #e8ecf1 100%);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    border-left: 3px solid var(--hf-gold);
}
.stat-card .stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--hf-gray-600, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hf-primary-dark);
}

/* --- Summary Section (gold border panel) --- */
.summary-section {
    background: linear-gradient(135deg, rgba(252,192,34,0.1) 0%, rgba(252,192,34,0.05) 100%);
    border: 2px solid var(--hf-gold);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

@media (max-width: 767.98px) {
    .export-card-body { padding: 1rem; }
    .btn-export { width: 100%; margin-top: 0.5rem; }
    .data-section-body { padding: 1rem; }
}

/* ================================================
   PORTAL COMPONENTS (used by portalControls)
   ================================================ */

/* --- Portal Section (white card with dark blue header) --- */
.portal-section {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.portal-section-header {
    background: linear-gradient(135deg, var(--hf-primary, #043A52) 0%, var(--hf-primary-dark, #033951) 100%);
    color: white;
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.portal-section-header i {
    color: var(--hf-gold, #FCC022);
}
.portal-section-body {
    padding: 1rem;
}

/* --- Status Current Badge (gold pill for current status) --- */
.status-current-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--hf-gold, #FCC022) 0%, var(--hf-gold-hover, #E0A61D) 100%);
    color: var(--hf-primary-dark, #033951);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* --- Portal Legend (approved/pending/missing indicators) --- */
.portal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}
.portal-legend.standalone {
    border-radius: 0.5rem;
    border-bottom: none;
    margin-bottom: 1rem;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: #495057;
}
.legend-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}
.legend-icon.approved { background: #d1fae5; color: #059669; }
.legend-icon.pending { background: #fef3c7; color: #d97706; }
.legend-icon.missing { background: #fee2e2; color: #dc2626; }

/* --- Status Icon (inline status indicators in tables) --- */
.status-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}
.status-icon.approved { background: #d1fae5; color: #059669; }
.status-icon.pending { background: #fef3c7; color: #d97706; }
.status-icon.missing { background: #fee2e2; color: #dc2626; }

/* ================================================
   FORM COMPONENTS (used by formControls, legalControls)
   ================================================ */

/* --- Form Section (bordered card for form groups) --- */
.form-section {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--hf-gold);
}
.form-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hf-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-section-title i {
    color: var(--hf-gold);
    font-size: 1.1rem;
}

/* --- Field Group --- */
.field-group {
    margin-bottom: 1rem;
}
.field-group:last-child {
    margin-bottom: 0;
}

/* --- Field Label extensions --- */
.field-label .required {
    color: #dc3545;
}
.field-label .readonly-badge {
    font-size: 0.65rem;
    background: #e9ecef;
    color: #6c757d;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* --- Field Hint --- */
.field-hint {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* --- Validation Error --- */
.validation-error {
    color: #dc3545;
    font-size: 0.75rem;
    font-weight: 500;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}
.empty-state i {
    font-size: 2.5rem;
    color: #dee2e6;
    margin-bottom: 0.75rem;
}

/* --- Icon Action Button (inline icon buttons in tables/lists) --- */
.btn-icon-action {
    width: 24px;
    height: 24px;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
}
.btn-icon-action:hover {
    transform: scale(1.15);
    filter: brightness(1.1);
}

/* --- Read-only form controls --- */
.form-control:read-only {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* --- Form Components Responsive --- */
@media (max-width: 767.98px) {
    .form-section {
        padding: 1rem;
    }
}

/* ================================================
   ANIMATIONS
   ================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animated--fade-in {
    animation: fadeIn 0.3s ease-in;
}

.animated--grow-in {
    animation: fadeIn 0.2s ease-in;
}

/* ================================================
   RESPONSIVE UTILITIES
   ================================================ */

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
}

/* ================================================
   ACCESSIBILITY & FOCUS STATES
   ================================================ */

/* Focus visible for keyboard navigation */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible {
    outline: 2px solid var(--hf-gold);
    outline-offset: 2px;
}

/* Skip to content link (accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--hf-gold);
    color: var(--hf-dark-gray-dark);
    padding: 0.5rem 1rem;
    z-index: 9999;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */

@media print {
    .sidebar,
    .topbar,
    .footer,
    .scroll-to-top {
        display: none !important;
    }

    #content {
        margin: 0 !important;
    }
}

/* ================================================
   TOP NAVBAR STYLES (Used by External-Template.Master only)
   Modern Gold & Dark Gray Theme
   ================================================ */

/* Main Navbar */
.navbar-hf {
    background: linear-gradient(135deg, var(--hf-dark-gray) 0%, var(--hf-dark-gray-dark) 100%);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    padding: 0;
    min-height: 64px;
    border-bottom: 3px solid var(--hf-gold);
}

.navbar-hf .container-fluid {
    padding: 0 1rem;
}

.navbar-hf .navbar-brand {
    padding: 0.5rem 0;
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-hf .navbar-brand img {
    height: 44px;
    width: auto;
    filter: brightness(1.05);
    transition: var(--hf-transition);
}

.navbar-hf .navbar-brand:hover img {
    filter: brightness(1.15);
}

/* Mobile Toggle Button */
.navbar-hf .navbar-toggler {
    border: 2px solid var(--hf-gold);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: var(--hf-transition);
}

.navbar-hf .navbar-toggler:hover,
.navbar-hf .navbar-toggler:focus {
    background-color: var(--hf-gold);
    box-shadow: 0 0 0 0.2rem rgba(254, 194, 33, 0.25);
}

.navbar-hf .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FEC221' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

.navbar-hf .navbar-toggler:hover .navbar-toggler-icon,
.navbar-hf .navbar-toggler:focus .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2358595B' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar Links */
.navbar-hf .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    padding: 1rem 0.875rem !important;
    transition: var(--hf-transition);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.03rem;
    position: relative;
    border-radius: 0;
}

.navbar-hf .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--hf-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-hf .nav-link:hover::after,
.navbar-hf .nav-link:focus::after,
.navbar-hf .nav-link.active::after {
    width: 80%;
}

.navbar-hf .nav-link:hover,
.navbar-hf .nav-link:focus {
    color: var(--hf-gold) !important;
    background-color: rgba(254, 194, 33, 0.1);
}

.navbar-hf .nav-link i {
    margin-right: 0.35rem;
    color: var(--hf-gold);
    font-size: 0.9em;
}

/* Dropdown Toggle Arrow */
.navbar-hf .dropdown-toggle::after {
    border-top-color: var(--hf-gold);
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* Dropdown Menu */
.navbar-hf .dropdown-menu {
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    margin-top: 0;
    min-width: 220px;
    border-top: 3px solid var(--hf-gold);
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-hf .dropdown-item {
    color: var(--hf-dark-gray);
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--hf-transition);
    border-left: 3px solid transparent;
}

.navbar-hf .dropdown-item:hover,
.navbar-hf .dropdown-item:focus {
    background-color: var(--hf-gold-light);
    color: var(--hf-dark-gray-dark);
    border-left-color: var(--hf-gold);
    padding-left: 1.5rem;
}

.navbar-hf .dropdown-item i {
    width: 1.25rem;
    margin-right: 0.5rem;
    color: var(--hf-gold);
}

.navbar-hf .dropdown-item .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    vertical-align: middle;
}

.navbar-hf .dropdown-divider {
    margin: 0.5rem 1rem;
    border-color: var(--hf-gray-200);
}

/* Nested Dropdown (Submenu) */
.navbar-hf .dropdown-submenu {
    position: relative;
}

.navbar-hf .dropdown-submenu > .dropdown-menu {
    top: -3px;
    left: 100%;
    margin-top: 0;
    margin-left: 0;
    display: none;
    border-radius: 0.5rem;
}

.navbar-hf .dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.navbar-hf .dropdown-submenu > .dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-hf .dropdown-submenu > .dropdown-item::after {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--hf-gold);
    font-size: 0.75rem;
}

/* User Dropdown */
.navbar-hf .user-dropdown .dropdown-toggle {
    color: var(--hf-white) !important;
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(254, 194, 33, 0.3);
}

.navbar-hf .user-dropdown .dropdown-toggle i {
    color: var(--hf-dark-gray-dark);
}

.navbar-hf .user-dropdown .dropdown-toggle:hover {
    background: linear-gradient(135deg, var(--hf-gold-hover) 0%, #d9a01a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(254, 194, 33, 0.4);
}

.navbar-hf .user-dropdown .dropdown-toggle::after {
    border-top-color: var(--hf-dark-gray-dark);
}

/* ================================================
   MOBILE RESPONSIVE NAVBAR
   ================================================ */

@media (max-width: 991.98px) {
    .navbar-hf {
        padding: 0.5rem 0;
    }

    .navbar-hf .navbar-collapse {
        background: linear-gradient(180deg, var(--hf-dark-gray-dark) 0%, #2d2e30 100%);
        margin: 0.75rem -1rem -0.5rem -1rem;
        padding: 1rem;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        border-top: 1px solid rgba(254, 194, 33, 0.2);
        border-radius: 0 0 0.5rem 0.5rem;
    }

    .navbar-hf .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 0.35rem;
        margin: 0.125rem 0;
    }

    .navbar-hf .nav-link::after {
        display: none;
    }

    .navbar-hf .nav-link:hover,
    .navbar-hf .nav-link:focus {
        background-color: rgba(254, 194, 33, 0.15);
    }

    .navbar-hf .dropdown-menu {
        border: none;
        background-color: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        padding: 0.5rem 0 0.5rem 1rem;
        margin: 0;
        border-radius: 0.35rem;
        border-top: none;
        animation: none;
    }

    .navbar-hf .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
        padding: 0.5rem 1rem;
        border-radius: 0.25rem;
        border-left: none;
    }

    .navbar-hf .dropdown-item:hover,
    .navbar-hf .dropdown-item:focus {
        background-color: rgba(254, 194, 33, 0.2);
        color: var(--hf-gold);
        padding-left: 1rem;
    }

    .navbar-hf .dropdown-item i {
        color: var(--hf-gold);
    }

    .navbar-hf .dropdown-submenu > .dropdown-menu {
        position: static;
        margin-left: 0.5rem;
        display: none;
        background-color: rgba(0, 0, 0, 0.15);
    }

    .navbar-hf .dropdown-submenu.show > .dropdown-menu,
    .navbar-hf .dropdown-submenu:has(.dropdown-menu.show) > .dropdown-menu {
        display: block;
    }

    .navbar-hf .dropdown-divider {
        border-color: rgba(254, 194, 33, 0.15);
        margin: 0.5rem 0;
    }

    .navbar-hf .user-dropdown {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(254, 194, 33, 0.2);
    }

    .navbar-hf .user-dropdown .dropdown-toggle {
        width: 100%;
        text-align: center;
    }
}

/* Extra small devices */
@media (max-width: 575.98px) {
    .navbar-hf .navbar-brand img {
        height: 36px;
    }

    .navbar-hf .nav-link {
        font-size: 0.75rem;
    }

    .navbar-hf .dropdown-item {
        font-size: 0.8rem;
    }
}

/* Content area when using top navbar (no sidebar) */
.content-top-nav {
    padding-top: 84px; /* Account for fixed navbar + border */
    min-height: calc(100vh - 84px);
    background-color: var(--hf-gray-100);
}

/* Footer for top navbar layout */
.footer-hf {
    background: linear-gradient(135deg, var(--hf-dark-gray) 0%, var(--hf-dark-gray-dark) 100%);
    padding: 1.25rem 1.5rem;
    border-top: 3px solid var(--hf-gold);
    margin-top: auto;
}

.footer-hf .copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.footer-hf img {
    filter: brightness(1.1);
}

/* Footer responsive */
@media (max-width: 575.98px) {
    .footer-hf {
        padding: 1rem;
    }

    .footer-hf .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-hf img {
        margin: 0 auto;
    }
}

/* ================================================
   PLATAFORMA-SPECIFIC: USER NAVBAR (Top Navbar)
   Used by userTemplate.Master for logged-in users
   ================================================ */

.user-navbar {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    border-top: 4px solid var(--hf-gold);
    padding: 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.user-navbar .navbar-brand {
    padding: 0.5rem 1rem;
}

.user-navbar .navbar-brand img {
    height: 45px;
    width: auto;
}

.user-navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 1rem;
    transition: all 0.2s ease-in-out;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.03rem;
}

.user-navbar .navbar-nav .nav-link:hover {
    color: var(--hf-white);
    background-color: rgba(254, 194, 33, 0.1);
    border-bottom-color: var(--hf-gold);
}

.user-navbar .navbar-nav .nav-link.active {
    color: var(--hf-gold);
    border-bottom-color: var(--hf-gold);
}

.user-navbar .navbar-nav .nav-link i {
    margin-right: 0.35rem;
    color: var(--hf-gold);
}

.user-navbar .dropdown-menu {
    background: var(--hf-white);
    border: none;
    border-radius: var(--hf-border-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-top: 3px solid var(--hf-gold);
    margin-top: 0;
}

.user-navbar .dropdown-item {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: var(--hf-gray-700);
    transition: all 0.2s ease-in-out;
}

.user-navbar .dropdown-item:hover {
    background-color: var(--hf-gold-light);
    color: var(--hf-dark-gray);
}

.user-navbar .dropdown-item i {
    margin-right: 0.5rem;
    color: var(--hf-gold);
}

.user-content {
    padding-top: 1.5rem;
    min-height: calc(100vh - 70px);
}

@media (max-width: 991.98px) {
    .user-navbar .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

/* ================================================
   PLATAFORMA-SPECIFIC: EXTERNAL TEMPLATE (Login, Registration)
   Used by externalTemplate.Master
   ================================================ */

.external-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--hf-gray-100) 0%, var(--hf-gray-200) 100%);
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
}

.external-header {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    border-top: 4px solid var(--hf-gold);
    padding: 1rem 0;
}

.external-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.external-header .logo img {
    height: 50px;
    width: auto;
}

.external-header .nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 1.5rem;
    letter-spacing: 0.3px;
    transition: color 0.2s ease-in-out;
}

.external-header .nav-links a:hover {
    color: var(--hf-gold);
}

.external-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.external-card {
    background: var(--hf-white);
    border-radius: 1rem;
    box-shadow: var(--hf-shadow-lg);
    overflow: hidden;
    width: 100%;
}

.external-card-header {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.external-card-header h4,
.external-card-header h5 {
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.external-card-header img {
    max-width: 200px;
    height: auto;
}

.external-card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--hf-gold), var(--hf-gold-hover));
}

.external-card-body {
    padding: 1.5rem;
}

.external-card-body .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.external-card-body .form-control,
.external-card-body .input-group-text {
    font-size: 0.85rem;
}

.external-card-body .form-text {
    font-size: 0.75rem;
}

.external-card-body .btn-external.btn-lg {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.external-card-body .text-center a {
    font-size: 0.8rem;
}

.external-footer {
    background: var(--hf-white);
    border-top: 1px solid var(--hf-border);
    padding: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .external-card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .external-header .nav-links {
        display: none;
    }
    .external-header .mobile-toggle {
        display: inline-flex;
    }
}

/* --- External Card Info Variant --- */
.external-card-info {
    background: var(--hf-white);
    border-radius: 1rem;
    box-shadow: var(--hf-shadow-lg);
    overflow: hidden;
    height: 100%;
}

.external-card-info .external-card-header {
    background: linear-gradient(135deg, var(--hf-primary) 0%, var(--hf-primary-dark) 100%);
    padding: 1.25rem 1.5rem;
    text-align: left;
}

.external-card-info .external-card-body {
    padding: 1.5rem;
}

.external-card-info .list-group-item {
    border: none;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    color: var(--hf-gray-700);
}

.external-card-info p {
    font-size: 0.85rem;
}

.external-card-info .list-group-item i {
    color: var(--hf-gold);
}

/* --- External Button (Gold, for login/registration actions) --- */
.btn-external {
    background: linear-gradient(135deg, var(--hf-gold) 0%, var(--hf-gold-hover) 100%);
    color: var(--hf-primary-dark);
    border: none;
    font-weight: 700;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(252, 192, 34, 0.25);
    transition: all 0.2s ease;
}

.btn-external:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(252, 192, 34, 0.35);
    color: var(--hf-primary-dark);
}

.btn-external:active {
    transform: translateY(0);
}

.btn-external:disabled {
    opacity: 0.7;
    transform: none;
}

/* --- Password Toggle --- */
.password-toggle {
    cursor: pointer;
    background: var(--hf-white);
    border: 1px solid var(--hf-gray-300);
    border-left: none;
    color: var(--hf-gray-600);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--hf-primary);
}

/* --- Countdown Widget --- */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.countdown-item {
    background: linear-gradient(145deg, var(--hf-primary), var(--hf-primary-dark));
    border-radius: 10px;
    padding: 1rem 0.75rem;
    min-width: 80px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.countdown-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hf-gold);
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    letter-spacing: 1px;
    font-weight: 600;
}

.countdown-separator {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: var(--hf-gold);
    font-weight: bold;
    padding: 0 0.25rem;
}

@media (max-width: 576px) {
    .countdown-item {
        min-width: 65px;
        padding: 0.75rem 0.5rem;
    }
    .countdown-value {
        font-size: 1.5rem;
    }
    .countdown-label {
        font-size: 0.6rem;
    }
    .countdown-separator {
        font-size: 1.25rem;
    }
}

/* --- Footer Links --- */
.footer-links {
    background: var(--hf-white);
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.footer-links h6 {
    color: var(--hf-primary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--hf-gray-600);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--hf-gold);
}

/* --- Form Section Divider --- */
.form-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--hf-primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--hf-gold), transparent);
}

/* --- Mobile Header Toggle --- */
.external-header .mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--hf-white);
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.external-header .mobile-toggle:hover {
    border-color: var(--hf-gold);
    color: var(--hf-gold);
}

/* ================================================
   PLATAFORMA-SPECIFIC: INLINE UTILITY OVERRIDES
   ================================================ */

.ModalPopupBackground {
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1040;
}

.hidden {
    display: none;
}

.RBL label {
    display: block;
}

.RBL td {
    text-align: center;
    width: 40px;
}

.gridCell {
    font-weight: bold;
}

input:disabled {
    color: var(--hf-gray-600);
}
