/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;700;800&display=swap');

:root {
    /* Vibrant, Modern Gradients for primary accents */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #13B497 0%, #59D4A4 100%);

    /* Core Colors */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f5576c;

    /* Text & Background (Ultra-Clean Premium Light Theme) */
    --text-color: #0f172a;
    --text-muted: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;

    /* Borders & Premium Shadows */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --glass-shadow: 0 15px 35px rgba(50, 50, 93, .05), 0 5px 15px rgba(0, 0, 0, .03);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f6f9fc;
    background-image:
        radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(245, 87, 108, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(102, 126, 234, 0.05) 0px, transparent 50%);
    min-height: 100vh;
    color: var(--text-color);
    position: relative;
    overflow-x: hidden;
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    font-weight: 700;
}

/* Universal Text Gradients */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.text-gradient-secondary {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Premium SaaS Card */
.glass-panel {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.navbar .logo {
    font-size: 1.8rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.6);
    color: white;
}

/* Layout Utilities */
.container {
    padding: 100px 5% 50px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Premium Compact Header */
.premium-header-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
    padding: 15px 25px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), inset 0 2px 4px 0 rgba(255, 255, 255, 0.5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

.premium-header-compact::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.header-icon {
    width: 54px;
    height: 54px;
    background: #f0fdf4;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #059669;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid #d1fae5;
}

.header-content {
    text-align: left;
}

.header-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

@media (max-width: 640px) {
    .premium-header-compact {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px;
    }

    .header-content {
        text-align: center;
    }

    .header-title {
        font-size: 1.25rem;
    }
}

/* Global Form System (Derived from Mutual Form HTML) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    /* Soft bottom line */
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    background: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

.form-control::placeholder {
    color: #a0aec0;
}

/* Authentication Cards (Login/Register) */
.auth-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 3rem;
    text-align: center;
}

.auth-container h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Messages */
.error-msg,
.success-msg {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: none;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.error-msg {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.success-msg {
    color: #047857;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
}

/* Dashboard / Search Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

.sidebar {
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

/* Matches Grid System */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
}

.match-card {
    padding: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--success-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.match-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.match-card:hover::before {
    opacity: 1;
}

.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

.match-card-header h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.badge {
    padding: 0.35rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-direct {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 2px 10px rgba(19, 180, 151, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        /* Handle mobile menu conceptually */
    }
}

/* === PREMIUM UI COMPONENTS === */

/* --- Card Design --- */
.form-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-header {
    background: var(--primary-gradient);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* --- Layout Grid --- */
.form-grid {
    display: grid;
    gap: 1.5rem;
}

/* Custom Responsive Flex Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.col-md-4,
.col-md-6,
.col-md-12 {
    padding-right: 12px;
    padding-left: 12px;
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-4 {
        width: 33.333333%;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-12 {
        width: 100%;
    }
}

.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .row-2 {
        grid-template-columns: 1fr;
    }
}

/* --- Section Labels (Premium Modern Badge) --- */
.section-label {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 3rem 0 1.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.section-label i {
    color: #a7f3d0;
    font-size: 1.1rem;
}

/* --- Form Inputs (Premium & Colorful) --- */
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    margin-left: 2px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-icon-wrapper .form-input,
.input-icon-wrapper .dropdown-toggle {
    padding-left: 48px;
    /* Room for icon */
}

.input-icon-wrapper:focus-within i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(99, 102, 241, 0.08);
    outline: none;
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #cbd5e1;
}

/* Force uppercase on all text inputs */
.form-input:not([type="email"]):not([type="password"]),
.dropdown-search input,
.pref-search-input,
.pref-tag-search {
    text-transform: uppercase;
}

/* Keep placeholders normal case if desired, but usually text-transform affects them too. 
   We will ensure email and password stay normal. */

/* --- Accordion --- */
.accordion-group {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    background: #ffffff;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    transition: all 0.2s;
    font-weight: 600;
    color: var(--text-color);
}

.accordion-header:hover {
    background: #f8fafc;
}

.accordion-header.active {
    background: #f0f4ff;
    color: var(--primary-color);
}

.accordion-content {
    display: none;
    padding: 24px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

.accordion-content.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Searchable Dropdown --- */
.custom-select-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    cursor: pointer;
}

.custom-options {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.15);
    border: 1px solid #edf2f7;
    z-index: 50;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s;
}

.custom-options.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.custom-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid #f7fafc;
    transition: background 0.15s;
}

.custom-option:hover {
    background: #eff6ff;
    color: var(--primary-color);
}

.custom-option.selected {
    background: #ebf8ff;
    color: #4c51bf;
    font-weight: 600;
}

/* --- Tag / Multi-Select Chips --- */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.06);
    min-height: 48px;
    align-items: center;
    cursor: text;
    transition: all 0.2s;
}

.tag-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.tag-chip {
    background: linear-gradient(135deg, #ebf8ff, #e0e7ff);
    color: #4c51bf;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.tag-chip span {
    cursor: pointer;
    opacity: 0.6;
    font-size: 1.1em;
}

.tag-chip span:hover {
    opacity: 1;
    color: #e53e3e;
}

/* --- Grade Chip Radios --- */
.grade-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.chip-radio {
    display: none;
}

.chip-label {
    padding: 12px;
    text-align: center;
    border: 2px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    background: white;
}

.chip-radio:checked+.chip-label {
    background: linear-gradient(135deg, #ebf8ff, #e0e7ff);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* --- Submit Button (Full Width Premium) --- */
.btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -5px rgba(16, 185, 129, 0.55);
}

.btn-submit:active {
    transform: translateY(0);
}

/* --- Review Modal --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.review-card {
    background: white;
    padding: 0;
    border-radius: 16px;
    width: 95%;
    max-width: 650px;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.review-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.review-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.review-body {
    padding: 2rem;
    overflow-y: auto;
    background: #f8fafc;
}

.preview-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.preview-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #4a5568;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-weight: 700;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
    border-bottom: 1px dashed #edf2f7;
    padding-bottom: 8px;
}

.preview-row:last-child {
    border-bottom: none;
}

.preview-label {
    color: #718096;
    font-weight: 500;
}

.preview-value {
    color: #2d3748;
    font-weight: 600;
    text-align: right;
    max-width: 65%;
    word-break: break-word;
}

.tnc-box {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tnc-box input {
    margin-top: 4px;
    cursor: pointer;
    transform: scale(1.2);
}

.tnc-box label {
    font-size: 0.9rem;
    color: #2c5282;
    cursor: pointer;
    line-height: 1.4;
    user-select: none;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === REGISTER FORM SPECIFIC COMPONENTS === */

/* --- Section Title (Register Form) --- */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.15);
}

.section-title i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
}

/* --- Row Layout (Bootstrap-like) --- */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.col-md-6 {
    flex: 1;
    min-width: 250px;
}

.col-md-4 {
    flex: 1;
    min-width: 250px;
}

@media (max-width: 768px) {

    .col-md-6,
    .col-md-4 {
        min-width: 100%;
    }
}

/* --- Custom Dropdown (Register Form) --- */
.custom-dropdown {
    position: relative;
}

.custom-dropdown .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 18px;
    padding-left: 48px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    color: var(--text-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.custom-dropdown .dropdown-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.custom-dropdown .dropdown-toggle.active {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.custom-dropdown .dropdown-toggle i {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.custom-dropdown .dropdown-toggle.active i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.custom-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.15);
    border: 1px solid #edf2f7;
    z-index: 50;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    animation: slideDown 0.2s ease;
}

.custom-dropdown .dropdown-menu.show {
    display: block;
}

.custom-dropdown .dropdown-search {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.custom-dropdown .dropdown-search input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.custom-dropdown .dropdown-search input:focus {
    border-color: var(--primary-color);
}

.custom-dropdown .dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid #f9fafb;
    transition: all 0.15s;
}

.custom-dropdown .dropdown-item:hover {
    background: #f0f4ff;
    color: var(--primary-color);
}

.custom-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

/* --- Multi-Select Container (Register Form Blocks) --- */
.multi-select-container {
    position: relative;
}

.multi-select-display {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    cursor: pointer;
    min-height: 48px;
    transition: all 0.25s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.multi-select-display:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.multi-select-display.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(99, 102, 241, 0.08);
}

.multi-select-display .dropdown-arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.multi-select-display.active .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.multi-select-display .selected-item {
    background: #eef2ff;
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #c7d2fe;
}

.multi-select-display .selected-item i {
    cursor: pointer;
    font-size: 0.7rem;
    opacity: 0.6;
}

.multi-select-display .selected-item i:hover {
    opacity: 1;
    color: #e53e3e;
}

.multi-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.15);
    border: 1px solid #edf2f7;
    z-index: 50;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    animation: slideDown 0.2s ease;
}

.multi-select-menu.show {
    display: block;
}

.multi-select-search {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.multi-select-search input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.multi-select-search input:focus {
    border-color: var(--primary-color);
}

.multi-select-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.15s;
}

.multi-select-item:hover {
    background: #f0f4ff;
}

.multi-select-item input[type="checkbox"] {
    accent-color: var(--primary-color);
    transform: scale(1.1);
    cursor: pointer;
}

.multi-select-item label {
    cursor: pointer;
    flex: 1;
}

/* --- Other Input (Hidden by default) --- */
.other-block-input,
.other-subject-input {
    display: none;
    margin-top: 0.5rem;
}

/* --- Loading Spinner --- */
.loading-spinner {
    display: none;
    margin-top: 5px;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Preference Items (Register Form) --- */
.preference-item {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease;
}

.preference-item:hover {
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.preference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.preference-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.preference-number {
    background: var(--primary-gradient);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.preference-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0.5rem;
}

.btn-remove {
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-remove:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.btn-add {
    background: rgba(255, 255, 255, 0.8);
    border: 2px dashed rgba(102, 126, 234, 0.3);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background: #f0f4ff;
    border-color: var(--primary-color);
}

.btn-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-style: solid;
}

/* --- Contact Method Options --- */
.contact-method-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.contact-method-option {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.06);
    background: rgba(248, 250, 252, 0.8);
    transition: all 0.25s;
}

.contact-method-option:hover {
    border-color: rgba(102, 126, 234, 0.3);
}

.contact-method-option input[type="checkbox"] {
    accent-color: var(--primary-color);
    transform: scale(1.15);
    cursor: pointer;
}

.contact-method-option:has(input:checked) {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ebf8ff, #e0e7ff);
}

.contact-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.contact-label i {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* --- Input Group --- */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: rgba(248, 250, 252, 0.8);
    border: 2px solid rgba(0, 0, 0, 0.06);
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: var(--text-muted);
}

/* --- Notification --- */
.notification {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary-color);
    z-index: 2000;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 380px;
}

.notification.show {
    bottom: 24px;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.info {
    border-left-color: #3b82f6;
}

.notification-title {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Alert Box (Register) --- */
.alert {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    background: linear-gradient(135deg, #ebf8ff, #e0e7ff);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #2c5282;
}

.alert i {
    margin-right: 6px;
}

/* --- Form Check (Terms) --- */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.form-check-input {
    accent-color: var(--primary-color);
    transform: scale(1.2);
    cursor: pointer;
    margin-top: 3px;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
}

/* --- Form Text / Helper --- */
.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Utility: text-center, mt-3, mb-3 --- */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* --- Compact Grid (Mutual Transfer Page) --- */
.compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* --- WhatsApp Button --- */
.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.2s;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    color: white;
}

/* ========================================================
   MOBILE RESPONSIVE FRAMEWORK
   ======================================================== */

/* --- Hamburger Menu Button --- */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile Slide Menu --- */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

.mobile-slide-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    z-index: 1060;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 24px 24px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.mobile-slide-menu.active {
    right: 0;
}

.mobile-slide-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 14px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.mobile-slide-menu a:hover,
.mobile-slide-menu a.active-link {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary-color);
}

.mobile-slide-menu a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 12px 0;
}

/* --- Bottom Navigation Bar (Pill Tabs) --- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 6px 8px 8px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.25s;
    position: relative;
    min-width: 56px;
}

.bnav-item i {
    font-size: 1.15rem;
    transition: all 0.25s;
}

.bnav-item.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    padding: 6px 16px;
    transform: translateY(-2px);
}

.bnav-item.active i {
    font-size: 1.2rem;
}

.bnav-badge {
    position: absolute;
    top: -2px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 0.55rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* --- FAB (Floating Action Button) --- */
.fab-btn {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
}

.fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.5);
}

/* --- FAB Filter Variant (Search Page) --- */
.fab-btn.fab-filter {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
    animation: fab-pulse 2s infinite;
}

.fab-btn.fab-filter:hover {
    box-shadow: 0 8px 28px rgba(245, 87, 108, 0.5);
}

@keyframes fab-pulse {

    0%,
    100% {
        box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
    }

    50% {
        box-shadow: 0 6px 28px rgba(245, 87, 108, 0.6);
    }
}

/* --- Filter Bottom Sheet (Mobile) --- */
.filter-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s;
}

.filter-sheet-overlay.active {
    opacity: 1;
}

.filter-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0;
    z-index: 1110;
    padding: 0 20px 24px;
    max-height: 75vh;
    overflow-y: auto;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.filter-sheet.active {
    bottom: 0;
}

.filter-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 8px;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1;
}

.filter-sheet-handle span {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.15);
}

.filter-sheet-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.filter-sheet-title h3 {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-sheet-title h3 i {
    color: var(--primary-color);
}

.filter-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.filter-sheet-group {
    margin-bottom: 14px;
}

.filter-sheet-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.filter-sheet-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    appearance: auto;
    min-height: 48px;
}

.filter-sheet-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.filter-sheet-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.filter-sheet-btns .btn-sheet-search {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: var(--primary-gradient);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-sheet-btns .btn-sheet-reset {
    padding: 14px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: transparent;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================
   MOBILE BREAKPOINT (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

    /* Hide inline filter bar on mobile (moved to bottom sheet) */
    .filter-bar {
        display: none !important;
    }

    /* Show mobile-only elements */
    .hamburger-btn {
        display: block;
    }

    body.is-authenticated .bottom-nav {
        display: block;
    }

    body.is-authenticated .fab-btn {
        display: flex;
    }

    /* Hide desktop nav links */
    .nav-links {
        display: none !important;
    }

    /* Navbar adjustments */
    .navbar {
        padding: 0.75rem 4% !important;
        margin: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
    }

    .navbar .logo {
        font-size: 1.4rem;
    }

    /* Body padding for fixed nav elements */
    body {
        padding-bottom: 72px;
        /* bottom nav height */
    }

    /* Container */
    .container {
        margin: 0.8rem 3% !important;
        width: 94% !important;
    }

    /* Glass Panels */
    .glass-panel {
        border-radius: 16px;
        padding: 16px !important;
    }

    /* Grid System - Stack on mobile */
    .row {
        flex-direction: column !important;
    }

    .col-md-6,
    .col-md-4,
    .col-md-3 {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    /* Form Inputs */
    .form-input,
    select.form-input {
        min-height: 48px;
        font-size: 16px !important;
        /* Prevents iOS zoom */
        padding: 12px 16px;
    }

    .custom-dropdown .dropdown-toggle {
        min-height: 48px;
        padding: 12px 16px;
    }

    /* Buttons */
    .btn,
    .btn-submit,
    .btn-primary,
    .btn-outline {
        min-height: 48px;
        font-size: 0.95rem;
    }

    /* Hero Banners */
    .match-hero,
    .search-hero {
        padding: 1.5rem 1.2rem !important;
        border-radius: 16px !important;
        margin-bottom: 1rem !important;
    }

    .match-hero h1,
    .search-hero h1 {
        font-size: 1.4rem !important;
    }

    .match-hero p,
    .search-hero p {
        font-size: 0.9rem !important;
    }

    .match-hero-stats,
    .search-hero-stats {
        gap: 8px !important;
    }

    .mh-stat {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    .mh-stat .mh-num {
        font-size: 1.1rem !important;
    }

    /* Match Tabs - Scrollable */
    .match-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        flex-wrap: nowrap !important;
    }

    .match-tabs::-webkit-scrollbar {
        display: none;
    }

    .match-tab {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    /* Match Cards Grid - Single Column */
    .match-results-grid,
    .compact-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Match Cards */
    .pm-card {
        border-radius: 16px;
    }

    .pm-card-top {
        padding: 1rem 1rem 0;
    }

    .pm-card-body {
        padding: 0.75rem 1rem;
    }

    .pm-card-footer {
        padding: 0 1rem 1rem;
    }

    /* Chain Flow - Vertical on mobile */
    .chain-flow {
        flex-direction: column !important;
    }

    .chain-arrow-container {
        transform: rotate(90deg);
    }

    .chain-section {
        padding: 1.2rem !important;
        border-radius: 16px;
    }

    /* Search Filter Bar */
    .filter-bar {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 12px !important;
    }

    .filter-bar select,
    .filter-bar input,
    .filter-bar button {
        width: 100% !important;
        min-height: 44px;
    }

    /* Search Results */
    .results-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    /* Section Labels */
    .section-label {
        font-size: 0.95rem;
        padding: 10px 14px;
    }

    /* Contact method options */
    .contact-methods-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* Form container */
    .form-container {
        padding: 16px !important;
    }

    /* Preference items */
    .preference-item {
        padding: 12px !important;
    }

    .preference-header {
        flex-direction: column;
        gap: 8px;
    }

    /* Empty states */
    .match-empty {
        padding: 2rem 1.2rem;
    }

    /* Chat container on mobile */
    .chat-container {
        height: calc(100vh - 130px) !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    /* Dashboard stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Login form */
    .login-container,
    .auth-container {
        padding: 20px !important;
        margin: 1rem !important;
        border-radius: 16px !important;
    }

    /* Scroll to top on page nav */
    .main-header h1 {
        font-size: 1.5rem;
    }

    .main-header p {
        font-size: 0.9rem;
    }

    /* Profile Modal adjustments */
    .profile-modal-overlay .profile-modal {
        width: 95% !important;
        max-height: 85vh;
        border-radius: 20px !important;
    }
}