﻿:root {
      --bg: #0f1117; --card: #1c2333; --text: #e8ecf4; --text-muted: #8a95aa;
      --accent: #3b82f6; --accent-hover: #2563eb; --border: rgba(255,255,255,0.09);
      --radius: 12px; --input-bg: #0f1117;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
      background: var(--bg); color: var(--text);
      display: flex; justify-content: center; align-items: center;
      min-height: 100vh; padding: 20px;
    }
    .card {
      background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 36px 32px; width: 100%; max-width: 400px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }
    .brand { text-align: center; margin-bottom: 28px; }
    .logo-icon {
      width: 52px; height: 52px; border-radius: 12px; margin: 0 auto 12px;
      background: linear-gradient(135deg, #3b82f6, #60a5fa);
      display: flex; align-items: center; justify-content: center;
      font-size: 26px; color: #fff;
      box-shadow: 0 4px 16px rgba(59,130,246,0.35);
    }
    .brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
    .brand-badge {
      display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 600;
      background: rgba(34,197,94,0.1); color: #22c55e;
      border: 1px solid rgba(34,197,94,0.2); padding: 2px 10px; border-radius: 20px;
    }
    /* Tabs */
    .tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
    .tab {
      flex: 1; padding: 10px; text-align: center; font-size: 13px; font-weight: 600;
      color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
      margin-bottom: -1px; transition: all 0.15s;
    }
    .tab.active { color: var(--accent); border-bottom-color: var(--accent); }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; }
    /* Form */
    .form-group { margin-bottom: 16px; }
    label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
    input[type=email], input[type=password], input[type=text] {
      width: 100%; padding: 10px 12px; background: var(--input-bg);
      border: 1px solid var(--border); border-radius: 8px;
      color: var(--text); font-size: 14px; font-family: inherit;
      transition: border-color 0.15s;
    }
    input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
    .btn-primary {
      width: 100%; padding: 11px; background: var(--accent); color: #fff; border: none;
      border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
      transition: background 0.15s; margin-top: 4px; font-family: inherit;
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .btn-primary:hover { background: var(--accent-hover); }
    .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-link {
      background: none; border: none; color: var(--accent); font-size: 12px;
      cursor: pointer; padding: 0; font-family: inherit; text-decoration: underline;
    }
    .btn-link:hover { color: var(--accent-hover); }
    .form-footer { margin-top: 12px; text-align: center; font-size: 12px; color: var(--text-muted); }
    .alert {
      padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 14px;
      display: none; align-items: flex-start; gap: 8px;
    }
    .alert.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; display: flex; }
    .alert.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: #4ade80; display: flex; }
    .divider { text-align: center; margin: 18px 0; font-size: 12px; color: var(--text-muted); position: relative; }
    .divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border); }
    .divider::before { left: 0; } .divider::after { right: 0; }
    .guest-btn {
      width: 100%; padding: 10px; background: transparent; color: var(--text-muted);
      border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
      cursor: pointer; font-family: inherit; transition: all 0.15s;
    }
    .guest-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
    .spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .forgot-panel, .reset-panel { display: none; }
    .back-link { font-size: 12px; color: var(--text-muted); cursor: pointer; margin-bottom: 16px; display: inline-flex; align-items: center; gap: 4px; }
    .back-link:hover { color: var(--text); }
    .invite-only-notice {
      display: none;
      text-align: center; padding: 20px 0 8px;
    }
    .invite-only-notice .beta-badge {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 4px 12px; border-radius: 99px; margin-bottom: 14px;
      background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.3);
      font-size: 11px; font-weight: 700; color: #a5b4fc; letter-spacing: 0.06em;
    }
    .invite-only-notice p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
    .invite-only-notice a:not(.btn-primary) { color: var(--accent); text-decoration: none; font-weight: 600; }
    .invite-only-notice a:not(.btn-primary):hover { text-decoration: underline; }