
  .modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(6,12,21,0.72); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
    padding: 24px;
  }
  .modal-overlay.open { opacity: 1; pointer-events: auto; }
  .modal {
    background: #fff; border-radius: 20px; padding: 40px;
    max-width: 500px; width: 100%;
    transform: scale(0.94) translateY(14px); transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    max-height: 90vh; overflow-y: auto; position: relative;
  }
  .modal-overlay.open .modal { transform: scale(1) translateY(0); }
  .modal h2 { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
  .modal p { font-size: 15px; color: var(--text-muted); margin-bottom: 26px; }
  .modal-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
  .modal-form-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); font-family: var(--font-display); }
  .modal-form-group input, .modal-form-group select, .modal-form-group textarea {
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; font-size: 15px; color: var(--navy); outline: none;
    font-family: var(--font-body); transition: border-color 0.2s; appearance: none;
  }
  .modal-form-group input:focus, .modal-form-group select:focus, .modal-form-group textarea:focus { border-color: var(--blue); }
  .modal-form-group textarea { min-height: 84px; resize: vertical; }
  .modal-software-other { display: none; }
  .modal-software-other.visible { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
  .modal-software-other label { font-size: 13px; font-weight: 600; color: var(--text-muted); font-family: var(--font-display); }
  .modal-software-other input { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 15px; color: var(--navy); outline: none; font-family: var(--font-body); transition: border-color 0.2s; }
  .modal-close {
    position: absolute; top: 16px; right: 16px; width: 34px; height: 34px;
    border-radius: 50%; border: none; background: var(--border); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text-muted);
    transition: background 0.2s, transform 0.2s;
  }
  .modal-close:hover { background: #d1d9e0; transform: rotate(90deg); }
  .modal-submit {
    width: 100%; padding: 14px; background: var(--blue); color: #fff;
    border: none; border-radius: 12px; font-family: var(--font-display);
    font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.2s; margin-top: 8px;
  }
  .modal-submit:hover { background: var(--blue-dark); box-shadow: 0 8px 24px rgba(29,78,216,0.35); }

  /* Smooth scroll for JS */
  .smooth-scroll { scroll-behavior: smooth; }

  /* AUTH MODAL */
  .auth-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(6,12,21,0.75); backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
    padding: 24px;
  }
  .auth-overlay.open { opacity: 1; pointer-events: auto; }
  .auth-modal {
    background: #fff; border-radius: 24px;
    width: 100%; max-width: 460px;
    transform: scale(0.94) translateY(16px);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    overflow: hidden; position: relative;
    box-shadow: 0 32px 80px rgba(6,12,21,0.28), 0 4px 16px rgba(29,78,216,0.1);
  }
  .auth-overlay.open .auth-modal { transform: scale(1) translateY(0); }
  .auth-header {
    padding: 32px 36px 0;
  }
  .auth-logo { display: flex; align-items: center; margin-bottom: 24px; }
  .auth-logo img { height: 28px; }
  .auth-tabs {
    display: flex; gap: 0; margin-bottom: 28px;
    border-bottom: 2px solid var(--border);
  }
  .auth-tab {
    flex: 1; padding: 10px 0; text-align: center;
    font-family: var(--font-display); font-size: 15px; font-weight: 700;
    color: var(--text-muted); cursor: pointer; border: none; background: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
  }
  .auth-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
  .auth-body { padding: 0 36px 36px; }
  .auth-panel { display: none; }
  .auth-panel.active { display: block; }
  .auth-group {
    display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
  }
  .auth-group label {
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    font-family: var(--font-display);
  }
  .auth-group input {
    background: var(--bg); border: 1.5px solid var(--border);
    border-radius: 10px; padding: 12px 14px;
    font-size: 15px; color: var(--navy); outline: none;
    font-family: var(--font-body); transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
  }
  .auth-group input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
  }
  .auth-group input.error { border-color: #ef4444; }
  .auth-error-msg {
    font-size: 12px; color: #ef4444; margin-top: 4px;
    font-family: var(--font-display); font-weight: 500; display: none;
  }
  .auth-error-msg.visible { display: block; }
  .auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .auth-forgot {
    text-align: right; margin-bottom: 20px; margin-top: -6px;
  }
  .auth-forgot a {
    font-size: 13px; color: var(--blue); font-family: var(--font-display);
    font-weight: 600; text-decoration: none; cursor: pointer;
  }
  .auth-forgot a:hover { text-decoration: underline; }
  .auth-btn {
    width: 100%; padding: 14px; background: var(--blue); color: #fff;
    border: none; border-radius: 12px; font-family: var(--font-display);
    font-size: 16px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; margin-top: 4px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
  }
  .auth-btn:hover { background: var(--blue-dark); box-shadow: 0 8px 24px rgba(29,78,216,0.35); transform: translateY(-1px); }
  .auth-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
  .auth-divider {
    display: flex; align-items: center; gap: 12px; margin: 18px 0;
  }
  .auth-divider-line { flex: 1; height: 1px; background: var(--border); }
  .auth-divider span { font-size: 12px; color: var(--text-muted); font-family: var(--font-display); font-weight: 600; }
  .auth-switch {
    text-align: center; margin-top: 16px;
    font-size: 14px; color: var(--text-muted); font-family: var(--font-display);
  }
  .auth-switch a { color: var(--blue); font-weight: 700; cursor: pointer; text-decoration: none; }
  .auth-switch a:hover { text-decoration: underline; }
  .auth-success {
    text-align: center; padding: 16px 0 8px; display: none;
  }
  .auth-success.visible { display: block; }
  .auth-success-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(16,185,129,0.1); border: 2px solid rgba(16,185,129,0.25);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  }
  .auth-success h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
  .auth-success p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
  /* Password strength */
  .password-strength { margin-top: 6px; }
  .strength-bar {
    height: 4px; border-radius: 2px; background: var(--border);
    overflow: hidden; margin-bottom: 4px;
  }
  .strength-fill {
    height: 100%; border-radius: 2px; width: 0%;
    transition: width 0.3s, background 0.3s;
  }
  .strength-label { font-size: 11px; font-weight: 600; font-family: var(--font-display); color: var(--text-muted); }
  /* Close button */
  .auth-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: var(--border); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: var(--text-muted); transition: all 0.2s;
    z-index: 1;
  }
  .auth-close:hover { background: #d1d9e0; transform: rotate(90deg); }
  /* NAV AUTH STATE */
  .nav-user {
    display: none; align-items: center; gap: 10px;
  }
  .nav-user.visible { display: flex; }
  .nav-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--blue); color: #fff;
    font-family: var(--font-display); font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .nav-user-name {
    font-family: var(--font-display); font-size: 14px; font-weight: 600;
    color: var(--navy);
  }
  .nav-logout {
    font-family: var(--font-display); font-size: 13px; font-weight: 600;
    color: var(--text-muted); background: none; border: none; cursor: pointer;
    padding: 6px 10px; border-radius: 8px; transition: all 0.2s;
  }
  .nav-logout:hover { background: var(--border); color: var(--navy); }
  /* Forgot panel */
  .auth-back {
    background: none; border: none; cursor: pointer;
    font-family: var(--font-display); font-size: 13px; font-weight: 600;
    color: var(--blue); display: flex; align-items: center; gap: 4px;
    padding: 0; margin-bottom: 20px; transition: opacity 0.2s;
  }
  .auth-back:hover { opacity: 0.75; }

