/* =========================================================
   NexCargo - style.css organizado
   Objetivo: estilos globais compartilhados entre telas mobile/PWA,
   popups, formulários, botões, feedbacks e menus.
   ========================================================= */

/* =========================================================
   1. TOKENS / VARIÁVEIS
   ========================================================= */
:root {
    --brand-orange: #1A3651; /* compatibilidade: variável antiga agora representa o azul NexCargo */
    --bg-main: #E2E8F0;
    --bg-panel: #FFFFFF;
    --bg-soft: #FFFFFF;
    --green-ok: #2FCA62;
    --text-main: #1A3651;
    --text-soft: #4A5568;
    --danger-soft: #E97070;
    --danger-bg: #F07A7A;
    --line-soft: rgba(26, 54, 81, 0.14);
    --shadow-soft: 0 12px 32px rgba(26, 54, 81, 0.14);
    --radius-lg: 14px;
    --radius-md: 10px;
    --on-primary: #FFFFFF;
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: Arial, Helvetica, sans-serif;
}

body {
    overflow-x: hidden;
}

.hidden,
.hidden-submit-holder {
    display: none !important;
}

/* =========================================================
   3. BASE DE TELAS / CONTAINER MOBILE
   ========================================================= */
.mobile-shell,
.screen-shell {
    min-height: 100vh;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
}

.screen-content.narrow-content {
    flex: 1;
    padding: 16px 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

@media (min-width: 700px) {
    .mobile-shell,
    .screen-shell {
        width: min(100%, 480px);
        max-width: 480px;
        margin: 0 auto;
        min-height: 100dvh;
    }
}

/* =========================================================
   4. TOPO PADRÃO / BRAND
   ========================================================= */
.compact-header {
    padding: 10px 12px 8px;
    background: var(--bg-main);
    border: none;
    box-shadow: none;
    margin: 0;
}

.app-header-top,
.header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.header-action-left,
.header-action-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-action-left {
    flex: 1;
    min-width: 0;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #1A3651;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-orange);
    font-size: 20px;
    font-weight: 700;
}

.app-brand-text h1 {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.2px;
}

.app-brand-text .pallet-word,
.pallet-word {
    color: var(--brand-orange);
}

.app-brand-text .go-word,
.go-word {
    color: var(--text-main);
}

.app-user-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #1A3651;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 18px;
}

.screen-subheader {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.back-mini {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    background: #1A3651;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.screen-subheader-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.screen-subheader-text strong {
    font-size: 14px;
    color: var(--text-main);
}

.screen-subheader-text span {
    font-size: 12px;
    color: var(--text-soft);
}

/* =========================================================
   5. DROPDOWN / MENU HEADER
   Mantém compatibilidade com as duas estruturas usadas no projeto:
   .dropdown-panel e .header-dropdown.
   ========================================================= */
.dropdown-wrapper,
.dropdown-anchor {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-wrapper-right,
.dropdown-anchor-right {
    justify-content: flex-end;
}

.header-icon-button,
.header-user-button {
    border: none;
    outline: none;
    cursor: pointer;
    background: #1A3651;
    color: var(--text-main);
    position: relative;
    z-index: 2;
}

.header-icon-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.header-user-button {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 150px;
}

.header-user-name {
    font-size: 13px;
    font-weight: 700;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-panel,
.header-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #FFFFFF;
    border: 1px solid rgba(26, 54, 81, 0.12);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    z-index: 30;
}

.dropdown-panel-right,
.user-dropdown {
    right: 0;
    left: auto;
}

.dropdown-panel.show,
.header-dropdown.show {
    display: block;
}

.dropdown-panel a,
.header-dropdown a {
    display: block;
    padding: 14px 16px;
    color: var(--text-main);
    text-decoration: none;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(26, 54, 81, 0.08);
}

.dropdown-panel a:last-child,
.header-dropdown a:last-child {
    border-bottom: none;
}

.dropdown-panel a:hover,
.header-dropdown a:hover {
    background: rgba(26, 54, 81, 0.06);
}

.dropdown-user-info {
    padding: 14px 16px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid rgba(26, 54, 81, 0.08);
}

.dropdown-user-info strong {
    font-size: 14px;
    color: var(--text-main);
}

.dropdown-user-info span {
    font-size: 12px;
    color: var(--text-soft);
}

.header-dropdown-area {
    display: none !important;
}

/* =========================================================
   6. FORMULÁRIOS
   ========================================================= */
.uma-form-screen,
.operacao-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.screen-field-block,
.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.screen-field-block label,
.input-group label {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.screen-field-block input,
.input-group input,
.input-group select {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    border: 2px solid var(--brand-orange);
    background: var(--bg-main);
    color: var(--text-main);
    padding: 0 14px;
    font-size: 14px;
    outline: none;
}

.screen-field-block input::placeholder,
.input-group input::placeholder {
    color: #4A5568;
}

.screen-field-block input:focus,
.input-group input:focus,
.input-group select:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 2px rgba(214, 121, 64, 0.15);
}

/* =========================================================
   7. BOTÕES / AÇÕES
   ========================================================= */
.bottom-primary-btn,
.bottom-danger-btn,
.btn-login,
.btn-secondary {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.2px;
    cursor: pointer;
    border: 2px solid rgba(26, 54, 81, 0.22);
}

.bottom-primary-btn,
.btn-login {
    background: #1A3651;
    color: var(--text-main);
}

.bottom-danger-btn {
    background: var(--danger-bg);
    color: var(--text-main);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
}

.cta-orange-btn {
    width: 100%;
    min-height: 74px;
    border: none;
    border-radius: 14px;
    background: var(--brand-orange);
    color: var(--text-main);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 8px;
}

.actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.actions-right {
    justify-content: flex-end;
}

.center-actions {
    justify-content: center;
}

/* =========================================================
   8. LOGIN
   ========================================================= */
.login-screen-content {
    justify-content: flex-start;
    padding-top: 24px;
}

.login-brand-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 26px;
    text-align: center;
}

.login-brand-square {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: #1A3651;
    color: var(--brand-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 14px;
}

.login-brand-center h2 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 8px;
}

.login-brand-center p {
    font-size: 15px;
    color: var(--text-main);
}

.local-login-box {
    width: 100%;
    min-height: 68px;
    background: var(--bg-panel);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.local-login-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.local-login-text strong {
    color: var(--text-main);
    font-size: 14px;
}

.local-login-text span {
    color: var(--text-soft);
    font-size: 13px;
}

/* Toggle switch usado no login e parâmetros */
.switch {
    position: relative;
    width: 52px;
    height: 30px;
    display: inline-block;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #4A5568;
    border-radius: 999px;
    transition: 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 4px;
    top: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .slider {
    background: var(--brand-orange);
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* =========================================================
   9. MENU / DASHBOARD
   ========================================================= */
.screen-menu-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: #1A3651;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.hello-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    margin-bottom: 18px;
}

.hello-block strong {
    font-size: 28px;
    color: var(--text-main);
    font-weight: 800;
}

.hello-block span {
    font-size: 15px;
    color: var(--text-soft);
}

.menu-action-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.orange-action-button {
    width: 100%;
    min-height: 96px;
    border-radius: 18px;
    background: var(--brand-orange);
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
}

.orange-action-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.orange-action-text strong {
    font-size: 18px;
    font-weight: 800;
}

.orange-action-text span {
    font-size: 14px;
    color: var(--text-main);
}

.orange-action-play {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(243, 247, 248, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

/* =========================================================
   10. BADGES / STATUS / FEEDBACK INLINE
   ========================================================= */
.type-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--line-soft);
    background: #4A5568;
    color: var(--green-ok);
    font-size: 12px;
    font-weight: 800;
    width: fit-content;
    max-width: 100%;
    text-transform: uppercase;
}

.type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-ok);
}

.feedback-inline {
    width: 100%;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.feedback-success {
    background: rgba(47, 202, 98, 0.14);
    border: 1px solid rgba(47, 202, 98, 0.35);
    color: var(--text-main);
}

.feedback-error {
    background: rgba(233, 112, 112, 0.16);
    border: 1px solid rgba(233, 112, 112, 0.35);
    color: var(--text-main);
}

/* =========================================================
   11. TELAS DE ERRO / SUCESSO / AVISO
   ========================================================= */
.error-banner-full,
.success-banner-full,
.warning-banner-full {
    color: var(--text-main);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 0;
    margin: 0 -12px;
}

.error-banner-full {
    background: var(--danger-bg);
}

.success-banner-full {
    background: rgba(47, 202, 98, 0.18);
    border-top: 1px solid rgba(47, 202, 98, 0.28);
    border-bottom: 1px solid rgba(47, 202, 98, 0.28);
}

.warning-banner-full {
    background: rgba(214, 121, 64, 0.18);
    border-top: 1px solid rgba(214, 121, 64, 0.28);
    border-bottom: 1px solid rgba(214, 121, 64, 0.28);
}

.error-banner-full strong,
.success-banner-full strong,
.warning-banner-full strong {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.error-banner-full span,
.success-banner-full span,
.warning-banner-full span {
    font-size: 14px;
    color: var(--text-main);
}

.invalid-center-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-top: 10px;
}

.invalid-x-circle,
.success-check-circle,
.warning-circle {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.invalid-x-circle {
    background: rgba(170, 59, 59, 0.45);
    color: var(--danger-bg);
    font-size: 34px;
}

.success-check-circle {
    background: rgba(47, 202, 98, 0.16);
    color: var(--green-ok);
    font-size: 40px;
}

.warning-circle {
    background: rgba(214, 121, 64, 0.16);
    color: var(--brand-orange);
    font-size: 42px;
}

.invalid-code-box {
    width: 100%;
    border: 2px solid #FF8B92;
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    background: transparent;
}

.invalid-code-box h3 {
    color: var(--text-main);
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 800;
}

.invalid-code-value {
    width: 100%;
    min-height: 54px;
    border-radius: 10px;
    background: #4A5568;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
}

.invalid-code-box p {
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}

.success-box {
    border-color: rgba(47, 202, 98, 0.40);
}

.warning-box {
    border-color: rgba(214, 121, 64, 0.40);
}

/* =========================================================
   12. EMBARQUE / HISTÓRICO DE LEITURAS
   ========================================================= */
.embarque-form-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.last-read-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.last-read-label {
    font-size: 14px;
    color: var(--text-soft);
}

.identified-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.identified-item {
    min-height: 64px;
    border-radius: 10px;
    background: #E2E8F0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    color: #222222;
    opacity: 0.9;
}

.identified-item.active {
    background: rgba(47, 202, 98, 0.14);
    border: 2px solid var(--green-ok);
    color: var(--text-main);
}

.identified-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.95;
}

.identified-item strong {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.active-soft {
    background: rgba(47, 202, 98, 0.10);
    border: 1px solid rgba(47, 202, 98, 0.35);
    color: var(--text-main);
}

.quantity-summary strong {
    font-size: 26px;
}

.cart-icon-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.cart-icon-circle.duplicate {
    background: rgba(214, 121, 64, 0.18);
    border: 2px solid rgba(214, 121, 64, 0.40);
}

.cart-icon-circle.invalid {
    background: rgba(233, 112, 112, 0.18);
    border: 2px solid rgba(233, 112, 112, 0.40);
}

.cart-icon {
    font-size: 44px;
    line-height: 1;
}

.cart-badge {
    position: absolute;
    right: -4px;
    bottom: -2px;
    min-width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--danger-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    border: 2px solid rgba(26, 54, 81, 0.14);
}

/* =========================================================
   13. AÇÕES FIXAS INFERIORES
   ========================================================= */
.fixed-bottom-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen-scroll-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.with-fixed-actions {
    padding-bottom: 120px;
}

.fixed-bottom-actions,
.bottom-stacked-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fixed-bottom-actions {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-main);
    padding: 10px 12px 14px;
    border-top: 1px solid rgba(26, 54, 81, 0.08);
}

.full-width-form {
    width: 100%;
}

.bottom-success-btn {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    border: none;
    background: #BFEFD0;
    color: #17321f;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.2px;
    cursor: pointer;
}

.final-action-btn {
    border: 2px solid rgba(26, 54, 81, 0.22);
}

/* =========================================================
   14. POPUP GLOBAL / MODAL
   Compatível com JS usando remove('hidden') ou add('active').
   ========================================================= */
.pg-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99999;
    display: none;
}

.pg-modal-overlay.active,
.pg-modal-overlay:not(.hidden) {
    display: flex;
}

.pg-modal {
    width: 100%;
    max-width: 340px;
    background: #FFFFFF;
    border: 1px solid rgba(26, 54, 81, 0.12);
    border-radius: 18px;
    padding: 22px 16px 16px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
    animation: modalPop 0.18s ease-out;
}

.pg-modal h3 {
    color: var(--text-main);
    font-size: 19px;
    line-height: 1.3;
    margin-bottom: 10px;
    font-weight: 800;
    text-align: center;
}

.pg-modal p {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
    text-align: center;
}

.pg-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-btn {
    width: 100%;
    min-height: 48px;
}

.pg-global-modal-error {
    border: 2px solid #ff3b3b;
}

.pg-global-modal-success {
    border: 2px solid var(--green-ok);
}

.pg-global-modal-error h3 {
    color: #ff8a8a;
}

.pg-global-modal-success h3 {
    color: #73e89a;
}

.pg-popup-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
}

.pg-global-modal-error .pg-popup-icon {
    background: rgba(255, 59, 59, 0.16);
    color: #ff8a8a;
}

.pg-global-modal-success .pg-popup-icon {
    background: rgba(47, 202, 98, 0.16);
    color: #73e89a;
}

.pg-popup-ok {
    background: var(--brand-orange);
    color: var(--text-main);
    border: none;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =========================================================
   15. COMPATIBILIDADE COM TELAS ANTIGAS / APOIO
   ========================================================= */
.login-wrapper,
.dashboard-wrapper {
    min-height: 100vh;
    background: var(--bg-main);
}

.login-card,
.topbar,
.welcome-card,
.form-card,
.info-card,
.embarque-header-card,
.scanner-card,
.status-card,
.result-card,
.menu-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.brand-title span,
.menu-text p,
.info-card p,
.welcome-card p,
.scanner-card p,
.topbar-subtitle,
.user-id {
    color: var(--text-main);
}
.pg-global-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.72);
}

.pg-global-popup.active {
    display: flex;
}

.pg-global-modal {
    width: 100%;
    max-width: 360px;
    background: #FFFFFF;
    color: #1A3651;
    border-radius: 14px;
    border: 2px solid #1A3651;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    padding: 20px;
    text-align: center;
}

.pg-global-modal h3 {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 800;
}

.pg-global-modal p {
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.4;
    color: #1A3651;
}

.pg-global-modal-error {
    border-color: #E97070;
}

.pg-global-modal-success {
    border-color: #2FCA62;
}

.pg-global-modal-actions {
    display: flex;
    justify-content: center;
}
/* =========================================================
   AJUSTES PWA / COLETOR - LOGIN E TOPO
   ========================================================= */

.mobile-shell,
.screen-shell {
    min-height: 100dvh;
}

.login-screen-content {
    justify-content: flex-start;
    padding-top: 8px !important;
    gap: 10px !important;
}

.login-brand-center {
    margin-bottom: 12px !important;
}

.login-brand-square {
    width: 54px !important;
    height: 54px !important;
    font-size: 26px !important;
    margin-bottom: 6px !important;
}

.login-brand-center h2 {
    font-size: 28px !important;
    margin-bottom: 4px !important;
    line-height: 1 !important;
}

.login-brand-center p {
    font-size: 13px !important;
    margin-bottom: 0 !important;
}

.screen-field-block,
.input-group {
    gap: 6px !important;
}

.screen-field-block label,
.input-group label {
    font-size: 13px !important;
}

.screen-field-block input,
.input-group input,
.input-group select {
    min-height: 44px !important;
    padding: 0 12px !important;
}

.local-login-box {
    min-height: 52px !important;
    padding: 8px 12px !important;
    margin-top: 0 !important;
}

.local-login-text strong {
    font-size: 13px !important;
}

.local-login-text span {
    font-size: 12px !important;
}

.btn-login,
.login-submit-btn,
.bottom-primary-btn {
    min-height: 50px !important;
}

.header-icon-button,
.header-user-button,
.pg-menu-btn,
.pg-user-btn {
    min-width: 50px !important;
    min-height: 50px !important;
    padding: 10px 14px !important;
    touch-action: manipulation;
}

.header-user-button,
.pg-user-btn {
    max-width: 190px !important;
}

.header-user-name {
    max-width: 110px !important;
}

.dropdown-panel,
.header-dropdown,
.pg-dropdown-menu,
.pg-user-menu {
    z-index: 99998 !important;
}
/* =========================================================
   RESPONSIVIDADE GLOBAL PWA / COLETOR
   ========================================================= */

html {
    font-size: clamp(14px, 3.6vw, 16px);
}

body {
    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
}

.mobile-shell,
.screen-shell {
    width: 100%;
    min-height: 100dvh;
}

.screen-content,
.screen-content.narrow-content {
    width: 100%;
    padding-inline: clamp(10px, 3vw, 16px);
    padding-top: clamp(8px, 2vh, 16px);
    gap: clamp(10px, 2vh, 18px);
}

.compact-header {
    padding-inline: clamp(10px, 3vw, 14px);
    padding-top: max(8px, env(safe-area-inset-top));
}

.app-brand-icon,
.screen-menu-icon,
.header-icon-button,
.header-user-button {
    min-width: clamp(44px, 12vw, 52px);
    min-height: clamp(44px, 12vw, 52px);
}

.app-brand-text h1 {
    font-size: clamp(18px, 5vw, 22px);
}

.screen-field-block input,
.input-group input,
.input-group select {
    min-height: clamp(44px, 7vh, 54px);
    font-size: clamp(14px, 4vw, 16px);
}

.bottom-primary-btn,
.bottom-danger-btn,
.btn-login,
.btn-secondary,
.bottom-success-btn {
    min-height: clamp(46px, 7vh, 56px);
    font-size: clamp(14px, 4vw, 16px);
}

.login-screen-content {
    min-height: 100dvh;
    justify-content: flex-start !important;
    padding-top: clamp(6px, 2vh, 18px) !important;
}

.login-brand-center {
    margin-bottom: clamp(10px, 2vh, 18px) !important;
}

.login-brand-square {
    width: clamp(48px, 14vw, 68px) !important;
    height: clamp(48px, 14vw, 68px) !important;
    font-size: clamp(24px, 7vw, 32px) !important;
    margin-bottom: clamp(6px, 1.5vh, 12px) !important;
}

.login-brand-center h2 {
    font-size: clamp(26px, 8vw, 34px) !important;
    line-height: 1 !important;
}

.login-brand-center p {
    font-size: clamp(12px, 3.6vw, 15px) !important;
}

.local-login-box {
    min-height: auto !important;
    padding: clamp(8px, 2vh, 12px) clamp(10px, 3vw, 14px) !important;
}

.cta-orange-btn,
.orange-action-button {
    min-height: clamp(72px, 16vh, 96px);
}

.fixed-bottom-actions {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
}

.pg-global-modal,
.pg-modal {
    width: min(100%, 360px);
    max-width: calc(100vw - 32px);
}

/* =========================================================
   17. AJUSTES FINAIS NEXCARGO / CONTRASTE
   Mantém as classes antigas para não alterar templates nem JS.
   ========================================================= */
.header-icon-button,
.header-user-button,
.app-user-circle,
.back-mini,
.bottom-primary-btn,
.btn-login,
.cta-orange-btn,
.orange-action-button,
.pg-popup-ok,
.pg-primary-btn,
.login-submit-btn,
.final-action-btn {
    background: var(--brand-orange);
    color: var(--on-primary) !important;
}

.app-brand-icon,
.login-brand-square,
.screen-menu-icon {
    background: var(--brand-orange);
    color: var(--on-primary) !important;
}

.dropdown-panel,
.header-dropdown,
.dropdown-user-info,
.pg-dropdown-menu,
.pg-user-menu {
    background: var(--bg-panel);
    border-color: var(--line-soft);
    box-shadow: var(--shadow-soft);
}

.dropdown-panel a,
.header-dropdown a,
.pg-dropdown-menu a,
.pg-user-menu a {
    background: var(--bg-panel);
    color: var(--text-main);
}

.dropdown-panel a:hover,
.header-dropdown a:hover,
.pg-dropdown-menu a:hover,
.pg-user-menu a:hover {
    background: var(--bg-main);
}

.pg-modal,
.pg-global-modal {
    background: var(--bg-panel);
    color: var(--text-main);
    border-color: var(--line-soft);
}

.pg-global-modal p,
.pg-modal p {
    color: var(--text-soft);
}

.pg-global-modal-error,
.pg-modal.pg-global-modal-error {
    border-color: #E97070;
}

.pg-global-modal-success,
.pg-modal.pg-global-modal-success {
    border-color: #2FCA62;
}

.pg-global-modal-error h3,
.pg-modal.pg-global-modal-error h3 {
    color: #E97070;
}

.pg-global-modal-success h3,
.pg-modal.pg-global-modal-success h3 {
    color: #2FCA62;
}

.pg-feedback-success,
.feedback-success,
.alert-success {
    background: rgba(47, 202, 98, 0.14);
    border-color: #2FCA62;
    color: #17321F;
}

.pg-feedback-error,
.feedback-error,
.alert-error {
    background: rgba(233, 112, 112, 0.14);
    border-color: #E97070;
    color: #8A1F1F;
}

