/* =========================================
   VARIABLES
========================================= */

:root {

    --primary: #123b63;
    --primary-dark: #0b2945;
    --primary-light: #eaf1f7;

    --accent: #1f6fae;

    --background: #f4f6f8;
    --surface: #ffffff;

    --text: #1f2933;
    --text-muted: #6b7280;

    --border: #dfe4e8;

    --success: #198754;

    --shadow:
        0 10px 35px rgba(15, 35, 55, 0.08);
}


/* =========================================
   GENERAL
========================================= */

* {
    box-sizing: border-box;
}

body {

    margin: 0;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--background);

    color: var(--text);

    min-height: 100vh;
}


/* =========================================
   CONTENEDOR
========================================= */

.app-container {

    min-height: 100vh;

    display: flex;

    flex-direction: column;
}


/* =========================================
   TOPBAR
========================================= */

.topbar {

    height: 76px;

    background: var(--surface);

    border-bottom: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 5%;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.03);
}


.brand {

    display: flex;

    align-items: center;

    gap: 13px;
}


.brand-logo {

    width: 43px;

    height: 43px;

    border-radius: 8px;

    background: var(--primary);

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 18px;
}


.brand-info {

    display: flex;

    flex-direction: column;
}


.brand-name {

    font-size: 15px;

    font-weight: 700;

    letter-spacing: 1px;

    color: var(--primary);
}


.brand-system {

    font-size: 12px;

    color: var(--text-muted);

    margin-top: 2px;
}


.security-status {

    color: #64748b;

    font-size: 12px;

    display: flex;

    align-items: center;

    gap: 7px;
}


.status-dot {

    width: 7px;

    height: 7px;

    background: #16a34a;

    border-radius: 50%;
}


/* =========================================
   MAIN
========================================= */

.main-content {

    flex: 1;

    width: 100%;

    max-width: 900px;

    margin: auto;

    padding: 55px 20px 35px;
}


/* =========================================
   CARD PRINCIPAL
========================================= */

.scanner-card {

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 14px;

    padding: 38px;

    box-shadow: var(--shadow);
}


/* =========================================
   HEADER
========================================= */

.section-header {

    display: flex;

    align-items: center;

    gap: 17px;

    margin-bottom: 35px;
}


.header-icon {

    width: 55px;

    height: 55px;

    flex-shrink: 0;

    border-radius: 10px;

    background: var(--primary-light);

    color: var(--primary);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;
}


.section-header h1 {

    margin: 0;

    font-size: 25px;

    font-weight: 700;

    color: var(--primary-dark);
}


.section-header p {

    margin: 5px 0 0;

    color: var(--text-muted);

    font-size: 14px;
}


/* =========================================
   SCANNER
========================================= */

.scanner-container {

    width: 100%;

    min-height: 310px;

    border: 2px dashed #cbd5df;

    border-radius: 12px;

    background:
        linear-gradient(
            145deg,
            #f8fafc,
            #f1f5f9
        );

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;
}


.scanner-placeholder {

    padding: 35px 20px;
}


.scanner-icon {

    width: 72px;

    height: 72px;

    margin: 0 auto 18px;

    border-radius: 14px;

    background: white;

    color: var(--primary);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 32px;

    box-shadow:
        0 5px 20px rgba(0,0,0,.06);
}


.scanner-placeholder h2 {

    font-size: 19px;

    font-weight: 700;

    color: var(--primary-dark);

    margin-bottom: 8px;
}


.scanner-placeholder p {

    color: var(--text-muted);

    font-size: 14px;

    margin-bottom: 22px;
}


/* =========================================
   BOTÓN ESCANEAR
========================================= */

.btn-scan {

    background: var(--primary);

    border-color: var(--primary);

    padding: 11px 24px;

    border-radius: 7px;

    font-weight: 600;

    font-size: 14px;
}


.btn-scan:hover {

    background: var(--primary-dark);

    border-color: var(--primary-dark);
}


/* =========================================
   RESULTADO QR
========================================= */

.scanner-result {

    margin-top: 20px;

    padding: 15px 18px;

    background: #f0fdf4;

    border: 1px solid #bbf7d0;

    border-radius: 9px;

    display: flex;

    align-items: center;

    gap: 13px;
}


.result-icon {

    width: 38px;

    height: 38px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;
}


.result-icon.success {

    background: #dcfce7;

    color: var(--success);
}


.result-label {

    display: block;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: .6px;

    color: #64748b;
}


#qr-value {

    display: block;

    color: #166534;

    margin-top: 2px;
}


/* =========================================
   SEPARADOR
========================================= */

.separator {

    display: flex;

    align-items: center;

    gap: 15px;

    margin: 34px 0;
}


.separator::before,
.separator::after {

    content: "";

    height: 1px;

    background: var(--border);

    flex: 1;
}


.separator span {

    color: #94a3b8;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1px;
}


/* =========================================
   BÚSQUEDA MANUAL
========================================= */

.manual-search {

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 22px;

    background: #fafbfc;
}


.manual-header {

    display: flex;

    gap: 13px;

    align-items: center;

    margin-bottom: 17px;
}


.manual-icon {

    width: 40px;

    height: 40px;

    border-radius: 8px;

    background: white;

    border: 1px solid var(--border);

    color: var(--primary);

    display: flex;

    align-items: center;

    justify-content: center;
}


.manual-header h3 {

    margin: 0;

    font-size: 15px;

    color: var(--primary-dark);

    font-weight: 700;
}


.manual-header p {

    margin: 3px 0 0;

    color: var(--text-muted);

    font-size: 12px;
}


#manual-search-form {

    display: flex;

    gap: 10px;
}


.input-group-custom {

    flex: 1;

    position: relative;
}


.input-group-custom i {

    position: absolute;

    left: 14px;

    top: 50%;

    transform: translateY(-50%);

    color: #94a3b8;
}


.input-group-custom input {

    width: 100%;

    height: 47px;

    border: 1px solid var(--border);

    border-radius: 7px;

    padding: 0 15px 0 42px;

    font-size: 14px;

    outline: none;

    background: white;

    transition: .2s;
}


.input-group-custom input:focus {

    border-color: var(--accent);

    box-shadow:
        0 0 0 3px rgba(31,111,174,.10);
}


.btn-search {

    height: 47px;

    padding: 0 22px;

    background: var(--primary);

    border: 0;

    border-radius: 7px;

    color: white;

    font-weight: 600;
}


.btn-search:hover {

    background: var(--primary-dark);

    color: white;
}


/* =========================================
   INFORMACIÓN
========================================= */

.system-information {

    display: flex;

    justify-content: center;

    gap: 35px;

    margin-top: 25px;

    color: #7b8794;

    font-size: 11px;
}


.system-information div {

    display: flex;

    align-items: center;

    gap: 6px;
}


.system-information i {

    color: var(--primary);
}


/* =========================================
   FOOTER
========================================= */

.footer {

    height: 55px;

    border-top: 1px solid var(--border);

    background: white;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 15px;

    color: #94a3b8;

    font-size: 11px;
}


/* =========================================
   MODAL
========================================= */

.scanner-modal {

    border: 0;

    border-radius: 12px;

    overflow: hidden;
}


.scanner-modal .modal-header {

    padding: 18px 22px;

    border-bottom: 1px solid var(--border);
}


.modal-kicker {

    display: block;

    color: var(--accent);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.3px;

    margin-bottom: 3px;
}


.modal-title {

    color: var(--primary-dark);

    font-weight: 700;

    font-size: 18px;
}


.scanner-modal .modal-body {

    padding: 20px;

    background: #111827;
}


.qr-reader {

    width: 100%;

    max-width: 550px;

    margin: auto;

    overflow: hidden;

    border-radius: 8px;
}


.camera-message {

    color: #cbd5e1;

    text-align: center;

    font-size: 12px;

    margin-top: 15px;

    display: flex;

    justify-content: center;

    gap: 7px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

    .topbar {

        height: 68px;

        padding: 0 18px;
    }


    .brand-system {

        display: none;
    }


    .security-status {

        font-size: 10px;
    }


    .main-content {

        padding: 25px 12px;
    }


    .scanner-card {

        padding: 22px 16px;

        border-radius: 10px;
    }


    .section-header {

        align-items: flex-start;

        margin-bottom: 25px;
    }


    .header-icon {

        width: 45px;

        height: 45px;

        font-size: 18px;
    }


    .section-header h1 {

        font-size: 20px;
    }


    .section-header p {

        font-size: 12px;
    }


    .scanner-container {

        min-height: 270px;
    }


    .manual-search {

        padding: 16px;
    }


    #manual-search-form {

        flex-direction: column;
    }


    .btn-search {

        width: 100%;
    }


    .system-information {

        flex-direction: column;

        align-items: center;

        gap: 8px;

        margin-top: 18px;
    }


    .footer {

        height: 48px;
    }

}


/* =========================================
   TELÉFONO PEQUEÑO
========================================= */

@media (max-width: 400px) {

    .brand-name {

        font-size: 13px;
    }


    .scanner-placeholder {

        padding: 25px 12px;
    }


    .scanner-icon {

        width: 60px;

        height: 60px;

        font-size: 27px;
    }


    .scanner-placeholder h2 {

        font-size: 17px;
    }

}
.alert-container {
    margin-bottom: 20px;
}

.alert-container .alert {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 9px;
    padding: 14px 17px;
    margin: 0;
}

.alert-container .alert > i {
    font-size: 21px;
}

.alert-container .alert div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alert-container .alert strong {
    font-size: 13px;
}

.alert-container .alert span {
    font-size: 12px;
}