:root {
      --color-background-primary: #ffffff;
      --color-background-page: #eef2f6;
      --color-text-primary: #142033;
      --color-text-secondary: #5f6b7a;
      --color-text-tertiary: #8b97a6;
      --color-text-danger: #b42318;
      --color-text-success: #166534;
      --color-border-secondary: #cbd5df;
      --color-border-tertiary: #e3e8ee;
      --border-radius-md: 8px;
      --border-radius-lg: 12px;
      --brand-navy: #142e4c;
      --brand-navy-hover: #1b3d62;
    }

    * { box-sizing: border-box; }

    html,
    body { min-height: 100%; }

    body {
      margin: 0;
      min-width: 320px;
      background: var(--color-background-page);
      color: var(--color-text-primary);
      -webkit-font-smoothing: antialiased;
    }

    button,
    input { font: inherit; }

    .hidden { display: none !important; }

    .login-page {
      display: grid;
      min-height: 100vh;
      padding: 0;
      place-items: stretch;
    }

    .login-shell {
      display: flex;
      width: 100%;
      min-height: 520px;
      height: 100vh;
      overflow: hidden;
      border: 0;
      border-radius: 0;
      background: var(--color-background-primary);
    }

    .brand-panel {
      position: relative;
      display: flex;
      width: 44%;
      flex: 0 0 44%;
      flex-direction: column;
      overflow: hidden;
      padding: 2.5rem;
      background: var(--brand-navy);
      color: #fff;
    }

    .brand-panel::before,
    .brand-panel::after {
      position: absolute;
      z-index: 0;
      border: 36px solid rgba(255, 255, 255, 0.04);
      border-radius: 50%;
      content: "";
      pointer-events: none;
    }

    .brand-panel::before { top: -130px; right: -130px; width: 260px; height: 260px; }
    .brand-panel::after { bottom: -105px; left: -105px; width: 200px; height: 200px; }

    .brand-logo,
    .brand-message { position: relative; z-index: 1; }

    .brand-logo {
      display: flex;
      align-items: center;
      gap: 9px;
      color: rgba(255, 255, 255, 0.9);
      font-size: 16px;
      font-weight: 500;
      letter-spacing: 0.01em;
    }

    .brand-logo svg { width: 32px; height: 32px; flex: 0 0 32px; }

    .brand-message {
      max-width: 340px;
      margin: auto 0;
      padding: 2.5rem 0;
    }

    .brand-message h1 {
      margin: 0;
      color: #fff;
      font-size: 24px;
      font-weight: 500;
      line-height: 1.3;
    }

    .brand-message p {
      margin: 10px 0 0;
      color: rgba(255, 255, 255, 0.5);
      font-size: 13px;
      line-height: 1.6;
    }

    .form-panel {
      display: flex;
      flex: 1;
      align-items: center;
      justify-content: center;
      padding: 2.5rem;
      background: var(--color-background-primary);
    }

    .auth-form { width: min(100%, 390px); }

    .auth-form h2 {
      margin: 0 0 4px;
      color: var(--color-text-primary);
      font-size: 22px;
      font-weight: 500;
      line-height: 1.35;
    }

    .auth-subtitle {
      margin: 0 0 2rem;
      color: var(--color-text-secondary);
      font-size: 14px;
    }

    .auth-field { display: block; margin-bottom: 1.1rem; }

    .auth-label {
      display: block;
      margin-bottom: 5px;
      color: var(--color-text-secondary);
      font-size: 13px;
      font-weight: 500;
    }

    .auth-input,
    .password-wrap input {
      width: 100%;
      padding: 9px 12px;
      border: 1px solid var(--color-border-secondary);
      border-radius: var(--border-radius-md);
      outline: 0;
      background: var(--color-background-primary);
      color: var(--color-text-primary);
      font-size: 14px;
      transition: border-color 140ms ease, box-shadow 140ms ease;
    }

    .auth-input:focus,
    .password-wrap input:focus {
      border-color: #1b4d7a;
      box-shadow: 0 0 0 3px rgba(20, 46, 76, 0.1);
    }

    .password-wrap { position: relative; }
    .password-wrap input { padding-right: 42px; }

    .password-toggle {
      position: absolute;
      top: 50%;
      right: 10px;
      display: grid;
      padding: 2px;
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--color-text-tertiary);
      cursor: pointer;
      place-items: center;
      transform: translateY(-50%);
    }

    .password-toggle:hover { color: var(--color-text-secondary); }
    .password-toggle:focus-visible { border-radius: 4px; box-shadow: 0 0 0 3px rgba(20, 46, 76, 0.12); }
    .password-toggle i { font-size: 17px; }

    .auth-hint {
      display: flex;
      align-items: flex-start;
      gap: 5px;
      margin: -0.35rem 0 1.25rem;
      color: var(--color-text-secondary);
      font-size: 12px;
      line-height: 1.45;
    }

    .auth-hint i { margin-top: 1px; font-size: 13px; }

    .login-submit {
      display: flex;
      width: 100%;
      min-height: 42px;
      align-items: center;
      justify-content: center;
      padding: 10px 16px;
      border: 0;
      border-radius: var(--border-radius-md);
      background: var(--brand-navy);
      color: #fff;
      font-size: 14px;
      font-weight: 500;
      letter-spacing: 0.01em;
      cursor: pointer;
      transition: background 140ms ease, transform 100ms ease, opacity 140ms ease;
    }

    .login-submit:hover { background: var(--brand-navy-hover); }
    .login-submit:active { transform: scale(0.99); }
    .login-submit:disabled { cursor: not-allowed; opacity: 0.68; }

    .auth-status {
      min-height: 18px;
      margin: 10px 0 0;
      color: var(--color-text-secondary);
      font-size: 12px;
      line-height: 1.5;
      white-space: pre-line;
    }

    .auth-status.is-error { color: var(--color-text-danger); }
    .auth-status.is-success { color: var(--color-text-success); }

    .auth-divider { height: 1px; margin: 1.25rem 0; border: 0; background: var(--color-border-tertiary); }

    .auth-help {
      margin: 0;
      color: var(--color-text-secondary);
      font-size: 12px;
      text-align: center;
    }

    .auth-help a { color: var(--color-text-secondary); text-decoration: none; }
    .auth-help a:hover { text-decoration: underline; }

    @media (max-width: 760px) {
      .login-page { padding: 0; place-items: stretch; }
      .login-shell { min-height: 100vh; border: 0; border-radius: 0; flex-direction: column; }
      .brand-panel { width: 100%; flex: 0 0 auto; min-height: 230px; padding: 1.75rem; }
      .brand-message { margin: 2rem 0 0; padding: 0; }
      .brand-message h1 { max-width: 330px; font-size: 22px; }
      .form-panel { padding: 2rem 1.5rem; }
    }
