/* ═══════════════════════════════════════════════════════════════════════════
   Loving.lk Profile Manager — Main Stylesheet
   Colors: Gold #f6af04 | Navy #2c3e50 | BG #dfdfdf | White #fff
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold:       #f6af04;
    --gold-dark:  #d4960a;
    --gold-light: #fff3cc;
    --navy:       #2c3e50;
    --navy-dark:  #1a2533;
    --navy-mid:   #34495e;
    --bg:         #dfdfdf;
    --bg-light:   #f4f4f4;
    --white:      #ffffff;
    --text:       #333333;
    --text-light: #666666;
    --border:     #e0e0e0;
    --red:        #e74c3c;
    --green:      #27ae60;
    --shadow:     0 4px 20px rgba(0,0,0,0.10);
    --shadow-lg:  0 10px 40px rgba(0,0,0,0.15);
    --radius:     12px;
    --radius-sm:  8px;
    --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.3; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

/* ════════════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════════════ */
.site-header { position: sticky; top: 0; z-index: 1000; }

.header-main {
    background: var(--navy);
    padding: 14px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.header-main-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img {
    height: 46px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}
.logo-icon {
    font-size: 2rem;
    line-height: 1;
}
.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
    line-height: 1;
}
.logo-dot { color: var(--gold); }
.logo-tagline {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Password strength bar */
.password-strength {
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.35s ease, background 0.35s ease;
}
.strength-label, .match-label {
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
    min-height: 18px;
}
.auth-card--wide { max-width: 500px; }

/* Nav */
.header-nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
    color: rgba(255,255,255,0.8);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-link--btn {
    background: var(--gold);
    color: var(--navy) !important;
    font-weight: 700;
}
.nav-link--btn:hover { background: var(--gold-dark); }
.nav-link--logout { color: rgba(255,255,255,0.5) !important; font-size: 13px; }
.nav-link--logout:hover { color: #e74c3c !important; background: rgba(231,76,60,0.1); }

/* ════════════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════════════ */
.site-footer { display: none; }

/* ════════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ════════════════════════════════════════════════════════════════════════════ */
.site-main { flex: 1; padding: 40px 0; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    line-height: 1;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(246,175,4,0.35); }
.btn-primary.copied { background: var(--green); border-color: var(--green); color: white; }

.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: white; }

.btn-danger {
    background: var(--red);
    color: white;
    border-color: var(--red);
}
.btn-danger:hover { background: #c0392b; }

.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.btn-view  { background: #3498db; color: white; border-color: #3498db; }
.btn-view:hover  { background: #2980b9; }
.btn-edit  { background: var(--navy-mid); color: white; border-color: var(--navy-mid); }
.btn-edit:hover  { background: var(--navy); }
.btn-delete { background: var(--red); color: white; border-color: var(--red); }
.btn-delete:hover { background: #c0392b; }
.btn-copy { background: var(--navy); color: white; border-color: var(--navy); padding: 9px 13px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-copy:hover { background: var(--gold); color: var(--navy); }
.btn-copy.copied { background: var(--green); border-color: var(--green); }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--navy);
}
.form-control {
    width: 100%;
    padding: 11px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(246,175,4,0.2);
}

.input-group { display: flex; position: relative; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-eye {
    padding: 0 14px;
    border: 2px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--bg-light);
    cursor: pointer;
    color: var(--text-light);
    transition: all var(--transition);
    font-size: 14px;
}
.input-eye:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    transition: opacity 0.5s ease;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ── Page Header ──────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.7rem;
    color: var(--navy);
}
.page-title i { color: var(--gold); }
.page-subtitle { color: var(--text-light); font-size: 14px; margin-top: 4px; }

/* ════════════════════════════════════════════════════════════════════════════
   AUTH / LOGIN
   ════════════════════════════════════════════════════════════════════════════ */
.auth-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    border-top: 4px solid var(--gold);
}
.auth-icon { font-size: 3rem; margin-bottom: 16px; }
.auth-title { font-size: 1.6rem; color: var(--navy); margin-bottom: 6px; }
.auth-subtitle { color: var(--text-light); font-size: 14px; margin-bottom: 28px; }
.auth-form { text-align: left; }

/* ════════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════════════════════════════ */
.dashboard-wrapper { padding: 0; }

.stats-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 28px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gold);
    min-width: 140px;
    flex: 1;
}
.stat-number { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-label  { font-size: 13px; color: var(--text-light); font-weight: 500; }

.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.table-search-bar { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.search-input { max-width: 340px; }
.table-responsive { overflow-x: auto; }

.profiles-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.profiles-table thead tr {
    background: var(--navy);
    color: white;
}
.profiles-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}
.profiles-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.profiles-table tbody tr:hover { background: #fafaf8; }
.profiles-table tbody tr:last-child td { border-bottom: none; }

.td-num { color: var(--text-light); font-size: 13px; width: 40px; }
.td-name strong { display: block; color: var(--navy); }
.td-name small  { color: var(--text-light); font-size: 12px; }
.td-age { white-space: nowrap; }
.td-actions { display: flex; gap: 6px; flex-wrap: nowrap; }

.gender-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}
.gender-male   { background: #dbeafe; color: #1e40af; }
.gender-female { background: #fce7f3; color: #9d174d; }

.td-link { min-width: 280px; }
.link-box { display: flex; }
.link-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 12px;
    background: var(--bg-light);
    color: var(--text-light);
    outline: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--navy); margin-bottom: 8px; }
.empty-state p  { color: var(--text-light); margin-bottom: 24px; }

/* ─── Delete Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 36px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: popIn 0.2s ease;
}
@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.modal-icon { font-size: 2.5rem; margin-bottom: 12px; }
.modal-box h3 { color: var(--navy); margin-bottom: 8px; }
.modal-box p  { color: var(--text-light); font-size: 14px; margin-bottom: 28px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }

/* ════════════════════════════════════════════════════════════════════════════
   ADD / EDIT FORM
   ════════════════════════════════════════════════════════════════════════════ */
.form-wrapper { }

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}
.form-card-header {
    background: var(--navy);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
}
.form-card-header i { color: var(--gold); font-size: 1.1rem; }
.paste-hint {
    margin-left: auto;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
}
.form-card-body { padding: 24px; }

.paste-area {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    min-height: 300px;
    background: #fafaf8;
    border-color: var(--border);
}
.paste-area:focus { background: var(--white); }

.paste-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.char-counter { font-size: 12px; color: var(--text-light); }

/* Live field preview */
.field-preview {
    margin-top: 20px;
    background: var(--gold-light);
    border: 1px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 16px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity:0; transform: translateY(-5px); } to { opacity:1; transform: none; } }
.field-preview-title {
    font-weight: 700;
    color: var(--navy);
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.field-preview-title i { color: var(--gold-dark); }
.field-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.preview-item {
    background: white;
    border-radius: 6px;
    padding: 8px 12px;
    border-left: 3px solid var(--gold);
    font-size: 13px;
}
.preview-label { color: var(--text-light); font-size: 11px; display: block; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.preview-value { color: var(--navy); font-weight: 600; display: block; margin-top: 2px; }

/* Photo upload */
.upload-zone {
    border: 2px dashed var(--gold);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gold-light);
}
.upload-zone:hover, .upload-zone.dragover {
    background: #ffe680;
    border-color: var(--gold-dark);
}
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-zone p { color: var(--text-light); font-size: 14px; margin-bottom: 6px; }
.upload-zone .upload-note { font-size: 12px; }
.upload-link { color: var(--navy); font-weight: 700; text-decoration: underline; cursor: pointer; }

.photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.photo-preview-item {
    width: 120px;
    text-align: center;
}
.photo-preview-item img {
    width: 120px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gold);
}
.photo-preview-name { font-size: 11px; color: var(--text-light); display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-preview-size { font-size: 11px; color: var(--gold-dark); font-weight: 600; }

.existing-photos { margin-bottom: 20px; }
.existing-photos-label { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 12px; }
.existing-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.existing-photo {
    position: relative;
    width: 120px;
}
.existing-photo img {
    width: 120px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
}
.delete-photo-label { position: absolute; inset: 0; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; }
.delete-photo-check { display: none; }
.delete-overlay {
    position: absolute; inset: 0;
    background: rgba(231,76,60,0);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.delete-photo-check:checked ~ .delete-overlay { background: rgba(231,76,60,0.8); }
.delete-photo-label:hover .delete-overlay { background: rgba(231,76,60,0.5); }

.upload-full-notice {
    text-align: center;
    padding: 20px;
    color: var(--green);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* ════════════════════════════════════════════════════════════════════════════
   PUBLIC PROFILE VIEW
   ════════════════════════════════════════════════════════════════════════════ */
.profile-page { }

/* Family info */
.family-info-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.family-member-block {
    border-right: 1px solid var(--border);
}
.family-member-block:last-child { border-right: none; }
.family-member-title {
    background: var(--gold-light);
    border-bottom: 1px solid var(--gold);
    padding: 12px 24px;
    font-weight: 700;
    font-size: 14px;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
}
.family-member-title i { color: var(--gold-dark); }

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.profile-hero {
    background: var(--navy);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 28px;
    padding: 48px 40px;
    position: relative;
}
.profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(246,175,4,0.15) 0%, rgba(44,62,80,0) 60%);
    pointer-events: none;
}
.profile-hero-content {
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    flex-wrap: wrap;
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--gold);
    flex-shrink: 0;
    box-shadow: 0 0 0 6px rgba(246,175,4,0.2);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gold);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
}
.profile-name {
    color: white;
    font-size: 2rem;
    margin-bottom: 12px;
}
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ptag {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
}
.ptag i { color: var(--gold); }

/* ─── Sections ──────────────────────────────────────────────────────────── */
.profile-body { display: flex; flex-direction: column; gap: 24px; }

.profile-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.section-header {
    background: var(--navy);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
}
.section-header h2 {
    font-size: 1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.section-header h2 i { color: var(--gold); }
.photo-count {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px;
    padding: 4px;
}
.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(44,62,80,0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    transition: background var(--transition);
}
.gallery-item:hover .gallery-overlay {
    background: rgba(44,62,80,0.55);
}

/* Info table */
.info-table-wrapper { overflow-x: auto; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }
.info-table tr:hover { background: #fafaf8; }
.info-label {
    padding: 14px 24px;
    font-weight: 600;
    color: var(--navy);
    background: #f8f9fa;
    width: 35%;
    border-right: 1px solid var(--border);
}
.info-value {
    padding: 14px 24px;
    color: var(--text);
}

/* Share */
.share-section .section-header + * { padding: 24px; }
.share-link-box {
    display: flex;
    gap: 0;
    margin: 24px 24px 16px;
}
.share-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gold);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 13px;
    background: var(--bg-light);
    color: var(--text);
    outline: none;
    font-family: 'Courier New', monospace;
}
.share-link-box .btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 12px 20px;
}
.share-buttons {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}
.share-wa  { background: #25d366; color: white; }
.share-wa:hover  { background: #128c7e; transform: translateY(-2px); }
.share-fb  { background: #1877f2; color: white; }
.share-fb:hover  { background: #0d65d9; transform: translateY(-2px); }

/* ─── Lightbox ──────────────────────────────────────────────────────────── */
.lightbox {
    position: fixed; inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.92);
}
.lightbox-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox-img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: fixed;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background var(--transition);
    backdrop-filter: blur(5px);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--gold); color: var(--navy); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(5px);
}

/* ─── 404 state ─────────────────────────────────────────────────────────── */
.not-found-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.not-found-inner {
    text-align: center;
    background: var(--white);
    padding: 60px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    border-top: 4px solid var(--red);
}
.not-found-icon { font-size: 3.5rem; margin-bottom: 16px; }
.not-found-inner h1 { color: var(--navy); margin-bottom: 8px; }
.not-found-inner p  { color: var(--text-light); font-size: 14px; }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    h1 { font-size: 1.4rem; }
    .profile-hero { padding: 32px 20px; }
    .profile-name { font-size: 1.5rem; }
    .profile-hero-content { gap: 20px; }
    .profile-avatar { width: 80px; height: 80px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .info-label { width: 45%; padding: 12px 16px; }
    .info-value { padding: 12px 16px; }
    .family-info-body { grid-template-columns: 1fr; }
    .family-member-block { border-right: none; border-bottom: 1px solid var(--border); }
    .family-member-block:last-child { border-bottom: none; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-card { padding: 32px 24px; }
    .stats-bar { gap: 10px; }
    .stat-card { padding: 16px 20px; }
    .profiles-table { font-size: 13px; }
    .lightbox-prev  { left: 8px; }
    .lightbox-next  { right: 8px; }
    .profile-hero-content { flex-direction: column; text-align: center; }
    .profile-tags { justify-content: center; }
}
