:root {
    --gold: #D4A843;
    --gold-light: #F2DFA0;
    --navy: #1B2A4A;
    --navy-light: #2D4470;
    --teal: #5BAFB0;
    --teal-light: #A0E4E5;
    --olive: #6B8E5A;
    --olive-light: #A4C991;
    --cream: #F5F0E8;
    --cream-dark: #E8E0D0;
    --white: #FFFFFF;
    --text: #2C2C2C;
    --text-light: #6B6B6B;
    --red: #E05555;
    --green: #4CAF7D;
    --shadow: 0 8px 32px rgba(27,42,74,0.12);
    --shadow-lg: 0 16px 48px rgba(27,42,74,0.18);
    --radius: 20px;
    --radius-sm: 12px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Outfit', sans-serif;
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ===== ANIMATIONS ===== */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes tabFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .screen.tab-fade-in {
    animation: tabFadeIn 0.2s ease forwards;
  }
  @keyframes slideLeft {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
  }
  @keyframes slideRight {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
  }
  @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }
  @keyframes swipeRight {
    to { transform: translateX(150%) rotate(20deg); opacity: 0; }
  }
  @keyframes swipeLeft {
    to { transform: translateX(-150%) rotate(-20deg); opacity: 0; }
  }
  @keyframes cardEnter {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }
  @keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }
  @keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
  }

  /* ===== BACKGROUND TEXTURE ===== */
  body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
      radial-gradient(circle at 20% 20%, rgba(212,168,67,0.08) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(91,175,176,0.08) 0%, transparent 50%),
      radial-gradient(circle at 50% 50%, rgba(107,142,90,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  /* ===== SCREEN CONTAINER ===== */
  .screen {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    width: 100%;
  }
  .screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    animation: fadeIn 0.4s ease;
  }

  /* ===== HEADER / NAV ===== */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 8px rgba(27,42,74,0.06);
    border-bottom: none;
  }
  .nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
  }
  .nav-logo img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }
  .nav-logo-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), var(--olive));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', serif;
    color: white;
    font-size: 20px;
    font-weight: bold;
  }
  .nav-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    color: var(--navy);
  }
  .nav-actions {
    display: flex;
    gap: 12px;
  }
  .nav-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
  }
  .nav-btn.outline {
    background: transparent;
    border: 1.5px solid var(--navy);
    color: var(--navy);
  }
  .nav-btn.outline:hover { background: var(--navy); color: white; }
  .nav-btn.filled {
    background: var(--navy);
    color: white;
  }
  .nav-btn.filled:hover { background: var(--navy-light); transform: translateY(-1px); }
  .nav-profile {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--olive));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s;
  }
  .nav-profile:hover { transform: scale(1.1); }

  /* ===== LANDING SCREEN ===== */
  .landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 32px 60px;
    text-align: center;
    min-height: 100vh;
    width: 100%;
  }
  .landing-bridge {
    width: 360px;
    height: 360px;
    margin-bottom: 8px;
    animation: float 4s ease-in-out infinite;
    position: relative;
  }
  .landing-bridge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
  }
  .landing-bridge-svg {
    width: 360px;
    height: 360px;
  }
  .landing h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--navy);
    margin-bottom: 12px;
    animation: fadeUp 0.8s ease 0.2s both;
  }
  .landing .tagline {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--text-light);
    font-weight: 300;
    margin-bottom: 48px;
    animation: fadeUp 0.8s ease 0.4s both;
  }
  .landing-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    animation: fadeUp 0.8s ease 0.6s both;
  }
  .role-card {
    flex: 1;
    min-width: 280px;
    max-width: 360px;
    background: white;
    border-radius: var(--radius);
    padding: 40px 32px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
  }
  .role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    transition: height 0.4s ease;
  }
  .role-card.volunteer::before { background: linear-gradient(90deg, var(--teal), var(--teal-light)); }
  .role-card.org::before { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
  .role-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
  }
  .role-card:hover::before { height: 8px; }
  .role-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
  }
  .volunteer .role-icon { background: linear-gradient(135deg, rgba(91,175,176,0.15), rgba(91,175,176,0.05)); }
  .org .role-icon { background: linear-gradient(135deg, rgba(212,168,67,0.15), rgba(212,168,67,0.05)); }
  .role-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 10px;
  }
  .role-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
  }
  .role-card .cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s;
  }
  .volunteer .cta { color: var(--teal); }
  .org .cta { color: var(--gold); }
  .role-card:hover .cta { gap: 14px; }

  /* ===== FORM SCREEN ===== */
  .form-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 32px 60px;
    width: 100%;
  }
  .form-container {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    animation: fadeUp 0.6s ease;
  }
  .form-header {
    text-align: center;
    margin-bottom: 40px;
  }
  .form-header .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    margin-bottom: 20px;
    transition: color 0.2s;
    background: none;
    border: none;
    font-family: 'Outfit', sans-serif;
  }
  .form-header .back-btn:hover { color: var(--navy); }
  .form-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 8px;
  }
  .form-header p {
    color: var(--text-light);
    font-size: 0.95rem;
  }

  /* Progress bar */
  .progress-bar {
    width: 100%;
    height: 6px;
    background: var(--cream-dark);
    border-radius: 3px;
    margin-bottom: 36px;
    overflow: hidden;
  }
  .progress-bar .fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .volunteer-form .fill { background: linear-gradient(90deg, var(--teal), var(--teal-light)); }
  .org-form .fill { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }

  /* Form steps */
  .form-step {
    display: none;
    animation: slideLeft 0.4s ease;
  }
  .form-step.active { display: block; }

  .field-group {
    margin-bottom: 24px;
  }
  .field-group label {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--navy);
    margin-bottom: 8px;
  }
  .field-group label .required {
    color: var(--red);
  }
  .field-group input[type="text"],
  .field-group input[type="email"],
  .field-group input[type="tel"],
  .field-group input[type="number"],
  .field-group select,
  .field-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    background: white;
    transition: all 0.3s ease;
    outline: none;
  }
  .field-group input:focus,
  .field-group select:focus,
  .field-group textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(91,175,176,0.1);
  }
  .org-form .field-group input:focus,
  .org-form .field-group select:focus,
  .org-form .field-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212,168,67,0.1);
  }
  .field-group textarea {
    resize: vertical;
    min-height: 100px;
  }
  .field-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B6B6B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
  }

  /* Checkbox/Chip group */
  .chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .chip {
    padding: 10px 18px;
    border: 2px solid var(--cream-dark);
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    background: white;
    color: var(--text-light);
    user-select: none;
  }
  .chip:hover { border-color: var(--teal); color: var(--teal); }
  .chip.selected {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
  }
  .org-form .chip:hover { border-color: var(--gold); color: var(--gold); }
  .org-form .chip.selected {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
  }

  /* Availability grid */
  .avail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .avail-item {
    padding: 16px;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: white;
  }
  .avail-item .icon { font-size: 24px; margin-bottom: 6px; }
  .avail-item .label { font-size: 0.85rem; font-weight: 500; color: var(--text-light); }
  .avail-item:hover { border-color: var(--teal); }
  .avail-item.selected {
    background: linear-gradient(135deg, rgba(91,175,176,0.1), rgba(91,175,176,0.05));
    border-color: var(--teal);
  }
  .avail-item.selected .label { color: var(--teal); font-weight: 600; }

  /* Toggle */
  .toggle-group {
    display: flex;
    gap: 12px;
  }
  .toggle-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
    background: white;
    color: var(--text-light);
  }
  .toggle-btn:hover { border-color: var(--teal); }
  .toggle-btn.selected {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
  }
  .org-form .toggle-btn:hover { border-color: var(--gold); }
  .org-form .toggle-btn.selected {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
  }

  /* Form navigation */
  .form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 36px;
    gap: 16px;
  }
  .btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .btn-secondary {
    background: var(--cream-dark);
    color: var(--text-light);
  }
  .btn-secondary:hover { background: #ddd5c5; }
  .btn-primary {
    background: var(--navy);
    color: white;
  }
  .btn-primary:hover { background: var(--navy-light); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(27,42,74,0.3); }
  .btn-primary.teal { background: var(--teal); }
  .btn-primary.teal:hover { background: #4a9e9f; }
  .btn-primary.gold { background: var(--gold); }
  .btn-primary.gold:hover { background: #c49a36; }

  /* ===== MATCH SCREEN (Dating-app style) ===== */
  .match-screen {
    padding: 90px 32px 90px;
    align-items: center;
    justify-content: flex-start;
  }
  .match-header {
    text-align: center;
    margin-bottom: 28px;
    animation: fadeUp 0.5s ease;
    position: relative;
  }
  .match-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--navy);
    margin-bottom: 6px;
  }
  .match-header p {
    color: var(--text-light);
    font-size: 0.95rem;
  }

  /* Card stack */
  .card-stack {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 520px;
    margin-bottom: 28px;
  }
  .match-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    cursor: grab;
    transition: box-shadow 0.3s;
    animation: cardEnter 0.4s ease;
    display: flex;
    flex-direction: column;
  }
  .match-card:active { cursor: grabbing; }
  .match-card.swiping-right { animation: swipeRight 0.5s ease forwards; }
  .match-card.swiping-left { animation: swipeLeft 0.5s ease forwards; }

  .card-banner {
    height: 140px;
    position: relative;
    overflow: hidden;
  }
  .card-banner.vol-banner {
    background: linear-gradient(135deg, var(--teal), var(--olive));
  }
  .card-banner.org-banner {
    background: linear-gradient(135deg, var(--gold), var(--olive));
  }
  .card-banner-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.12;
    background: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 20px,
      rgba(255,255,255,0.3) 20px,
      rgba(255,255,255,0.3) 22px
    );
  }
  .card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    border: 4px solid white;
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }

  .card-body {
    flex: 1;
    padding: 52px 28px 24px;
    overflow-y: auto;
    text-align: center;
  }
  .card-body h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 4px;
  }
  .card-body .card-sub {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 18px;
  }
  .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
  }
  .card-tag {
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
  }
  .card-tag.teal-tag {
    background: rgba(91,175,176,0.12);
    color: var(--teal);
  }
  .card-tag.gold-tag {
    background: rgba(212,168,67,0.12);
    color: var(--gold);
  }
  .card-tag.olive-tag {
    background: rgba(107,142,90,0.12);
    color: var(--olive);
  }
  .card-details {
    text-align: left;
    margin-top: 12px;
  }
  .card-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.88rem;
    color: var(--text);
    border-bottom: 1px solid var(--cream);
  }
  .card-detail:last-child { border: none; }
  .card-detail .detail-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
  }

  /* Swipe hint overlays */
  .swipe-overlay {
    position: absolute;
    top: 20px;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    pointer-events: none;
  }
  .swipe-overlay.like {
    right: 20px;
    border: 3px solid var(--green);
    color: var(--green);
    transform: rotate(15deg);
  }
  .swipe-overlay.nope {
    left: 20px;
    border: 3px solid var(--red);
    color: var(--red);
    transform: rotate(-15deg);
  }

  /* Action buttons */
  .match-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    animation: fadeUp 0.5s ease 0.3s both;
  }
  .action-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }
  .action-btn:hover { transform: scale(1.15); }
  .action-btn.pass {
    background: white;
    color: var(--red);
  }
  .action-btn.pass:hover { background: var(--red); color: white; }
  .action-btn.connect {
    background: var(--green);
    color: white;
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
  .action-btn.connect:hover { background: #3d9d6d; }
  .action-btn.info-btn {
    background: white;
    color: var(--teal);
  }
  .action-btn.info-btn:hover { background: var(--teal); color: white; }

  /* Match counter */
  .match-counter {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    animation: fadeUp 0.5s ease 0.4s both;
  }

  /* ===== MATCH POPUP ===== */
  .match-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27,42,74,0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
  }
  .match-popup-overlay.active { display: flex; }
  .match-popup {
    background: white;
    border-radius: var(--radius);
    padding: 48px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: fadeUp 0.5s ease;
    box-shadow: var(--shadow-lg);
  }
  .match-popup .confetti-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: pulse 1s ease infinite;
  }
  .match-popup h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--navy);
    margin-bottom: 8px;
  }
  .match-popup p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
  }
  .match-popup .contact-info {
    background: var(--cream);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
  }
  .match-popup .contact-info p {
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text);
  }
  .match-popup .contact-info strong {
    color: var(--navy);
  }

  /* ===== CONNECTIONS LIST ===== */
  .connections-screen {
    padding: 100px 32px 90px;
    align-items: center;
  }
  .connections-container {
    max-width: 640px;
    width: 100%;
  }
  .connections-header {
    text-align: center;
    margin-bottom: 32px;
  }
  .connections-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--navy);
  }
  .connection-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
    animation: fadeUp 0.4s ease both;
  }
  .connection-item:hover { transform: translateX(4px); }
  .connection-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
  }
  .connection-avatar.vol { background: linear-gradient(135deg, rgba(91,175,176,0.2), rgba(91,175,176,0.1)); }
  .connection-avatar.org { background: linear-gradient(135deg, rgba(212,168,67,0.2), rgba(212,168,67,0.1)); }
  .connection-info { flex: 1; }
  .connection-info h4 { font-size: 1rem; color: var(--navy); margin-bottom: 2px; }
  .connection-info p { font-size: 0.82rem; color: var(--text-light); }
  .connection-contact {
    padding: 8px 16px;
    border-radius: 50px;
    background: var(--cream);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--navy);
    cursor: pointer;
    border: none;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
  }
  .connection-contact:hover { background: var(--navy); color: white; }

  /* ===== CONNECTIONS SECTIONS (B5) ===== */
  .connections-section { margin-bottom: 16px; }
  .connections-section h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 12px;
  }
  .connections-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    margin-bottom: 12px;
  }
  .connections-section-header h3 {
    margin-bottom: 0;
    padding: 0;
  }
  .connection-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
  }

  /* ===== NO MORE CARDS ===== */
  .no-cards {
    text-align: center;
    padding: 60px 20px;
    animation: fadeUp 0.5s ease;
  }
  .no-cards .empty-icon { margin-bottom: 20px; opacity: 1; }
  .no-cards h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 8px;
  }
  .no-cards p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto 24px;
  }
  .empty-state-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--navy);
    background: transparent;
    color: var(--navy);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .empty-state-btn:hover {
    background: var(--navy);
    color: var(--white);
  }

  /* ===== TAB BAR ===== */
  .tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: none;
    box-shadow: 0 -1px 8px rgba(27,42,74,0.06);
    display: flex;
    z-index: 100;
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
  }
  .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: color 0.2s;
    color: var(--text-light);
    border: none;
    background: none;
    font-family: 'Outfit', sans-serif;
  }
  .tab-item .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
  }
  .tab-item .tab-icon svg {
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.45;
  }
  .tab-item .tab-label { font-size: 11px; font-weight: 500; letter-spacing: 0.01em; }
  .tab-item.active { color: var(--navy); }
  .tab-item.active .tab-icon svg {
    opacity: 1;
    transform: scale(1.08);
  }

  /* ===== SUCCESS SCREEN ===== */
  .success-anim {
    text-align: center;
    padding: 40px;
    animation: fadeUp 0.6s ease;
  }
  .success-anim .check {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), var(--teal));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin: 0 auto 24px;
    animation: pulse 1.5s ease infinite;
  }
  .success-anim h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.6rem;
    color: var(--navy);
    margin-bottom: 8px;
  }
  .success-anim p {
    color: var(--text-light);
    margin-bottom: 28px;
  }

  /* ===== RESPONSIVE ===== */
  @media (max-width: 600px) {
    .nav { padding: 12px 16px; }
    .nav-title { font-size: 1.1rem; }
    .landing { padding: 90px 20px 40px; }
    .landing-cards { gap: 16px; }
    .role-card { padding: 28px 24px; min-width: auto; }
    .form-screen { padding: 90px 20px 40px; }
    .card-stack { height: 480px; }
    .card-body { padding: 48px 20px 20px; }
    .match-screen { padding: 80px 16px 100px; }
    .connections-screen { padding: 90px 16px 100px; }
  }

  /* hide scrollbar for card body */
  .card-body::-webkit-scrollbar { width: 0; }

/* ===== AUTH SCREEN ===== */

.screen#authScreen {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--cream);
  padding: 24px 20px;
}

.auth-container {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 40px 32px 36px;
  box-shadow: 0 8px 40px rgba(26,43,77,0.10);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-text {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--navy);
  line-height: 1.1;
}

.auth-tagline {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--teal);
  margin-top: 4px;
  font-weight: 400;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid #e8ecf0;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #8a9ab0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active {
  color: var(--navy);
  border-bottom-color: var(--teal);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d8e0ea;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  color: var(--navy);
  background: #f8f9fb;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.auth-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(56,142,135,0.12);
  background: #fff;
}

.auth-error {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--red);
  min-height: 1.1em;
  margin: 4px 0 10px;
  font-weight: 500;
}

.auth-btn {
  width: 100%;
  padding: 13px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(56,142,135,0.25);
}

.auth-btn:hover {
  background: #2d7a73;
  box-shadow: 0 6px 18px rgba(56,142,135,0.32);
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-btn:disabled {
  background: #9bbdb9;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 480px) {
  .auth-container {
    padding: 32px 20px 28px;
    border-radius: 16px;
  }
}

/* ===== ROLE SELECT SCREEN ===== */
.role-select-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 32px 60px;
  text-align: center;
  min-height: 100vh;
  width: 100%;
}
.role-select-container {
  max-width: 800px;
  width: 100%;
  animation: fadeUp 0.6s ease;
}
.role-select-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--navy);
  margin-bottom: 8px;
}
.role-select-sub {
  font-size: 1.05rem;
  color: var(--text-light);
  font-weight: 300;
  margin-bottom: 48px;
}
.role-select-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.role-select-card {
  flex: 1;
  min-width: 280px;
  max-width: 360px;
  background: white;
  border-radius: var(--radius);
  padding: 40px 32px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.role-select-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  transition: height 0.4s ease;
}
.role-select-card.volunteer::before {
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
}
.role-select-card.org::before {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.role-select-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}
.role-select-card:hover::before { height: 8px; }
.role-select-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 40px;
}
.role-select-card.volunteer .role-select-icon {
  background: linear-gradient(135deg, rgba(91,175,176,0.15), rgba(91,175,176,0.05));
}
.role-select-card.org .role-select-icon {
  background: linear-gradient(135deg, rgba(212,168,67,0.15), rgba(212,168,67,0.05));
}
.role-select-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.role-select-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}
.role-select-card .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap 0.3s;
}
.role-select-card.volunteer .cta { color: var(--teal); }
.role-select-card.org .cta { color: var(--gold); }
.role-select-card:hover .cta { gap: 14px; }

@media (max-width: 600px) {
  .role-select-screen { padding: 90px 20px 40px; }
  .role-select-card { padding: 28px 24px; min-width: auto; }
}

/* ===== FIELD ERROR ===== */
.field-error {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: var(--red);
  margin-top: 6px;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

/* ===== TOAST / SNACKBAR ===== */
@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

#toastContainer {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: white;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  animation: toastSlideUp 0.35s ease forwards;
  pointer-events: auto;
  max-width: 380px;
  text-align: center;
  line-height: 1.4;
}
.toast.removing {
  animation: toastFadeOut 0.35s ease forwards;
}
.toast.success {
  background: var(--green);
}
.toast.error {
  background: var(--red);
}
.toast.info {
  background: var(--teal);
}

/* ===== BTN LOADING STATE ===== */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== SKELETON LOADING (F15) ===== */
.skeleton-card {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
}
.skeleton-banner {
  height: 140px;
  background: linear-gradient(90deg, var(--cream-dark) 25%, var(--cream) 50%, var(--cream-dark) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--cream-dark) 25%, var(--cream) 50%, var(--cream-dark) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  margin: -40px auto 0;
  border: 4px solid white;
}
.skeleton-body {
  padding: 52px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.skeleton-line {
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--cream-dark) 25%, var(--cream) 50%, var(--cream-dark) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-line.title { width: 65%; height: 22px; }
.skeleton-line.sub { width: 45%; height: 14px; }
.skeleton-line.tags { width: 80%; height: 28px; border-radius: 50px; }
.skeleton-line.detail { width: 90%; height: 14px; }
.skeleton-line.detail-short { width: 70%; height: 14px; }

/* ===== SCORE BADGE (F12) ===== */
.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.score-badge.score-high {
  background: var(--green);
}
.score-badge.score-medium {
  background: var(--gold);
}
.score-badge.score-low {
  background: var(--text-light);
}

/* ===== DRAG-TO-RANK (F6) ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: white;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  user-select: none;
  -webkit-user-select: none;
}
.rank-item:active {
  cursor: grabbing;
}
.rank-item.dragging {
  box-shadow: 0 8px 24px rgba(27,42,74,0.18);
  border-color: var(--teal);
  transform: scale(1.03);
  opacity: 0.9;
  z-index: 10;
}
.rank-item .rank-handle {
  font-size: 1.2rem;
  color: var(--text-light);
  flex-shrink: 0;
  cursor: grab;
  line-height: 1;
}
.rank-item .rank-position {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-item .rank-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
}
.rank-item .rank-weight {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(91,175,176,0.12);
  color: var(--teal);
  flex-shrink: 0;
}
.rank-item.drag-over {
  border-color: var(--teal-light);
  background: rgba(91,175,176,0.04);
}

/* ===== ORG DASHBOARD (F9) ===== */
.org-dashboard-screen {
  padding: 90px 32px 100px;
  align-items: center;
  justify-content: flex-start;
}
.org-dashboard-container {
  max-width: 640px;
  width: 100%;
  animation: fadeUp 0.6s ease;
}
.org-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.org-dashboard-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--navy);
}
.btn-accept-all {
  padding: 10px 22px;
  border-radius: 50px;
  background: var(--teal);
  color: white;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(91,175,176,0.3);
}
.btn-accept-all:hover {
  background: #4a9e9f;
  transform: translateY(-1px);
}
.btn-accept-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.vol-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  animation: fadeUp 0.4s ease both;
  border-left: 4px solid var(--cream-dark);
}
.vol-card.status-accepted {
  border-left-color: var(--green);
}
.vol-card.status-rejected {
  border-left-color: var(--red);
  opacity: 0.55;
}
.vol-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.vol-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(91,175,176,0.15), rgba(91,175,176,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.vol-card-info {
  flex: 1;
}
.vol-card-info h4 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 2px;
}
.vol-card-info p {
  font-size: 0.82rem;
  color: var(--text-light);
}
.vol-card-score {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.vol-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.vol-card-chips .chip-sm {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(91,175,176,0.1);
  color: var(--teal);
}
.vol-card-actions {
  display: flex;
  gap: 10px;
}
.vol-card-actions .btn-vol {
  flex: 1;
  padding: 10px 16px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.vol-card-actions .btn-vol.accept {
  background: var(--green);
  color: white;
}
.vol-card-actions .btn-vol.accept:hover {
  background: #3d9d6d;
  transform: translateY(-1px);
}
.vol-card-actions .btn-vol.reject {
  background: var(--cream-dark);
  color: var(--text-light);
}
.vol-card-actions .btn-vol.reject:hover {
  background: var(--red);
  color: white;
}
.vol-card-actions .btn-vol:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Dashboard skeleton */
.skeleton-vol-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.skeleton-vol-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.skeleton-vol-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--cream-dark) 25%, var(--cream) 50%, var(--cream-dark) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
.skeleton-vol-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-vol-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.skeleton-vol-chip {
  width: 60px;
  height: 22px;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--cream-dark) 25%, var(--cream) 50%, var(--cream-dark) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-vol-btns {
  display: flex;
  gap: 10px;
}
.skeleton-vol-btn {
  flex: 1;
  height: 38px;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--cream-dark) 25%, var(--cream) 50%, var(--cream-dark) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* Swipe disabled state */
.match-card.swipe-disabled {
  pointer-events: none;
}
.match-actions .action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

@media (max-width: 600px) {
  .org-dashboard-screen { padding: 80px 16px 100px; }
  .org-dashboard-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .rank-item { padding: 14px 14px; gap: 10px; }
}

/* ===== PROFILE SCREEN (F8) ===== */
.profile-screen {
  padding: 90px 32px 100px;
  align-items: center;
  justify-content: flex-start;
}
.profile-container {
  max-width: 520px;
  width: 100%;
  animation: fadeUp 0.6s ease;
}
.profile-photo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}
.profile-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(91,175,176,0.3);
}
.profile-initials {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: white;
  font-weight: 400;
}
.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-photo-spinner {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.profile-change-photo {
  margin-top: 12px;
  padding: 8px 18px;
  border: 1px solid var(--cream-dark);
  border-radius: 50px;
  background: white;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.profile-change-photo:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.profile-change-photo svg {
  flex-shrink: 0;
}
.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.profile-fields .field-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  display: block;
}
.profile-fields textarea {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  padding: 12px 16px;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s;
  width: 100%;
}
.profile-fields textarea:focus {
  border-color: var(--teal);
  outline: none;
}
.profile-section {
  margin-bottom: 24px;
}
.profile-section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 12px;
  display: block;
}
.profile-weights {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-weight-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-weight-label {
  font-size: 0.85rem;
  color: var(--text);
  min-width: 120px;
  flex-shrink: 0;
}
.profile-weight-bar {
  flex: 1;
  height: 8px;
  background: var(--cream-dark);
  border-radius: 50px;
  overflow: hidden;
}
.profile-weight-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 50px;
  transition: width 0.3s ease;
}
.profile-weight-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  min-width: 36px;
  text-align: right;
}
.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.profile-save-btn {
  width: 100%;
}
.btn-outline-navy {
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.btn-outline-navy:hover {
  background: var(--navy);
  color: white;
}

@media (max-width: 600px) {
  .profile-screen { padding: 80px 16px 100px; }
  .profile-weight-label { min-width: 90px; font-size: 0.8rem; }
}

/* ===== FILTER BUTTON & BOTTOM SHEET (F13) ===== */
.filter-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--cream-dark);
  background: white;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.filter-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid white;
}
.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.filter-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.filter-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 901;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
}
.filter-sheet.active {
  transform: translateY(0);
}
.filter-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--cream-dark);
  margin: 12px auto 0;
}
.filter-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 8px;
}
.filter-sheet-header h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--navy);
}
.filter-clear-btn {
  background: none;
  border: none;
  color: var(--teal);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}
.filter-clear-btn:hover {
  text-decoration: underline;
}
.filter-sheet-body {
  padding: 8px 24px 16px;
}
.filter-group {
  margin-bottom: 20px;
}
.filter-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  display: block;
}
.filter-group input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  background: white;
  color: var(--text);
  transition: border-color 0.2s;
}
.filter-group input[type="text"]:focus {
  border-color: var(--teal);
  outline: none;
}
.filter-sheet-footer {
  padding: 12px 24px 24px;
}

/* ===== TUTORIAL OVERLAY (F16) ===== */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27,42,74,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.tutorial-card {
  background: white;
  border-radius: var(--radius);
  padding: 40px 32px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.4s ease;
}
.tutorial-step {
  display: none;
}
.tutorial-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
.tutorial-icon {
  font-size: 56px;
  margin-bottom: 20px;
  line-height: 1;
}
.tutorial-step h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.tutorial-step p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.5;
}
.tutorial-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0 20px;
}
.tutorial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cream-dark);
  cursor: pointer;
  transition: all 0.2s;
}
.tutorial-dot.active {
  background: var(--teal);
  transform: scale(1.2);
}
.tutorial-btn {
  width: 100%;
}

/* ===== REPORT/BLOCK (F24) ===== */
.card-menu-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  transition: all 0.2s;
  line-height: 1;
  letter-spacing: 1px;
}
.card-menu-btn:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.card-menu-dropdown {
  position: absolute;
  top: 48px;
  left: 12px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 7;
  min-width: 200px;
  overflow: hidden;
  display: none;
  animation: fadeIn 0.15s ease;
}
.card-menu-dropdown.active {
  display: block;
}
.card-menu-item {
  padding: 12px 18px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  display: block;
}
.card-menu-item:hover {
  background: var(--cream);
}
.card-menu-item.danger {
  color: var(--red);
}
.card-menu-item.danger:hover {
  background: rgba(224,85,85,0.08);
}

.report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27,42,74,0.6);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.report-modal {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.3s ease;
}
.report-modal h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 18px;
}
.report-modal .field-group {
  margin-bottom: 16px;
}
.report-modal .field-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  display: block;
}
.report-modal select,
.report-modal textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  background: white;
  color: var(--text);
  transition: border-color 0.2s;
}
.report-modal select:focus,
.report-modal textarea:focus {
  border-color: var(--teal);
  outline: none;
}
.report-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.report-modal-actions .btn {
  flex: 1;
}

/* ===== F17: CHAT SCREEN ===== */
.chat-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--cream);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid var(--cream-dark);
  box-shadow: 0 2px 8px rgba(27,42,74,0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}
.chat-back-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--navy);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.chat-back-btn:hover { background: var(--cream); }
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chat-header-info {
  flex: 1;
}
.chat-header-info h4 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 2px;
  font-family: 'DM Serif Display', serif;
}
.chat-header-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 50px;
  background: rgba(91,175,176,0.15);
  color: var(--teal);
  font-weight: 600;
}
.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scroll-behavior: smooth;
}
.messages-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
}
.messages-empty .empty-wave {
  font-size: 3rem;
  margin-bottom: 16px;
}
.messages-empty h3 {
  font-family: 'DM Serif Display', serif;
  color: var(--navy);
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.messages-empty p {
  font-size: 0.9rem;
  color: var(--text-light);
}
.message-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  position: relative;
  animation: fadeUp 0.2s ease;
}
.bubble-theirs {
  align-self: flex-start;
  background: white;
  color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.bubble-mine {
  align-self: flex-end;
  background: var(--teal);
  color: white;
  border-bottom-right-radius: 4px;
}
.message-time {
  font-size: 0.68rem;
  opacity: 0.6;
  margin-top: 4px;
  display: block;
}
.bubble-theirs .message-time { text-align: left; }
.bubble-mine .message-time { text-align: right; }
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: white;
  border-top: 1px solid var(--cream-dark);
  box-shadow: 0 -2px 8px rgba(27,42,74,0.06);
  position: sticky;
  bottom: 0;
}
.chat-input-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--cream-dark);
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  background: var(--cream);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-bar input:focus {
  border-color: var(--teal);
}
.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--teal);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--navy); transform: scale(1.08); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== F18: DARK MODE ===== */
.dark-mode {
  --cream: #0F1624;
  --cream-dark: #1A2440;
  --white: #1A2440;
  --text: #E8EAF0;
  --text-light: #8892A4;
  --navy: #7B9ADB;
  --navy-light: #4A6AA0;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
}
.dark-mode body,
.dark-mode {
  background: #0F1624;
  color: #E8EAF0;
}
.dark-mode .match-card,
.dark-mode .connection-item,
.dark-mode .vol-card,
.dark-mode .report-modal,
.dark-mode .filter-sheet,
.dark-mode .tutorial-card,
.dark-mode .auth-card {
  background: #1E2D4E;
  color: #E8EAF0;
}
.dark-mode .chat-header,
.dark-mode .chat-input-bar {
  background: #1A2440;
  border-color: #2A3F6E;
}
.dark-mode .chat-input-bar input {
  background: #0F1624;
  border-color: #2A3F6E;
  color: #E8EAF0;
}
.dark-mode .bubble-theirs {
  background: #1E2D4E;
  color: #E8EAF0;
}
.dark-mode .messages-list {
  background: #0F1624;
}
.dark-mode .card-body,
.dark-mode .card-body h3 {
  color: #E8EAF0;
}
.dark-mode .card-sub,
.dark-mode .card-detail span {
  color: #8892A4;
}
.dark-mode .action-btn.pass {
  background: #1E2D4E;
}
.dark-mode .connection-contact {
  background: #2A3F6E;
  color: #E8EAF0;
}
.dark-mode .connection-contact:hover {
  background: #7B9ADB;
  color: #0F1624;
}
.dark-mode .profile-container,
.dark-mode .profile-fields input,
.dark-mode .profile-fields textarea {
  background: #1A2440;
  color: #E8EAF0;
  border-color: #2A3F6E;
}
.dark-mode .chip {
  background: #2A3F6E;
  color: #8892A4;
}
.dark-mode .chip.selected {
  color: white;
}
.dark-mode .toggle-btn {
  background: #2A3F6E;
  color: #8892A4;
}
.dark-mode .connections-header h2,
.dark-mode .connection-info h4,
.dark-mode .role-select-title,
.dark-mode h3 {
  color: #7B9ADB;
}
.dark-mode .tab-bar {
  background: #1A2440;
  border-top: 1px solid #2A3F6E;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.3);
}
.dark-mode .tab-item {
  color: #8892A4;
}
.dark-mode .tab-item.active {
  color: var(--teal);
}
.dark-mode .match-header h2 {
  color: #E8EAF0;
}
.dark-mode .match-header p {
  color: #8892A4;
}
.dark-mode .no-cards h3 { color: #7B9ADB; }
.dark-mode .no-cards p { color: #8892A4; }
.dark-mode .empty-state-btn {
  border-color: #7B9ADB;
  color: #7B9ADB;
}
.dark-mode .empty-state-btn:hover {
  background: #7B9ADB;
  color: #1A2440;
}
.dark-mode .filter-overlay { background: rgba(0,0,0,0.6); }
.dark-mode .report-modal select,
.dark-mode .report-modal textarea {
  background: #0F1624;
  color: #E8EAF0;
  border-color: #2A3F6E;
}

@media (prefers-color-scheme: dark) {
  body:not(.light-mode) {
    --cream: #0F1624;
    --cream-dark: #1A2440;
    --white: #1A2440;
    --text: #E8EAF0;
    --text-light: #8892A4;
    --navy: #7B9ADB;
    --navy-light: #4A6AA0;
  }
}

/* Dark mode toggle in profile */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--cream-dark);
  margin-top: 8px;
}
.dark-mode-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}
.dark-mode-toggle-label .dm-icon {
  font-size: 1.2rem;
}
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--cream-dark);
  border-radius: 26px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}
.toggle-switch.active {
  background: var(--teal);
}
.toggle-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch.active .toggle-switch-knob {
  transform: translateX(22px);
}

/* ===== F21: UNDO BUTTON ===== */
.action-btn.undo-btn {
  width: 48px;
  height: 48px;
  background: white;
  color: var(--gold);
  font-size: 20px;
  opacity: 0.4;
  pointer-events: none;
  transition: all 0.3s ease;
}
.action-btn.undo-btn.undo-active {
  opacity: 1;
  pointer-events: auto;
}
.action-btn.undo-btn.undo-active:hover {
  transform: scale(1.15);
  color: var(--navy);
}
.dark-mode .action-btn.undo-btn {
  background: #1E2D4E;
}

/* ===== F22: MATCH CELEBRATION OVERLAY ===== */
.match-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy, #1B2A4A), var(--teal, #5BAFB0));
  opacity: 0;
  transition: opacity 0.3s;
}
.match-celebration-overlay.active {
  display: flex;
  opacity: 1;
}
.match-celebration-content {
  text-align: center;
  z-index: 2;
  transform: scale(0);
  animation: celebrationSpring 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.15s forwards;
}
@keyframes celebrationSpring {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.celebration-title {
  font-family: 'DM Serif Display', serif;
  font-size: 3rem;
  color: var(--cream, #F5F0E8);
  margin-bottom: 12px;
}
.celebration-subtitle {
  font-size: 1.05rem;
  color: rgba(245,240,232,0.8);
  margin-bottom: 32px;
  font-family: 'Outfit', sans-serif;
}
.celebration-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.celebration-actions .btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s;
}
.celebration-actions .btn:hover { transform: scale(1.05); }
.celebration-btn-primary {
  background: var(--gold, #D4A843);
  color: var(--navy, #1B2A4A);
}
.celebration-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3) !important;
}

/* Confetti particles */
.confetti-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.confetti-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===== F23: ACTIVITY BADGE ===== */
.activity-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  z-index: 3;
  letter-spacing: 0.02em;
}
.activity-badge.badge-new {
  background: var(--gold);
  color: var(--navy, #1B2A4A);
}
.activity-badge.badge-active-today {
  background: var(--green);
  color: white;
}
.activity-badge.badge-active-week {
  background: var(--teal);
  color: white;
}