:root {
  --blue-950: #071d49;
  --blue-900: #092966;
  --blue-800: #0b3f98;
  --blue-700: #0b57d0;
  --blue-600: #1769e8;
  --blue-100: #dceaff;
  --blue-50: #eff6ff;
  --ink: #12223d;
  --muted: #60708a;
  --line: #dbe3ee;
  --surface: #ffffff;
  --background: #f5f8fc;
  --success: #0b7a55;
  --success-bg: #e9f8f2;
  --danger: #b42318;
  --danger-bg: #fff0ee;
  --shadow-lg: 0 28px 70px rgba(7, 29, 73, 0.14);
  --shadow-sm: 0 10px 30px rgba(7, 29, 73, 0.08);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue-950);
  transform: translateY(-160%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.boot-view {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
  background: var(--background);
}

.boot-mark,
.brand-symbol {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px 14px 14px 4px;
  color: var(--blue-700);
  background: #fff;
  box-shadow: 0 8px 24px rgba(4, 38, 92, 0.2);
  font-size: 25px;
  font-weight: 800;
}

.boot-mark {
  animation: boot-pulse 1.1s ease-in-out infinite alternate;
}

@keyframes boot-pulse {
  from { transform: scale(0.96); opacity: 0.72; }
  to { transform: scale(1.04); opacity: 1; }
}

.login-view {
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at 87% 10%, rgba(56, 132, 255, 0.12), transparent 34%),
    var(--background);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(410px, 0.95fr) minmax(480px, 1.05fr);
  width: min(1180px, 100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(219, 227, 238, 0.75);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(40px, 5vw, 72px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 10% 100%, rgba(43, 133, 255, 0.58), transparent 42%),
    linear-gradient(145deg, var(--blue-950) 10%, #0a397f 65%, #0d5ac2 120%);
}

.brand-panel::before,
.brand-panel::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.brand-panel::before {
  width: 390px;
  height: 390px;
  top: -210px;
  right: -150px;
}

.brand-panel::after {
  width: 280px;
  height: 280px;
  right: -110px;
  bottom: -120px;
}

.brand-lockup,
.mobile-brand,
.app-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-lockup .brand-symbol {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.brand-lockup div,
.mobile-brand div,
.app-brand div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-lockup strong,
.mobile-brand strong,
.app-brand strong {
  letter-spacing: 0.13em;
  font-size: 17px;
}

.brand-lockup span:not(.brand-symbol),
.mobile-brand span:not(.brand-symbol),
.app-brand span:not(.brand-symbol) {
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.brand-message {
  position: relative;
  z-index: 1;
  margin: auto 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-message .eyebrow {
  color: #99c7ff;
}

.brand-message h1 {
  margin: 0;
  font-size: clamp(34px, 3.3vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.brand-copy {
  max-width: 480px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  line-height: 1.9;
}

.trust-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  list-style: none;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.trust-list li span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--blue-950);
  background: #8bdcc0;
  font-size: 11px;
  font-weight: 900;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 7vw, 94px);
}

.mobile-brand {
  display: none;
  margin-bottom: 56px;
  color: var(--ink);
}

.mobile-brand .brand-symbol,
.app-brand .brand-symbol {
  color: #fff;
  background: var(--blue-700);
}

.login-card {
  width: min(420px, 100%);
  margin: auto;
}

.login-card h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.form-intro {
  margin: 14px 0 36px;
  color: var(--muted);
  line-height: 1.65;
}

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

.field-group label {
  display: block;
  margin-bottom: 9px;
  color: #263854;
  font-size: 14px;
  font-weight: 700;
}

.field-group input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid #c6d1df;
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field-group input:hover {
  border-color: #97a7bd;
}

.field-group input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(23, 105, 232, 0.12);
}

.field-group input:disabled {
  color: #7d8999;
  background: #f2f5f9;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 72px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 58px;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  color: var(--blue-700);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: var(--blue-50);
}

.password-toggle:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.module-card button:focus-visible {
  outline: 3px solid rgba(23, 105, 232, 0.28);
  outline-offset: 2px;
}

.form-status {
  min-height: 24px;
  margin: -4px 0 12px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.form-status:not(:empty) {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--danger-bg);
}

.primary-button,
.secondary-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  font-weight: 750;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 11px;
  color: #fff;
  background: var(--blue-700);
  box-shadow: 0 10px 24px rgba(11, 87, 208, 0.22);
}

.primary-button:hover:not(:disabled) {
  background: var(--blue-800);
  box-shadow: 0 13px 30px rgba(11, 87, 208, 0.28);
  transform: translateY(-1px);
}

.primary-button:disabled {
  color: rgba(255, 255, 255, 0.76);
  background: #7da8e8;
  box-shadow: none;
}

.button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading .button-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.security-note {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid #dce8f7;
  border-radius: 12px;
  color: var(--muted);
  background: #f7faff;
  font-size: 12px;
  line-height: 1.55;
}

.security-note p {
  margin: 0;
}

.security-note strong {
  color: var(--ink);
}

.security-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-size: 12px;
  font-weight: 900;
}

.login-footer {
  margin: 48px auto 0;
  color: #8a97a9;
  font-size: 12px;
  text-align: center;
}

.app-view {
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0, rgba(23, 105, 232, 0.08), transparent 28%),
    var(--background);
}

.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
}

.app-brand {
  color: var(--ink);
}

.app-brand .brand-symbol {
  width: 42px;
  height: 42px;
  border-radius: 12px 12px 12px 4px;
  font-size: 23px;
}

.account-area,
.account-summary {
  display: flex;
  align-items: center;
}

.account-area {
  gap: 24px;
}

.account-summary {
  gap: 10px;
}

.account-summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-summary strong {
  font-size: 13px;
}

.account-summary span:not(.avatar) {
  color: var(--muted);
  font-size: 11px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--blue-800);
  background: var(--blue-100);
  font-size: 14px;
  font-weight: 800;
}

.secondary-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #cbd6e4;
  border-radius: 9px;
  color: #334764;
  background: #fff;
  font-size: 13px;
}

.secondary-button:hover:not(:disabled) {
  border-color: #9aaac0;
  background: #f6f8fb;
}

.secondary-button:disabled {
  color: #8b98a8;
  background: #f1f4f7;
}

.dashboard {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 80px;
}

.welcome-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 42px;
}

.welcome-section h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 50px);
  letter-spacing: -0.04em;
}

.welcome-section > div > p:last-child {
  max-width: 660px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.secure-session {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 14px 18px;
  border: 1px solid #cce8dc;
  border-radius: 12px;
  color: var(--success);
  background: var(--success-bg);
}

.secure-session > span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-size: 12px;
  font-weight: 900;
}

.secure-session div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.secure-session strong {
  color: #145b45;
  font-size: 12px;
}

.secure-session small {
  color: #50816f;
  font-size: 10px;
}

.access-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(380px, 1.3fr);
  gap: 48px;
  align-items: center;
  margin-bottom: 66px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.access-panel h2,
.modules-section h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.access-panel p:not(.section-kicker) {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.profit-centers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profit-centers li {
  min-width: 74px;
  padding: 10px 14px;
  border: 1px solid #cfe0fa;
  border-radius: 9px;
  color: var(--blue-800);
  background: var(--blue-50);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.profit-centers .empty-access {
  color: var(--muted);
  border-color: var(--line);
  background: #f6f8fb;
  font-weight: 600;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
}

.section-heading > p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 13px;
}

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

.module-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(7, 29, 73, 0.055);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.module-card:hover {
  border-color: #b7c9e3;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.module-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 26px;
  border-radius: 14px;
  font-weight: 850;
}

.module-icon-onboarding {
  color: #1b5fba;
  background: #e1eeff;
}

.module-icon-payroll {
  color: #7452aa;
  background: #eee8fb;
}

.module-icon-finiquito {
  color: #98701c;
  background: #fff1cc;
}

.module-card-body {
  flex: 1;
}

.status-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #50617a;
  background: #edf1f6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.module-card h3 {
  margin: 0;
  font-size: 21px;
}

.module-card p {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.module-card button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d7dee8;
  border-radius: 9px;
  color: #8490a1;
  background: #f5f7fa;
  font-size: 12px;
  font-weight: 750;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: #8190a3;
  font-size: 11px;
}

.app-footer span:first-child {
  color: #445672;
  font-weight: 750;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-status {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100% - 48px));
  padding: 13px 16px;
  border: 1px solid #efb4b4;
  border-radius: 10px;
  color: #8d1f1f;
  background: #fff3f3;
  box-shadow: 0 12px 32px rgba(64, 22, 22, 0.14);
  font-size: 13px;
  line-height: 1.5;
}

.app-status:empty {
  display: none;
}

@media (max-width: 900px) {
  .login-view {
    padding: 0;
  }

  .login-shell {
    display: block;
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand-panel {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 36px max(24px, 7vw);
  }

  .mobile-brand {
    display: flex;
  }

  .login-footer {
    margin-top: 56px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 260px;
  }
}

@media (max-width: 700px) {
  .header-inner,
  .dashboard,
  .app-footer {
    width: min(100% - 32px, 1180px);
  }

  .header-inner {
    min-height: 68px;
  }

  .account-summary {
    display: none;
  }

  .account-area {
    gap: 0;
  }

  .dashboard {
    padding: 48px 0 60px;
  }

  .welcome-section,
  .section-heading {
    display: block;
  }

  .secure-session {
    width: 100%;
    margin-top: 24px;
  }

  .access-panel {
    display: block;
    margin-bottom: 52px;
    padding: 25px;
  }

  .profit-centers {
    justify-content: flex-start;
    margin-top: 22px;
  }

  .section-heading > p {
    margin-top: 12px;
  }

  .app-footer {
    display: block;
  }

  .app-footer span {
    display: block;
    margin-bottom: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
