:root {
    --pm-navy: #071d35;
    --pm-navy-2: #0c2b4b;
    --pm-blue: #1677ff;
    --pm-blue-dark: #0d5dd7;
    --pm-text: #10233f;
    --pm-muted: #66758a;
    --pm-border: #e7edf5;
    --pm-bg: #f5f8fc;
    --pm-white: #ffffff;
    --pm-danger: #ff334c;
    --pm-success: #10b981;
    --pm-shadow: 0 14px 35px rgba(22, 44, 78, .10);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body.pm-redesign-page {
    background: var(--pm-bg);
    color: var(--pm-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    overflow-x: hidden;
}

body.pm-redesign-page a { -webkit-tap-highlight-color: transparent; }

.pm-shell {
    min-height: 100vh;
    display: flex;
    width: 100%;
}

.pm-sidebar {
    width: 286px;
    min-width: 286px;
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 110;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(6, 28, 50, .98) 0%, rgba(7, 31, 55, .96) 62%, rgba(7, 25, 46, .98) 100%);
    border-right: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pm-sidebar::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 34%;
    background:
        linear-gradient(180deg, rgba(7, 29, 52, .12), rgba(7, 29, 52, .75)),
        url("/portal-motorista/public/assets/painel-redesign/banner-onibus-portal-motorista.png") 73% center / auto 100% no-repeat;
    opacity: .72;
    pointer-events: none;
}

.pm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 22px 20px;
    color: #fff;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.pm-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 5px 12px rgba(0,0,0,.25));
}

.pm-brand-title {
    font-size: 20px;
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: .2px;
}

.pm-brand-sub {
    display: block;
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.25;
    opacity: .72;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.pm-side-nav {
    padding: 16px 12px;
    display: grid;
    gap: 7px;
    position: relative;
    z-index: 2;
}

.pm-side-link {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 14px;
    border-radius: 13px;
    color: rgba(255,255,255,.90);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.pm-side-link:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
    transform: translateX(2px);
}

.pm-side-link.is-active {
    background: linear-gradient(135deg, #1886ff, #0f69ec);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 105, 236, .35);
}

.pm-side-link img {
    width: 29px;
    height: 29px;
    object-fit: contain;
    flex: 0 0 29px;
}

.pm-side-link.is-active .pm-side-home {
    font-size: 25px;
    width: 29px;
    text-align: center;
}

.pm-side-footer {
    margin-top: auto;
    padding: 0 18px 30px;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255,255,255,.68);
    position: relative;
    z-index: 2;
}

.pm-main {
    width: calc(100% - 286px);
    margin-left: 286px;
    min-width: 0;
}

.pm-topbar {
    height: 78px;
    padding: 13px 28px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #edf1f6;
    position: sticky;
    top: 0;
    z-index: 95;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 3px 18px rgba(16, 35, 63, .04);
    backdrop-filter: blur(12px);
}

.pm-search {
    width: min(720px, 100%);
    height: 48px;
    border-radius: 24px;
    background: #f4f6f9;
    border: 1px solid #edf0f4;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    color: #76869a;
}

.pm-search span { font-size: 19px; }

.pm-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: var(--pm-text);
}

.pm-search input::placeholder { color: #8b98a8; }

.pm-top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 13px;
    white-space: nowrap;
}

.pm-vip {
    border-radius: 22px;
    padding: 9px 15px;
    font-size: 14px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    box-shadow: none;
}

.pm-vip.vip-active {
    color: #08773e;
    background: #dff8e9;
    border: 1px solid #bfeecf;
}

.pm-vip.vip-warning {
    color: #92400e;
    background: #fff3d5;
    border: 1px solid #f9dfa0;
}

.pm-notify {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    border: 1px solid #edf0f4;
    background: #f8fafc;
    display: inline-grid;
    place-items: center;
    text-decoration: none;
    color: var(--pm-text);
    position: relative;
    font-size: 19px;
}

.pm-notify.has-update::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pm-danger);
    border: 2px solid #fff;
    position: absolute;
    right: 1px;
    top: 1px;
}

.pm-logout {
    min-width: 91px;
    height: 44px;
    border-radius: 22px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    background: linear-gradient(135deg, #ff4057, #f52642);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 9px 20px rgba(245, 38, 66, .22);
}

.pm-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 28px 118px;
}

.pm-mobile-top { display: none; }

.pm-hero {
    min-height: 280px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(2,20,39,.93) 0%, rgba(4,27,49,.76) 34%, rgba(4,26,47,.18) 62%, rgba(4,26,47,.06) 100%),
        url("/portal-motorista/public/assets/painel-redesign/banner-onibus-portal-motorista.png") center / cover no-repeat;
    box-shadow: var(--pm-shadow);
    isolation: isolate;
}

.pm-hero-copy {
    width: min(54%, 700px);
    min-height: 280px;
    padding: 32px 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    color: #fff;
}

.pm-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 3.2vw, 56px);
    line-height: .98;
    letter-spacing: -.9px;
    color: #fff;
    font-weight: 900;
}

.pm-hero h1 span {
    display: block;
    color: #1d7fff;
}

.pm-hero p {
    margin: 0;
    max-width: 560px;
    font-size: clamp(16px, 1.45vw, 22px);
    line-height: 1.45;
    color: rgba(255,255,255,.94);
}

.pm-quote {
    margin-top: 18px;
    width: fit-content;
    max-width: 100%;
    background: linear-gradient(135deg, rgba(20,111,239,.96), rgba(10,75,181,.96));
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 25px;
    padding: 9px 15px;
    display: inline-flex;
    gap: 9px;
    align-items: center;
    font-size: 14px;
    font-style: italic;
    font-weight: 700;
    box-shadow: 0 10px 23px rgba(0,0,0,.15);
}

.pm-date-card {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 225px;
    border-radius: 16px;
    padding: 17px 18px;
    color: #fff;
    background: rgba(4,25,46,.82);
    border: 1px solid rgba(255,255,255,.13);
    box-shadow: 0 12px 30px rgba(0,0,0,.23);
    backdrop-filter: blur(8px);
    z-index: 2;
}

.pm-date-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pm-date-row + .pm-date-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.16);
}

.pm-date-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
}

.pm-date-main {
    font-size: 15px;
    font-weight: 900;
    text-transform: capitalize;
}

.pm-date-sub {
    margin-top: 3px;
    font-size: 11px;
    opacity: .82;
}

.pm-upgrade-wrap {
    margin-top: 13px;
}

.pm-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #dc263d;
    font-size: 13px;
    font-weight: 900;
    padding: 9px 13px;
    border-radius: 18px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

.pm-cards {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.pm-card {
    min-height: 176px;
    border-radius: 18px;
    border: 1px solid rgba(16,35,63,.05);
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 120px minmax(0,1fr) 42px;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    color: var(--pm-text);
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(22,44,78,.06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.pm-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(22,44,78,.12);
}

.pm-card::after {
    content: "";
    position: absolute;
    left: 12px;
    bottom: 0;
    height: 4px;
    width: 96px;
    border-radius: 4px 4px 0 0;
    background: var(--pm-accent);
}

.pm-card-config { --pm-accent:#1685ff; background: linear-gradient(135deg,#edf7ff,#dff1ff); }
.pm-card-dev { --pm-accent:#f5a623; background: linear-gradient(135deg,#fff8ed,#fff0d8); }
.pm-card-updates { --pm-accent:#ff3854; background: linear-gradient(135deg,#fff3f4,#ffe4e8); }
.pm-card-reminders { --pm-accent:#10c97a; background: linear-gradient(135deg,#ecfff7,#dcfaec); }
.pm-card-notes { --pm-accent:#8b5cf6; background: linear-gradient(135deg,#f7f1ff,#eee5ff); }
.pm-card-share { --pm-accent:#19b873; background: linear-gradient(135deg,#effff7,#e0faee); }

.pm-card-media {
    display: grid;
    place-items: center;
    height: 118px;
}

.pm-card-media img {
    width: 108px;
    height: 108px;
    object-fit: contain;
    filter: drop-shadow(0 9px 12px rgba(27,49,82,.12));
}

.pm-card-copy h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.1;
    color: #10233f;
    font-weight: 900;
    letter-spacing: -.25px;
}

.pm-card-copy p {
    margin: 0;
    max-width: 320px;
    color: #55687e;
    font-size: 14px;
    line-height: 1.45;
}

.pm-card-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.58);
    display: grid;
    place-items: center;
    font-size: 30px;
    line-height: 1;
    font-weight: 400;
    color: #0f213a;
}

.pm-card.btn-piscando {
    border-color: #ff6073 !important;
}

.pm-card.btn-piscando::after {
    content: "";
    left: 12px;
    right: auto;
    top: auto;
    bottom: 0;
    width: 96px;
    height: 4px;
    border: 0;
    border-radius: 4px 4px 0 0;
    background: var(--pm-accent);
    box-shadow: none;
    transform: none;
}

.pm-admin-shortcut {
    margin-top: 20px;
    min-height: 54px;
    border-radius: 14px;
    background: #15263b;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 800;
    box-shadow: var(--pm-shadow);
}

.pm-no-results {
    display: none;
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
    border-radius: 16px;
    background: #fff;
    border: 1px dashed #cad5e2;
    color: #6c7b8e;
}

/* O modal existente continua funcional, mas recebe acabamento visual compatível. */
.pm-redesign-page .modal-overlay { backdrop-filter: blur(5px); }
.pm-redesign-page .modal-content {
    border: 1px solid rgba(16,35,63,.08);
    box-shadow: 0 24px 70px rgba(5,22,39,.28);
}

/* A barra inferior atual do projeto fica acima do conteúdo. */
.pm-redesign-page .menu-mobile,
.pm-redesign-page nav.menu-mobile,
.pm-redesign-page .bottom-nav,
.pm-redesign-page .mobile-bottom-nav {
    z-index: 500;
}

@media (max-width: 1280px) {
    .pm-card {
        grid-template-columns: 98px minmax(0,1fr) 38px;
    }
    .pm-card-media img {
        width: 92px;
        height: 92px;
    }
    .pm-card-copy h2 { font-size: 19px; }
    .pm-date-card { width: 205px; right: 18px; }
    .pm-hero-copy { width: 58%; padding-left: 28px; }
}

@media (max-width: 1080px) {
    .pm-sidebar { display: none; }
    .pm-main {
        width: 100%;
        margin-left: 0;
    }
    .pm-topbar { display: none; }
    .pm-content {
        padding: 16px 14px 112px;
        max-width: 760px;
    }
    .pm-mobile-top {
        display: block;
        margin-bottom: 16px;
    }
    .pm-mobile-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 58px;
        margin-bottom: 13px;
    }
    .pm-mobile-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
    }
    .pm-mobile-brand img {
        width: 42px;
        height: 42px;
        object-fit: contain;
        border-radius: 11px;
    }
    .pm-mobile-brand strong {
        display: block;
        color: #10233f;
        font-size: 16px;
        line-height: 1.03;
        font-weight: 900;
    }
    .pm-mobile-actions {
        margin-left: auto;
        display: flex;
        gap: 8px;
        align-items: center;
    }
    .pm-mobile-actions .pm-notify,
    .pm-mobile-actions .pm-logout {
        width: 42px;
        min-width: 42px;
        height: 42px;
        border-radius: 13px;
        padding: 0;
        font-size: 0;
    }
    .pm-mobile-actions .pm-notify { font-size: 18px; }
    .pm-mobile-actions .pm-logout::before {
        content: "↪";
        font-size: 24px;
        transform: rotate(180deg);
    }
    .pm-mobile-heading h1 {
        margin: 0;
        color: #10233f;
        font-weight: 900;
        font-size: clamp(30px, 9vw, 43px);
        line-height: .98;
        letter-spacing: -.7px;
    }
    .pm-mobile-heading h1 span {
        display: block;
        color: #1677ff;
    }
    .pm-mobile-heading .pm-vip {
        margin-top: 10px;
    }
    .pm-mobile-heading .pm-upgrade-wrap { margin-top: 10px; }

    .pm-hero {
        min-height: 232px;
        border-radius: 17px;
        background:
            linear-gradient(90deg, rgba(3,24,45,.94) 0%, rgba(4,26,48,.70) 43%, rgba(4,26,48,.08) 72%),
            url("/portal-motorista/public/assets/painel-redesign/banner-onibus-portal-motorista.png") 68% center / cover no-repeat;
    }
    .pm-hero-copy {
        width: 62%;
        min-height: 232px;
        padding: 20px 18px;
        justify-content: center;
    }
    .pm-hero h1 { display: none; }
    .pm-hero p {
        font-size: clamp(16px, 4.4vw, 20px);
        line-height: 1.42;
    }
    .pm-quote {
        margin-top: 12px;
        font-size: 12px;
        line-height: 1.2;
        padding: 8px 11px;
        border-radius: 20px;
    }
    .pm-date-card { display: none; }
    .pm-cards {
        margin-top: 16px;
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .pm-card {
        min-height: 132px;
        border-radius: 16px;
        grid-template-columns: 116px minmax(0,1fr) 38px;
        gap: 7px;
        padding: 12px 12px;
    }
    .pm-card-media { height: 106px; }
    .pm-card-media img {
        width: 104px;
        height: 104px;
    }
    .pm-card-copy h2 {
        margin-bottom: 6px;
        font-size: clamp(19px, 5vw, 25px);
    }
    .pm-card-copy p {
        font-size: clamp(12px, 3.3vw, 15px);
        line-height: 1.35;
    }
    .pm-card-arrow {
        width: 36px;
        height: 36px;
        font-size: 28px;
    }
}

@media (max-width: 520px) {
    .pm-content {
        padding-left: 12px;
        padding-right: 12px;
    }
    .pm-mobile-brand strong { font-size: 15px; }
    .pm-vip {
        min-height: 34px;
        padding: 7px 12px;
        font-size: 12px;
    }
    .pm-hero {
        min-height: 220px;
    }
    .pm-hero-copy {
        width: 65%;
        min-height: 220px;
        padding: 16px 14px;
    }
    .pm-hero p { font-size: 15px; }
    .pm-quote {
        max-width: 220px;
        font-size: 11px;
    }
    .pm-card {
        grid-template-columns: 92px minmax(0,1fr) 34px;
        min-height: 118px;
        padding: 10px;
    }
    .pm-card-media { height: 92px; }
    .pm-card-media img {
        width: 88px;
        height: 88px;
    }
    .pm-card-copy h2 { font-size: 19px; }
    .pm-card-copy p { font-size: 12px; }
    .pm-card-arrow {
        width: 32px;
        height: 32px;
        font-size: 25px;
    }
}

@media (max-width: 380px) {
    .pm-card {
        grid-template-columns: 78px minmax(0,1fr) 30px;
    }
    .pm-card-media img {
        width: 76px;
        height: 76px;
    }
    .pm-card-copy h2 { font-size: 17px; }
    .pm-card-copy p { font-size: 11.5px; }
    .pm-mobile-heading h1 { font-size: 31px; }
}

@media (prefers-reduced-motion: reduce) {
    .pm-card,
    .pm-side-link,
    .btn-piscando {
        animation: none !important;
        transition: none !important;
    }
}

/* portal-owner-admin-section-v1 */
.pm-owner-admin-section{
  margin:26px 0 12px;padding:22px;border-radius:26px;
  display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);
  align-items:center;gap:20px;color:#fff;
  background:radial-gradient(circle at 90% 15%,rgba(255,255,255,.14),transparent 30%),
             linear-gradient(135deg,#071d35 0%,#0c3158 58%,#11548a 100%);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 18px 42px rgba(7,29,53,.16);overflow:hidden
}
.pm-owner-admin-intro,.pm-owner-admin-title-row,.pm-owner-admin-title-row>div,.pm-owner-admin-open>span:first-child{min-width:0}
.pm-owner-admin-badge{display:inline-flex;align-items:center;min-height:28px;padding:5px 11px;margin-bottom:13px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);font-size:11px;font-weight:900;letter-spacing:.06em;color:#d9efff}
.pm-owner-admin-title-row{display:flex;align-items:center;gap:15px}
.pm-owner-admin-shield{width:62px;height:62px;flex:0 0 62px;display:grid;place-items:center;border-radius:19px;font-size:31px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14)}
.pm-owner-admin-section h2{margin:0 0 6px;color:#fff;font-size:clamp(23px,2vw,31px);line-height:1.05;font-weight:900}
.pm-owner-admin-section p{margin:0;color:rgba(255,255,255,.8);font-size:14px;line-height:1.55}
.pm-owner-admin-open{min-height:94px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 18px;border-radius:20px;text-decoration:none!important;color:#0a2745!important;background:#fff;border:1px solid rgba(255,255,255,.82);box-shadow:0 10px 24px rgba(0,0,0,.12)}
.pm-owner-admin-open strong,.pm-owner-admin-open small{display:block}
.pm-owner-admin-open strong{margin-bottom:5px;font-size:15px;font-weight:900}
.pm-owner-admin-open small{color:#60748a;font-size:12px;line-height:1.4}
.pm-owner-admin-arrow{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:50%;background:#eaf5ff;color:#0d6fd1;font-size:29px}
@media(max-width:820px){.pm-owner-admin-section{grid-template-columns:1fr;padding:18px;border-radius:22px}.pm-owner-admin-open{min-height:82px}}
@media(max-width:480px){.pm-owner-admin-section{margin-top:18px;padding:15px;gap:15px}.pm-owner-admin-title-row{align-items:flex-start;gap:11px}.pm-owner-admin-shield{width:50px;height:50px;flex-basis:50px;border-radius:15px;font-size:26px}.pm-owner-admin-section h2{font-size:22px}.pm-owner-admin-open{min-height:76px;padding:14px}.pm-owner-admin-arrow{width:38px;height:38px;flex-basis:38px}}
/* /portal-owner-admin-section-v1 */
