@import "color-base.css";

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: 'Sora', sans-serif;
      background-color: var(--blue);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
    }

    /* Background decorative circles */
    body::before {
      content: '';
      position: fixed;
      width: 600px;
      height: 600px;
      border-radius: 50%;
      background: rgba(255,255,255,0.05);
      top: -200px;
      right: -150px;
      pointer-events: none;
    }
    body::after {
      content: '';
      position: fixed;
      width: 400px;
      height: 400px;
      border-radius: 50%;
      background: rgba(255,255,255,0.04);
      bottom: -100px;
      left: -100px;
      pointer-events: none;
    }

    .bg-shape {
      position: fixed;
      width: 300px;
      height: 300px;
      border-radius: 50%;
      background: rgba(255,255,255,0.03);
      bottom: 100px;
      right: 80px;
      pointer-events: none;
    }

    /* Card */
    .card {
      background: var(--white);
      border-radius: 24px;
      width: 420px;
      max-width: calc(100vw - 32px);
      padding: 48px 44px 44px;
      box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 20px 60px rgba(10,40,100,0.25),
        0 1px 2px rgba(0,0,0,0.06);
      animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    @keyframes slideUp {
      from { opacity: 0; transform: translateY(32px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* Logo / Brand */
    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 32px;
    }
    .logo-icon {
      width: 36px;
      height: 36px;
      background: var(--blue);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .logo-icon svg {
      width: 20px;
      height: 20px;
      fill: none;
      stroke: white;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .logo-name {
      font-size: 17px;
      font-weight: 700;
      color: var(--black);
      letter-spacing: -0.3px;
    }

    /* Heading */
    .heading {
      margin-bottom: 6px;
    }
    .heading h1 {
      font-size: 26px;
      font-weight: 700;
      color: var(--black);
      letter-spacing: -0.5px;
      line-height: 1.2;
    }
    .heading p {
      font-size: 14px;
      color: var(--gray);
      margin-top: 6px;
      font-weight: 400;
    }

    /* Form */
    form {
      margin-top: 28px;
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .field label {
      font-size: 13px;
      font-weight: 600;
      color: var(--black);
      letter-spacing: 0.1px;
    }

    .input-wrap {
      position: relative;
    }
    .input-wrap svg {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      width: 16px;
      height: 16px;
      stroke: var(--gray);
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
      pointer-events: none;
      transition: stroke 0.2s;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"] {
      width: 100%;
      padding: 12px 14px 12px 40px;
      border: 1.5px solid var(--border);
      border-radius: 12px;
      font-family: 'Sora', sans-serif;
      font-size: 14px;
      font-weight: 400;
      color: var(--black);
      background: var(--white);
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    input::placeholder { color: #b0b7c3; }

    input:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(18, 108, 225, 0.12);
    }
    input:focus + svg,
    .input-wrap:focus-within svg {
      stroke: var(--blue);
    }

    input.error {
      border-color: var(--error);
      box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
    }

    .field-error {
      font-size: 12px;
      color: var(--error);
      font-weight: 500;
      display: none;
    }
    .field-error.visible { display: block; }

    /* Forgot password */
    .row-forgot {
      display: flex;
      justify-content: flex-end;
      margin-top: -8px;
    }
    .row-forgot a {
      font-size: 13px;
      color: var(--blue);
      text-decoration: none;
      font-weight: 500;
    }
    .row-forgot a:hover { text-decoration: underline; }

    /* Remember me */
    .row-remember {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: -4px;
    }
    .row-remember input[type="checkbox"] {
      width: 16px;
      height: 16px;
      accent-color: var(--blue);
      cursor: pointer;
      padding: 0;
      border: none;
      box-shadow: none;
    }
    .row-remember label {
      font-size: 13px;
      color: var(--gray);
      cursor: pointer;
      user-select: none;
    }

    /* Submit */
    .btn-submit {
      width: 100%;
      padding: 14px;
      background: var(--blue);
      color: white;
      border: none;
      border-radius: 12px;
      font-family: 'Sora', sans-serif;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-top: 4px;
      letter-spacing: -0.1px;
    }
    .btn-submit:hover {
      background: var(--blue-dark);
      box-shadow: 0 4px 16px rgba(18, 108, 225, 0.35);
      transform: translateY(-1px);
    }
    .btn-submit:active { transform: translateY(0); }
    .btn-submit.loading { pointer-events: none; opacity: 0.8; }

    /* Spinner */
    .spinner {
      width: 18px;
      height: 18px;
      border: 2.5px solid rgba(255,255,255,0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      display: none;
    }
    .btn-submit.loading .spinner { display: block; }
    .btn-submit.loading .btn-text { display: none; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* Divider */
    .divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 4px 0;
    }
    .divider::before, .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }
    .divider span {
      font-size: 12px;
      color: #b0b7c3;
      font-weight: 500;
      white-space: nowrap;
    }

    /* Social buttons */
    .social-row {
      display: flex;
      gap: 10px;
    }
    .btn-social {
      flex: 1;
      padding: 10px;
      border: 1.5px solid var(--border);
      border-radius: 12px;
      background: white;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-family: 'Sora', sans-serif;
      font-size: 13px;
      font-weight: 500;
      color: var(--black);
      transition: border-color 0.2s, background 0.2s;
    }
    .btn-social:hover {
      border-color: #b0b7c3;
      background: var(--gray-light);
    }
    .btn-social svg { width: 18px; height: 18px; flex-shrink: 0; }

    /* Sign up link */
    .signup-row {
      text-align: center;
      font-size: 13px;
      color: var(--gray);
      margin-top: 4px;
    }
    .signup-row a {
      color: var(--blue);
      font-weight: 600;
      text-decoration: none;
    }
    .signup-row a:hover { text-decoration: underline; }

    /* Success state */
    .success-overlay {
      display: none;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 12px;
      animation: fadeIn 0.4s ease both;
    }
    .success-overlay.visible { display: flex; }
    .success-icon {
      width: 64px;
      height: 64px;
      background: #ecfdf5;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .success-icon svg {
      width: 32px;
      height: 32px;
      stroke: #10b981;
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }
    .success-overlay h2 {
      font-size: 20px;
      font-weight: 700;
      color: var(--black);
      letter-spacing: -0.3px;
    }
    .success-overlay p {
      font-size: 14px;
      color: var(--gray);
    }
    @keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

    /* Toggle password */
    .toggle-pw {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .toggle-pw svg {
      width: 16px;
      height: 16px;
      stroke: var(--gray);
      stroke-width: 2;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
      position: static;
      transform: none;
    }
    .toggle-pw:hover svg { stroke: var(--blue); }