:root {
    --primary: #123f5c;
    --primary-dark: #082f49;
    --primary-soft: #cfdde4;
    --primary-light: #e2ebef;

    --accent: #d99a26;
    --accent-soft: #eadbbf;

    --text: #22303d;
    --muted: #62707d;
    --border: #cbd7de;

    --background: #e4ebef;
    --surface: #edf3f5;
    --surface-soft: #e5edf1;
    --white: #f8fafb;

    --danger: #8f1d1d;
    --danger-bg: #ead2d2;

    --success: #27654f;
    --success-bg: #d2e6dc;
}

/* Modal global de confirmação de moradas */
.portal-map-modal[hidden]{display:none}.portal-map-modal{position:fixed;z-index:6500;inset:0;display:flex;align-items:center;justify-content:center;padding:28px}.portal-map-backdrop{position:absolute;inset:0;background:rgba(6,25,36,.7);backdrop-filter:blur(4px)}.portal-map-dialog{position:relative;display:grid;width:min(1080px,94vw);height:min(700px,88vh);grid-template-rows:auto 1fr auto;overflow:hidden;border:1px solid #91a9b5;border-radius:18px;background:#d6e2e7;box-shadow:0 30px 90px rgba(0,0,0,.42)}.portal-map-dialog header{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;background:#173f56;color:#fff}.portal-map-dialog header small{color:#bdd3de;font-size:10px;text-transform:uppercase}.portal-map-dialog h2{margin:3px 0 0;font-size:20px}.portal-map-dialog header button{width:38px;height:38px;border:0;border-radius:50%;background:#dce7eb;color:#173f56;font-size:24px;cursor:pointer}.portal-map-dialog iframe{width:100%;height:100%;border:0;background:#c3d1d8}.portal-map-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 17px}.portal-map-dialog footer span{font-size:12px}.portal-map-dialog footer a{color:#075f89;font-size:12px;font-weight:800;text-decoration:none}@media(max-width:650px){.portal-map-modal{padding:8px}.portal-map-dialog{width:100%;height:92vh}.portal-map-dialog footer{align-items:flex-start;flex-direction:column}}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 61, 94, 0.09), transparent 34%),
        linear-gradient(180deg, #e8eef2 0%, #dbe5ea 100%);
}

.portal-login-body {
    min-height: 100vh;
}

/* =========================
   Layout principal
========================= */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 60px;
    background:
        radial-gradient(circle at top left, rgba(217, 154, 38, 0.16), transparent 36%),
        linear-gradient(135deg, #123f5c 0%, #082f49 100%);
    color: #f8fafb;
    overflow: hidden;
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    right: -160px;
    bottom: -180px;
    background: rgba(255, 255, 255, 0.05);
}

.brand-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 820px;
}

/* =========================
   Seletor de idioma
========================= */

.login-language-top {
    width: 100%;
    max-width: 480px;
    margin: 0 auto 16px;
    display: flex;
    justify-content: flex-end;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(237, 243, 245, 0.72);
    width: fit-content;
    border: 1px solid rgba(15, 61, 94, 0.10);
}

.language-switcher a {
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark) !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.language-switcher a:hover,
.language-switcher a.active {
    background: var(--primary);
    color: #ffffff !important;
    text-decoration: none !important;
}

.language-switcher a:hover {
    transform: translateY(-1px);
}

.language-switcher-form {
    background: rgba(237, 243, 245, 0.82);
    margin-bottom: 0;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
}

/* =========================
   Logotipo
========================= */

.brand-logo-wrap {
    width: 100%;
    max-width: 620px;
    margin-bottom: 30px;
    overflow: visible;
}

.brand-logo {
    display: block;
    width: 600px !important;
    max-width: 600px !important;
    height: auto !important;
    max-height: 160px !important;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.22));
}

.mobile-logo-wrap {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 18px;
    overflow: visible;
    display: flex;
    justify-content: center;
}

.mobile-logo {
    display: block;
    width: 280px !important;
    max-width: 280px !important;
    height: auto !important;
    max-height: 95px !important;
    object-fit: contain;
    object-position: center;
}

/* =========================
   Bloco institucional
========================= */

.brand-subtitle {
    margin: 24px 0 0;
    font-size: 23px;
    line-height: 1.22;
    font-weight: 800;
    color: rgba(248, 250, 251, 0.94);
    max-width: 720px;
    letter-spacing: -0.04em;
}

.mobile-slogan {
    display: none;
}

.brand-features {
    margin-top: 34px;
    display: grid;
    gap: 13px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 16px;
    line-height: 1.35;
    color: rgba(248, 250, 251, 0.88);
}

.feature-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(134, 239, 172, 0.14);
    color: #b7f0ce;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-top: -2px;
}

.brand-footer {
    margin-top: 42px;
    font-size: 17px;
    color: rgba(248, 250, 251, 0.62);
}

/* =========================
   Painel de login
========================= */

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
    background:
        radial-gradient(circle at top right, rgba(217, 154, 38, 0.10), transparent 34%),
        linear-gradient(180deg, #e8eef2 0%, #dbe5ea 100%);
}

.login-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(237, 243, 245, 0.92);
    border: 1px solid rgba(15, 61, 94, 0.10);
    border-radius: 24px;
    padding: 38px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
    backdrop-filter: blur(8px);
}

.mobile-brand {
    display: none;
    margin-bottom: 24px;
}

.login-card h2 {
    margin: 0;
    font-size: 27px;
    letter-spacing: -0.02em;
    color: var(--primary-dark);
}

.login-intro {
    margin: 10px 0 26px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

/* =========================
   Alertas
========================= */

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 18px;
}

.alert-error {
    color: var(--danger);
    background: var(--danger-bg);
}

.alert-success {
    color: var(--success);
    background: var(--success-bg);
}

/* =========================
   Formulário
========================= */

.login-form {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 7px;
}

.form-group label {
    font-size: 14px;
    font-weight: 700;
    color: #344054;
}

.form-group input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--text);
    background: #f4f7f9;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    background: #f8fafb;
    box-shadow: 0 0 0 4px rgba(15, 61, 94, 0.10);
}

.btn-login {
    height: 50px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #123f5c, #082f49);
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 4px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 20px rgba(8, 47, 73, 0.20);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(8, 47, 73, 0.25);
}

.btn-login:active {
    transform: translateY(0);
}

/* =========================
   Links e nota
========================= */

.login-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    font-size: 14px;
    color: var(--muted);
}

.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.login-links a:hover {
    text-decoration: underline;
}

.disabled-link {
    opacity: 0.55;
    pointer-events: none;
}

.login-note {
    margin-top: 24px;
    padding: 14px;
    border-radius: 14px;
    background: #dce7ec;
    color: var(--primary-dark);
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    border: 1px solid rgba(15, 61, 94, 0.10);
}

.login-copy {
    margin: 24px auto 0;
    max-width: 480px;
    text-align: center;
    font-size: 13px;
    color: #62707d;
}

/* =========================
   Responsivo Login
========================= */

@media (max-width: 1400px) {
    .brand-logo-wrap {
        max-width: 560px;
    }

    .brand-logo {
        width: 540px !important;
        max-width: 540px !important;
        max-height: 150px !important;
    }

    .brand-subtitle {
        font-size: 31px;
        max-width: 660px;
    }
}

@media (max-width: 1200px) {
    .login-brand-panel {
        padding: 44px 46px;
    }

    .brand-subtitle {
        font-size: 28px;
        max-width: 620px;
    }

    .feature-item {
        font-size: 15px;
    }

    .brand-logo-wrap {
        max-width: 520px;
    }

    .brand-logo {
        width: 500px !important;
        max-width: 500px !important;
        max-height: 140px !important;
    }
}

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;
        padding: 28px 18px;
        background:
            radial-gradient(circle at top right, rgba(217, 154, 38, 0.10), transparent 34%),
            linear-gradient(180deg, #e8eef2 0%, #dbe5ea 100%);
    }

    .login-language-top {
        max-width: 520px;
        justify-content: center;
        margin-bottom: 18px;
    }

    .mobile-brand {
        display: block;
    }

    .login-card {
        max-width: 520px;
        padding: 32px;
        border-radius: 20px;
    }

    .login-copy {
        max-width: 520px;
    }
}

@media (max-width: 460px) {
    .login-form-panel {
        padding: 24px 14px;
    }

    .login-card {
        max-width: 100%;
        padding: 26px 22px;
    }

    .login-card h2 {
        font-size: 24px;
    }

    .mobile-logo {
        width: 250px !important;
        max-width: 250px !important;
    }

    .login-links {
        flex-wrap: wrap;
    }

    .language-switcher a {
        min-width: 34px;
        height: 28px;
        padding: 0 8px;
        font-size: 11px;
    }
}

/* =========================
   Portal Sidebar
========================= */

.portal-app-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(15, 61, 94, 0.09), transparent 34%),
        linear-gradient(180deg, #e8eef2 0%, #dbe5ea 100%);
}

.portal-app-layout {
    min-height: 100vh;
    display: flex;
}

.portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;

    background:
        radial-gradient(circle at top left, rgba(217, 154, 38, 0.07), transparent 30%),
        linear-gradient(180deg, #dfe8ed 0%, #d3dfe5 48%, #c6d4dc 100%);

    color: #1f2933;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    z-index: 1000;

    border-right: 1px solid rgba(15, 61, 94, 0.13);
    box-shadow: 12px 0 28px rgba(15, 23, 42, 0.13);

    transition: width 0.22s ease, transform 0.22s ease;
}

.portal-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 26px;
}

.portal-sidebar-logo {
    max-width: 185px;
    overflow: hidden;
}

.portal-sidebar-logo img {
    display: block;
    width: 180px;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(8, 47, 73, 0.14));
}

.portal-sidebar-toggle {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 13px;
    background: rgba(15, 61, 94, 0.10);
    color: #0f3d5e;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.portal-sidebar-toggle:hover {
    background: rgba(15, 61, 94, 0.16);
    color: #082f49;
    transform: translateY(-1px);
}

.portal-user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(237, 243, 245, 0.82), rgba(218, 229, 235, 0.86));
    border: 1px solid rgba(15, 61, 94, 0.10);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
    margin-bottom: 22px;
}

.portal-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #d99a26;
    color: #082f49;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.portal-user-info {
    min-width: 0;
}

.portal-user-info strong {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    color: #172033;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-user-info span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #62707d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-sidebar-nav {
    display: grid;
    gap: 7px;
}

.portal-nav-link,
.portal-logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 15px;
    color: #344054;
    text-decoration: none;
    font-size: 14px;
    font-weight: 750;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.portal-nav-link {
    background: transparent;
}

.portal-sidebar-controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.portal-sidebar-pin {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 61, 94, 0.08);
    color: #62707d;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.portal-sidebar-pin svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.portal-sidebar-pin--footer {
    width: 100%;
    height: 42px;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    padding: 0 14px;
    color: #475467;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
}

.portal-sidebar-pin:hover {
    background: rgba(15, 61, 94, 0.15);
    color: #123f5c;
    transform: translateY(-1px);
}

.portal-sidebar.is-pinned .portal-sidebar-pin {
    background: #123f5c;
    color: #fff;
    box-shadow: 0 6px 14px rgba(8, 47, 73, 0.2);
}

button.portal-nav-link {
    width: 100%;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

.portal-notification-trigger {
    position: relative;
}

.portal-bell-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portal-bell-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border: 2px solid #dfe9ee;
    border-radius: 50%;
    background: #d13b3b;
}

.portal-notification-count {
    min-width: 22px;
    height: 22px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d13b3b;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.portal-nav-link:hover,
.portal-nav-link:not(.active):hover {
    background: rgba(15, 61, 94, 0.09);
    color: #082f49;
    transform: translateX(2px);
}

.portal-nav-link.active {
    background:
        linear-gradient(135deg, #123f5c 0%, #082f49 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(8, 47, 73, 0.20);
    transform: translateX(2px);
}

.portal-nav-link.active .portal-nav-icon,
.portal-nav-link.active .portal-nav-text {
    color: #ffffff;
}

.portal-nav-icon {
    width: 24px;
    text-align: center;
    flex: 0 0 auto;
    color: #5f6d78;
}

.portal-nav-link:hover .portal-nav-icon {
    color: #0f3d5e;
}

.portal-nav-link.active:hover .portal-nav-icon {
    color: #ffffff;
}

.portal-nav-text {
    white-space: nowrap;
}

.portal-sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
}

.portal-sidebar-settings { width:100%; display:flex; align-items:center; gap:12px; padding:10px 12px; border:0; border-radius:10px; background:transparent; color:#34465f; font:inherit; font-weight:700; cursor:pointer; }
.portal-sidebar-settings:hover { background:rgba(255,255,255,.52); }
.portal-sidebar-settings svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
.portal-sidebar.collapsed .portal-sidebar-settings { justify-content:center; }

.portal-settings-backdrop { position:fixed; inset:0; z-index:1190; background:rgba(11,31,47,.28); backdrop-filter:blur(2px); }
.portal-settings-backdrop[hidden] { display:none; }
.portal-settings-panel { position:fixed; z-index:1200; top:16px; left:296px; width:min(390px,calc(100vw - 328px)); overflow:hidden; border:1px solid #d5e0e6; border-radius:20px; background:#f8fbfc; box-shadow:0 24px 70px rgba(8,47,73,.25); opacity:0; visibility:hidden; transform:translateX(-16px); transition:.18s ease; }
.portal-settings-panel.is-open { opacity:1; visibility:visible; transform:none; }
.portal-app-layout.sidebar-collapsed ~ .portal-settings-panel { left:102px; }
.portal-settings-panel header { display:flex; justify-content:space-between; align-items:center; padding:20px; border-bottom:1px solid #dfe7eb; }
.portal-settings-panel header span { color:#71808c; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }.portal-settings-panel h2 { margin:3px 0 0; color:#123f5c; }.portal-settings-panel header button { width:38px; height:38px; border:0; border-radius:12px; background:#e7eef2; color:#526270; font-size:24px; cursor:pointer; }
.portal-settings-panel section { padding:20px; }.portal-settings-panel h3 { margin:0 0 12px; color:#123f5c; }
.portal-setting-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 0; border-bottom:1px solid #e2eaee; cursor:pointer; }.portal-setting-row span { display:flex; flex-direction:column; gap:4px; }.portal-setting-row strong { color:#263b4b; }.portal-setting-row small { color:#6d7d89; line-height:1.35; }
.portal-setting-row input { position:absolute; opacity:0; pointer-events:none; }.portal-setting-row i { position:relative; flex:0 0 44px; height:24px; border-radius:999px; background:#cbd6dc; transition:.2s; }.portal-setting-row i::after { content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 4px #789; transition:.2s; }.portal-setting-row input:checked+i { background:#16835f; }.portal-setting-row input:checked+i::after { transform:translateX(20px); }
.portal-settings-status { margin:14px 0 0; color:#647784; font-size:12px; line-height:1.4; }

.portal-order-chat { border:1px solid #d5e2e9; border-radius:14px; overflow:hidden; background:#fff; }
.portal-chat-head { padding:14px 16px; border-bottom:1px solid #e2eaee; background:#f3f8fa; }.portal-chat-head h3 { margin:0; color:#153f5b; }.portal-chat-head p { margin:4px 0 0; color:#71808c; font-size:12px; }
.portal-chat-messages { display:flex; flex-direction:column; gap:10px; max-height:360px; min-height:120px; overflow-y:auto; padding:16px; }
.portal-chat-empty { margin:auto; color:#71808c; font-size:13px; }
.portal-chat-message { align-self:flex-start; max-width:78%; padding:10px 12px 7px; border-radius:5px 14px 14px; background:#edf3f6; color:#263b4b; }.portal-chat-message.is-client { align-self:flex-end; border-radius:14px 5px 14px 14px; background:#dff3ec; }.portal-chat-message p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }.portal-chat-meta { display:flex; justify-content:flex-end; gap:7px; margin-top:5px; color:#71808c; font-size:10px; }.portal-chat-read { color:#16835f; font-weight:800; }
.portal-chat-author{display:block;margin:0 0 5px;color:#123f5c;font-size:12px;font-weight:800}.portal-chat-message.is-client .portal-chat-author{color:#167657}
.portal-update-toast{position:fixed;z-index:12000;top:18px;right:20px;width:min(400px,calc(100vw - 32px));display:grid;grid-template-columns:42px 1fr 30px;gap:11px;align-items:start;padding:14px;border:1px solid #b9d7e4;border-radius:16px;background:#f8fcfd;color:#123f5c;box-shadow:0 18px 46px rgba(8,47,73,.28);animation:portalToastIn .25s ease-out}.portal-update-toast-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:#dff3ec;color:#16835f;font-size:20px;font-weight:900}.portal-update-toast strong{display:block;margin:1px 0 5px;font-size:14px}.portal-update-toast p{margin:0;color:#526574;font-size:12px;line-height:1.45}.portal-update-toast-refresh{margin-top:9px;padding:7px 10px;border:0;border-radius:8px;background:#0d587c;color:#fff;font-size:12px;font-weight:800;cursor:pointer}.portal-update-toast-close{width:28px;height:28px;border:0;border-radius:8px;background:#e7eff3;color:#526574;font-size:18px;cursor:pointer}@keyframes portalToastIn{from{opacity:0;transform:translateY(-12px)}}
.portal-chat-form { display:flex; gap:9px; padding:12px; border-top:1px solid #e2eaee; background:#f8fbfc; }.portal-chat-form textarea { flex:1; min-height:44px; max-height:120px; resize:vertical; border:1px solid #bacbd5; border-radius:10px; padding:10px 12px; font:inherit; }.portal-chat-form button { align-self:flex-end; min-height:44px; padding:0 17px; border:0; border-radius:10px; background:#0d587c; color:#fff; font-weight:800; cursor:pointer; }

@media(max-width:760px){.portal-settings-panel,.portal-app-layout.sidebar-collapsed~.portal-settings-panel{top:10px;left:10px;right:10px;width:auto}.portal-chat-message{max-width:90%}.portal-chat-form{align-items:stretch;flex-direction:column}.portal-chat-form button{align-self:stretch}}

.portal-chat-trigger{position:relative;display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:#34465f;font:inherit;font-weight:700;cursor:pointer;box-shadow:none}.portal-chat-trigger:hover{background:rgba(255,255,255,.52)}.portal-sidebar.collapsed .portal-chat-trigger{justify-content:center;width:44px;height:44px;margin:auto;padding:0;border-radius:10px}.portal-chat-trigger svg,.order-chat-action svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.order-chat-action{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:0;border-radius:50%;background:#0878b8;color:#fff;cursor:pointer;box-shadow:0 4px 10px rgba(8,120,184,.22)}
.portal-chat-backdrop{position:fixed;inset:0;z-index:1120;background:rgba(8,30,44,.24);backdrop-filter:blur(2px)}.portal-chat-backdrop[hidden]{display:none}.portal-chat-panel{position:fixed;z-index:1130;top:16px;bottom:16px;left:296px;width:min(430px,calc(100vw - 328px));display:flex;flex-direction:column;overflow:hidden;border:1px solid #d5e0e6;border-radius:20px;background:#f8fbfc;box-shadow:0 24px 70px rgba(8,47,73,.25);opacity:0;visibility:hidden;transform:translateX(-16px);transition:.18s}.portal-chat-panel.is-open{opacity:1;visibility:visible;transform:none}.portal-app-layout.sidebar-collapsed~.portal-chat-panel{left:102px}.portal-chat-panel-head{position:relative;z-index:2;display:flex;flex:0 0 auto;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid #dfe7eb;background:#f8fbfc;color:#123f5c}.portal-chat-panel-head h2{flex:1;margin:0;font-size:20px}.portal-chat-panel-head button{width:36px;height:36px;border:0;border-radius:11px;background:#e7eef2;color:#526270;font-size:22px;cursor:pointer}.portal-chat-list-view,.portal-chat-thread-view{min-height:0;display:flex;flex:1;flex-direction:column}.portal-chat-list-view[hidden],.portal-chat-thread-view[hidden]{display:none!important}.portal-chat-search{display:flex;flex:0 0 auto;gap:8px;margin:12px;padding:10px 13px;border:1px solid #cad7df;border-radius:999px;background:#fff}.portal-chat-search input{width:100%;border:0;outline:0;background:transparent;font:inherit}.portal-chat-conversations{min-height:0;flex:1;overflow-y:auto;padding:0 10px 12px}.portal-chat-conversation{position:relative;display:grid;grid-template-columns:42px 1fr auto;gap:9px;width:100%;padding:11px 38px 11px 8px;border:0;border-bottom:1px solid #dde5e9;background:transparent;text-align:left;cursor:pointer}.portal-chat-avatar{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:#0878b8;color:#fff;font-size:12px;font-weight:900}.portal-chat-conversation strong,.portal-chat-conversation span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.portal-chat-conversation strong{color:#173e59;font-size:13px}.portal-chat-conversation span{margin-top:4px;color:#526574;font-size:12px}.portal-chat-conversation time{font-size:10px;color:#71808c}.portal-chat-conversation-delete{position:absolute;right:5px;bottom:10px;width:28px;height:28px;border:0;border-radius:8px;background:#edf3f6;color:#a72b2b;cursor:pointer}.portal-chat-unread{display:inline-flex!important;width:8px;height:8px;margin-right:5px;border-radius:50%;background:#e33}.portal-chat-route{flex:0 0 auto;padding:11px 15px;border-bottom:1px solid #dce5ea;background:#eef5f8;color:#123f5c;font-size:13px;font-weight:800}.portal-chat-thread-view .portal-order-chat{display:flex;min-height:0;flex:1;flex-direction:column;border:0;border-radius:0;background:#fff}.portal-chat-thread-view .portal-chat-messages{min-height:0;flex:1;max-height:none;overflow-y:auto}.portal-chat-thread-view .portal-chat-form{flex:0 0 auto}
@media(max-width:760px){.portal-chat-panel,.portal-app-layout.sidebar-collapsed~.portal-chat-panel{inset:8px;width:auto}.order-chat-action{width:34px;height:34px}}

.portal-logout-link {
    background: rgba(127, 29, 29, 0.085);
    color: #8f1d1d;
    border: 1px solid rgba(127, 29, 29, 0.12);
}

.portal-logout-link:hover {
    background: linear-gradient(135deg, #8f1d1d, #641515);
    color: #ffffff;
    transform: translateX(2px);
    box-shadow: 0 10px 22px rgba(127, 29, 29, 0.16);
}

.portal-logout-link:hover .portal-nav-icon {
    color: #ffffff;
}

.portal-main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    padding: 32px;
    transition: margin-left 0.22s ease;
}

.portal-sidebar.collapsed {
    width: 86px;
}

.portal-sidebar.collapsed .portal-sidebar-logo,
.portal-sidebar.collapsed .portal-user-info,
.portal-sidebar.collapsed .portal-nav-text,
.portal-sidebar.collapsed .portal-notification-count,
.portal-sidebar.collapsed .portal-sidebar-pin {
    display: none;
}

.portal-sidebar.collapsed .portal-sidebar-header {
    justify-content: center;
}

.portal-sidebar.collapsed .portal-nav-link,
.portal-sidebar.collapsed .portal-logout-link,
.portal-sidebar.collapsed .portal-sidebar-settings,
.portal-sidebar.collapsed .portal-chat-trigger {
    position: relative;
}

.portal-sidebar.collapsed .portal-nav-link::after,
.portal-sidebar.collapsed .portal-logout-link::after,
.portal-sidebar.collapsed .portal-sidebar-settings::after,
.portal-sidebar.collapsed .portal-chat-trigger::after {
    content: attr(data-label);
    position: absolute;
    z-index: 1200;
    top: 50%;
    left: calc(100% + 12px);
    padding: 9px 12px;
    border: 1px solid rgba(15, 61, 94, 0.12);
    border-radius: 10px;
    background: #082f49;
    color: #fff;
    box-shadow: 0 10px 24px rgba(8, 47, 73, 0.24);
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-5px, -50%);
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
} 

.portal-sidebar.collapsed .portal-nav-link:hover::after,
.portal-sidebar.collapsed .portal-nav-link:focus-visible::after,
.portal-sidebar.collapsed .portal-logout-link:hover::after,
.portal-sidebar.collapsed .portal-logout-link:focus-visible::after,
.portal-sidebar.collapsed .portal-sidebar-settings:hover::after,
.portal-sidebar.collapsed .portal-sidebar-settings:focus-visible::after,
.portal-sidebar.collapsed .portal-chat-trigger:hover::after,
.portal-sidebar.collapsed .portal-chat-trigger:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}

.portal-notification-backdrop {
    position: fixed;
    z-index: 1090;
    inset: 0;
    background: rgba(8, 47, 73, 0.22);
    backdrop-filter: blur(2px);
}

.portal-notification-backdrop[hidden] {
    display: none;
}

.portal-notification-panel {
    position: fixed;
    z-index: 1100;
    top: 16px;
    left: 296px;
    width: min(430px, calc(100vw - 328px));
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 61, 94, 0.13);
    border-radius: 22px;
    background: #f7fafb;
    box-shadow: 0 24px 70px rgba(8, 47, 73, 0.24);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-18px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.portal-notification-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.portal-app-layout.sidebar-collapsed ~ .portal-notification-panel {
    left: 102px;
}

.portal-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid #d7e2e7;
}

.portal-notification-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #7b8994;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.portal-notification-header h2 {
    margin: 0;
    color: #082f49;
    font-size: 22px;
}

.portal-notification-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #e8eff2;
    color: #475467;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.portal-notification-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #dfe7eb;
    color: #62707d;
    font-size: 12px;
}

.portal-notification-toolbar button {
    border: 0;
    background: transparent;
    color: #0f587e;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.portal-notification-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.portal-notification-toolbar button.is-danger {
    color: #9b2c2c;
}

.portal-notification-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
}

.portal-notification-item {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 8px;
    gap: 11px;
    align-items: start;
    padding: 15px 42px 15px 12px;
    border-radius: 15px;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease;
}

.portal-notification-delete {
    position: absolute;
    top: 9px;
    right: 8px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7b8994;
    cursor: pointer;
    opacity: .62;
    transition: opacity .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}

.portal-notification-delete svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-notification-item:hover .portal-notification-delete,
.portal-notification-delete:focus-visible {
    opacity: 1;
}

.portal-notification-delete:hover {
    background: #f7e5e5;
    color: #a83232;
    transform: scale(1.04);
}

.portal-notification-item + .portal-notification-item {
    border-top: 1px solid #e2e9ed;
}

.portal-notification-item:hover {
    background: #e9f0f3;
}

.portal-notification-item.is-unread {
    background: #e5eef5;
}

.portal-notification-type {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #dbe7ed;
    color: #123f5c;
    font-size: 15px;
    font-weight: 900;
}

.portal-notification-type--proposta { background: #f4e7c7; color: #80540a; }
.portal-notification-type--entrega { background: #d8e9e1; color: #27654f; }
.portal-notification-type--mensagem { background: #e3dff0; color: #563c83; }

.portal-notification-content,
.portal-notification-title-row {
    min-width: 0;
}

.portal-notification-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.portal-notification-title-row strong {
    color: #22303d;
    font-size: 13px;
    line-height: 1.35;
}

.portal-notification-title-row time {
    flex: 0 0 auto;
    color: #84919b;
    font-size: 10px;
}

.portal-notification-message {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    color: #62707d;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.portal-notification-unread {
    width: 7px;
    height: 7px;
    margin-top: 6px;
    border-radius: 50%;
    background: #d13b3b;
}

.portal-notification-empty {
    margin: auto;
    max-width: 280px;
    padding: 36px 24px;
    text-align: center;
}

.portal-notification-empty-bell {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #e1ebef;
    color: #2c678a;
    font-size: 28px;
}

/* Propostas apresentadas no detalhe carregado por modal. */
.order-proposal {
    position: relative;
    padding: 14px 14px 44px;
}

.order-proposal > strong {
    display: block;
    padding-right: 100px;
}

.order-proposal .proposal-comment {
    margin: 12px 0 8px;
    padding: 10px 12px;
    border: 1px solid #cbd8e2;
    border-radius: 8px;
    background: #fff;
    color: #334155;
}

.order-proposal .proposal-comment-label {
    display: block;
    margin-bottom: 5px;
    color: #52697a;
    font-size: 12px;
    font-weight: 800;
}

.order-proposal .proposal-comment blockquote {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.order-proposal .proposal-status {
    position: absolute;
    top: 11px;
    right: 11px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.order-proposal .proposal-status.expirada { background: #fff0bf; color: #8a5a00; }
.order-proposal .proposal-status.recusada { background: #fee2e2; color: #b42318; }
.order-proposal .proposal-status.pendente { background: #dff3ff; color: #075985; }
.order-proposal .proposal-status.aceite { background: #dcfce7; color: #166534; }

.order-proposal .proposal-revision {
    position: absolute;
    right: 11px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
}

.portal-notification-empty h3 {
    margin: 16px 0 6px;
    color: #123f5c;
}

.portal-notification-empty p {
    margin: 0;
    color: #62707d;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .portal-sidebar-pin {
        display: none;
    }

    .portal-notification-panel,
    .portal-app-layout.sidebar-collapsed ~ .portal-notification-panel {
        top: 10px;
        right: 10px;
        bottom: auto;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 20px);
    }
}

.portal-sidebar.collapsed .portal-user-box {
    justify-content: center;
    padding: 12px 8px;
}

.portal-sidebar.collapsed .portal-nav-link,
.portal-sidebar.collapsed .portal-logout-link {
    justify-content: center;
    padding: 0 10px;
}

.portal-sidebar.collapsed + .portal-main-content,
.portal-app-layout.sidebar-collapsed .portal-main-content {
    margin-left: 86px;
}

/* =========================
   Dashboard com sidebar
========================= */

.portal-page-header {
    background:
        linear-gradient(180deg, #edf3f5 0%, #e5edf1 100%);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 61, 94, 0.10);
    margin-bottom: 24px;
}

.portal-page-header h1 {
    margin: 0;
    color: #082f49;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.portal-page-header p {
    margin: 8px 0 0;
    color: #62707d;
}

.portal-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.portal-dashboard-card {
    background:
        linear-gradient(180deg, #edf3f5 0%, #e5edf1 100%);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 61, 94, 0.10);
}

.portal-dashboard-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #082f49;
}

.portal-dashboard-card p {
    margin: 0;
    color: #62707d;
    line-height: 1.5;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .portal-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .portal-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .portal-sidebar.mobile-open {
        transform: translateX(0);
    }

    .portal-main-content {
        margin-left: 0;
        padding: 22px 16px;
    }

    .portal-sidebar.collapsed + .portal-main-content,
    .portal-app-layout.sidebar-collapsed .portal-main-content {
        margin-left: 0;
    }

    .portal-mobile-menu-btn {
        display: inline-flex;
    }
}

@media (max-width: 560px) {
    .portal-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .portal-page-header h1 {
        font-size: 24px;
    }
}

/* ================================
   Dashboard Cliente
================================ */

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-kpi-card {
    background:
        linear-gradient(180deg, #edf3f5 0%, #e5edf1 100%);
    border-radius: 16px;
    border: 1px solid rgba(15, 61, 94, 0.10);
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.07);
    padding: 16px 18px;
}

.dashboard-kpi-card h3 {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #62707d;
}

.dashboard-kpi-number {
    margin-top: 10px;
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    color: #123f5c;
}

.portal-page-header .dashboard-welcome {
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: normal;
}

.dashboard-welcome-label {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #607180;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0.015em;
    white-space: nowrap;
}

.dashboard-welcome-label::after {
    content: '';
    width: 1px;
    height: 28px;
    background: #bfd0d8;
    border-radius: 999px;
}

.dashboard-welcome-name {
    color: #082f49;
    font-size: 29px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.dashboard-heading-with-language {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.portal-language-selector {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    padding: 5px;
    border: 1px solid rgba(23,63,88,.1);
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    box-shadow: 0 5px 16px rgba(15,61,94,.08);
}

.portal-language-selector button {
    min-width: 39px;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #173f58;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.portal-language-selector button:hover,
.portal-language-selector button:focus-visible {
    background: #edf3f8;
    outline: none;
    transform: translateY(-1px);
}

.portal-language-selector button.is-active {
    background: #eef2ff;
    color: #16375a;
    box-shadow: 0 2px 7px rgba(30,64,175,.12);
}

.dashboard-section {
    margin-bottom: 28px;
}

.dashboard-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-section-header h2 {
    margin: 0;
    font-size: 22px;
    color: #082f49;
}

.dashboard-section-header p {
    margin: 0;
    color: #62707d;
    font-size: 14px;
}

.dashboard-year-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #475467;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-year-filter--chart {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
}

.dashboard-year-filter select,
.dashboard-year-filter button {
    min-height: 38px;
    padding: 7px 34px 7px 12px;
    border: 1px solid #b8cbd5;
    border-radius: 10px;
    background: #f4f8fa;
    color: #123f5c;
    font: inherit;
    cursor: pointer;
}

.dashboard-chart {
    background:
        linear-gradient(180deg, #edf3f5 0%, #e5edf1 100%);
    border-radius: 20px;
    border: 1px solid rgba(15, 61, 94, 0.10);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    padding: 18px 20px 12px;
    overflow-x: auto;
}

.dashboard-line-chart {
    position: relative;
    min-width: 620px;
    padding-top: 64px;
    padding-bottom: 20px;
}

.dashboard-chart-legend {
    position: absolute;
    top: 8px;
    left: 52px;
    right: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 22px;
    color: #344b5d;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.dashboard-chart-legend i {
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: var(--legend-color);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--legend-color) 22%, transparent);
}

.dashboard-chart-legend i.is-bar {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.dashboard-chart-legend i.is-line {
    position: relative;
}

.dashboard-chart-legend i.is-line::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    border: 2px solid var(--legend-color);
    border-radius: 50%;
    background: #edf3f5;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dashboard-line-chart svg {
    display: none;
    width: 100%;
    height: auto;
    overflow: visible;
}

#dashboard-orders-chart {
    display: block;
    width: 100%;
    height: 380px;
}

.dashboard-axis-title {
    position: absolute;
    z-index: 2;
    color: #c0392b;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

.dashboard-axis-title--y {
    top: 70px;
    left: 38px;
}

.dashboard-axis-title--x {
    right: 18px;
    bottom: 3px;
}

.dashboard-chart-grid {
    stroke: #cbd9e0;
    stroke-width: 1;
    stroke-dasharray: 5 7;
}

.dashboard-chart-axis-label,
.dashboard-chart-month,
.dashboard-chart-value {
    fill: #62707d;
    font-family: inherit;
    font-size: 12px;
}

.dashboard-chart-value {
    fill: #123f5c;
    font-weight: 800;
}

.dashboard-chart-area {
    fill: url(#dashboardAreaGradient);
}

.dashboard-chart-line {
    fill: none;
    stroke: #123f5c;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-chart-dot {
    fill: #edf3f5;
    stroke: #2c678a;
    stroke-width: 4;
}

.dashboard-table-wrapper {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #edf3f5;
    border: 1px solid rgba(15, 61, 94, 0.10);
    border-radius: 18px;
    overflow: hidden;
    min-width: 760px;
}

.dashboard-table th,
.dashboard-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid #cfdde4;
    font-size: 14px;
    color: #344054;
}

.dashboard-table thead {
    background: #dce7ec;
}

.dashboard-table th {
    color: #475467;
    font-weight: 700;
}

.dashboard-table tbody tr {
    background: #edf3f5;
}

.dashboard-table tbody tr:nth-child(even) {
    background: #e5edf1;
}

.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.dashboard-progress-table th,
.dashboard-progress-table td {
    text-align: center;
    vertical-align: middle;
}

.dashboard-progress-table .dashboard-table-filters th {
    padding: 9px 7px;
    background: #e7eff3;
}

.dashboard-table-filters input {
    width: 100%;
    min-width: 92px;
    padding: 8px 9px;
    border: 1px solid #b9cdd8;
    border-radius: 8px;
    background: #f7fafb;
    color: #173f58;
    font: inherit;
    font-size: 12px;
    text-align: center;
}

.dashboard-table-filters input:focus {
    outline: 2px solid rgba(18, 63, 92, 0.22);
    border-color: #547f98;
}

.dashboard-operation-complete {
    background: rgba(22, 134, 91, 0.12);
    color: #176447 !important;
    font-weight: 700;
}

.dashboard-operation-complete small {
    display: block;
    margin-top: 4px;
    color: #176447;
    font-size: 11px;
}

.dashboard-progress-table .orders-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.dashboard-progress-table .orders-type-info {
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border: 1px solid #87a6b9;
    border-radius: 50%;
    color: #315f79;
    font-size: 11px;
    font-style: normal;
    cursor: help;
}

.dashboard-table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    color: #475467;
    font-size: 13px;
}

.dashboard-table-pagination--top {
    margin: 0 0 12px;
}

.dashboard-table-pagination div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-page-size {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.dashboard-page-size select {
    padding: 7px 9px;
    border: 1px solid #b9cdd8;
    border-radius: 8px;
    background: #edf3f5;
    color: #123f5c;
}

.dashboard-table-pagination button {
    padding: 8px 13px;
    border: 1px solid #b9cdd8;
    border-radius: 9px;
    background: #edf3f5;
    color: #123f5c;
    font-weight: 700;
    cursor: pointer;
}

.dashboard-table-pagination button:disabled {
    opacity: 0.45;
    cursor: default;
}

.portal-date-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: inherit;
    line-height: 1.25;
    white-space: nowrap;
}

.portal-date-stack > small {
    margin-top: 3px;
    color: #647b8a;
    font-size: 11px;
    font-weight: 600;
}

.portal-chat-conversation > time small {
    display: block;
    margin-top: 2px;
    color: inherit;
    font-size: 10px;
}

.cmr-history-list {
    display: grid;
    gap: 9px;
}

.cmr-history-list > a {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border: 1px solid #c8d8e1;
    border-radius: 10px;
    background: #edf5f8;
    color: #173f58;
    text-decoration: none;
}

.cmr-history-list > a:hover {
    border-color: #78a6bd;
    background: #e1eff5;
}

.cmr-history-list span,
.cmr-history-list small {
    display: block;
}

.cmr-history-list small {
    margin-top: 4px;
}

.cmr-history-icon {
    display: grid !important;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #123f5c;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
}

.cmr-history-content {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 9px;
    min-width: 0;
}

.cmr-history-content > strong {
    flex-basis: 100%;
    color: #123f5c;
    font-size: 14px;
}

.cmr-history-content > small {
    margin: 0;
    color: #718592;
    font-size: 11px;
}

.cmr-history-content .portal-date-stack {
    align-items: flex-start;
    color: #456274;
    font-size: 12px;
}

.cmr-history-content .portal-date-stack > small {
    display: none;
}

.cmr-history-list .cmr-history-action {
    color: #0878b7;
    font-size: 12px;
    white-space: nowrap;
}

.cmr-history-action > span {
    display: inline !important;
    margin-left: 5px;
    font-size: 16px;
}

@media (max-width: 620px) {
    .cmr-history-list > a { grid-template-columns: 44px 1fr; }
    .cmr-history-action { grid-column: 2; }
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-status--success {
    background: #d2e6dc;
    color: #27654f;
}

.dashboard-status--warning {
    background: #eadbbf;
    color: #7a5008;
}

.dashboard-status--danger {
    background: #ead2d2;
    color: #8f1d1d;
}

.dashboard-status--info {
    background: #d1e2eb;
    color: #0f4f73;
}

.dashboard-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #123f5c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 16px rgba(8, 47, 73, 0.16);
}

.dashboard-action-link:hover {
    background: #082f49;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(8, 47, 73, 0.20);
}

.dashboard-note {
    margin-top: 12px;
    padding: 16px;
    background: #dfe9ee;
    border: 1px solid rgba(15, 61, 94, 0.10);
    border-radius: 16px;
    color: #475467;
    font-size: 14px;
}

/* Faturação */
.billing-heading{display:flex;align-items:center;justify-content:space-between}.billing-heading h1{margin:3px 0 5px}.billing-heading p{margin:0;color:#52687a}.billing-heading-icon{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;background:#dcecf3;color:#0b5578;font-size:28px;font-weight:800}.billing-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.billing-summary article{padding:17px 20px;border:1px solid #cbdbe3;border-radius:16px;background:#edf4f6;box-shadow:0 10px 24px rgba(25,61,79,.06)}.billing-summary small{display:block;margin-bottom:8px;color:#526b7c;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.billing-summary strong{color:#073b59;font-size:25px}.billing-card{overflow:hidden;border:1px solid #c7d9e2;border-radius:17px;background:#edf4f6}.billing-toolbar{display:flex;gap:10px;padding:14px;border-bottom:1px solid #c7d9e2}.billing-toolbar label{display:flex;align-items:center;flex:1;gap:8px;padding:0 13px;border:1px solid #b8cfdb;border-radius:10px;background:#fff}.billing-toolbar input{width:100%;padding:11px 0;border:0;outline:0;background:transparent}.billing-toolbar select{padding:10px 12px;border:1px solid #b8cfdb;border-radius:10px;background:#fff;color:#173c52}.billing-table-wrap{overflow-x:auto}.billing-table{width:100%;border-collapse:collapse;color:#15384d;font-size:14px}.billing-table th{padding:12px 14px;background:#d8e6ec;text-align:left;white-space:nowrap}.billing-table td{padding:14px;border-top:1px solid #cfdee5;vertical-align:middle}.billing-table tbody tr:hover{background:#e5f0f4}.billing-table td small{display:block;margin-top:5px;color:#687e8d;font-size:11px}.billing-amount{font-weight:800;white-space:nowrap}.billing-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}.billing-status.is-paid{background:#d6f3df;color:#126836}.billing-status.is-pending{background:#fff0c8;color:#895700}.billing-download{display:inline-flex;padding:8px 11px;border-radius:9px;background:#0b5d83;color:#fff;font-weight:750;text-decoration:none;white-space:nowrap;transition:.18s}.billing-download:hover{background:#073f5c;transform:translateY(-1px)}.billing-unavailable{color:#728491;font-size:12px}.billing-empty{padding:55px;text-align:center;color:#607685}.billing-pagination{display:flex;justify-content:space-between;align-items:center;padding:12px 15px;border-top:1px solid #c7d9e2}.billing-pagination div{display:flex;align-items:center;gap:10px}.billing-pagination button{width:34px;height:34px;border:1px solid #b8cfdb;border-radius:9px;background:#fff;color:#0a4c6c}.billing-pagination button:disabled{opacity:.4}
.billing-status.is-partial{background:#dcecff;color:#155b87}.billing-summary-note{display:block;margin-top:5px;color:#356079;font-size:11px}
@media(max-width:900px){.billing-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.billing-toolbar{flex-wrap:wrap}.billing-toolbar label{flex-basis:100%}.billing-table{min-width:1050px}}

/* ================================
   Responsivo Dashboard Cliente
================================ */

@media (max-width: 900px) {
    .dashboard-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-heading-with-language { align-items:flex-start; flex-direction:column; }
    .portal-language-selector { width:100%; justify-content:flex-end; }
    .portal-page-header .dashboard-welcome {
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .dashboard-welcome-label {
        font-size: 15px;
    }

    .dashboard-welcome-label::after {
        height: 22px;
    }

    .dashboard-welcome-name {
        font-size: 25px;
    }

    .dashboard-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-kpi-card {
        padding: 14px;
    }

    .dashboard-kpi-number {
        font-size: 25px;
    }

    .dashboard-table {
        min-width: 100%;
    }
}

/* ================================
   Tracking de pedidos
================================ */

.tracking-page-heading,
.tracking-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tracking-page-heading h1,
.tracking-detail-heading h1 {
    margin: 3px 0 0;
}

.tracking-page-heading p,
.tracking-detail-heading p {
    margin: 7px 0 0;
}

.tracking-eyebrow {
    color: #2c678a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tracking-heading-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #d8e5eb;
    font-size: 25px;
}

.tracking-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.tracking-tabs,
.tracking-detail-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tracking-tab,
.tracking-detail-tabs button {
    position: relative;
    border: 0;
    background: transparent;
    color: #62707d;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.tracking-tab {
    padding: 11px 13px;
    border-radius: 11px;
}

.tracking-tab span,
.tracking-detail-tabs button span {
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #dce7ec;
    font-size: 10px;
}

.tracking-tab:hover,
.tracking-tab.is-active {
    background: #dce8ee;
    color: #082f49;
}

.tracking-tab.is-active {
    box-shadow: inset 0 -3px #2c678a;
}

.tracking-search {
    width: min(380px, 100%);
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid #bccdd6;
    border-radius: 12px;
    background: #f5f9fa;
    color: #62707d;
}

.tracking-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #22303d;
    font: inherit;
    font-size: 13px;
}

.tracking-list-card,
.tracking-info-card,
.tracking-timeline-card {
    border: 1px solid rgba(15, 61, 94, .12);
    border-radius: 18px;
    background: #edf3f5;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}

.tracking-list-card {
    overflow: hidden;
}

.tracking-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #cbd9e0;
    background: #dce7ec;
    color: #123f5c;
}

.tracking-list-header span {
    color: #62707d;
    font-size: 12px;
}

.tracking-order-row {
    display: grid;
    grid-template-columns: 42px 130px minmax(320px, 1.5fr) 130px minmax(150px, .65fr) 24px;
    align-items: center;
    gap: 16px;
    min-height: 94px;
    padding: 14px 18px;
    border-bottom: 1px solid #d3dfe5;
    color: #22303d;
    text-decoration: none;
    transition: background .15s ease, box-shadow .15s ease;
}

.tracking-order-row:last-child { border-bottom: 0; }
.tracking-order-row:hover { background: #f5f9fa; box-shadow: inset 4px 0 #2c678a; }
.tracking-order-row[hidden] { display: none; }

.tracking-order-target {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #dbe7ed;
}

.tracking-order-reference,
.tracking-order-date,
.tracking-order-route span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tracking-order-row small {
    color: #7b8994;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.tracking-order-reference > span { color: #62707d; font-size: 11px; }
.tracking-order-route { display: grid; grid-template-columns: minmax(0,1fr) 22px minmax(0,1fr); align-items: center; gap: 8px; }
.tracking-order-route strong { overflow: hidden; font-size: 12px; line-height: 1.4; text-overflow: ellipsis; }
.tracking-order-route i { color: #2c678a; font-style: normal; text-align: center; }

.tracking-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    background: #dce8ee;
    color: #174f6e;
    font-size: 11px;
    font-weight: 800;
}

.tracking-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tracking-state--entregue { background: #d8e9e1; color: #27654f; }
.tracking-state--ativo { background: #f0e4c8; color: #80540a; }
.tracking-order-open { color: #2c678a; font-size: 26px; }

.tracking-empty {
    padding: 54px 24px;
    text-align: center;
    color: #62707d;
}

.tracking-empty > span { font-size: 34px; }
.tracking-empty h2 { margin: 13px 0 6px; color: #123f5c; font-size: 19px; }
.tracking-empty p { margin: 0; font-size: 13px; }

.tracking-back {
    display: inline-flex;
    margin-bottom: 18px;
    color: #0f587e;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.tracking-detail-heading {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #c5d3da;
}

.tracking-share {
    padding: 10px 14px;
    border: 1px solid #2c678a;
    border-radius: 10px;
    background: transparent;
    color: #0f587e;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.tracking-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, .75fr);
    align-items: start;
    gap: 24px;
}

.tracking-detail-tabs {
    margin-bottom: 16px;
    border-bottom: 1px solid #c5d3da;
}

.tracking-detail-tabs button {
    padding: 11px 9px;
}

.tracking-detail-tabs button.is-active {
    color: #123f5c;
    box-shadow: 0 3px #2c678a;
}

[data-tracking-panel][hidden] { display: none; }

.tracking-info-card {
    margin-bottom: 18px;
    padding: 22px;
}

.tracking-info-card h2 { margin: 0 0 17px; color: #123f5c; font-size: 18px; }
.tracking-summary-card { padding: 0; overflow: hidden; }
.tracking-summary-brand { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid #cfdae0; }
.tracking-summary-brand span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #d99a26; }
.tracking-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; padding: 20px 24px; }
.tracking-summary-grid div { display: flex; flex-direction: column; gap: 5px; }
.tracking-summary-grid small,.tracking-address-columns article small { color: #7b8994; font-size: 11px; }

.tracking-service-list { display: flex; flex-wrap: wrap; gap: 9px; }
.tracking-service-list span { padding: 8px 10px; border-radius: 9px; background: #e0eaef; color: #31546b; font-size: 12px; }

.tracking-address-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.tracking-address-columns h3 { margin: 0 0 10px; color: #344054; font-size: 14px; }
.tracking-address-columns article { display: flex; flex-direction: column; gap: 6px; min-height: 148px; padding: 16px; border: 1px solid #ccd8de; border-radius: 12px; background: #e7eef2; }
.tracking-address-columns article + article { margin-top: 10px; }
.tracking-address-columns article p { margin: 0; color: #475467; font-size: 12px; line-height: 1.5; }
.tracking-address-columns article time { margin-top: auto; color: #2c678a; font-size: 11px; font-weight: 800; }
.tracking-address-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.tracking-address-heading small { color:#344054!important; font-weight:800; }
.tracking-address-heading time { margin:0!important; padding:5px 8px; border-radius:7px; background:#d4e7f2; }
.tracking-address-body { display:flex; flex-direction:column; gap:6px; margin-top:10px; }
.tracking-map-link { align-self:flex-start; color:#0878b7; font-size:12px; font-weight:800; text-decoration:none; }
.tracking-map-link:hover { text-decoration:underline; }

.tracking-timeline-card { position:sticky; top:22px; display:flex; max-height:min(720px,calc(100vh - 44px)); flex-direction:column; overflow:hidden; }
.tracking-timeline-card > header { flex:0 0 auto; padding:19px; background:#d1e0ed; text-align:center; }
.tracking-timeline-card > header span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e8f0f5; color: #17618a; font-size: 20px; }
.tracking-timeline-card > header h2 { margin: 8px 0 0; color: #123f5c; font-size: 18px; }
.tracking-timeline { min-height:0; padding:20px 18px; overflow-y:auto; scrollbar-color:#8aa8b8 #dce7ec; scrollbar-width:thin; }
.tracking-timeline article { display:grid; grid-template-columns:80px 22px minmax(0,1fr); gap:10px; min-height:90px; }
.tracking-timeline article time { color:#5d707d; font-size:11px; font-weight:750; line-height:1.5; }
.tracking-timeline-dot { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; width:21px; height:21px; margin-top:-2px; border-radius:50%; font-size:13px; font-weight:900; line-height:1; }
.tracking-timeline-dot.is-complete { background:#d8f3e4; color:#18794e; box-shadow:0 0 0 2px #f3faf6; }
.tracking-timeline-dot.is-pending { background:#31546b; color:#ffd45c; box-shadow:0 0 0 3px #dce8ee; }
.tracking-timeline-dot::after { content:''; position:absolute; z-index:-1; top:21px; left:10px; width:1px; height:69px; background:#b8c9d1; }
.tracking-timeline article:last-child .tracking-timeline-dot::after { display:none; }
.tracking-timeline article.is-current .tracking-timeline-dot.is-complete { background:#c9edd9; color:#12673f; box-shadow:0 0 0 3px #eaf8f0; }
.tracking-timeline article.is-current .tracking-timeline-dot.is-pending { background:#173f56; color:#ffd45c; box-shadow:0 0 0 4px #d6e6ee; }
.tracking-timeline article div strong { color:#344054; font-size:13px; }
.tracking-timeline article div p { margin:4px 0 0; color:#526673; font-size:12px; line-height:1.45; }
.tracking-timeline-empty { padding:32px; color:#62707d; font-size:12px; text-align:center; }

.tracking-card-heading p { margin:-10px 0 18px; color:#62707d; font-size:12px; }
.tracking-documents-empty { padding:42px 18px; border:1px dashed #b8cbd5; border-radius:13px; background:#e8eff2; text-align:center; }
.tracking-documents-empty > span { font-size:32px; }
.tracking-documents-empty h3 { margin:12px 0 5px; color:#31546b; font-size:16px; }
.tracking-documents-empty p { max-width:440px; margin:0 auto; color:#62707d; font-size:12px; line-height:1.5; }
.tracking-document-list { display:flex; flex-direction:column; gap:9px; }
.tracking-document-list a { display:grid; grid-template-columns:34px minmax(0,1fr) 24px; align-items:center; gap:11px; padding:14px; border:1px solid #c7d4db; border-radius:11px; background:#e7eef2; color:inherit; text-decoration:none; }
.tracking-document-list a > span:nth-child(2) { display:flex; flex-direction:column; gap:4px; }
.tracking-document-list small { color:#62707d; font-size:10px; }
.tracking-document-list i { color:#17618a; font-style:normal; font-size:18px; }

@media (max-width: 1120px) {
    .tracking-list-card { overflow-x:auto; }
    .tracking-list { min-width:1050px; }
    .tracking-detail-layout { grid-template-columns:1fr; }
    .tracking-timeline-card { position:static; }
}

@media (max-width: 680px) {
    .tracking-overview,.tracking-page-heading,.tracking-detail-heading { align-items:stretch; flex-direction:column; }
    .tracking-tabs { width:100%; overflow-x:auto; }
    .tracking-tab { white-space:nowrap; }
    .tracking-search { width:100%; }
    .tracking-heading-icon { display:none; }
    .tracking-summary-grid,.tracking-address-columns { grid-template-columns:1fr; }
    .tracking-share { width:100%; }
}
.portal-chat-route-label{color:#26333d}.portal-chat-route-path{color:#0878b8}
