/* Login T Media Group — efectos estáticos y grafiti de fondo. */
:root {
    color-scheme: light;
    --paper: #fbfbfd;
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --accent: #0071e3;
    --accent-hover: #0066cc;
    --line: #dedee3;
    --field: #f5f5f7;
}

* { box-sizing: border-box; }
body {
    position: relative;
    margin: 0;
    min-width: 280px;
    min-height: 100vh;
    min-height: 100svh;
    background: linear-gradient(135deg, var(--paper) 0%, #f4f8ff 100%);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: #cce5ff; color: var(--ink); }
.graffiti-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: .2;
}
.graffiti-mural {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.login-page {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: 24px clamp(24px, 4.5vw, 68px) 18px;
    display: flex;
    flex-direction: column;
}
.page-header, .page-footer, .brand, .header-label, .team-brands { display: flex; align-items: center; }
.page-header { justify-content: space-between; gap: 24px; }
.brand { gap: 12px; }
.brand img { display: block; width: 100px; height: auto; }
.brand-identity { display: flex; flex-direction: column; gap: 5px; }
.brand-identity strong { color: #1b3655; font-size: 16px; font-weight: 700; letter-spacing: -.4px; }
.brand-identity span { font-size: 10px; color: var(--muted); }
.header-label { gap: 8px; font-size: 11px; color: #646b71; }
.header-label > span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.login-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(350px, 1fr);
    gap: clamp(30px, 4vw, 64px);
    align-items: center;
    padding: 16px 0;
}
.welcome-column { min-width: 0; position: relative; }
.welcome-copy { position: relative; z-index: 1; }
.welcome-copy::before { content: ''; position: absolute; inset: -70px -50px; z-index: -1; background: radial-gradient(ellipse, #fbfbfdfa 15%, #fbfbfdc4 45%, #fbfbfd00 72%); pointer-events: none; }
.hero-logo-wrap { position: relative; isolation: isolate; width: clamp(270px, 32vw, 450px); max-width: 100%; margin: 0 0 24px; }
.hero-logo-wrap::before { content: ''; position: absolute; inset: 10% -9% 12%; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse at center, #ffffff 15%, #edf5ffcf 55%, #edf5ff00 73%); pointer-events: none; }
.hero-logo-wrap::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: -9px; height: 10px; background: radial-gradient(ellipse, #244b6d24 0%, #244b6d00 70%); pointer-events: none; }
.hero-logo { display: block; width: 100%; height: auto; }
.eyebrow, .form-kicker { font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 21px; color: var(--accent); }
.eyebrow > span { display: block; width: 24px; height: 2px; background: var(--accent); }
.welcome-column h2 {
    margin: 0;
    font-size: clamp(34px, 3.5vw, 52px);
    line-height: 1.13;
    letter-spacing: -2.5px;
    font-weight: 800;
}
.brush-text { position: relative; display: inline-block; color: var(--accent); }
.brush-text::after {
    content: '';
    position: absolute;
    left: 1px;
    right: -4px;
    bottom: -7px;
    height: 7px;
    opacity: .7;
    background: var(--accent);
    clip-path: polygon(0 60%, 12% 15%, 47% 0, 100% 32%, 92% 65%, 44% 73%, 6% 100%);
    transform: rotate(-1.5deg);
}
.welcome-description { margin: 24px 0 0; max-width: 480px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.form-column { position: relative; min-width: 0; }
.form-column::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    top: -21px;
    right: -20px;
    border-top: 1px solid #0071e33d;
    border-right: 1px solid #0071e33d;
    border-radius: 0 34px 0 0;
    pointer-events: none;
}
.form-card {
    position: relative;
    padding: 28px clamp(24px, 3vw, 42px) 22px;
    border: 1px solid #b8d0e9;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 20px 40px -14px #173b6345, 0 5px 0 #d9e7f5, 0 2px 5px #142d4810;
}
.form-card::before { content: ''; position: absolute; inset: -1px; border-top: 3px solid var(--accent); border-radius: inherit; pointer-events: none; }
.form-card:focus-within { border-color: #78a9db; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.access-symbol { display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent); background: #eef5ff; border-radius: 12px; transform: rotate(-5deg); }
.access-symbol svg { width: 23px; height: 23px; transform: rotate(5deg); }
.form-kicker { color: var(--muted); font-size: 9px; letter-spacing: 1.4px; }
.form-title { margin: 0; font-size: clamp(29px, 2.3vw, 33px); font-weight: 800; letter-spacing: -1.35px; line-height: 1.16; }
.form-title > span { color: var(--accent); }
.form-subtitle { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 12px 0 22px; }
.input-group { margin-bottom: 16px; }
.field-label { display: block; margin: 0 0 9px; font-size: 11px; font-weight: 600; color: #36424e; }
.input-control { display: flex; align-items: center; position: relative; }
.input-icon { position: absolute; left: 17px; display: flex; color: #828a90; pointer-events: none; }
.input-icon svg { width: 18px; height: 18px; }
input:not([type="hidden"]) {
    width: 100%;
    min-width: 0;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--field);
    color: var(--ink);
    padding: 0 15px;
    font-size: 13px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input-control input { padding-left: 45px; }
#contrasena { padding-right: 51px; }
input::placeholder { color: #8d9194; opacity: 1; }
input:not([type="hidden"]):focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px #0071e31f; }
.input-control:focus-within .input-icon { color: var(--accent); }
.password-toggle { position: absolute; right: 4px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; border-radius: 8px; color: #7b838a; }
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--accent); background: #0071e30a; }
.btn-login, .btn-primary, .btn-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 50px; border-radius: 10px; font-size: 12px; font-weight: 600; border: 1px solid transparent; transition: background .18s ease, box-shadow .18s ease; }
.btn-login, .btn-primary { background: var(--accent); color: #fff; }
.btn-login { width: 100%; margin-top: 5px; height: 50px; box-shadow: 0 6px 15px -6px #0071e355; }
.btn-login:not(.is-loading)::after { content: '→'; font-family: system-ui, sans-serif; font-size: 21px; font-weight: 400; line-height: 1; margin-left: 6px; }
.btn-login:hover, .btn-primary:hover { background: var(--accent-hover); box-shadow: 0 7px 17px -5px #0071e366; }
.is-loading { opacity: .8; }
.is-loading::before { content: ''; width: 14px; height: 14px; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.forgot-pass { display: block; margin: 10px auto 0; padding: 8px; min-height: 36px; border: 0; border-radius: 6px; background: transparent; color: #65717d; font-size: 11px; text-underline-offset: 4px; }
.forgot-pass:hover { color: var(--accent); text-decoration: underline; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 7px; border-top: 1px solid #eeeef1; margin-top: 13px; padding-top: 16px; color: #7a838b; font-size: 9px; line-height: 1.5; text-align: center; }
.security-note svg { width: 15px; height: 15px; flex-shrink: 0; }
.form-footnote { text-align: center; margin: 19px 0 0; font-size: 10px; line-height: 1.7; color: #6e6e73; }
.page-footer { justify-content: space-between; gap: 24px; padding-top: 19px; border-top: 1px solid #d2d2d7; }
.team-brands { gap: 24px; flex-wrap: wrap; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; color: #626a71; }
.team-brands > span + span { position: relative; }
.team-brands > span + span::before { content: ''; position: absolute; left: -13px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #a1a1a6; }
.footer-caption { font-size: 10px; color: #6e6e73; }
.error-msg, .success-msg { padding: 12px 14px; margin: 0 0 20px; border-radius: 10px; border: 1px solid; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.error-msg { background: #fff4f1; border-color: #edc6bb; color: #8f3424; }
.success-msg { background: #f0f8f4; border-color: #c5dfd1; color: #226346; }
.modal-open { overflow: hidden; }
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 10; padding: 24px; background: #14273bcc; align-items: center; justify-content: center; overflow-y: auto; }
.modal-backdrop.is-open { display: flex; }
.recovery-modal { width: 100%; max-width: 460px; max-height: calc(100dvh - 48px); overflow-y: auto; padding: 28px; border-radius: 22px; background: #fff; box-shadow: 0 25px 90px #00000033; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-header h2 { margin: 9px 0 0; font-size: 25px; line-height: 1.25; letter-spacing: -.8px; }
.modal-close { flex-shrink: 0; border: 0; border-radius: 8px; background: #f5f5f7; color: #68717a; width: 40px; height: 40px; font-size: 26px; line-height: 1; }
.modal-close:hover { background: #e6f1ff; color: var(--accent); }
#forgotDescription { margin: 20px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.btn-primary, .btn-secondary { padding: 0 18px; }
.btn-secondary { background: #f5f5f7; border-color: var(--line); color: #52606c; }
.btn-secondary:hover { background: #e8e8ed; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 1280px) and (min-height: 860px) {
    .login-page { padding-top: 40px; padding-bottom: 30px; }
    .login-wrapper { padding-top: 50px; padding-bottom: 45px; }
    .form-card { padding-top: 40px; padding-bottom: 30px; }
}
@media (max-width: 1100px) and (min-width: 801px) {
    .login-page { padding-left: 30px; padding-right: 30px; }
    .login-wrapper { grid-template-columns: minmax(0, 1.15fr) minmax(340px, 1fr); gap: 30px; }
    .welcome-column h2 { font-size: 37px; letter-spacing: -1.8px; }
    .welcome-description { font-size: 12px; }
    .form-card { padding-left: 26px; padding-right: 26px; }
    .form-title { font-size: 31px; }
}
@media (max-width: 800px) {
    .login-page { padding: 22px 24px; }
    .brand img { width: 70px; }
    .brand-identity strong { font-size: 14px; }
    .brand-identity span { font-size: 9px; }
    .login-wrapper { grid-template-columns: minmax(0, 1fr); gap: 27px; padding: 33px 0 29px; }
    .welcome-column { min-height: 145px; }
    .welcome-copy { max-width: 540px; }
    .hero-logo-wrap { width: 240px; margin-bottom: 22px; }
    .eyebrow { margin-bottom: 13px; font-size: 9px; }
    .welcome-column h2 { font-size: clamp(30px, 5.5vw, 42px); letter-spacing: -1.6px; }
    .welcome-description { max-width: 370px; margin-top: 19px; font-size: 12px; }
    .welcome-description br { display: none; }
    .graffiti-background { opacity: .2; background-image: url('../assets/login/graffiti-mural.webp'); background-size: max(100%, 580px) auto; background-repeat: repeat-y; background-position: center top; }
    .graffiti-mural { display: none; }
    .welcome-copy::before { inset: -30px -15px; background: radial-gradient(ellipse, #fbfbfdf5 15%, #fbfbfda6 50%, #fbfbfd00 80%); }
    .form-column { width: 100%; max-width: 470px; justify-self: center; }
    .form-column::before { top: -12px; right: -12px; width: 80px; height: 80px; }
    .form-card { padding: 28px 30px 24px; border-radius: 23px; }
    .form-title { font-size: 33px; }
    .form-footnote { margin-top: 14px; }
    input:not([type="hidden"]) { font-size: 16px; }
    .page-footer { align-items: flex-start; padding-top: 17px; }
    .team-brands { gap: 18px; font-size: 8px; letter-spacing: .7px; }
    .team-brands > span + span::before { left: -10px; }
    .footer-caption { display: none; }
}
@media (max-width: 380px) {
    .login-page { padding-left: 17px; padding-right: 17px; }
    .header-label { font-size: 9px; }
    .brand { gap: 8px; }
    .brand img { width: 58px; }
    .page-header { gap: 12px; }
    .brand-identity strong { font-size: 12px; }
    .header-label { gap: 5px; }
    .hero-logo-wrap { width: 215px; }
    .welcome-column h2 { font-size: 28px; letter-spacing: -1.3px; }
    .form-card { padding-left: 23px; padding-right: 23px; }
    .form-title { font-size: 30px; }
    .team-brands { gap: 14px; font-size: 7px; }
    .team-brands > span + span::before { left: -8px; }
    .modal-backdrop { padding: 16px; }
    .recovery-modal { padding: 23px; }
    .modal-actions { flex-wrap: wrap; }
    .modal-actions > button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
