:root {
    --luvik-blue: #023059;
    --luvik-blue-soft: #0f4c7f;
    --luvik-slate: #485664;
    --luvik-text: #1a1f24;
    --luvik-surface: #ffffff;
    --luvik-muted-bg: #eef0f2;
    --luvik-line: #dce5ec;
    --luvik-gold: #ffc107;
    --luvik-success: #059652;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Montserrat", system-ui, sans-serif;
    background: linear-gradient(180deg, #f8fbfd 0%, #eef0f2 100%);
    color: var(--luvik-text);
}

a {
    color: var(--luvik-blue);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Montserrat", sans-serif;
    color: var(--luvik-slate);
}

.layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100vh;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(2,48,89,0.96) 0%, rgba(2,48,89,0.92) 100%),
        url('/assets/brand/canal.png') center/cover;
    color: #fff;
    padding: 28px 22px;
    position: relative;
}

.brand-lockup {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.brand-lockup img {
    width: 150px;
    max-width: 100%;
}

.sidebar-copy {
    color: rgba(255,255,255,0.82);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.sidebar nav a {
    display: block;
    color: #e7eff6;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.12);
}

.content {
    padding: 26px 30px 40px;
}

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

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(2,48,89,0.06);
    border: 1px solid rgba(2,48,89,0.1);
}

.user-chip strong {
    color: var(--luvik-blue);
    font-size: 13px;
}

.user-chip span {
    font-size: 12px;
    color: #667789;
}

.topbar h1 {
    font-size: 34px;
}

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

.card, .panel {
    background: var(--luvik-surface);
    border-radius: 22px;
    box-shadow: 0 16px 35px rgba(15, 33, 56, 0.08);
    padding: 22px;
    border: 1px solid rgba(220,229,236,0.8);
}

.metric {
    font-size: 40px;
    line-height: 1;
    font-weight: 800;
    color: var(--luvik-blue);
    margin: 8px 0;
}

.metric-caption {
    font-size: 13px;
    color: #647180;
    line-height: 1.5;
}

.metric-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.muted {
    color: #667789;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 700;
    color: var(--luvik-blue-soft);
    margin-bottom: 12px;
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    margin-bottom: 24px;
}

.hero-copy,
.hero-visual {
    background: var(--luvik-surface);
    border-radius: 26px;
    box-shadow: 0 16px 35px rgba(15, 33, 56, 0.08);
    border: 1px solid rgba(220,229,236,0.8);
}

.hero-copy {
    padding: 34px;
    background:
        radial-gradient(circle at top left, rgba(2,48,89,0.08), transparent 40%),
        linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
}

.hero-copy h2 {
    margin: 0 0 14px;
    font-size: 42px;
    line-height: 1.08;
}

.hero-copy p {
    font-size: 16px;
    line-height: 1.7;
    max-width: 720px;
    color: #51606f;
}

.hero-cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-visual {
    position: relative;
    overflow: hidden;
    min-height: 420px;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay-card {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(8px);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 14px 35px rgba(2,48,89,0.14);
}

.hero-overlay-card img {
    width: 110px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

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

.overlay-grid strong {
    display: block;
    color: var(--luvik-blue);
    font-size: 22px;
}

.overlay-grid span {
    display: block;
    color: #657586;
    font-size: 12px;
    margin-top: 4px;
}

.brand-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.logo-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.logo-chip {
    width: 112px;
    height: 72px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--luvik-line);
    display: grid;
    place-items: center;
    padding: 12px;
}

.logo-chip img {
    max-width: 100%;
    max-height: 42px;
    object-fit: contain;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 13px 10px;
    border-bottom: 1px solid #e8edf3;
    vertical-align: top;
    font-size: 14px;
}

th {
    color: var(--luvik-slate);
    font-weight: 700;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(2,48,89,0.1);
    color: var(--luvik-blue);
    font-size: 12px;
    font-weight: 700;
}

.badge.pending {
    background: rgba(255,193,7,0.18);
    color: #8a6200;
}

.badge.success {
    background: rgba(5,150,82,0.14);
    color: #057344;
}

.badge.info {
    background: rgba(15,76,127,0.12);
    color: #0f4c7f;
}

.badge.danger {
    background: rgba(223,21,41,0.12);
    color: #b21125;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.list-title {
    margin-top: 0;
    margin-bottom: 12px;
}

input, textarea, select {
    width: 100%;
    border: 1px solid #d3dfef;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 8px;
    margin-bottom: 16px;
    font-family: "Montserrat", sans-serif;
    background: #fff;
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--luvik-blue);
    color: #fff;
    border-radius: 12px;
    padding: 13px 18px;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    text-decoration: none;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 13px 18px;
    border: 1px solid rgba(2,48,89,0.12);
    color: var(--luvik-blue);
    background: #fff;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
}

.module-grid,
.agent-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

.semaforo-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--luvik-line);
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.semaforo-card.ok {
    border-color: rgba(5,150,82,0.24);
    background: linear-gradient(180deg, #ffffff 0%, rgba(5,150,82,0.05) 100%);
}

.semaforo-card.warn {
    border-color: rgba(255,193,7,0.28);
    background: linear-gradient(180deg, #ffffff 0%, rgba(255,193,7,0.08) 100%);
}

.semaforo-card.danger {
    border-color: rgba(223,21,41,0.24);
    background: linear-gradient(180deg, #ffffff 0%, rgba(223,21,41,0.05) 100%);
}

.semaforo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.semaforo-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: currentColor;
}

.semaforo-card.ok .semaforo-dot {
    color: var(--luvik-success);
}

.semaforo-card.warn .semaforo-dot {
    color: #d49d00;
}

.semaforo-card.danger .semaforo-dot {
    color: #df1529;
}

.semaforo-value {
    font-size: 30px;
    font-weight: 800;
    margin: 14px 0 8px;
    color: var(--luvik-blue);
}

.semaforo-detail {
    color: #667789;
    line-height: 1.55;
    font-size: 14px;
}

.module-card,
.agent-card {
    display: block;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    color: var(--luvik-text);
    text-decoration: none;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(13,37,63,0.06);
    padding: 20px;
    border: 1px solid rgba(220,229,236,0.85);
}

.clickable-card {
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(13,37,63,0.1);
    border-color: rgba(2,48,89,0.22);
}

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

.module-card h4,
.agent-card h4 {
    margin: 0 0 8px;
    font-size: 22px;
}

.module-card p,
.agent-card p {
    line-height: 1.65;
    color: #526273;
}

.module-footer {
    margin-top: 14px;
    color: var(--luvik-slate);
}

.card-hint {
    margin-top: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--luvik-blue-soft);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-flex;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(2,48,89,0.08);
    color: var(--luvik-blue);
    font-size: 13px;
    font-weight: 700;
}

.simple-list {
    margin: 0;
    padding-left: 18px;
}

.simple-list li {
    margin-bottom: 10px;
    line-height: 1.65;
}

.suite-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    align-items: center;
}

.suite-hero img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 18px;
}

.image-panel {
    padding: 0;
    overflow: hidden;
}

.image-panel img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.image-panel-copy {
    padding: 18px 20px 22px;
}

.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.detail-head-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-links {
    margin-top: 16px;
}

.step-stack {
    display: grid;
    gap: 12px;
}

.step-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border-radius: 16px;
    background: #f7f9fc;
    border: 1px solid var(--luvik-line);
}

.step-badge {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--luvik-blue);
    color: #fff;
    font-weight: 800;
}

.mini-grid {
    display: grid;
    gap: 12px;
}

.mini-card {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--luvik-line);
    background: linear-gradient(180deg, #fff 0%, #f7fafc 100%);
}

.mini-card strong {
    display: block;
    color: var(--luvik-blue);
    margin-bottom: 6px;
}

.mini-card span {
    display: block;
    color: #667789;
    font-size: 13px;
    line-height: 1.5;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover td {
    background: rgba(2,48,89,0.03);
}

.map-frame {
    width: 100%;
    height: 520px;
    border: 0;
    border-radius: 16px;
}

pre {
    white-space: pre-wrap;
    background: #f7f9fc;
    padding: 16px;
    border-radius: 14px;
    overflow: auto;
    border: 1px solid var(--luvik-line);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: linear-gradient(135deg, #eef3f7 0%, #ffffff 100%);
}

.login-brand-panel {
    background:
        linear-gradient(180deg, rgba(2,48,89,0.9), rgba(2,48,89,0.82)),
        url('/assets/brand/somos.jpg') center/cover;
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand-logo {
    width: 160px;
    margin-bottom: 26px;
}

.login-brand-panel h1 {
    color: #fff;
    font-size: 42px;
    line-height: 1.12;
    margin: 0 0 18px;
}

.login-brand-panel p {
    color: rgba(255,255,255,0.86);
    line-height: 1.7;
    max-width: 620px;
}

.login-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.login-facts div {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    padding: 18px;
}

.login-facts strong {
    display: block;
    font-size: 30px;
    margin-bottom: 6px;
}

.login-facts span {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.86);
}

.login-form-panel {
    display: grid;
    place-items: center;
    padding: 34px;
}

.login-box {
    width: 100%;
    max-width: 430px;
    background: #fff;
    padding: 34px;
    border-radius: 24px;
    box-shadow: 0 20px 44px rgba(2,48,89,0.12);
    border: 1px solid rgba(220,229,236,0.85);
}

.login-logo-dark {
    width: 132px;
    margin-bottom: 12px;
}

.form-alert {
    background: #ffe6e6;
    color: #8f1d1d;
    padding: 12px;
    border-radius: 12px;
    margin: 14px 0 18px;
}

@media (max-width: 1180px) {
    .layout,
    .login-shell,
    .hero-panel,
    .suite-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .content {
        padding: 20px;
    }

    .cards,
    .grid-2,
    .module-grid,
    .agent-grid,
    .login-facts,
    .semaforo-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h2 {
        font-size: 32px;
    }

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

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .detail-head {
        flex-direction: column;
    }
}
