/* ── Portal microWK — colores: #000739, #00c693, #5dffc8 ── */

:root {
    --portal-navy: #000739;
    --portal-green: #00c693;
    --portal-green-light: #5dffc8;
    --portal-green-dark: #00a87c;
    --portal-bg: #eef1f5;
    --portal-border: #e8ebf0;
    --portal-text: #444;
    --portal-muted: #666;
    --site-max-width: 1380px;
    --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Tipografía global: Montserrat en toda la web ── */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html,
body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--portal-text);
}

button,
input,
select,
textarea,
optgroup,
.btn,
.form-control,
.input-group-addon,
.input-lg,
.dropdown-menu,
.dropdown-menu > li > a,
.modal-content,
.modal-title,
.modal-body,
.modal-footer,
.alert,
.navbar,
.nav,
.nav > li > a,
.panel,
.panel-heading,
.panel-body,
.panel-title,
.table,
.pagination > li > a,
.pagination > li > span,
.popover,
.tooltip,
.list-group-item,
.breadcrumb,
label,
legend,
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-sans);
}

h1, .h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2, .h2 {
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

h3, .h3 {
    font-weight: 700;
    line-height: 1.3;
}

h4, .h4, h5, .h5, h6, .h6 {
    font-weight: 700;
    line-height: 1.35;
}

.btn {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.form-control {
    font-size: 15px;
    font-weight: 400;
}

small, .small {
    font-size: 13px;
    font-weight: 500;
}

strong, b, .font-bold {
    font-weight: 700;
}

/* ── Shell global: todas las pantallas al mismo ancho máximo ── */
.container {
    max-width: var(--site-max-width) !important;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.page-home > .container,
.page-portal > .container,
.portal-footer .container {
    max-width: var(--site-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* ── Header ── */
.portal-header {
    background: var(--portal-navy);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 4px 24px rgba(0, 7, 57, 0.25);
}

.portal-header-top {
    background: var(--portal-green);
    font-size: 13px;
    line-height: 1.2;
    border-bottom: 1px solid rgba(0, 7, 57, 0.12);
}

.portal-header-top .container {
    padding-left: 20px;
    padding-right: 20px;
}

.portal-header-top-inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    padding: 6px 0;
    width: 100%;
    box-sizing: border-box;
}

.portal-header-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
    min-width: 0;
    flex: 1 1 auto;
}

.portal-header-tag-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 7, 57, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-header-tag-icon .glyphicon {
    font-size: 12px;
    line-height: 1;
    position: static;
    top: auto;
    margin: 0;
    color: #fff;
}

.portal-header-tag-text {
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-header-auth {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    margin: 0;
    flex-shrink: 0;
}

.portal-header-auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    color: #fff !important;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    border-radius: 999px;
    background: rgba(0, 7, 57, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.portal-header-auth-link:hover,
.portal-header-auth-link:focus {
    background: rgba(0, 7, 57, 0.24);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff !important;
    text-decoration: none;
}

.portal-header-auth-link .glyphicon {
    position: static;
    top: auto;
    margin: 0;
    font-size: 11px;
    line-height: 1;
}

.portal-header-auth-label-short {
    display: none !important;
}

.portal-header-auth-text {
    display: inline;
}

.portal-header-auth-link .portal-header-auth-label-full {
    display: inline;
}

.portal-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 7, 57, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    max-width: 200px;
}

.portal-user-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-user-pill .glyphicon {
    position: static;
    top: auto;
    margin: 0;
    font-size: 11px;
    flex-shrink: 0;
}

.portal-demo-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
    width: 100%;
}

.portal-demo-banner-icon {
    font-size: 22px;
    color: #2563eb;
    margin-top: 2px;
}

.portal-demo-banner-body strong {
    display: block;
    color: #1e3a8a;
    font-size: 15px;
    margin-bottom: 4px;
}

.portal-demo-banner-body p {
    margin: 0;
    color: #3730a3;
    font-size: 14px;
}

.portal-demo-banner code {
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #1e40af;
}

.portal-header-main {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-header-main .container {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 56px;
}

.portal-logo {
    flex-shrink: 0;
    display: block;
}

.portal-logo img {
    max-height: 52px;
    width: auto;
    display: block;
}

.portal-nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    margin-left: auto;
}

.portal-nav-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 4px 0;
    border-radius: 1px;
}

.portal-nav-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.portal-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.portal-nav > li > a {
    display: block;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.portal-nav > li > a:hover,
.portal-nav > li > a:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    text-decoration: none;
}

.portal-nav > li.active > a,
.portal-nav > li.portal-nav-active > a {
    background: rgba(0, 198, 147, 0.25);
    color: var(--portal-green-light) !important;
}

.portal-nav .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 7, 57, 0.15);
    padding: 8px;
    margin-top: 8px;
}

.portal-nav .dropdown-menu > li > a {
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 15px;
    color: var(--portal-navy) !important;
}

.portal-nav .dropdown-menu > li > a:hover {
    background: #f0fdf8;
    color: var(--portal-green-dark) !important;
}

.portal-cta-btn {
    display: inline-block;
    background: var(--portal-green);
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 16px rgba(0, 198, 147, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
}

.portal-cta-btn:hover,
.portal-cta-btn:focus {
    background: #00db9f;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 198, 147, 0.45);
    text-decoration: none;
}

.portal-cta-btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.portal-cta-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

/* ── Footer ── */
.portal-footer {
    background: var(--portal-navy);
    color: rgba(255, 255, 255, 0.75);
    padding: 0;
    margin-top: 0;
}

.portal-footer-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--portal-green) 0%, var(--portal-green-light) 50%, var(--portal-green) 100%);
}

.portal-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px 32px;
    padding: 48px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: start;
}

.portal-footer-logo {
    display: block;
    margin-bottom: 18px;
}

.portal-footer-brand img {
    max-height: 48px;
    width: auto;
    display: block;
}

.portal-footer-brand p {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.62);
    margin: 0 0 20px;
    max-width: 320px;
}

.portal-footer-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portal-footer-cta {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: var(--portal-green);
    color: #fff !important;
    transition: background 0.2s, transform 0.2s;
}

.portal-footer-cta:hover {
    background: #00db9f;
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.portal-footer-cta-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.9) !important;
}

.portal-footer-cta-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff !important;
}

.portal-footer-col h4 {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 198, 147, 0.35);
}

.portal-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-footer-links li {
    margin-bottom: 10px;
}

.portal-footer-links a {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 14px;
    transition: color 0.2s;
}

.portal-footer-links a:hover {
    color: var(--portal-green-light) !important;
    text-decoration: none;
}

.portal-footer-bottom {
    padding: 18px 0 22px;
}

.portal-footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.portal-footer-copy {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

.portal-footer-copy strong {
    color: rgba(255, 255, 255, 0.72);
}

.portal-footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.portal-footer-bottom-links a {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.portal-footer-bottom-links a:hover {
    color: var(--portal-green-light) !important;
    text-decoration: none;
}

.portal-footer-bottom strong {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Page layouts ── */
.page-portal {
    background: var(--portal-bg);
    min-height: 500px;
    padding: 32px 0 48px;
}

.page-portal-inner {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 7, 57, 0.04);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Auth (login / registro) ── */
.portal-auth {
    width: 100%;
    margin: 0 auto;
}

.portal-auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.portal-auth-header h1 {
    color: var(--portal-navy);
    font-weight: 800;
    font-size: 32px;
    margin: 0 0 10px;
}

.portal-auth-header p {
    color: var(--portal-muted);
    font-size: 17px;
    margin: 0;
}

.portal-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.portal-auth-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 7, 57, 0.05);
}

.portal-auth-card h2 {
    color: var(--portal-navy);
    font-weight: 800;
    font-size: 22px;
    margin: 0 0 4px;
}

.portal-auth-card .portal-auth-sub {
    color: var(--portal-muted);
    font-size: 14px;
    margin-bottom: 24px;
    display: block;
}

.portal-auth-card-login {
    background: linear-gradient(160deg, var(--portal-navy) 0%, #002855 100%);
    border: none;
}

.portal-auth-card-login h2 {
    color: #fff;
}

.portal-auth-card-login .portal-auth-sub {
    color: rgba(255, 255, 255, 0.65);
}

.portal-auth-card-login .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 10px;
    height: 48px;
}

.portal-auth-card-login .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.portal-auth-card-login .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--portal-green);
    box-shadow: 0 0 0 3px rgba(0, 198, 147, 0.25);
    color: #fff;
}

.portal-auth-card-login .btn-success {
    background: var(--portal-green);
    border-color: var(--portal-green);
    border-radius: 10px;
    font-weight: 700;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
}

.portal-auth-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.portal-auth-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--portal-text);
    font-size: 15px;
}

.portal-auth-benefits .glyphicon {
    color: var(--portal-green);
    font-size: 13px;
    top: 0;
}

/* ── Services portal (home) ── */
.home-services {
    background: linear-gradient(180deg, #fff 0%, var(--portal-bg) 100%);
}

.home-service-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    padding: 0;
    height: 100%;
    margin-bottom: 24px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
}

.home-service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 7, 57, 0.1);
    border-color: rgba(0, 198, 147, 0.35);
}

.home-service-card-top {
    padding: 24px 24px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.home-service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 198, 147, 0.15), rgba(0, 198, 147, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-service-icon .glyphicon {
    color: var(--portal-green);
    font-size: 22px;
    top: 0;
}

.home-service-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 198, 147, 0.12);
    color: var(--portal-green-dark);
}

.home-service-badge-hot {
    background: rgba(0, 7, 57, 0.08);
    color: var(--portal-navy);
}

.home-service-body {
    padding: 16px 24px 20px;
    flex: 1;
}

.home-service-body h3 {
    color: var(--portal-navy);
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 8px;
}

.home-service-body p {
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.home-service-footer {
    padding: 0 24px 24px;
}

.home-service-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--portal-green-dark) !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 16px;
    background: #f8fafb;
    border-radius: 10px;
    transition: background 0.2s;
    text-decoration: none;
}

.home-service-link:hover {
    background: #f0fdf8;
    text-decoration: none;
    color: var(--portal-green) !important;
}

.home-service-link .glyphicon {
    font-size: 12px;
    top: 0;
    transition: transform 0.2s;
}

.home-service-card:hover .home-service-link .glyphicon {
    transform: translateX(4px);
}

/* Quick access bar */
.home-quick-access {
    background: var(--portal-navy);
    padding: 0;
    margin: 0;
}

.home-quick-inner {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
}

.home-quick-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 16px;
    min-width: 0;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s, color 0.2s;
    text-align: center;
}

.home-quick-item:last-child {
    border-right: none;
}

.home-quick-item:hover {
    background: rgba(0, 198, 147, 0.15);
    color: var(--portal-green-light) !important;
    text-decoration: none;
}

.home-quick-item .glyphicon {
    color: var(--portal-green);
    font-size: 16px;
    top: 0;
}

/* Testimonials strip */
.home-testimonials {
    background: #fff;
}

.home-testimonial {
    background: #f8fafb;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    padding: 24px;
    height: 100%;
    margin-bottom: 20px;
}

.home-testimonial-stars {
    color: var(--portal-green);
    font-size: 14px;
    margin-bottom: 12px;
}

.home-testimonial-stars .glyphicon {
    margin-right: 2px;
}

.home-testimonial p {
    color: var(--portal-text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 16px;
    font-style: italic;
}

.home-testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-testimonial-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--portal-green), var(--portal-green-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}

.home-testimonial-name {
    font-weight: 700;
    color: var(--portal-navy);
    font-size: 14px;
}

.home-testimonial-role {
    font-size: 12px;
    color: var(--portal-muted);
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .portal-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .portal-nav-toggle {
        display: block;
    }

    .portal-nav-wrap {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--portal-navy);
        padding: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        align-items: stretch;
    }

    .portal-nav-wrap.portal-nav-open {
        display: flex;
    }

    .portal-header-main .container {
        position: relative;
        flex-wrap: wrap;
    }

    .portal-nav {
        flex-direction: column;
        width: 100%;
    }

    .portal-nav > li > a {
        padding: 12px 16px;
    }

    .portal-cta-btn {
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }

    .portal-auth-grid {
        grid-template-columns: 1fr;
    }

    .home-quick-item {
        min-width: 50%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .home-quick-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .portal-header-tag-text {
        display: none;
    }

    .portal-header-tag {
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .portal-header-top .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .portal-header-top-inner {
        gap: 10px;
        min-height: 40px;
        padding: 5px 0;
    }

    .portal-header-tag {
        gap: 8px;
    }

    .portal-header-tag-icon {
        width: 26px;
        height: 26px;
    }

    .portal-header-tag-text {
        font-size: 11px;
    }

    .portal-header-auth {
        gap: 6px;
        flex-shrink: 0;
    }

    .portal-header-auth-link {
        padding: 6px 10px;
        font-size: 11px;
    }

    .portal-header-auth-label-full {
        display: none !important;
    }

    .portal-header-auth-label-short {
        display: inline !important;
    }

    .portal-user-pill {
        max-width: 120px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .portal-footer-bottom-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .portal-footer-bottom-links {
        justify-content: center;
        gap: 14px;
    }

    .portal-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portal-logo img {
        max-height: 42px;
    }

    .page-portal-inner {
        padding: 20px;
        border-radius: 12px;
    }

    .portal-auth-card {
        padding: 24px;
    }
}

/* ── Auth cross-links ── */
.portal-auth-switch {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--portal-muted);
}

.portal-auth-switch a {
    color: var(--portal-green-dark) !important;
    font-weight: 700;
}

.portal-auth-card-login .portal-auth-switch a {
    color: var(--portal-green-light) !important;
}

.portal-auth-card-client {
    background: linear-gradient(160deg, #002855 0%, #000739 100%);
}

/* ── Worker route gates (afiliados, cobros, etc.) ── */
.portal-gate {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    width: 100%;
    margin: 0 auto;
    align-items: start;
}

.portal-gate-main {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: 0 8px 32px rgba(0, 7, 57, 0.06);
}

.portal-gate-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e8fff8, #d1fae5);
    color: var(--portal-green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.portal-gate-main h1 {
    color: var(--portal-navy) !important;
    font-weight: 800;
    font-size: 30px;
    margin: 0 0 8px;
}

.portal-gate-subtitle {
    color: var(--portal-green-dark);
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 16px;
}

.portal-gate-intro {
    color: var(--portal-muted);
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 24px;
}

.portal-gate-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}

.portal-gate-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    color: #444;
    font-size: 15px;
    line-height: 1.5;
}

.portal-gate-benefits .glyphicon-ok {
    color: var(--portal-green);
    margin-top: 3px;
    flex-shrink: 0;
}

.portal-gate-steps h3 {
    color: var(--portal-navy);
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 16px;
}

.portal-gate-steps ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-gate-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    color: #555;
    font-size: 15px;
    border-bottom: 1px solid var(--portal-border);
}

.portal-gate-steps li:last-child {
    border-bottom: none;
}

.portal-gate-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--portal-green);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-gate-login-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    padding: 28px 24px;
    box-shadow: 0 8px 32px rgba(0, 7, 57, 0.08);
    position: sticky;
    top: 100px;
}

.portal-gate-login-card h2 {
    color: var(--portal-navy);
    font-weight: 800;
    font-size: 22px;
    margin: 0 0 6px;
}

.portal-gate-login-sub {
    color: var(--portal-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.portal-gate-login-card label {
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

.portal-gate-login-card .form-control {
    border-radius: 10px;
}

.portal-gate-register {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--portal-muted);
}

.portal-gate-register a {
    color: var(--portal-green-dark) !important;
    font-weight: 700;
}

/* ── Task flow (propuesta / aceptar / rechazar) ── */
.portal-task-flow {
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
}

.portal-task-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: 0 12px 40px rgba(0, 7, 57, 0.08);
}

.portal-task-card h1 {
    color: var(--portal-navy) !important;
    font-weight: 800;
    font-size: 28px;
    margin: 0 0 20px;
}

.portal-task-price-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--portal-navy), #002855);
    color: #fff;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 20px;
}

.portal-task-price-tag span {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 600;
}

.portal-task-price-tag strong {
    font-size: 32px;
    font-weight: 800;
    color: var(--portal-green-light);
}

.portal-task-meta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    border: 1px solid var(--portal-border);
    border-radius: 12px;
    overflow: hidden;
}

.portal-task-meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--portal-border);
    font-size: 14px;
}

.portal-task-meta-list li:last-child {
    border-bottom: none;
}

.portal-task-meta-list li span {
    color: var(--portal-muted);
    font-weight: 600;
}

.portal-task-meta-list li strong {
    color: var(--portal-navy);
    text-align: right;
}

.portal-task-desc {
    color: var(--portal-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.portal-task-actions .btn {
    margin-bottom: 10px;
    border-radius: 10px;
    font-weight: 700;
}

.portal-btn-reject {
    background: #fff;
    border: 2px solid var(--portal-border);
    color: #666 !important;
}

.portal-task-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--portal-border);
}

.portal-task-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.portal-task-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--portal-green);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-task-step-body {
    flex: 1;
    min-width: 0;
}

.portal-task-step-body h3 {
    color: var(--portal-navy) !important;
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 10px;
}

.portal-task-textarea {
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.5;
}

.portal-btn-copy {
    border-radius: 10px;
    font-weight: 600;
}

.portal-btn-copy.copied {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.portal-task-brief-box {
    background: var(--portal-bg, #eef1f5);
    border: 1px solid var(--portal-border, #e8ebf0);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.portal-task-brief-box label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--portal-muted, #666);
    margin-bottom: 8px;
}

.portal-task-brief-box p {
    margin: 0;
    color: var(--portal-navy, #000739);
    line-height: 1.6;
    font-size: 15px;
}

.portal-task-accepted-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #d4edda;
    color: #155724;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 700;
    margin-bottom: 24px;
}

.portal-task-accepted-badge .glyphicon {
    font-size: 20px;
}

.portal-task-confirm-btn {
    margin-top: 20px;
    border-radius: 10px;
    font-weight: 700;
}

/* Legal pages */
.page-portal-legal > .container {
    max-width: var(--site-max-width, 1380px);
    padding-top: 32px;
    padding-bottom: 48px;
}

.portal-legal-page {
    max-width: 820px;
    margin: 0 auto;
}

.portal-legal-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--portal-border, #e8ebf0);
}

.portal-legal-header h1 {
    color: var(--portal-navy, #000739);
    font-weight: 800;
    font-size: 32px;
    margin: 0;
}

.portal-legal-body {
    color: #444;
    line-height: 1.75;
    font-size: 16px;
}

.portal-legal-body h2,
.portal-legal-body h3 {
    color: var(--portal-navy, #000739);
    font-weight: 800;
    margin-top: 28px;
    margin-bottom: 12px;
}

.portal-legal-body p {
    margin-bottom: 16px;
}

.portal-legal-body ul,
.portal-legal-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.portal-task-status {
    text-align: center;
    padding: 48px 32px;
}

.portal-task-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.portal-task-status-warning .portal-task-status-icon {
    background: #fef3c7;
    color: #b45309;
}

.portal-task-status-info .portal-task-status-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.portal-task-status-error .portal-task-status-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.portal-task-status p {
    color: var(--portal-muted);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

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

    .portal-gate-login-card {
        position: static;
    }

    .portal-gate-main {
        padding: 24px 20px;
    }

    .portal-gate-main h1 {
        font-size: 24px;
    }

    .portal-task-card {
        padding: 24px 20px;
    }

    .portal-task-card h1 {
        font-size: 24px;
    }

    .home-quick-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}
