/*
 * Expreso Loma Grande · Ajustes visuales 3.0
 * Se carga después de app.css y design-v2.css.
 * Solo modifica presentación; no cambia consultas, rutas ni lógica PHP.
 */

/* Logo oficial */
.sidebar-brand img {
    width: 205px;
    max-height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 5px 11px rgba(0, 0, 0, .20));
}
.topbar-brand-mobile img {
    object-fit: contain;
}

/* Dashboard más compacto en PC/notebook */
@media (min-width: 861px) {
    .topbar {
        min-height: 72px;
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .content {
        padding-top: 14px;
        padding-bottom: 18px;
    }

    .live-toolbar {
        min-height: 30px;
        margin-bottom: 10px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .dashboard-kpis {
        gap: 10px;
        margin-bottom: 10px;
    }

    .dashboard-kpi {
        min-height: 100px;
        padding: 13px 14px;
        gap: 10px;
    }

    .dashboard-kpi-icon {
        width: 39px;
        height: 39px;
        font-size: 22px;
    }

    .dashboard-kpi-copy strong {
        margin: 7px 0 6px;
        font-size: clamp(18px, 1.35vw, 23px);
    }

    .company-hero {
        min-height: 164px;
        margin-bottom: 10px;
        background-position: center 57%;
    }

    .company-hero-copy {
        width: min(560px, 56%);
        padding: 19px 28px 15px;
    }

    .company-hero-kicker {
        font-size: 8px;
    }

    .company-hero h2 {
        margin: 6px 0;
        font-size: clamp(23px, 2vw, 30px);
    }

    .company-hero p {
        max-width: 420px;
        font-size: 12px;
        line-height: 1.4;
    }

    .hero-info-row {
        margin-top: 13px;
        padding: 7px 8px;
    }

    .hero-info-row > div {
        grid-template-columns: 21px 1fr;
        padding-left: 11px;
        padding-right: 11px;
    }

    .hero-info-row span {
        font-size: 18px;
    }

    .dashboard-alert-strip {
        gap: 8px;
        margin-bottom: 10px;
    }

    .alert-chip {
        padding: 8px 10px;
    }

    .dashboard-main-grid {
        gap: 10px;
        margin-bottom: 10px;
    }

    .dashboard-card {
        padding: 13px 14px;
    }

    .dashboard-card-header {
        margin-bottom: 8px;
    }

    .dashboard-card-header > div > strong {
        font-size: 18px;
    }

    .line-chart-wrap {
        min-height: 170px;
    }

    .line-chart {
        height: 150px;
    }

    .passenger-bars {
        min-height: 173px;
        padding-top: 10px;
    }

    .passenger-bar-item {
        height: 160px;
    }

    .dashboard-recent-table .data-table th,
    .dashboard-recent-table .data-table td {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .dashboard-shortcuts {
        gap: 9px;
    }

    .dashboard-shortcuts > a {
        min-height: 78px;
        padding: 10px 12px;
    }

    .app-footer {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* Mantener proporciones cómodas en pantallas intermedias */
@media (min-width: 861px) and (max-width: 1500px) {
    .company-hero {
        min-height: 154px;
    }

    .company-hero-copy {
        padding-top: 17px;
    }

    .dashboard-kpi:nth-child(4),
    .dashboard-kpi:nth-child(5) {
        min-height: 94px;
    }
}

/* Dashboard móvil más corto y legible */
@media (max-width: 860px) {
    .sidebar-brand img {
        width: 204px;
        max-height: 62px;
    }

    .topbar-brand-mobile img {
        width: 144px;
        height: 39px;
    }

    .content {
        padding-top: 10px;
    }

    .company-hero {
        min-height: 166px;
        background-position: 66% center;
    }

    .company-hero-copy {
        padding-top: 16px;
        padding-bottom: 12px;
    }

    .company-hero h2 {
        font-size: 21px;
    }

    .hero-info-row {
        margin-top: 12px;
    }
}

@media (max-width: 620px) {
    .company-hero {
        min-height: 158px;
        background-size: auto 100%;
        background-position: 64% center;
    }

    .company-hero-copy {
        padding: 14px 14px 10px;
    }

    .company-hero h2 {
        max-width: 205px;
        font-size: 19px;
    }

    .company-hero p {
        max-width: 210px;
        font-size: 9px;
    }

    .hero-info-row {
        margin-top: 10px;
        padding: 6px;
    }

    .dashboard-kpi {
        min-height: 96px;
    }

    .dashboard-kpi:last-child {
        min-height: 72px;
    }
}

/* ===== Login 3.0 ===== */
.login-page-v3 {
    min-height: 100svh;
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    gap: 12px;
    padding: 24px;
    background:
        radial-gradient(circle at 13% 18%, rgba(27, 91, 219, .13), transparent 30%),
        radial-gradient(circle at 88% 80%, rgba(6, 32, 94, .08), transparent 32%),
        #f4f7fb;
}

.login-shell-v3 {
    width: min(1120px, 100%);
    min-height: 610px;
    display: grid;
    grid-template-columns: minmax(390px, .82fr) minmax(460px, 1.18fr);
    overflow: hidden;
    border: 1px solid #dfe6f0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(11, 37, 86, .16);
}

.login-brand-v3 {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: 38px 38px 32px;
    color: #fff;
    background:
        radial-gradient(circle at 70% 22%, rgba(27, 103, 244, .23), transparent 30%),
        linear-gradient(145deg, #04143f, #061d56 58%, #082766);
}

.login-brand-header {
    min-width: 0;
}

.login-official-logo {
    width: min(340px, 100%);
    height: auto;
    display: block;
    filter: drop-shadow(0 9px 18px rgba(0, 0, 0, .24));
}

.login-brand-copy {
    margin-top: 25px;
}

.login-brand-line {
    width: 52px;
    height: 3px;
    display: block;
    border-radius: 999px;
    background: #f4bb12;
}

.login-brand-eyebrow {
    margin: 18px 0 8px !important;
    color: #f4c937 !important;
    font-size: 9px !important;
    font-weight: 850;
    letter-spacing: .16em;
}

.login-brand-v3 h1 {
    max-width: 430px;
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(29px, 3vw, 40px);
    line-height: 1.08;
}

.login-brand-v3 .login-brand-copy > p:last-child {
    max-width: 420px;
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    line-height: 1.55;
}

.login-bus-photo {
    position: relative;
    height: 245px;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 17px;
    background: #06143d;
    box-shadow: 0 18px 35px rgba(0, 0, 0, .24);
}

.login-bus-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 48%, rgba(1, 9, 29, .82) 100%);
}

.login-bus-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 58%;
}

.login-bus-photo figcaption {
    position: absolute;
    left: 17px;
    bottom: 14px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .9);
    font-size: 11px;
    font-weight: 750;
}

.login-photo-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27d776;
    box-shadow: 0 0 0 4px rgba(39, 215, 118, .18);
}

.login-card-v3 {
    min-width: 0;
    display: grid;
    place-items: center;
    padding: 44px 54px;
    background:
        radial-gradient(circle at 100% 0, rgba(32, 97, 222, .045), transparent 30%),
        #fff;
}

.login-card-inner {
    width: min(480px, 100%);
}

.login-card-header-v3 {
    margin-bottom: 26px;
    text-align: center;
}

.login-user-badge {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    border-radius: 50%;
    color: #174fae;
    background: linear-gradient(145deg, #eef4ff, #dde8fb);
    box-shadow: inset 0 0 0 7px #f8fbff;
}

.login-user-badge svg,
.login-input-icon svg,
.login-submit svg,
.login-security svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-user-badge svg {
    width: 31px;
    height: 31px;
}

.login-card-kicker {
    margin: 0 0 7px !important;
    color: #1b5bd6 !important;
    font-size: 9px !important;
    font-weight: 850;
    letter-spacing: .15em;
}

.login-card-v3 h2 {
    margin: 0 0 7px;
    color: #101d35;
    font-size: 29px;
}

.login-card-header-v3 > p:last-child {
    margin: 0;
    color: #788499;
    font-size: 13px;
}

.login-form-v3 label {
    margin-top: 16px;
    margin-bottom: 7px;
    color: #33435e;
    font-size: 12px;
}

.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    color: #8ca0c1;
    pointer-events: none;
}

.login-input-icon svg {
    width: 19px;
    height: 19px;
}

.login-input-wrap input {
    min-height: 50px;
    padding-left: 44px;
    border-color: #d8e1ed;
    border-radius: 11px;
    background: #fbfcfe;
    color: #17233a;
}

.login-input-wrap input::placeholder {
    color: #9ba7ba;
}

.login-input-wrap input:focus {
    border-color: #2365e8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(35, 101, 232, .10);
}

.login-input-wrap.password-field input {
    padding-right: 82px;
}

.password-toggle-v3 {
    right: 10px;
    color: #215ac4;
    font-size: 10px;
}

.login-submit {
    min-height: 50px;
    margin-top: 23px;
    border-radius: 11px;
    font-size: 12px;
    background: linear-gradient(135deg, #0b4fd4, #176df4);
    box-shadow: 0 11px 24px rgba(14, 83, 216, .22);
}

.login-submit svg {
    width: 17px;
    height: 17px;
}

.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e8edf4;
    color: #52617a;
    text-align: left;
}

.login-security > span {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #2e65c7;
    background: #eef4ff;
}

.login-security svg {
    width: 19px;
    height: 19px;
}

.login-security strong,
.login-security small {
    display: block;
}

.login-security strong {
    color: #263650;
    font-size: 11px;
}

.login-security small {
    margin-top: 2px;
    color: #8490a3;
    font-size: 9px;
}

.login-footer-v3 {
    color: #758197;
    font-size: 10px;
    text-align: center;
}

/* Tablet */
@media (max-width: 940px) {
    .login-page-v3 {
        padding: 18px;
    }

    .login-shell-v3 {
        grid-template-columns: minmax(330px, .8fr) minmax(410px, 1.2fr);
        min-height: 570px;
    }

    .login-brand-v3 {
        padding: 30px 27px 26px;
    }

    .login-bus-photo {
        height: 220px;
    }

    .login-card-v3 {
        padding: 38px 34px;
    }
}

/* Celular: foto compacta arriba y formulario cómodo */
@media (max-width: 760px) {
    .login-page-v3 {
        display: block;
        padding: 12px;
    }

    .login-shell-v3 {
        min-height: 0;
        grid-template-columns: 1fr;
        border-radius: 19px;
    }

    .login-brand-v3 {
        gap: 12px;
        padding: 18px;
        background:
            radial-gradient(circle at 80% 0, rgba(28, 106, 250, .25), transparent 38%),
            linear-gradient(145deg, #04143f, #061f5e);
    }

    .login-official-logo {
        width: 245px;
        max-width: 78%;
        margin: 0 auto;
    }

    .login-brand-copy {
        display: none;
    }

    .login-bus-photo {
        height: 148px;
        border-radius: 13px;
    }

    .login-bus-photo img {
        object-position: center 52%;
    }

    .login-bus-photo figcaption {
        left: 13px;
        bottom: 11px;
        font-size: 9px;
    }

    .login-card-v3 {
        padding: 25px 20px 22px;
    }

    .login-card-header-v3 {
        margin-bottom: 19px;
    }

    .login-user-badge {
        width: 53px;
        height: 53px;
        margin-bottom: 11px;
    }

    .login-user-badge svg {
        width: 25px;
        height: 25px;
    }

    .login-card-v3 h2 {
        font-size: 24px;
    }

    .login-input-wrap input {
        min-height: 48px;
    }

    .login-submit {
        min-height: 48px;
    }

    .login-security {
        margin-top: 20px;
        padding-top: 16px;
    }

    .login-footer-v3 {
        padding: 12px 4px 2px;
    }
}

@media (max-width: 390px) {
    .login-page-v3 {
        padding: 8px;
    }

    .login-brand-v3 {
        padding: 13px;
    }

    .login-official-logo {
        width: 215px;
    }

    .login-bus-photo {
        height: 126px;
    }

    .login-card-v3 {
        padding: 21px 16px 18px;
    }

    .login-card-v3 h2 {
        font-size: 22px;
    }
}
