@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #fff5f6;
    --card-bg: #ffffff;
    --primary: #d90429;
    --primary-light: #ffccd5;
    --primary-hover: #ef233c;
    --secondary: #fb8b24;
    --text-main: #2b2d42;
    --text-muted: #6c757d;
    --border-color: #f0a6b2;
    --shadow-soft: 0 8px 30px rgba(217, 4, 41, 0.06);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --max-width: 480px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #fff8f9;
    background-image: url('/images/bg.png');
    background-size: 300px; /* repeats line art pattern beautifully */
    background-repeat: repeat;
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Constrain App to Mobile Frame on Desktop */
#app-container {
    width: 100%;
    max-width: var(--max-width);
    background: rgba(255, 245, 246, 0.85); /* Translucent soft pink backdrop */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 45px rgba(217, 4, 41, 0.08);
    overflow: hidden;
}

/* Header Navbar */
header {
    background: rgba(255, 255, 255, 0.75); /* Translucent header */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    flex-wrap: nowrap;
    gap: 6px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-shrink: 1;
}

.logo-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.logo-text {
    font-size: clamp(0.8rem, 3.5vw, 1.15rem);
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

/* Main Content Wrapper */
main {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Utility Components */
.card {
    background: rgba(255, 255, 255, 0.7); /* Translucent cards for glassmorphism */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(240, 166, 178, 0.25);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f8d7da;
    padding-bottom: 8px;
}

/* Form Styles with English & Roman Urdu support */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-group label span.urdu {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 400;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23d90429' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #eaeaea;
    color: var(--text-main);
}

.btn-accent {
    background-color: var(--secondary);
    color: white;
}

/* Bottom Navigation Bar */
.bottom-nav {
    flex-shrink: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
    transition: color 0.2s;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active svg {
    transform: scale(1.1);
    stroke: var(--primary);
    fill: rgba(217, 4, 41, 0.05);
}

/* Alert Notification Styles */
.alert {
    padding: 12px 15px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Dashboard Styles */
.welcome-section {
    text-align: center;
    padding: 10px 0;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.welcome-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-card {
    text-align: center;
    padding: 15px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profiles List & Cards */
.profile-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.candidate-init {
    width: 45px;
    height: 45px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.candidate-name-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.profile-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-bottom-left-radius: var(--radius-sm);
    font-weight: 600;
}

.profile-tag.boy {
    background: #0077b6; /* Blue badge for Larka */
}

.profile-tag.girl {
    background: #ec4899; /* Pink badge for Larki */
}

.profile-tag.pending {
    background: var(--secondary);
}

.profile-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-main);
    border-top: 1px solid #f8eaed;
    border-bottom: 1px solid #f8eaed;
    padding: 10px 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detail-value {
    font-weight: 500;
}

/* Match compatibility Badge on profile details page */
.match-meter {
    background: linear-gradient(135deg, #d90429, #fb8b24);
    color: white;
    border-radius: var(--radius-md);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.15);
}

.match-score {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.match-text {
    flex: 1;
    margin-left: 15px;
}

.match-title {
    font-size: 1rem;
    font-weight: 600;
}

.match-desc {
    font-size: 0.75rem;
    opacity: 0.9;
}

main:has(.chat-container) {
    overflow-y: hidden;
}

/* WhatsApp-style Chat Room */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #fafafb;
    background-image: radial-gradient(rgba(217, 4, 41, 0.03) 1px, transparent 0), radial-gradient(rgba(217, 4, 41, 0.03) 1px, transparent 0);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(240, 166, 178, 0.35);
    box-shadow: var(--shadow-soft);
    position: relative;
    height: 100%;
}

.chat-messages-area {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
}

/* Chat Row Layout */
.message-row {
    display: flex;
    width: 100%;
    margin-bottom: 4px;
    align-items: flex-end;
    gap: 8px;
}
.message-row.sent {
    justify-content: flex-end;
}
.message-row.received {
    justify-content: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border: 1.5px solid white;
    user-select: none;
    text-transform: uppercase;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    word-wrap: break-word;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.message-bubble:active {
    transform: scale(0.98);
}

/* Sent by others */
.message-bubble.received {
    align-self: flex-start;
    background-color: var(--card-bg);
    border-radius: 16px 16px 16px 4px;
    border: 1px solid rgba(240, 166, 178, 0.2);
    color: var(--text-main);
}

/* Sent by current logged-in user */
.message-bubble.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, #ef233c, #d90429);
    color: white;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 3px 10px rgba(217, 4, 41, 0.12);
}

.message-sender {
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-sender.admin {
    color: #7b2cbf;
}
.message-sender.staff {
    color: var(--secondary);
}

.message-bubble.sent .message-sender {
    color: #ffccd5;
}

.message-text {
    line-height: 1.45;
}
.message-text.urdu-text {
    font-family: 'Noto Nastaliq Urdu', 'Outfit', sans-serif;
    font-size: 1.1rem;
    line-height: 1.95;
    direction: rtl;
    text-align: right;
}

.message-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
}

.message-bubble.sent .message-time {
    color: rgba(255, 255, 255, 0.75);
}

/* Date separator */
.date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    width: 100%;
}
.date-separator-line {
    flex: 1;
    height: 1px;
    background: rgba(240, 166, 178, 0.2);
}
.date-separator-text {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(240, 166, 178, 0.25);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

/* Slide-out sidebar drawer */
.chat-drawer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    max-width: 80%;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-shadow: 5px 0 25px rgba(0,0,0,0.05);
}
.chat-drawer.open {
    transform: translateX(0);
}
.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Chat Header */
.chat-header {
    background: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(240, 166, 178, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    flex-shrink: 0;
}
.chat-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}
.drawer-toggle-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.drawer-toggle-btn:active {
    transform: scale(0.9);
}

/* Emoji Suggestions */
.emoji-bar {
    display: flex;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(240, 166, 178, 0.03);
    border-top: 1px solid rgba(240, 166, 178, 0.15);
    overflow-x: auto;
    white-space: nowrap;
    align-items: center;
    scrollbar-width: none;
}
.emoji-bar::-webkit-scrollbar {
    display: none;
}
.emoji-pill {
    font-size: 1.1rem;
    padding: 4px 8px;
    background: white;
    border: 1px solid rgba(240, 166, 178, 0.25);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.emoji-pill:hover {
    background: #fff0f2;
    transform: translateY(-1px);
}
.emoji-pill:active {
    transform: scale(0.95);
}

/* Character counter */
.char-counter {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
    padding-right: 5px;
}
.char-counter.limit-near {
    color: var(--primary);
    font-weight: bold;
}

/* Floating bottom scroll toast */
.scroll-bottom-toast {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.3);
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-bottom-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Optimistic & tooltip updates */
.message-bubble.sending {
    opacity: 0.6;
}
.sending-status-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    vertical-align: middle;
}
.sending-status-icon svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}
.sending-spinner {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.copy-success-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.copy-success-tooltip.show {
    opacity: 1;
}

.chat-input-area {
    background: #f0f2f5;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid #e1e3e6;
    flex-wrap: wrap;
}

.chat-input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    border-radius: 24px;
    outline: none;
    font-size: 0.95rem;
    background: white;
    min-width: 150px;
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-send-btn:hover {
    background: var(--primary-hover);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Tab panels for forms or lists */
.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 12px 4px;
    text-align: center;
    background: none;
    border: none;
    font-size: clamp(0.58rem, 2.1vw, 0.85rem);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Search Filters Styling */
.filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    padding: 10px 0;
    border-bottom: 1px solid #f8eaed;
}

.filters-wrapper {
    display: none;
    margin-top: 15px;
}

.filters-wrapper.open {
    display: block;
}

/* Empty State illustration helper */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 60px;
    height: 60px;
    stroke: var(--border-color);
    margin-bottom: 15px;
}

/* User Pending Page design */
.pending-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    flex: 1;
}

.pending-icon {
    width: 100px;
    height: 100px;
    background: #fff3cd;
    color: #856404;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(133, 100, 4, 0.1);
}

.pending-icon svg {
    width: 50px;
    height: 50px;
}

.pending-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.pending-message {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.pending-urdu {
    font-size: 1.05rem;
    color: var(--primary);
    font-weight: 500;
    direction: rtl;
    line-height: 1.8;
    margin-bottom: 25px;
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.3);
    text-decoration: none;
    z-index: 99;
}

.fab svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

/* Details Page Field Sections */
.profile-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin: 15px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--border-color);
}

.profile-section-title:first-of-type {
    margin-top: 0;
}

/* Custom Segmented Control for Gender Selection */
.gender-segmented-control {
    display: flex;
    background: #f1f3f5;
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid #e9ecef;
    margin-top: 5px;
}

.segment-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
    margin: 0 !important; /* Override standard label margin */
}

.segment-item input:checked + .segment-label {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(217, 4, 41, 0.2);
}

.segment-label {
    display: block;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    user-select: none;
}

/* Pixel-Perfect Profile Cards */
.directory-card {
    background: #ffffff;
    border-radius: 20px;
    padding: clamp(12px, 2.5vw, 24px);
    display: flex;
    gap: clamp(12px, 2.5vw, 24px);
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: hidden;
}

.directory-card.female {
    border: 1px solid rgba(255, 77, 109, 0.15);
    box-shadow: 0 10px 25px -5px rgba(255, 77, 109, 0.05), 0 8px 10px -6px rgba(255, 77, 109, 0.05);
}

.directory-card.male {
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.05), 0 8px 10px -6px rgba(59, 130, 246, 0.05);
}

.directory-card:hover {
    transform: translateY(-2px);
}
.directory-card.female:hover {
    box-shadow: 0 20px 25px -5px rgba(255, 77, 109, 0.08), 0 10px 10px -5px rgba(255, 77, 109, 0.08);
}
.directory-card.male:hover {
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.08), 0 10px 10px -5px rgba(59, 130, 246, 0.08);
}

/* Avatar container with thick themed border */
.dir-avatar-container {
    position: relative;
    width: clamp(75px, 18vw, 100px);
    height: clamp(100px, 24vw, 133px);
    flex-shrink: 0;
    border-radius: var(--radius-md);
    padding: clamp(2px, 0.4vw, 4px);
    background: #ffffff;
}

.directory-card.female .dir-avatar-container {
    border: clamp(2px, 0.4vw, 3.5px) solid #ff4d6d;
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.15);
}

.directory-card.male .dir-avatar-container {
    border: clamp(2px, 0.4vw, 3.5px) solid #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.dir-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
    display: block;
}

.dir-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 700;
}

.directory-card.female .dir-avatar-placeholder {
    background: #ffe5ec;
    color: #ff4d6d;
}

.directory-card.male .dir-avatar-placeholder {
    background: #eff6ff;
    color: #3b82f6;
}

/* Gender badge overlay on avatar */
.dir-avatar-badge {
    position: absolute;
    bottom: clamp(-2px, -0.4vw, -2px);
    right: clamp(-2px, -0.4vw, -2px);
    width: clamp(18px, 3.8vw, 28px);
    height: clamp(18px, 3.8vw, 28px);
    border-radius: 50%;
    border: clamp(1px, 0.2vw, 2px) solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: clamp(0.65rem, 1.3vw, 0.95rem);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.directory-card.female .dir-avatar-badge {
    background: #ff4d6d;
}

.directory-card.male .dir-avatar-badge {
    background: #3b82f6;
}

/* Right content area */
.dir-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0; /* Enable flex-item shrinking */
}

.dir-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    width: 100%;
    flex-wrap: nowrap;
}

.dir-name-title {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
}

.gender-pill-tag {
    padding: clamp(2px, 0.4vw, 4px) clamp(8px, 1.5vw, 14px);
    border-radius: 50px;
    font-weight: 600;
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    display: inline-flex;
    align-items: center;
    gap: clamp(3px, 0.6vw, 6px);
    color: #ffffff;
    flex-shrink: 0;
    white-space: nowrap;
}

.gender-pill-tag.larki {
    background: #ff4d6d;
}

.gender-pill-tag.larka {
    background: #3b82f6;
}

.more-options-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    cursor: pointer;
    padding: 0 clamp(2px, 0.4vw, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
    flex-shrink: 0;
}

.more-options-btn:hover {
    color: #475569;
}

/* Sub-header info */
.dir-info-row {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.8vw, 6px);
    font-size: clamp(0.7rem, 1.3vw, 0.88rem);
    color: #475569;
    margin-bottom: clamp(6px, 1.2vw, 12px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-info-row svg {
    flex-shrink: 0;
}

.directory-card.female .dir-info-row svg {
    color: #ff4d6d;
}

.directory-card.male .dir-info-row svg {
    color: #3b82f6;
}

.dir-bullet {
    font-weight: bold;
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    line-height: 1;
}

.directory-card.female .dir-bullet {
    color: #ff4d6d;
}

.directory-card.male .dir-bullet {
    color: #3b82f6;
}

/* Pill stats list */
.dir-pill-stats {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 1.2vw, 12px);
    padding: clamp(4px, 0.8vw, 6px) clamp(10px, 2vw, 16px);
    border-radius: 50px;
    font-size: clamp(0.68rem, 1.3vw, 0.85rem);
    font-weight: 600;
    width: fit-content;
    white-space: nowrap;
}

.directory-card.female .dir-pill-stats {
    background: #ffe5ec;
    color: #1e293b;
}

.directory-card.male .dir-pill-stats {
    background: #eff6ff;
    color: #1e293b;
}

.dir-pill-bar {
    color: rgba(0, 0, 0, 0.1);
}

.directory-card.female .dir-pill-bar {
    color: rgba(255, 77, 109, 0.25);
}

.directory-card.male .dir-pill-bar {
    color: rgba(59, 130, 246, 0.25);
}

/* Thin Divider */
.dir-divider {
    border: 0;
    border-top: 1px solid #f1f5f9;
    margin: clamp(8px, 1.6vw, 14px) 0;
    width: 100%;
}

/* Bottom Grid for Job and Residence */
.dir-details-grid {
    display: flex;
    gap: clamp(12px, 2.5vw, 32px);
    margin-bottom: clamp(10px, 2vw, 16px);
    flex-wrap: nowrap;
}

.dir-detail-box {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1vw, 10px);
    flex-shrink: 0;
}

.dir-detail-box svg {
    width: clamp(14px, 2.5vw, 20px);
    height: clamp(14px, 2.5vw, 20px);
    flex-shrink: 0;
}

.directory-card.female .dir-detail-box svg {
    color: #ff4d6d;
}

.directory-card.male .dir-detail-box svg {
    color: #3b82f6;
}

.dir-detail-text {
    display: flex;
    flex-direction: column;
}

.dir-detail-label {
    font-size: clamp(0.58rem, 1.1vw, 0.72rem);
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.dir-detail-value {
    font-size: clamp(0.75rem, 1.5vw, 0.92rem);
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

/* Card Footer */
.dir-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-wrap: nowrap;
    gap: clamp(8px, 1.5vw, 12px);
    width: 100%;
}

.dir-badges-container {
    display: flex;
    gap: clamp(4px, 0.8vw, 8px);
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.dir-status-badge {
    padding: clamp(4px, 0.8vw, 6px) clamp(8px, 1.5vw, 12px);
    border-radius: 50px;
    font-size: clamp(0.65rem, 1.2vw, 0.78rem);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 0.8vw, 6px);
    white-space: nowrap;
}

.dir-status-badge.verified {
    background: #e6f7ed;
    color: #15803d;
}

.dir-status-badge.active {
    background: #e6f7ed;
    color: #15803d;
}

.dir-status-badge.inactive {
    background: #f1f5f9;
    color: #475569;
}

.dir-status-badge.cancelled {
    background: #fef2f2;
    color: #b91c1c;
}

.dir-status-badge.matched_group {
    background: #faf5ff;
    color: #6b21a8;
}

.dir-status-badge.matched_outside {
    background: #f0fdfa;
    color: #0f766e;
}

.dir-status-badge.pending_verification {
    background: #fffbeb;
    color: #b45309;
}

.dir-status-badge .badge-dot {
    width: clamp(4px, 0.8vw, 6px);
    height: clamp(4px, 0.8vw, 6px);
    border-radius: 50%;
    background: currentColor;
}

/* Action button styling */
.dir-action-btn {
    padding: clamp(6px, 1.2vw, 10px) clamp(12px, 2.2vw, 22px);
    border-radius: 50px;
    font-weight: 600;
    font-size: clamp(0.72rem, 1.4vw, 0.88rem);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 0.8vw, 6px);
    color: #ffffff !important;
    border: none;
    transition: background-color 0.2s, transform 0.2s;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.dir-action-btn svg {
    width: clamp(10px, 1.8vw, 14px);
    height: clamp(10px, 1.8vw, 14px);
    flex-shrink: 0;
}

.directory-card.female .dir-action-btn {
    background: #df3b67;
}
.directory-card.female .dir-action-btn:hover {
    background: #c22f56;
}

.directory-card.male .dir-action-btn {
    background: #3b82f6;
}
.directory-card.male .dir-action-btn:hover {
    background: #2563eb;
}

/* Superscript status label styles */
.dir-name-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.sup-status {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: super;
    line-height: 1;
}

.sup-status.verified {
    background: #e6f7ed;
    color: #15803d;
    border: 0.5px solid rgba(21, 128, 61, 0.2);
}

.sup-status.active {
    background: #e6f7ed;
    color: #15803d;
    border: 0.5px solid rgba(21, 128, 61, 0.2);
}

.sup-status.inactive {
    background: #f1f5f9;
    color: #475569;
    border: 0.5px solid rgba(71, 85, 105, 0.2);
}

.sup-status.cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border: 0.5px solid rgba(185, 28, 28, 0.2);
}

.sup-status.matched {
    background: #faf5ff;
    color: #6b21a8;
    border: 0.5px solid rgba(107, 33, 168, 0.2);
}

.sup-status.pending {
    background: #fffbeb;
    color: #b45309;
    border: 0.5px solid rgba(180, 83, 9, 0.2);
}

/* Card CTA Action Buttons styling */
.card-ctas {
    display: flex;
    gap: clamp(6px, 1.2vw, 10px);
    align-items: center;
    flex-shrink: 0;
}

.cta-btn {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 50%;
    width: clamp(32px, 7vw, 38px);
    height: clamp(32px, 7vw, 38px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.cta-btn svg {
    transition: transform 0.2s ease;
}

.cta-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.cta-btn:hover svg {
    transform: scale(1.1);
}

.cta-btn:active {
    transform: scale(0.92);
}

/* Favorite button active state */
.cta-btn.fav-btn.active {
    background: #ffe5ec;
    border-color: #ffb3c1;
}

.cta-btn.fav-btn.active svg {
    animation: heartbeat 0.3s ease-out;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Show Interest button sent state */
.cta-btn.interest-btn.sent {
    background: #e6f7ed;
    border-color: #bbf7d0;
    cursor: not-allowed;
}

/* Ignore / Hide button hover state */
.cta-btn.ignore-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* Thumbnail gallery below portrait pic */
.dir-thumb-track {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.dir-thumb-track::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.dir-thumb-item {
    width: clamp(18px, 4vw, 24px);
    height: clamp(24px, 5.3vw, 32px);
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.dir-thumb-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Interactive clickable directory card override */
.directory-card {
    cursor: pointer;
    user-select: none;
}

/* Feed Segmented Filter Control */
.feed-segmented-control {
    display: flex;
    background: #f1f3f5;
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid #e9ecef;
    margin-top: 10px;
    width: 100%;
}

/* Progressive Profile Wizard styles */
.stepper-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
    padding: 0 10px;
}

.stepper-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
    transform: translateY(-50%);
}

.stepper-progress-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step-indicator.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(217, 4, 41, 0.15);
}

.step-indicator.completed {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
}

.step-indicator::after {
    content: attr(data-title);
    position: absolute;
    top: 38px;
    font-size: 0.6rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    text-transform: capitalize;
}

.step-indicator.active::after {
    color: var(--primary);
    font-weight: 700;
}

.wizard-step-panel {
    display: none;
}

.wizard-step-panel.active {
    display: block;
    animation: fadeInStep 0.4s ease-out;
}

@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
}

/* Picture Manager Grid for Edit/Step 7 */
.photo-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.photo-manager-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3/4;
    border: 2px solid #e2e8f0;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

.photo-manager-card.is-main {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.15);
}

.photo-manager-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.photo-actions-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: space-around;
    padding: 8px 4px;
    transform: translateY(100%);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-manager-card:hover .photo-actions-overlay {
    transform: translateY(0);
}

.photo-action-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.15s, transform 0.1s;
}

.photo-action-btn:hover {
    color: #ffccd5;
    transform: scale(1.15);
}

.photo-action-btn.delete:hover {
    color: #fca5a5;
}
