:root {
    --bg: #eef4fa;
    --bg-soft: #f8fbff;
    --ink: #122739;
    --ink-soft: #4a6072;
    --brand: #1d5d8f;
    --brand-dark: #123f63;
    --accent: #b48a2c;
    --card: #ffffff;
    --line: #d3e0eb;
    --shadow: 0 16px 35px rgba(18, 39, 57, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    color: var(--ink);
    background: var(--bg);
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/banco-agua.svg") center center / cover no-repeat;
    z-index: -2;
}

.hero {
    padding: 1.2rem 1.5rem 3.2rem;
    background:
        linear-gradient(170deg, rgba(255, 255, 255, 0.95), rgba(232, 243, 252, 0.95)),
        repeating-linear-gradient(120deg, rgba(18, 63, 99, 0.035) 0, rgba(18, 63, 99, 0.035) 2px, transparent 2px, transparent 12px);
    border-bottom: 1px solid #c9d9e8;
}

.top-nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding-right: 150px;
}

.brand {
    font-weight: 800;
    font-size: 1.26rem;
    letter-spacing: 0.4px;
    font-family: "Garamond", "Times New Roman", serif;
    color: var(--brand-dark);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.nav-links a {
    text-decoration: none;
    color: #1d415e;
    font-weight: 700;
    padding: 0.2rem 0.2rem;
}

.menu-btn {
    border: 1px solid #9fb7cb;
    background: #f7fbff;
    color: #1c4362;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-weight: 700;
}

.menu-btn:hover {
    background: #e7f1f9;
}

.nav-links a:hover {
    color: var(--brand);
}

.hero-content {
    max-width: 1100px;
    margin: 2rem auto 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.4rem;
    align-items: stretch;
}

.hero-main-copy {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid #d6e3ee;
    border-radius: 22px;
    padding: 1.3rem 1.2rem 1.1rem;
    box-shadow: var(--shadow);
}

.eyebrow {
    color: #2a5a80;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.35px;
}

h1 {
    margin: 0.4rem 0 0.8rem;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.1;
    font-family: "Garamond", "Times New Roman", serif;
    color: #0f3553;
}

.subtitle {
    color: var(--ink-soft);
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.cta {
    display: inline-block;
    margin-top: 0.9rem;
    text-decoration: none;
    font-weight: 700;
    background: var(--brand);
    color: #fff;
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.cta:hover {
    transform: translateY(-1px);
    background: var(--brand-dark);
}

.cta-secondary {
    background: #e7f1f9;
    color: #154a72;
    border: 1px solid #bad0e2;
}

.cta-secondary:hover {
    background: #d9e9f6;
}

.hero-tags {
    margin-top: 0.95rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.hero-tags span {
    background: #f2f8fd;
    border: 1px solid #ccdeec;
    border-radius: 999px;
    padding: 0.3rem 0.62rem;
    font-size: 0.82rem;
    color: #285170;
    font-weight: 700;
}

.hero-side {
    display: grid;
    gap: 1rem;
}

.hero-visual-card {
    background: #fdfefe;
    border: 1px solid #d4e3ef;
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-bank-image {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: cover;
}

.hero-visual-caption {
    padding: 0.8rem 0.9rem;
    display: grid;
    gap: 0.15rem;
    color: #274b68;
}

.hero-visual-caption strong {
    font-family: "Garamond", "Times New Roman", serif;
    font-size: 1.12rem;
}

.hero-visual-caption span {
    color: #567086;
    font-size: 0.9rem;
}

.hero-card {
    background: var(--card);
    border: 1px solid #d4e4f0;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 1.1rem;
}

.hero-card h3 {
    margin-top: 0;
    font-family: "Garamond", "Times New Roman", serif;
    color: #1c4463;
}

.dashboard-grid {
    display: grid;
    gap: 0.8rem;
}

.dashboard-grid strong {
    display: block;
    font-size: 1.45rem;
}

.dashboard-grid span {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.8rem 1.5rem;
}

.section-alt {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section h2 {
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
    font-family: "Garamond", "Times New Roman", serif;
    color: #10395a;
}

.section p {
    margin: 0 0 1.3rem;
    color: var(--ink-soft);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--card);
    border: 1px solid #d3e0eb;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.card .tag {
    display: inline-block;
    font-size: 0.8rem;
    background: #e2efe9;
    color: var(--brand-dark);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    margin-bottom: 0.55rem;
}

.exchange-panel {
    background: linear-gradient(130deg, #1c4d73, #2a6b9a);
    color: #edf5fc;
    border-radius: 16px;
    padding: 1.15rem;
    box-shadow: var(--shadow);
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.property-card {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
}

.property-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.property-content {
    padding: 0.9rem;
}

.action-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.form-card {
    background: var(--card);
    border: 1px solid #d3e0eb;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 1.05rem;
}

.form-card h3 {
    margin-top: 0;
    font-family: "Garamond", "Times New Roman", serif;
    color: #1b4768;
}

form {
    display: grid;
    gap: 0.7rem;
}

label {
    font-weight: 600;
    display: grid;
    gap: 0.35rem;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    border: 1px solid #bed0dd;
    border-radius: 11px;
    padding: 0.6rem;
    background: #fbfdff;
}

button {
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, #c29a3b, #a87d22);
    color: #fff;
    font-weight: 700;
    padding: 0.72rem;
    cursor: pointer;
}

button:hover {
    filter: brightness(0.95);
}

.message {
    min-height: 1.2em;
    font-weight: 600;
}

footer {
    text-align: center;
    color: var(--ink-soft);
    padding: 2rem 1rem 2.5rem;
}

.employee-access-panel {
    position: fixed;
    top: 4rem;
    right: 1rem;
    width: min(340px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid #d5ddd8;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(31, 47, 43, 0.22);
    padding: 0.8rem;
    z-index: 1120;
}

.employee-access-panel.hidden {
    display: none;
}

.employee-access-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.employee-access-header h3 {
    margin: 0;
}

.employee-access-header button {
    border: none;
    background: #edf3f0;
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}

.employee-access-form {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.5rem;
}

.employee-success {
    color: #0b7d58;
}

.employee-admin.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.employee-admin {
    border-top: 1px solid var(--line);
}

.employee-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.employee-admin-header p {
    margin: 0.3rem 0 0;
}

.employee-role-label {
    color: var(--brand-dark);
    font-weight: 700;
}

.employee-modules {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.employee-module-chip {
    background: #e7f1ed;
    border: 1px solid #bfd2ca;
    color: #185645;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.employee-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.employee-stat {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0.8rem;
}

.employee-stat strong {
    display: block;
    font-size: 1.3rem;
}

.employee-stat span {
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.employee-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.admin-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 0.9rem;
    box-shadow: var(--shadow);
}

.admin-card h3 {
    margin-top: 0;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-card table {
    width: 100%;
    border-collapse: collapse;
}

.admin-card th,
.admin-card td {
    text-align: left;
    border-bottom: 1px solid #e4ebe7;
    padding: 0.5rem 0.4rem;
    font-size: 0.9rem;
}

.support-chat-toggle {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 1100;
    border: none;
    border-radius: 999px;
    background: linear-gradient(145deg, #1f5f8e, #194f76);
    color: #fff;
    font-weight: 700;
    padding: 0.65rem 1rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.support-chat-widget {
    position: fixed;
    right: 1rem;
    top: 4rem;
    width: min(360px, calc(100vw - 2rem));
    max-height: 72vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid #c8d9e7;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(31, 47, 43, 0.22);
    padding: 0.75rem;
    z-index: 1100;
}

.support-chat-widget.hidden {
    display: none;
}

.support-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.support-chat-header h3 {
    margin: 0;
}

.support-chat-header button {
    border: none;
    background: #edf3f0;
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}

.support-chat-messages {
    overflow: auto;
    max-height: 48vh;
    display: grid;
    gap: 0.5rem;
    padding-right: 0.2rem;
}

.chat-bubble {
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
    font-size: 0.92rem;
    line-height: 1.35;
}

.chat-bubble.user {
    background: #dbeaf7;
    justify-self: end;
}

.chat-bubble.bot {
    background: #f0f6fb;
    justify-self: start;
}

.chat-meta {
    color: #5e6d76;
    font-size: 0.72rem;
}

.support-chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem;
}

.support-chat-form input {
    border: 1px solid #bed0dd;
    border-radius: 10px;
    padding: 0.55rem;
}

.credit-agent-toggle {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    border: none;
    border-radius: 999px;
    background: linear-gradient(145deg, #23679a, #154b74);
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.credit-agent-widget {
    position: fixed;
    right: 1rem;
    bottom: 4.8rem;
    width: min(360px, calc(100vw - 2rem));
    max-height: 78vh;
    overflow: auto;
    background: #ffffff;
    border: 1px solid #c8d9e7;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(31, 47, 43, 0.22);
    padding: 0.9rem;
    z-index: 1000;
}

.credit-agent-widget.hidden {
    display: none;
}

.credit-agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.credit-agent-header h3 {
    margin: 0;
}

.credit-agent-header button {
    border: none;
    background: #f0f5f2;
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}

.credit-agent-intro {
    margin: 0 0 0.8rem;
    color: #4f625c;
    font-size: 0.92rem;
}

.credit-agent-form {
    display: grid;
    gap: 0.55rem;
}

.agent-checkbox {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 600;
}

.credit-agent-result {
    margin-top: 0.8rem;
    background: #f3f8fc;
    border: 1px solid #c8d9e7;
    border-radius: 10px;
    padding: 0.7rem;
    font-size: 0.92rem;
}

.credit-agent-result ul {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
}

.agent-ok {
    color: #135a88;
    font-weight: 700;
}

.agent-risk {
    color: #b33737;
    font-weight: 700;
}

@media (max-width: 860px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .top-nav {
        padding-right: 0;
    }

    .hero-main-copy {
        padding: 1rem 0.9rem;
    }

    .hero-bank-image {
        height: 190px;
    }

    .credit-agent-toggle {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .credit-agent-widget {
        right: 0.75rem;
        bottom: 4.4rem;
    }

    .support-chat-toggle {
        right: 0.75rem;
        top: 0.75rem;
    }

    .support-chat-widget {
        right: 0.75rem;
        top: 3.8rem;
    }

    .employee-access-panel {
        right: 0.75rem;
        top: 3.8rem;
    }

    .employee-admin-header button {
        width: 100%;
    }
}
