:root {
    --bg: #eef3f9;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #d8e2ef;
    --soft: #f5f8fc;
    --primary: #175cd3;
    --primary-dark: #123c8c;
    --accent: #06aed5;
    --accent-2: #7c3aed;
    --green: #12b76a;
    --yellow: #f79009;
    --red: #f04438;
    --cyan: #0ea5e9;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.portal-loading {
    display: grid;
    min-height: 100vh;
    place-items: center;
    gap: 12px;
    color: var(--muted);
}

.loading-mark {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: var(--primary);
    font-weight: 900;
    box-shadow: var(--shadow);
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 0.94fr) minmax(360px, 1.06fr);
    background: #faf9f4;
}

.login-copy {
    padding: 48px 6vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    font-weight: 900;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 12px;
    border: 1px solid #111;
    background: var(--accent);
    color: #111;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.eyebrow {
    color: #b58a00;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-copy h1 {
    margin: 10px 0 14px;
    max-width: 760px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: 0;
}

.login-copy p {
    max-width: 700px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
}

.feature-card {
    min-height: 116px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
}

.feature-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.feature-card span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.login-side {
    padding: 36px 5vw 36px 0;
    display: flex;
    align-items: center;
}

.login-card {
    width: min(100%, 520px);
    margin-left: auto;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.visual-panel {
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffdf4;
}

.visual-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.visual-map {
    margin: 18px 0;
    height: 150px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px) 0 0 / 34px 34px,
        #fff9e0;
    position: relative;
    overflow: hidden;
}

.route {
    position: absolute;
    inset: 32px 38px;
    border-top: 4px solid #111;
    border-right: 4px solid var(--accent);
    border-radius: 0 70px 0 0;
}

.route::before,
.route::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #111;
    box-shadow: 0 0 0 6px rgba(255, 196, 0, 0.22);
}

.route::before {
    left: -3px;
    top: -9px;
}

.route::after {
    right: -9px;
    bottom: -3px;
    background: var(--green);
}

.visual-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.visual-kpis div {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.visual-kpis strong {
    display: block;
    font-size: 20px;
}

.visual-kpis span {
    color: var(--muted);
    font-size: 11px;
}

.login-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.login-card .sub {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 13px;
}

.field label {
    color: #474747;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.field input,
.field select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    outline: none;
}

.field input:focus,
.field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 196, 0, 0.2);
}

.primary-btn,
.ghost-btn,
.danger-btn,
.soft-btn {
    min-height: 40px;
    padding: 10px 15px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 850;
}

.primary-btn {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.primary-btn:hover {
    background: var(--primary-dark);
}

.ghost-btn {
    color: #222;
    background: #fff;
    border-color: var(--line);
}

.soft-btn {
    color: #111;
    background: var(--accent);
    border-color: #111;
}

.danger-btn {
    color: #fff;
    background: var(--red);
}

.login-submit {
    width: 100%;
    margin-top: 6px;
}

.login-error {
    display: none;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: #8a1f1f;
    background: #fff1f1;
    border: 1px solid #ffc7c7;
    font-size: 13px;
}

.portal-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px;
    background: #ffffff;
    border-right: 1px solid var(--line);
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
    font-weight: 900;
}

.user-chip {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fffdf4;
    margin-bottom: 14px;
}

.user-chip strong {
    display: block;
}

.user-chip span {
    color: var(--muted);
    font-size: 12px;
}

.profile-field {
    margin: 12px 0 0;
}

.profile-field select {
    min-height: 38px;
    font-size: 13px;
}

.nav-list {
    display: grid;
    gap: 7px;
}

.nav-btn {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: #303030;
    background: transparent;
    text-align: left;
    font-weight: 800;
}

.nav-btn:hover,
.nav-btn.active {
    color: #111;
    background: #fff3b7;
    border-color: var(--accent);
}

.nav-group {
    display: grid;
    gap: 5px;
}

.nav-group.active {
    background: transparent;
}

.nav-parent {
    justify-content: flex-start;
}

.nav-parent strong {
    flex: 1;
    font: inherit;
}

.nav-parent em {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 6px;
    color: var(--primary);
    background: #eaf2ff;
    font-style: normal;
    font-weight: 900;
}

.nav-btn span {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 6px;
    background: #eaf2ff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.nav-sublist {
    display: grid;
    gap: 4px;
    margin: -2px 0 2px 34px;
    padding: 4px 0 0 10px;
    border-left: 1px solid #cfe0f6;
}

.nav-sublist[hidden] {
    display: none !important;
}

.nav-subbtn {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: #4a5870;
    background: transparent;
    text-align: left;
    font-weight: 800;
}

.nav-subbtn:hover,
.nav-subbtn.active {
    color: var(--primary);
    border-color: #bdd4ff;
    background: #eaf2ff;
}

.sidebar-footer {
    margin-top: 18px;
    display: grid;
    gap: 8px;
}

.main {
    min-width: 0;
    padding: 22px;
}

.topbar,
.filter-card,
.panel,
.metric-card,
.table-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.045);
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    margin-bottom: 18px;
}

.topbar h1 {
    margin: 0;
    font-size: 25px;
    letter-spacing: 0;
}

.topbar p {
    margin: 6px 0 0;
    color: var(--muted);
}

.readonly {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #064b30;
    background: #dcf8e7;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.metric-card {
    min-height: 112px;
    padding: 16px;
    border-left: 4px solid var(--accent);
}

.metric-card .label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.metric-card .value {
    margin-top: 8px;
    font-size: 30px;
    font-weight: 900;
}

.metric-card .hint {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 16px;
}

.panel,
.table-card {
    padding: 18px;
    margin-bottom: 16px;
}

.panel h2,
.table-card h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.panel .hint,
.table-card .hint {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.estado-bars {
    display: grid;
    gap: 10px;
}

.estado-row {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr 52px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.bar-track {
    height: 10px;
    border-radius: 99px;
    background: #eee9dc;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #111, var(--accent));
}

.filter-card {
    padding: 12px;
    margin-bottom: 12px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px;
    align-items: end;
}

.guide-filter-grid {
    grid-template-columns: minmax(210px, 1.4fr) repeat(5, minmax(112px, 1fr));
}

.mercaderia-filter-grid {
    grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(120px, 1fr));
}

.filter-field {
    display: grid;
    gap: 4px;
}

.filter-field span {
    color: #474747;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.filter-field input {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    outline: none;
}

.filter-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 196, 0, 0.18);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: end;
    justify-content: flex-end;
}

.guide-filter-grid .filter-actions {
    grid-column: span 2;
    align-self: end;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.guide-filter-grid .filter-actions .soft-btn,
.guide-filter-grid .filter-actions .ghost-btn {
    white-space: nowrap;
}

.mercaderia-filter-grid .filter-actions {
    grid-column: span 3;
    align-self: end;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.mercaderia-filter-grid .filter-actions .soft-btn,
.mercaderia-filter-grid .filter-actions .ghost-btn {
    white-space: nowrap;
}

.filter-actions .soft-btn,
.filter-actions .ghost-btn {
    min-height: 34px;
    padding: 7px 10px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.search-input {
    width: min(100%, 340px);
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.table-wrap table {
    min-width: 1180px;
}

.table-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.subtab {
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: #222;
    background: #fff;
    font-weight: 850;
}

.subtab.active {
    color: #111;
    border-color: #111;
    background: var(--accent);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.notice-card {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    color: #17345f;
    background: #eff6ff;
    font-weight: 750;
}

.notice-card.warning {
    border-color: #fed7aa;
    color: #7c2d12;
    background: #fff7ed;
}

.row-expander {
    width: 28px;
    height: 28px;
    border: 1px solid #b8c8dc;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    font-weight: 900;
}

.invoice-row,
.lote-row {
    cursor: pointer;
}

.detail-row > td {
    background: #f8fbff;
    padding: 0;
}

.expanded-box {
    padding: 16px;
    border-top: 1px solid #dbe6f5;
}

.expanded-box h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #172238;
}

.table-wrap.compact table {
    min-width: 980px;
}

.approval-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.approval-note {
    display: block;
    margin: 0 0 12px;
    color: #536882;
    font-weight: 800;
}

.approval-note textarea,
.line-note,
.signature-editor input {
    width: 100%;
    border: 1px solid #cbd7e6;
    border-radius: 8px;
    padding: 9px 10px;
    background: #fff;
    color: #15223a;
}

.approval-note textarea {
    min-height: 68px;
    margin-top: 6px;
}

.line-note {
    min-width: 220px;
    min-height: 46px;
    resize: vertical;
}

.decision-select {
    min-width: 160px;
    border: 1px solid #cbd7e6;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.signature-editor {
    display: grid;
    gap: 14px;
}

.signature-editor label {
    display: grid;
    gap: 6px;
    color: #536882;
    font-weight: 800;
}

.signature-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.signature-option {
    display: grid;
    gap: 6px;
    align-items: center;
    justify-items: center;
    min-height: 112px;
    padding: 8px;
    border: 1px solid #d5e0ef;
    border-radius: 10px;
    background: #fff;
    color: #536882;
    font-weight: 850;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.signature-option:hover,
.signature-option.active {
    border-color: #2563eb;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.signature-option.active {
    background: #eef5ff;
    color: #12315f;
}

.signature-option img {
    width: 100%;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.signature-preview {
    height: 150px;
    min-height: 150px;
    display: grid;
    place-items: center;
    border: 1px dashed #b7c8df;
    border-radius: 10px;
    background: #f8fbff;
    overflow: hidden;
}

.signature-preview img {
    width: 100%;
    height: 132px;
    max-width: 100%;
    max-height: 132px;
    object-fit: contain;
}

@media (max-width: 760px) {
    .signature-options {
        grid-template-columns: 1fr;
    }
}

.portal-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 5000;
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    background: #111827;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
    font-weight: 850;
    transition: opacity .24s ease, transform .24s ease;
}

.portal-toast.out {
    opacity: 0;
    transform: translateY(8px);
}

.metric-card.gold {
    border-left-color: #d7b400;
}

.metric-card.green {
    border-left-color: #73b936;
}

.metric-card.cyan {
    border-left-color: #0b9dcc;
}

.metric-card.orange {
    border-left-color: #f09933;
}

.tms-board {
    display: grid;
    gap: 14px;
}

.tms-lane {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.045);
}

.tms-lane header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #111;
    background: #faf7ec;
    font-weight: 900;
}

.tms-lane.gold header {
    background: #fff7c8;
}

.tms-lane.green header {
    background: #e7f8d6;
}

.tms-lane.cyan header {
    background: #e4f7ff;
}

.tms-lane.orange header {
    background: #fff0dc;
}

.lane-table {
    border: 0;
    border-radius: 0;
}

.guides-table .guide-row {
    cursor: pointer;
}

.guides-table .guide-row:hover td {
    background: #fff9e7;
}

.guide-detail-row td {
    padding: 0;
    background: #fffdf4;
}

.guide-detail {
    padding: 16px;
    border-top: 1px solid var(--line);
}

.guide-detail h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.icon-btn,
.link-btn {
    border-radius: 7px;
    border: 1px solid #111;
    background: #fff7ce;
    color: #111;
    font-weight: 850;
}

.icon-btn {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 12px;
}

.link-btn {
    padding: 3px 6px;
    background: transparent;
    border-color: transparent;
    text-decoration: underline;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.pagination-bar > div {
    display: flex;
    gap: 8px;
}

.pagination-bar button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.detail-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fffdf4;
}

.detail-item span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-item strong {
    display: block;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

.attachment-list {
    display: grid;
    gap: 8px;
}

.attachment-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: #fffdf4;
    text-decoration: none;
}

.attachment-link img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.attachment-link > span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.attachment-link:hover {
    border-color: var(--accent);
}

.attachment-link small {
    color: var(--muted);
    font-size: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 13px;
    vertical-align: top;
}

th {
    color: #303030;
    background: #faf7ec;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    color: #111;
    background: #f1eee5;
    font-size: 11px;
    font-weight: 900;
}

.badge.green {
    color: #107243;
    background: #def9e9;
}

.badge.yellow {
    color: #815900;
    background: #ffe59b;
}

.badge.gray {
    color: #52647e;
    background: #edf1f6;
}

.empty {
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.placeholder {
    max-width: 860px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.placeholder h2 {
    margin-top: 0;
}

.placeholder-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.placeholder-list li {
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fffdf4;
}

.modal-layer {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.55);
}

.modal-layer.open {
    display: flex;
}

.modal {
    width: min(920px, 100%);
    max-height: 88vh;
    overflow: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}

.modal-head {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    color: #111;
    background: var(--accent);
}

.modal-head h3 {
    margin: 0;
    font-size: 17px;
}

.modal-close {
    min-width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-weight: 900;
}

.modal-body {
    padding: 18px;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    padding: 13px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: #fffdf4;
}

.timeline-item strong {
    display: block;
    margin-bottom: 5px;
}

.timeline-item span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.mobile-only {
    display: none;
}

@media (max-width: 1100px) {
    .login-page,
    .portal-shell,
    .dashboard-grid,
    .two-col {
        grid-template-columns: 1fr;
    }

    .login-side {
        padding: 0 6vw 46px;
    }

    .login-card {
        margin: 0;
        width: 100%;
    }

    .sidebar {
        position: relative;
        height: auto;
        display: block;
        padding: 12px;
    }

    .nav-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-grid,
    .guide-filter-grid,
    .mercaderia-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .login-copy {
        padding: 30px 18px;
    }

    .feature-grid,
    .metric-grid,
    .visual-kpis,
    .nav-list {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 12px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-card {
        min-height: 92px;
    }

    .table-card-head,
    .pagination-bar,
    .attachment-link {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid,
    .guide-filter-grid,
    .mercaderia-filter-grid {
        grid-template-columns: 1fr;
    }

    .estado-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: inline-flex;
    }

    .login-copy h1 {
        font-size: 34px;
    }
}

/* Corporate B2B skin */
body {
    background:
        radial-gradient(circle at 12% 0%, rgba(23, 92, 211, 0.12), transparent 28%),
        linear-gradient(180deg, #f7fbff 0%, var(--bg) 42%, #e9f0f8 100%);
}

.login-page {
    background:
        linear-gradient(120deg, rgba(23, 92, 211, 0.10), transparent 34%),
        linear-gradient(180deg, #fbfdff 0%, #eef4fb 100%);
}

.brand-mark {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 32px rgba(23, 92, 211, 0.25);
}

.eyebrow {
    color: var(--primary);
}

.login-copy h1,
.topbar h1 {
    color: #0b1220;
}

.feature-card,
.login-card,
.visual-panel,
.topbar,
.filter-card,
.panel,
.metric-card,
.table-card,
.user-chip,
.placeholder,
.future-card,
.ops-card {
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.visual-panel {
    background: linear-gradient(145deg, #ffffff, #eff8ff);
}

.visual-map {
    background:
        linear-gradient(90deg, rgba(14, 165, 233, 0.12) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(rgba(23, 92, 211, 0.10) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(135deg, #eff8ff, #ffffff);
}

.route {
    border-top-color: var(--primary);
    border-right-color: var(--accent);
}

.route::before {
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(23, 92, 211, 0.16);
}

.route::after {
    background: var(--green);
    box-shadow: 0 0 0 6px rgba(18, 183, 106, 0.16);
}

.sidebar {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px);
    border-color: rgba(148, 163, 184, 0.34);
}

.nav-btn {
    color: #334155;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--primary-dark);
    background: linear-gradient(90deg, rgba(23, 92, 211, 0.12), rgba(6, 174, 213, 0.08));
    border-color: rgba(23, 92, 211, 0.20);
}

.nav-btn span {
    color: var(--primary);
}

.primary-btn,
.soft-btn,
.ghost-btn,
.danger-btn {
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.primary-btn,
.soft-btn {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), #4f7df3);
}

.primary-btn:hover,
.soft-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.ghost-btn {
    color: #334155;
    background: #fff;
    border-color: #cbd5e1;
}

.danger-btn {
    background: linear-gradient(135deg, var(--red), #fb7185);
}

.readonly {
    color: #047857;
    background: #dcfce7;
}

.metric-card {
    min-height: 108px;
    border-left: 5px solid var(--primary);
}

.metric-card.blue {
    border-left-color: var(--primary);
}

.metric-card.gold {
    border-left-color: #f59e0b;
}

.metric-card.green {
    border-left-color: var(--green);
}

.metric-card.cyan {
    border-left-color: var(--cyan);
}

.metric-card.orange {
    border-left-color: var(--yellow);
}

.metric-card .value {
    color: #172554;
}

.bar-track,
.chart-track {
    background: #e2e8f0;
}

.bar-fill,
.chart-fill {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.filter-card {
    background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.filter-field input,
.field input,
select {
    border-color: #cbd5e1;
    background: #fff;
}

.filter-field input:focus,
.field input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.12);
}

th {
    color: #475569;
    background: #f1f5f9;
}

td {
    border-bottom-color: #e2e8f0;
}

tbody tr:hover {
    background: #f8fbff;
}

.badge {
    color: #334155;
    background: #e2e8f0;
}

.badge.green {
    color: #027a48;
    background: #d1fadf;
}

.badge.yellow {
    color: #93370d;
    background: #fef0c7;
}

.badge.gray {
    color: #475467;
    background: #eef2f7;
}

.icon-btn,
.link-btn {
    color: var(--primary);
    border-color: rgba(23, 92, 211, 0.35);
    background: #eff6ff;
}

.icon-btn:hover,
.link-btn:hover {
    color: #fff;
    background: var(--primary);
}

.tms-lane {
    background: #fff;
    overflow: hidden;
}

.tms-lane header,
.future-card header,
.ops-card summary {
    color: #0f172a;
    background: #f8fafc;
}

.tms-lane.gold header,
.ops-card.gold summary {
    background: #fffbeb;
}

.tms-lane.green header,
.ops-card.green summary {
    background: #ecfdf3;
}

.tms-lane.cyan header,
.ops-card.cyan summary {
    background: #ecfeff;
}

.tms-lane.orange header,
.ops-card.orange summary {
    background: #fff7ed;
}

.modal-layer {
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(3px);
}

.modal {
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 12px;
}

.modal-head {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.modal-close {
    background: rgba(15, 23, 42, 0.28);
}

.timeline-item {
    border-left-color: var(--primary);
    background: #f8fbff;
}

.ops-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.ops-card {
    overflow: hidden;
}

.ops-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    cursor: pointer;
    font-weight: 900;
}

.ops-card summary strong,
.future-card header span,
.tms-lane header span {
    display: inline-flex;
    min-width: 34px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #dbeafe;
}

.today-board,
.future-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.today-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.board-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: var(--radius);
    background: linear-gradient(90deg, #ffffff, #f0f7ff);
}

.board-title h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.future-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.future-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0;
}

.insight-card.wide {
    grid-column: span 2;
}

.chart-list {
    display: grid;
    gap: 12px;
}

.chart-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1.4fr) minmax(110px, 0.5fr);
    align-items: center;
    gap: 12px;
}

.chart-label {
    display: grid;
    gap: 3px;
}

.chart-label span {
    color: var(--muted);
    font-size: 12px;
}

.chart-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
}

.chart-fill {
    height: 100%;
    border-radius: inherit;
}

.rse-filter-grid,
.sustainability-filter-grid {
    grid-template-columns: repeat(6, minmax(130px, 1fr));
}

@media (max-width: 1100px) {
    .ops-strip,
    .today-board,
    .future-grid,
    .insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rse-filter-grid,
    .sustainability-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ops-strip,
    .today-board,
    .future-grid,
    .insight-grid,
    .chart-row {
        grid-template-columns: 1fr;
    }

    .insight-card.wide {
        grid-column: auto;
    }

    .rse-filter-grid,
    .sustainability-filter-grid {
        grid-template-columns: 1fr;
    }
}

/* Enterprise portal refresh */
:root {
    --bg: #f3f6fb;
    --panel: #ffffff;
    --ink: #101828;
    --muted: #667085;
    --line: #d9e2ec;
    --soft: #f6f9fc;
    --primary: #155eef;
    --primary-dark: #0b3b8f;
    --accent: #0891b2;
    --accent-2: #475467;
    --green: #12b76a;
    --yellow: #f79009;
    --red: #f04438;
    --cyan: #0ea5e9;
    --shadow: 0 18px 50px rgba(16, 24, 40, 0.10);
    --radius: 8px;
}

body {
    color: var(--ink);
    background:
        linear-gradient(180deg, #f8fbff 0%, #f3f6fb 38%, #eef3f9 100%);
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(420px, 0.92fr);
    background:
        linear-gradient(135deg, rgba(21, 94, 239, 0.10), transparent 38%),
        linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

.login-copy {
    padding: 56px 7vw;
}

.login-brand {
    margin-bottom: 42px;
    color: #0f172a;
}

.brand-mark,
.loading-mark {
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #155eef, #0e7490);
    box-shadow: 0 18px 36px rgba(21, 94, 239, 0.24);
}

.eyebrow {
    color: #155eef;
    letter-spacing: 0;
}

.login-copy h1 {
    max-width: 760px;
    color: #0b1220;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 0.98;
}

.login-copy p {
    max-width: 720px;
    color: #475467;
}

.feature-card {
    min-height: 124px;
    border-color: rgba(21, 94, 239, 0.12);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
}

.login-side {
    padding: 44px 6vw 44px 0;
}

.login-card {
    width: min(100%, 560px);
    border: 1px solid rgba(21, 94, 239, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 30px 70px rgba(16, 24, 40, 0.16);
}

.visual-panel {
    position: relative;
    overflow: hidden;
    border-color: rgba(21, 94, 239, 0.12);
    background:
        linear-gradient(135deg, rgba(21, 94, 239, 0.10), rgba(8, 145, 178, 0.06)),
        #fff;
}

.visual-panel::after {
    content: "";
    position: absolute;
    inset: auto 18px 18px auto;
    width: 128px;
    height: 128px;
    border-radius: 28px;
    border: 1px solid rgba(21, 94, 239, 0.14);
    background:
        linear-gradient(135deg, rgba(21, 94, 239, 0.12), rgba(8, 145, 178, 0.04));
    transform: rotate(8deg);
}

.visual-map {
    background:
        linear-gradient(90deg, rgba(21, 94, 239, 0.10) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(rgba(8, 145, 178, 0.10) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(135deg, #f8fbff, #ffffff);
}

.route {
    border-top-color: #155eef;
    border-right-color: #0891b2;
}

.route::before {
    background: #155eef;
    box-shadow: 0 0 0 6px rgba(21, 94, 239, 0.16);
}

.route::after {
    background: #12b76a;
    box-shadow: 0 0 0 6px rgba(18, 183, 106, 0.16);
}

.portal-shell {
    grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
    padding: 18px 16px;
    color: #e5e7eb;
    background:
        linear-gradient(180deg, #101828 0%, #0f172a 100%);
    border-right: 0;
    box-shadow: 18px 0 50px rgba(16, 24, 40, 0.16);
}

.sidebar-brand {
    padding: 8px 4px 18px;
    border-bottom-color: rgba(255, 255, 255, 0.10);
}

.sidebar-brand small {
    color: #94a3b8;
}

.sidebar .brand-mark {
    width: 42px;
    height: 42px;
    box-shadow: 0 12px 28px rgba(21, 94, 239, 0.34);
}

.user-chip {
    border-color: rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
}

.user-chip span {
    color: #cbd5e1;
}

.profile-field label {
    color: #93c5fd;
}

.profile-field select {
    color: #0f172a;
    background: #fff;
}

.nav-list {
    gap: 8px;
}

.nav-btn {
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.nav-btn span {
    min-width: 34px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #93c5fd;
    background: rgba(255, 255, 255, 0.06);
    font-size: 11px;
}

.nav-btn:hover,
.nav-btn.active {
    color: #fff;
    border-color: rgba(21, 94, 239, 0.58);
    background: linear-gradient(90deg, rgba(21, 94, 239, 0.88), rgba(8, 145, 178, 0.72));
    box-shadow: 0 14px 30px rgba(21, 94, 239, 0.20);
}

.nav-btn:hover span,
.nav-btn.active span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.sidebar-footer .ghost-btn {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
}

.main {
    padding: 12px 26px 26px;
}

.topbar {
    min-height: 124px;
    padding: 18px 26px;
    border-color: rgba(21, 94, 239, 0.12);
    background:
        linear-gradient(90deg, rgba(21, 94, 239, 0.07), transparent 48%),
        #fff;
    box-shadow: 0 18px 44px rgba(16, 24, 40, 0.07);
}

.topbar h1 {
    color: #101828;
    font-size: 26px;
}

.readonly {
    color: #047857;
    background: #dcfce7;
}

.topbar-logo {
    width: 122px;
    height: 102px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 8px;
    background: #0b1220;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.subtabs {
    padding: 4px;
    width: fit-content;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.05);
}

.subtab {
    border: 0;
    color: #475467;
    background: transparent;
}

.subtab.active {
    color: #fff;
    background: #155eef;
    box-shadow: 0 12px 24px rgba(21, 94, 239, 0.20);
}

.filter-card,
.panel,
.metric-card,
.table-card,
.future-card,
.ops-card {
    border-color: rgba(148, 163, 184, 0.32);
    background: #fff;
    box-shadow: 0 14px 36px rgba(16, 24, 40, 0.06);
}

.filter-card {
    padding: 14px;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.filter-field span,
.field label {
    color: #475467;
}

.filter-field input,
.field input,
.field select,
select,
.search-input {
    border-color: #cbd5e1;
    background: #fff;
    color: #101828;
}

.filter-field input:focus,
.field input:focus,
.field select:focus,
select:focus,
.search-input:focus {
    border-color: #155eef;
    box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.12);
}

.primary-btn,
.soft-btn {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #155eef, #2563eb);
}

.primary-btn:hover,
.soft-btn:hover {
    background: linear-gradient(135deg, #0b3b8f, #155eef);
}

.ghost-btn {
    color: #344054;
    background: #fff;
    border-color: #cbd5e1;
}

.ghost-btn:hover {
    color: #155eef;
    border-color: rgba(21, 94, 239, 0.42);
    background: #eff6ff;
}

.danger-btn {
    background: #f04438;
}

.metric-card {
    min-height: 104px;
    padding: 17px 18px;
    border-left-width: 4px;
    background:
        linear-gradient(180deg, #fff, #fbfdff);
}

.metric-card .label {
    color: #475467;
}

.metric-card .value {
    color: #101828;
    font-size: 31px;
}

.metric-card .hint {
    color: #667085;
}

.metric-card.gold {
    border-left-color: #eab308;
}

.metric-card.green {
    border-left-color: #12b76a;
}

.metric-card.cyan {
    border-left-color: #0ea5e9;
}

.metric-card.orange {
    border-left-color: #f79009;
}

.table-wrap {
    border-color: #d9e2ec;
    background: #fff;
}

table {
    min-width: 900px;
}

th {
    color: #475467;
    background: #f3f6fb;
    border-bottom: 1px solid #d9e2ec;
}

td {
    color: #344054;
    border-bottom-color: #e5edf5;
}

tbody tr:hover td {
    background: #f8fbff;
}

.guides-table .guide-row:hover td {
    background: #f1f7ff;
}

.guide-detail-row td {
    background: #f8fbff;
}

.guide-detail {
    border-top-color: #d9e2ec;
}

.icon-btn,
.link-btn {
    color: #155eef;
    border-color: rgba(21, 94, 239, 0.28);
    background: #eff6ff;
}

.icon-btn:hover,
.link-btn:hover {
    color: #fff;
    background: #155eef;
}

.guide-detail-link {
    font-size: 12px;
    font-weight: 900;
    text-align: left;
}

.guide-modal-detail h4 {
    margin: 14px 0 10px;
}

.compact-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.badge {
    color: #344054;
    background: #eef2f7;
}

.badge.green {
    color: #027a48;
    background: #d1fadf;
}

.badge.yellow {
    color: #93370d;
    background: #fef0c7;
}

.ops-strip,
.today-board,
.future-grid,
.insight-grid {
    gap: 14px;
}

.ops-card summary,
.future-card header,
.tms-lane header {
    background: #f8fbff;
}

.ops-card.gold summary,
.tms-lane.gold header {
    background: #fffbeb;
}

.ops-card.green summary,
.tms-lane.green header {
    background: #ecfdf3;
}

.ops-card.cyan summary,
.tms-lane.cyan header {
    background: #ecfeff;
}

.ops-card.orange summary,
.tms-lane.orange header {
    background: #fff7ed;
}

.board-title {
    background:
        linear-gradient(90deg, rgba(21, 94, 239, 0.08), transparent),
        #fff;
}

.chart-row {
    padding: 10px;
    border: 1px solid #e5edf5;
    border-radius: 8px;
    background: #fbfdff;
}

.bar-track,
.chart-track {
    background: #e5edf5;
}

.bar-fill,
.chart-fill {
    background: linear-gradient(90deg, #155eef, #0891b2);
}

.modal-layer {
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(4px);
}

.modal {
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 12px;
}

.modal-head {
    color: #fff;
    background: linear-gradient(135deg, #155eef, #0891b2);
}

.modal-close {
    color: #fff;
    background: rgba(15, 23, 42, 0.28);
}

.timeline-item,
.detail-item,
.attachment-link,
.placeholder-list li {
    background: #f8fbff;
}

.provider-form {
    display: grid;
    gap: 12px;
}

.provider-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
}

.field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.field textarea {
    width: 100%;
    min-height: 78px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    resize: vertical;
    outline: none;
}

.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 196, 0, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.mini-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mini-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    text-align: left;
}

.mini-row:hover {
    border-color: #bdd4ff;
    background: #f8fbff;
}

.mini-row.static {
    cursor: default;
}

.mini-row span {
    color: var(--muted);
    font-size: 12px;
}

.soft-link {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.soft-link:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .portal-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    }

    .nav-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .provider-form-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .login-side {
        padding: 0 7vw 48px;
    }
}

@media (max-width: 720px) {
    .main {
        padding: 14px;
    }

    .sidebar {
        padding: 14px;
    }

    .nav-list {
        grid-template-columns: 1fr;
    }

    .provider-form-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        min-height: auto;
        padding: 18px;
    }

    .login-copy {
        padding: 34px 20px;
    }

    .login-copy h1 {
        font-size: 36px;
    }
}

.brand-logo {
    display: block;
    object-fit: contain;
    border-radius: 10px;
    background: #0b1220;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.brand-logo-login {
    width: 132px;
    height: 88px;
}

.brand-logo-sidebar {
    width: 88px;
    height: 64px;
    flex: 0 0 auto;
}

.sidebar-brand-text {
    transform: translate(8px, -6px);
    line-height: 1.25;
}

.sidebar-brand-text > div {
    font-size: 16px;
}

.loading-logo {
    width: 136px;
    max-height: 92px;
    object-fit: contain;
    border-radius: 14px;
    background: #0b1220;
    box-shadow: var(--shadow);
}

@media (max-width: 720px) {
    .topbar-logo {
        width: 96px;
        height: 78px;
    }
}
