/* =====================================================
   ROOT / VARIABLES
===================================================== */

:root {
    /* =====================================================
   MONTSERRAT FONT
===================================================== */

@font-face {

    font-family: 'Montserrat';

    src:
        url('/fonts/Montserrat-Regular.ttf')
        format('truetype');

    font-weight: 400;

    font-style: normal;
}

@font-face {

    font-family: 'Montserrat';

    src:
        url('/fonts/Montserrat-Medium.ttf')
        format('truetype');

    font-weight: 500;

    font-style: normal;
}

@font-face {

    font-family: 'Montserrat';

    src:
        url('/fonts/Montserrat-SemiBold.ttf')
        format('truetype');

    font-weight: 600;

    font-style: normal;
}

@font-face {

    font-family: 'Montserrat';

    src:
        url('/fonts/Montserrat-Bold.ttf')
        format('truetype');

    font-weight: 700;

    font-style: normal;
}

@font-face {

    font-family: 'Montserrat';

    src:
        url('/fonts/Montserrat-ExtraBold.ttf')
        format('truetype');

    font-weight: 800;

    font-style: normal;
}

@font-face {

    font-family: 'Montserrat';

    src:
        url('/fonts/Montserrat-Black.ttf')
        format('truetype');

    font-weight: 900;

    font-style: normal;
}

    --accent: #4f46e5;
    --bg: #f8fafc;

}

/* =====================================================
   BASE
===================================================== */

body {

    background: var(--bg);

    font-family:
        'Montserrat',
        sans-serif;

    font-size: 0.85rem;
}

/* =====================================================
   NAVBAR
===================================================== */

/* =====================================================
   NAVBAR
===================================================== */

.navbar {

    position: relative !important;

    top: auto !important;

    left: auto !important;

    right: auto !important;

    z-index: auto !important;

    background: white;

    border-bottom:
        1px solid #e2e8f0;

    width: 100%;
}

.navbar-logo {

    height: 35px;

    width: auto;

    object-fit: contain;
}

/* =====================================================
   CARDS
===================================================== */

.card {

    border: none;

    border-radius: 12px;

    box-shadow:
        0 4px 6px -1px rgba(0,0,0,0.05);
}

/* =====================================================
   NAV PILLS
===================================================== */

.nav-pills .nav-link {

    color: #64748b;

    font-weight: 600;

    padding: 10px 20px;
}

.nav-pills .nav-link.active {

    background: white;

    color: var(--accent);

    box-shadow:
        0 2px 8px rgba(0,0,0,0.08);
}

/* =====================================================
   STATUS
===================================================== */

.status-badge {

    padding: 3px 8px;

    border-radius: 5px;

    font-weight: 700;

    font-size: 0.65rem;
}

.status-sent {

    background: #dcfce7;

    color: #166534;
}

.status-pending {

    background: #fee2e2;

    color: #991b1b;
}

/* =====================================================
   CANVAS QSL
===================================================== */

#qslCanvas {

    width: 100%;

    border-radius: 8px;

    border: 1px solid #e2e8f0;

    background: #eee;
}

/* =====================================================
   HELPERS
===================================================== */

.border-dashed {

    border: 2px dashed #cbd5e1;

    background: #f1f5f9;
}

.filter-active {

    border: 2px solid var(--accent) !important;

    background-color: #eff6ff;
}

/* =====================================================
   FORMULARIOS
===================================================== */

.form-check-input {

    width: 1.2rem;

    height: 1.2rem;

    cursor: pointer;
}

.control-label {

    font-size: 0.75rem;

    font-weight: 700;

    color: #475569;

    margin-bottom: 4px;

    display: block;
}

/* =====================================================
   LINKS LEGALES
===================================================== */

.legal-link {

    font-size: 0.75rem;

    color: #94a3b8;

    text-decoration: none;

    transition: color 0.2s;
}

.legal-link:hover {

    color: var(--accent);

    text-decoration: underline;
}

/* =====================================================
   BOTÓN FLOTANTE
===================================================== */

.btn-flotante {

    font-size: 16px;

    font-weight: bold;

    color: #ffffff;

    border-radius: 50px;

    letter-spacing: 2px;

    background-color: #25d366;

    padding: 15px 25px;

    position: fixed;

    bottom: 40px;

    right: 40px;

    transition: all 300ms ease 0ms;

    box-shadow:
        0px 8px 15px rgba(0, 0, 0, 0.2);

    z-index: 9999;

    text-decoration: none;

    display: flex;

    align-items: center;

    justify-content: center;
}

.btn-flotante:hover {

    background-color: #128c7e;

    box-shadow:
        0px 15px 20px rgba(0, 0, 0, 0.3);

    transform: translateY(-7px);

    color: #ffffff;
}

/* =====================================================
   TABLAS
===================================================== */

.table-qso {

    min-width: 900px;
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

    /* ---------- BODY ---------- */

    body {

        font-size: 0.95rem;
    }

    .container {

        padding-left: 14px;

        padding-right: 14px;
    }

    .card {

        border-radius: 16px;
    }

    /* ---------- NAVBAR ---------- */

    /* ---------- NAVBAR ---------- */

.navbar {

    position: relative !important;

    top: auto !important;

    padding-top: 10px;

    padding-bottom: 10px;

    backdrop-filter: blur(10px);
}

    .navbar-brand {

        font-size: 1rem;
    }

    .navbar-logo {

        height: 32px;

        width: auto;
    }

    .navbar .container {

        align-items: flex-start;

        gap: 10px;
    }

    /* ---------- FORM SPACING ---------- */

    #qso-form .form-control,
    #qso-form .form-select {

        margin-bottom: 12px;
    }

    #qso-form .row {

        margin-bottom: 0;
    }

    /* ---------- TABS ---------- */

    .mobile-tabs {

        overflow-x: auto;

        overflow-y: hidden;

        flex-wrap: nowrap !important;

        white-space: nowrap;

        width: 100%;

        justify-content: flex-start !important;

        -webkit-overflow-scrolling: touch;

        scrollbar-width: none;

        padding-bottom: 4px;

        scroll-behavior: smooth;

        -webkit-mask-image:
            linear-gradient(
                to right,
                transparent 0,
                black 15px,
                black calc(100% - 15px),
                transparent 100%
            );
    }

    .mobile-tabs::-webkit-scrollbar {

        display: none;
    }

    .mobile-tabs .nav-item {

        flex: 0 0 auto;
    }

    .mobile-tabs .nav-link {

        padding: 10px 16px;

        font-size: 0.85rem;
    }

    /* ---------- FORMULARIOS ---------- */

    .form-control-sm,
    .form-select-sm {

        min-height: 48px;

        font-size: 16px;

        border-radius: 10px;
    }

    .btn-sm {

        min-height: 44px;

        padding: 10px 14px;

        border-radius: 10px;
    }

    .control-label {

        font-size: 0.8rem;
    }

    select {

        font-size: 16px !important;
    }

    /* ---------- TABLAS ---------- */

    .table-responsive-mobile {

        overflow-x: auto;

        overflow-y: hidden;

        -webkit-overflow-scrolling: touch;
    }

    .btn-group .btn {

        min-width: 44px;

        padding: 8px 12px;
    }

    .btn {

        min-height: 44px;
    }

    /* ---------- GAP ---------- */

    .gap-mobile {

        gap: 10px !important;
    }

    /* ---------- BOTÓN FLOTANTE ---------- */

    .btn-flotante {

        padding: 12px 20px;

        bottom: 20px;

        right: 20px;

        font-size: 14px;
    }

    /* ---------- FOOTER ---------- */

    footer .d-flex {

        flex-wrap: wrap;
    }

    footer .btn {

        width: 100%;
    }

}

/* =====================================================
   QSO PREMIUM TABLE
===================================================== */

.qso-premium-table {
    font-size: 0.82rem;
}

.qso-premium-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.qso-premium-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.qso-premium-table tbody tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

.qso-premium-table tbody tr:hover {
    background: #f8fafc;
}

.qso-premium-table .form-select-sm {
    min-width: 118px;
    font-size: 0.72rem;
}

@media (max-width: 768px) {
    .qso-premium-table {
        min-width: 900px;
    }
}

/* =====================================================
   QUICK STATS PREMIUM
===================================================== */

.quick-stat-card {
    min-height: 86px;
}

.quick-stat-label {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
}

.quick-stat-number {
    color: #0f172a;
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

/* =====================================================
   TYPOGRAPHY PREMIUM
===================================================== */

body {

    font-family:
        'Montserrat',
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

/* ---------- HEADER ---------- */

.app-topbar-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.app-topbar small {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b !important;
}

.app-public-link code {
    color: #4f46e5;
    font-size: 0.80rem;
    font-weight: 400;
    font-family:
        Montserrat,
        ui-sans-serif,
        system-ui,
        sans-serif;
    letter-spacing: 0em;
}

/* ---------- FOOTER ---------- */

.app-footer {
    font-size: 0.88rem;
}

.app-footer h6 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.app-footer .small {
    font-size: 0.76rem !important;
    line-height: 1.5;
}

.app-footer .fw-bold {
    letter-spacing: -0.02em;
}

/* ---------- BOTONES ---------- */

.btn {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ---------- BADGES ---------- */

.badge {
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ---------- LINKS ---------- */

.legal-link {
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748b;
}

.legal-link:hover {
    color: #4f46e5;
}

/* ---------- MOBILE ---------- */

@media (max-width: 768px) {

    .app-topbar-title {
        font-size: 0.88rem;
    }

    .app-footer h6 {
        font-size: 0.9rem;
    }

}

/* =====================================================
   PREMIUM TABS
===================================================== */

.premium-tabs-wrap {
    overflow-x: auto;
    padding-bottom: 2px;
}

.premium-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}

.premium-tabs .nav-link {
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 800;
    border-radius: 999px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    white-space: nowrap;
}

.premium-tabs .nav-link:hover {
    background: #eef2ff;
    color: #4f46e5;
}

.premium-tabs .nav-link.active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 4px 12px rgba(15,23,42,0.08);
}

@media (max-width: 768px) {

    .premium-tabs {
        width: max-content;
    }

    .premium-tabs .nav-link {
        padding: 11px 16px;
        font-size: 0.82rem;
    }

}

/* =====================================================
   FILTER HEADER PREMIUM
===================================================== */

.premium-filter-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    margin-bottom: 4px;
}

.premium-tabs .nav-link span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

/* =====================================================
   QSL DESIGN EDITOR PREMIUM
===================================================== */

.qsl-preview-stage {
    background:
        linear-gradient(135deg, #f8fafc 25%, transparent 25%) -12px 0/24px 24px,
        linear-gradient(225deg, #f8fafc 25%, transparent 25%) -12px 0/24px 24px,
        linear-gradient(315deg, #f8fafc 25%, transparent 25%) 0 0/24px 24px,
        linear-gradient(45deg, #f8fafc 25%, #ffffff 25%) 0 0/24px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}

.design-section {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 16px;
}

.design-section:last-of-type {
    border-bottom: none;
}

.design-section-title {
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.design-upload-box {
    display: block;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.design-upload-box:hover {
    background: #eef2ff;
    border-color: #4f46e5;
}

.form-range::-webkit-slider-thumb {
    background: #4f46e5;
}

.form-range::-moz-range-thumb {
    background: #4f46e5;
}

/* =====================================================
   GMAIL PREMIUM
===================================================== */

.gmail-step-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
}

.gmail-step-number {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* =====================================================
   BUSCADOR QSL ORIGINAL MODERNIZADO
===================================================== */

.search-qsl-page{
    background:#f1f5f9;
    color:#0f172a;
}

/* =========================
   CONTENEDORES
========================= */

.card-main{
    border:none;
    border-radius:24px;
    overflow:hidden;
    background:white;
    box-shadow:
        0 10px 25px rgba(15,23,42,.06);
}

/* =========================
   TITULOS
========================= */

.main-title{
    font-size:2.2rem;
    font-weight:900;
    letter-spacing:-.04em;
    color:#0f172a;
}

.main-subtitle{
    color:#64748b;
    font-size:.95rem;
}

/* =========================
   FORMULARIO
========================= */

.form-label{
    font-size:.72rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:#64748b;
}

.form-control,
.form-select{
    height:52px;
    border-radius:14px;
    border:1px solid #dbe3ee;
}

.search-qsl-page .form-label{
    font-size:.72rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:#64748b;
}

.search-qsl-page .form-control,
.search-qsl-page .form-select{
    height:54px;
    border-radius:16px;
    border:1px solid #dbe3ee;
    font-weight:700;
    background:white;
}

.search-qsl-page .form-control:focus,
.search-qsl-page .form-select:focus{
    box-shadow:
        0 0 0 4px rgba(79,70,229,.10);
    border-color:#4f46e5;
}

.btn-search{
    height:56px;
    border:none;
    border-radius:16px;
    font-weight:900;
    letter-spacing:.02em;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #7c3aed
        );

    box-shadow:
        0 12px 24px rgba(79,70,229,.18);

    transition:all .2s ease;
}

.btn-search:hover{
    transform:translateY(-2px);
}

/* =========================
   TABLA
========================= */

.table{
    overflow:hidden;
    border-radius:20px;
}

.table thead{
    background:
        linear-gradient(
            135deg,
            #0f172a,
            #1e293b
        );
}

.table thead th{
    color:#334155;
    border:none;
    padding:16px;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.76rem;
    font-weight:900;
}

.table tbody td{
    padding:18px;
    vertical-align:middle;
    border-bottom:1px solid #eef2f7;
    font-weight:600;
}

.table tbody tr{
    transition:all .15s ease;
}

.table tbody tr:hover{
    background:#f8fafc;
}

/* =========================
   BOTONES ACCIONES
========================= */

.btn-action{
    width:44px;
    height:44px;
    border:none;
    border-radius:14px;

    display:flex;
    align-items:center;
    justify-content:center;

    transition:all .2s ease;
}

.btn-action:hover{
    transform:translateY(-2px);
}

.btn-view{
    background:#2563eb;
    color:white;
}

.btn-download{
    background:#16a34a;
    color:white;
}

.btn-mail{
    background:#f59e0b;
    color:white;
}

/* =========================
   MODAL
========================= */

.modal-content{
    border:none;
    border-radius:28px;
    overflow:hidden;
}

.qsl-preview-img{
    width:100%;
    border-radius:22px;

    box-shadow:
        0 16px 40px rgba(15,23,42,.14);
}

/* =========================
   BANNER PROMO
========================= */

.banner-promo{
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f8fafc
        );

    border-radius:28px;

    padding:40px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:30px;

    border:1px solid #e2e8f0;

    overflow:hidden;
    position:relative;

    box-shadow:
        0 14px 35px rgba(15,23,42,.06);
}

.banner-promo::before{
    content:'';

    position:absolute;

    width:320px;
    height:320px;

    border-radius:50%;

    background:
        rgba(79,70,229,.05);

    top:-140px;
    right:-140px;
}

.banner-info{
    flex:1;
    position:relative;
    z-index:2;
}

.banner-info h5{
    font-size:1.8rem;
    font-weight:900;
    letter-spacing:-.03em;
}

.banner-visual{
    width:250px;
    min-height:230px;

    border-radius:28px;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #7c3aed
        );

    color:white;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    box-shadow:
        0 20px 40px rgba(79,70,229,.20);
}

.banner-visual i{
    font-size:4rem;
}

/* =========================
   FOOTER BANNER
========================= */

.banner-footer{
    background:
        linear-gradient(
            135deg,
            #0f172a,
            #1e293b
        );

    border-radius:28px;

    padding:34px;

    color:white;

    box-shadow:
        0 18px 40px rgba(15,23,42,.10);
}

/* =========================
   FOOTER
========================= */

footer a{
    transition:all .2s ease;
}

footer a:hover{
    color:#4f46e5 !important;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:768px){

    .main-title{
        font-size:1.8rem;
    }

    .banner-promo{
        flex-direction:column;
        text-align:center;
    }

    .banner-visual{
        width:100%;
    }

    .banner-footer{
        text-align:center;
    }

    .btn-mobile{
        width:100%;
    }

}

/* =====================================================
   GMAIL HELP LINK
===================================================== */

.gmail-help-link{
    display:inline-flex;
    align-items:center;
    gap:4px;

    text-decoration:none;

    font-size:.78rem;
    font-weight:800;

    color:#4f46e5;

    transition:all .2s ease;
}

.gmail-help-link:hover{
    color:#4338ca;
    transform:translateX(2px);
}

/* =====================================================
   MOBILE TOAST
===================================================== */

.app-mobile-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 14px 35px rgba(15,23,42,.25);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: all .25s ease;
    white-space: nowrap;
}

.app-mobile-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =====================================================
   CORRECCIÓN LISTADO DE CONTACTOS
===================================================== */

.qso-premium-table thead th {
    color: #334155 !important;
    background: #f8fafc !important;
}