@font-face {
    font-family: 'Chakra Petch';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('Fonts/login/chakra-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Chakra Petch';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('Fonts/login/chakra-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Chakra Petch';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('Fonts/login/chakra-700.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('Fonts/login/plexmono-400.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('Fonts/login/plexmono-500.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('Fonts/login/plexsans-var.woff2') format('woff2');
}

:root {
    --ink: #0a0c0f;
    --panel: #12161b;
    --line: rgba(244, 246, 248, 0.1);
    --text-hi: #f4f6f8;
    --text-lo: rgba(244, 246, 248, 0.58);
    --amber: #ff9d1f;
    --amber-dim: rgba(255, 157, 31, 0.16);
    --danger-bg: rgba(255, 90, 70, 0.1);
    --danger-border: rgba(255, 90, 70, 0.4);
    --danger-text: #ff9884;
}

html, body {
    height: 100%;
    margin: 0;
}

body.login-page {
    min-height: 100vh;
    display: flex;
    font-family: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--ink);
    color: var(--text-hi);
    padding-top: 0;
}

.login-shell {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.hud-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ---------- Panel de marca ---------- */
.login-brand {
    position: relative;
    flex: 0 0 57%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 56px;
    background:
        linear-gradient(155deg, rgba(10, 12, 15, 0.78) 0%, rgba(10, 12, 15, 0.5) 42%, rgba(10, 12, 15, 0.84) 100%),
        repeating-linear-gradient(0deg, rgba(244, 246, 248, 0.035) 0px, rgba(244, 246, 248, 0.035) 1px, transparent 1px, transparent 46px),
        repeating-linear-gradient(90deg, rgba(244, 246, 248, 0.035) 0px, rgba(244, 246, 248, 0.035) 1px, transparent 1px, transparent 46px),
        url('Imagenes/fondoIcold.jpg') center 18% / cover no-repeat,
        var(--ink);
    overflow: hidden;
}

.login-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--ink) 0%, rgba(10, 12, 15, 0.88) 16%, rgba(10, 12, 15, 0) 54%);
    pointer-events: none;
}

.login-brand > * {
    position: relative;
    z-index: 1;
}

.login-brand-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 157, 31, 0.55), transparent);
    filter: blur(1px);
    animation: hud-scan 7s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes hud-scan {
    0% { top: 0%; opacity: 0; }
    10% { opacity: .85; }
    50% { top: 62%; }
    90% { opacity: .85; }
    100% { top: 100%; opacity: 0; }
}

.hud-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: rgba(255, 157, 31, 0.55);
    z-index: 1;
    pointer-events: none;
}

.hud-corner--tl { top: 22px; left: 22px; border-top: 2px solid; border-left: 2px solid; }
.hud-corner--tr { top: 22px; right: 22px; border-top: 2px solid; border-right: 2px solid; }
.hud-corner--bl { bottom: 22px; left: 22px; border-bottom: 2px solid; border-left: 2px solid; }
.hud-corner--br { bottom: 22px; right: 22px; border-bottom: 2px solid; border-right: 2px solid; }

.login-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(244, 246, 248, 0.75);
}

.login-brand-top .hud-tag {
    color: var(--amber);
}

.login-brand-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
}

.login-brand-copy .eyebrow {
    display: block;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 16px;
}

.login-brand-copy h1 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 38px;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    color: var(--text-hi);
}

.login-brand-copy p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-lo);
    margin: 0 0 30px;
}

.login-brand-manifest {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.login-brand-manifest li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: rgba(244, 246, 248, 0.88);
}

.login-brand-manifest .idx {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--amber);
    flex: 0 0 auto;
}

.login-brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-lo);
}

.login-brand-footer .hud-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(244, 246, 248, 0.75);
}

.login-brand-footer .hud-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 8px rgba(255, 157, 31, 0.9);
    animation: hud-pulse 2.4s ease-in-out infinite;
}

@keyframes hud-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ---------- Costura diagonal ---------- */
.login-seam {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 57%;
    width: 14px;
    transform: translateX(-50%) skewX(-8deg);
    background: linear-gradient(180deg, var(--amber), rgba(255, 157, 31, 0.1));
    box-shadow: 0 0 26px rgba(255, 157, 31, 0.3);
    z-index: 2;
}

/* ---------- Panel de formulario ---------- */
.login-form-panel {
    flex: 1 1 43%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
    padding: 32px 24px;
}

.login-form-wrap {
    width: 100%;
    max-width: 380px;
}

.login-form-logo {
    height: 40px;
    width: auto;
    display: block;
    margin: 0 auto 28px;
    filter: brightness(0) invert(1);
    opacity: 0.94;
}

.login-form-eyebrow {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 10px;
}

.login-form-wrap h2 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text-hi);
}

.login-form-wrap .subtitle {
    font-size: 14px;
    color: var(--text-lo);
    margin: 0 0 30px;
}

.login-field {
    margin-bottom: 22px;
}

.login-field label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-lo);
    margin-bottom: 10px;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-group::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--amber);
    transform: scaleX(0);
    transition: transform .25s ease;
}

.login-input-group:focus-within::after {
    transform: scaleX(1);
}

.login-input-group .fa {
    position: absolute;
    left: 2px;
    color: var(--text-lo);
    font-size: 14px;
    pointer-events: none;
    transition: color .2s ease;
}

.login-input-group:focus-within .fa {
    color: var(--amber);
}

.login-input-group input.form-control {
    width: 100% !important;
    min-height: 42px;
    padding: 8px 4px 8px 26px;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    background: transparent;
    color: var(--text-hi);
    box-shadow: none;
}

.login-input-group input.form-control::placeholder {
    color: rgba(244, 246, 248, 0.32);
}

.login-input-group input.form-control:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.login-help-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 26px;
}

.login-help-row a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--amber);
    text-decoration: none;
}

.login-help-row a:hover {
    text-decoration: underline;
}

.login-submit-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 4px;
    background: var(--amber);
    color: var(--ink);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 16px;
    cursor: pointer;
    transition: filter .15s ease, transform .05s ease;
}

.login-submit-btn:hover {
    filter: brightness(1.08);
}

.login-submit-btn:active {
    transform: translateY(1px);
}

.login-form-footer {
    text-align: center;
    margin-top: 30px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(244, 246, 248, 0.35);
}

.login-back-link {
    display: block;
    text-align: center;
    margin-top: 22px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--text-lo);
    text-decoration: none;
}

.login-back-link:hover {
    color: var(--amber);
}

.validation-summary-errors {
    margin-bottom: 20px;
    padding: 10px 14px;
    border-radius: 4px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
}

.validation-summary-errors > ul {
    padding: 0;
    margin: 0;
}

.validation-summary-errors > ul > li {
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--danger-text);
}

.text-danger {
    display: block;
    font-size: 12px;
    margin-top: 6px;
    color: var(--danger-text);
}

@media (max-width: 900px) {
    .login-brand, .login-seam {
        display: none;
    }

    .login-form-panel {
        flex: 1 1 100%;
    }
}

@media (max-width: 420px) {
    .login-brand-copy h1 {
        font-size: 30px;
    }

    .login-form-wrap h2 {
        font-size: 24px;
    }
}
