@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url('fonts/inter-latin.woff2') format('woff2'); }

:root {
  --canvas: #CED2DA; --surface: #E8EAEF; --surface-2: #CED2DA; --surface-3: #DCDFE6;
  --card: rgb(232 234 239 / .86); --card-border: rgb(232 234 239 / .5);
  --card-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 4px 18px -14px rgb(18 20 24 / .25);
  --text: #121418; --ink: #121418; --text-medium: #30353F; --text-soft: #414753; --text-weak: #505662;
  --lima: #F4FFBF;
  --border: #C8CDD7; --border-strong: #A3AAB7; --focus: #121418;
  --danger: #dc2626; --danger-soft: rgb(220 38 38 / .1);
  --font: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root.dark {
  --canvas: #14171D; --surface: #272B33; --surface-2: #14171D; --surface-3: #31363F;
  --card: rgb(39 43 51 / .86); --card-border: rgb(88 97 112 / .5);
  --card-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 8px 22px -18px rgb(0 0 0 / .6);
  --text: #F6F7FA; --ink: #121418; --text-medium: #DCE1E9; --text-soft: #D0D7E2; --text-weak: #AAB3C2;
  --lima: #D8EB9F; --focus: #D8EB9F; --border: #3D434F; --border-strong: #586170;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.module-surface {
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 26px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.brand-link { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; font-weight: 600; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--lima); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex: none;
}
.eyebrow { margin: 0; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); font-weight: 600; }

.module-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 18px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

button, .siiem-button, .icon-button {
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .55rem .9rem;
  cursor: pointer;
}
button:hover, .siiem-button:hover { border-color: var(--border-strong); }
.icon-button {
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Login SIIEM (DISENO_LOGIN_SIIEM.md) */
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-shell {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  width: min(1040px, 100%);
  min-height: 680px;
  padding: 10px;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.login-brand {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: linear-gradient(155deg, #D8DDED, #CCD1DC 65%, #E4E8D6);
}
:root.dark .login-brand {
  background: linear-gradient(155deg, #31363F, #14171D 65%, #272B33);
}
.login-brand__overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgb(18 20 24 / .08) 1px, transparent 1px);
  background-size: 18px 18px; opacity: .35;
}
:root.dark .login-brand__overlay { background-image: radial-gradient(rgb(255 255 255 / .1) 1px, transparent 1px); opacity: .2; }
.login-brand__spotlight {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgb(244 255 191 / .45), transparent 50%);
  opacity: 0; transition: opacity .25s ease;
}
.login-brand.is-spotlight-active .login-brand__spotlight { opacity: 1; }
:root.dark .login-brand__spotlight { background: radial-gradient(420px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgb(216 235 159 / .18), transparent 50%); }
.login-brand__identity, .login-brand__content, .login-brand__footer { position: relative; z-index: 1; }
.login-brand__identity .brand-mark svg { width: 22px; height: 22px; }
.login-brand__identity > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.login-brand__identity small { margin-top: 2px; font-size: .72rem; font-weight: 500; color: var(--text-soft); }
.login-brand__content { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.login-brand__content h2 { margin: 0; font-size: 2rem; line-height: 1.1; font-weight: 700; }
.login-brand__content > p { margin: 0; color: var(--text-soft); max-width: 34ch; }
.login-brand__features { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.login-brand__features li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 12px; border-radius: 14px;
  background: rgb(255 255 255 / .4);
}
:root.dark .login-brand__features li { background: rgb(255 255 255 / .04); }
.login-brand__features li > span {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lima); color: var(--ink); font-size: .78rem; font-weight: 700;
}
.login-brand__features strong { display: block; font-size: .92rem; }
.login-brand__features p { margin: 2px 0 0; font-size: .82rem; color: var(--text-soft); }
.login-brand__footer { margin: auto 0 0; font-size: .8rem; color: var(--text-soft); }

.login-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
}
.login-theme-toggle { position: absolute; top: 18px; right: 18px; }
.login-panel__inner { width: 100%; max-width: 350px; display: flex; flex-direction: column; gap: 18px; }
.login-panel__header h1 { margin: 4px 0; font-size: 1.9rem; }
.login-panel__header p:last-child { margin: 0; color: var(--text-soft); }

.login-error {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  font-size: .9rem;
}
.login-error > span {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger); color: #fff; font-weight: 700; font-size: .8rem;
}

.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label { font-size: .9rem; font-weight: 600; }
.login-field input {
  width: 100%; min-height: 46px;
  padding: 10px 14px;
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.login-field input:focus { border-color: var(--border-strong); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lima) 45%, transparent); }
.login-password-wrap { position: relative; }
.login-password-wrap input { padding-right: 46px; }
.login-password-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  background: transparent; border: none; box-shadow: none;
}
.login-password-toggle:hover { background: var(--surface-2); border: none; }
.login-password-toggle .eye-slash { display: none; }
.login-password-toggle[aria-pressed="true"] .eye-slash { display: block; }

.login-submit {
  width: 100%; min-height: 48px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  font-weight: 600;
  background: var(--lima); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--lima) 70%, var(--border));
  border-radius: 14px;
}
.login-submit:hover { filter: brightness(.97); border-color: var(--border-strong); }

.login-help {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--text-soft);
}
.login-support { font-size: .85rem; color: var(--text-soft); text-decoration: none; }
.login-support:hover { color: var(--text); text-decoration: underline; }
.siiem-icon { width: 20px; height: 20px; flex: none; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr 1fr; min-height: auto; }
  .login-brand__content h2 { font-size: 1.6rem; }
}
@media (max-width: 700px) {
  .login-page { padding: 14px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; padding: 22px; gap: 14px; }
  .login-brand__features, .login-brand__footer { display: none; }
  .login-brand__content { margin-top: 0; }
  .login-panel { padding: 22px 18px; }
  .login-panel__inner { max-width: none; }
}
@media (max-width: 420px) {
  .login-page { padding: 10px; }
  .login-shell { border-radius: 20px; padding: 8px; }
  .login-brand { padding: 18px; border-radius: 14px; }
  .login-panel { padding: 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-brand__spotlight { transition: none; }
}

.theme-toggle .icon-sun { display: none; }
:root.dark .theme-toggle .icon-sun { display: block; }
:root.dark .theme-toggle .icon-moon { display: none; }
