:root {
    --bg-main: #0b0f15;
    --bg-card: #141b25;
    --border: #232d3d;
    --fg-main: #f0f6fc;
    --fg-muted: #8b949e;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-main);
    color: var(--fg-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .login-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    text-align: center;
    animation: fadeIn 0.3s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .icon-wrapper {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
  }
  h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
  p.subtitle { font-size: 13.5px; color: var(--fg-muted); margin-bottom: 24px; line-height: 1.4; }
  .form-group {
    position: relative;
    margin-bottom: 16px;
  }
  .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
  }
  input[type="password"], input[type="text"] {
    width: 100%;
    padding: 14px 44px 14px 16px;
    background: #0d121a;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--fg-main);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  }
  .toggle-pw-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--fg-muted);
    font-size: 18px;
    padding: 6px;
    cursor: pointer;
    user-select: none;
  }
  .toggle-pw-btn:hover { color: var(--fg-main); }
  .btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  .btn-submit:active { transform: scale(0.98); }
  .btn-submit:hover { background: var(--accent-hover); }
  .error-box {
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: var(--danger);
    font-size: 13.5px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
  }
  @keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
  }
  .badge-permanent {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 18px;
  }
