/* ============================================================
   GIA TỘC TRƯƠNG – SHARED STYLESHEET
   Desktop-first, responsive, Vietnamese family clan platform
   ============================================================ */

/* ── 1. DESIGN TOKENS ─────────────────────────────────── */
:root {
    --primary:        #B52914;
    --primary-dark:   #8A1F0F;
    --primary-soft:   rgba(181, 41, 20, 0.08);
    --gold:           #D4AF37;
    --gold-dark:      #B38618;
    --gold-bg:        #F9F4E8;
    --gold-border:    rgba(212,175,55,0.35);
    --cream:          #FAF8F5;
    --surface:        #FFFFFF;
    --surface-2:      #F5F2EE;
    --text-main:      #1A1A1A;
    --text-muted:     #595959;
    --text-light:     rgba(255,255,255,0.9);
    --border:         #EBE6DF;
    --border-dark:    #D9D2C9;
    --success:        #219653;
    --danger:         #D32F2F;
    --info:           #1976D2;
    --green-bg:       rgba(33,150,83,0.06);

    --radius-xs:  8px;
    --radius-sm:  12px;
    --radius-md:  16px;
    --radius-lg:  24px;
    --radius-xl:  32px;

    --shadow-xs:   0 2px 8px rgba(45,36,28,0.05);
    --shadow-soft: 0 4px 20px rgba(45,36,28,0.06);
    --shadow-md:   0 8px 30px rgba(45,36,28,0.08);
    --shadow-hover:0 12px 40px rgba(45,36,28,0.12);
    --shadow-pop:  0 24px 72px rgba(45,36,28,0.2);

    --font-heading: 'Poppins', sans-serif;
    --font-body:    'Inter', sans-serif;

    --role-son:       #B52914;
    --role-dau:       #8E44AD;
    --role-re:        #2D9CDB;
    --role-deceased:  #000000;

    --header-h: 88px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --z-header: 1000;
    --z-modal: 2000;
    --z-overlay: 1900;
    --z-dropdown: 1500;
    --z-toast: 3000;
}

/* ── 2. RESET & BASE ──────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 18px; /* Boosted for readability */
    color: var(--text-main);
    background: var(--cream);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word; /* Fix text overflow */
}

h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); }
ul, ol { list-style: none; }
input, textarea, select { font-family: var(--font-body); font-size: inherit; }

/* ── 3. UTILITIES ─────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}
.text-primary { color: var(--primary) !important; }
.text-gold    { color: var(--gold) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-center  { text-align: center; }

.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ── 4. BUTTONS ───────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
    padding: 0 24px;
    white-space: nowrap;
    line-height: normal;
}
.btn:focus-visible { outline: 4px solid var(--primary); outline-offset: 4px; box-shadow: 0 0 0 8px rgba(181,41,20,0.2); }
.btn-lg  { min-height: 58px; padding: 0 36px; font-size: 17px; }
.btn-sm  { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-xs  { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-primary         { background: var(--primary); color: #fff; }
.btn-primary:hover   { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(181,41,20,0.3); }

.btn-gold            { background: var(--gold); color: #fff; }
.btn-gold:hover      { background: var(--gold-dark); transform: translateY(-2px); }

.btn-outline         { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover   { background: var(--primary); color: #fff; }

.btn-outline-light   { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

.btn-outline-dark    { background: transparent; color: var(--text-main); border-color: var(--border-dark); }
.btn-outline-dark:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost           { background: none; border: none; color: var(--text-muted); }
.btn-ghost:hover     { color: var(--primary); background: var(--primary-soft); }

.btn-secondary       { background: var(--gold-bg); color: var(--gold-dark); border-color: var(--gold-border); }
.btn-secondary:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ── 5. CARDS ─────────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    padding: 32px;
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--gold-border);
}
.card-flat { box-shadow: none; }
.card-gold { border-left: 5px solid var(--gold); }
.card-red  { border-left: 5px solid var(--primary); }

/* ── 6. HEADER ────────────────────────────────────────── */
.site-header {
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Brand */
.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.brand-logo {
    width: 46px;
    height: 46px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 18px; color: var(--text-main); }
.brand-tagline { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 3px; }

/* Desktop Nav */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    margin-left: 16px;
}
.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 15px;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}
.nav-link:hover  { color: var(--primary); background: var(--primary-soft); }
.nav-link.active { color: var(--primary); font-weight: 600; }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Header Right */
.header-right { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.icon-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.notif-badge {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--primary);
    color: #fff;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
    font-family: var(--font-heading);
}

/* User Menu */
.user-menu-wrapper { position: relative; }
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
}
.user-profile-btn:hover { border-color: var(--gold); background: var(--gold-bg); }
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.user-info { display: flex; flex-direction: column; text-align: left; }
.user-name  { font-weight: 600; font-size: 14px; line-height: 1.2; }
.user-role  { font-size: 11px; color: var(--text-muted); }
.user-chevron { font-size: 16px; color: var(--text-muted); }

/* Header Login Link (guest) */
.header-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-xs);
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}
.header-login-btn:hover { background: var(--primary); color: #fff; }

/* Hamburger */
.hamburger {
    display: none;
    width: 44px; height: 44px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    font-size: 24px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.hamburger:hover { border-color: var(--primary); color: var(--primary); }

/* ── 7. MOBILE NAV DRAWER ─────────────────────────────── */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45,36,28,0.5);
    z-index: calc(var(--z-header) + 50);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    backdrop-filter: blur(4px);
}
.mobile-nav-overlay.open { opacity: 1; pointer-events: all; }

.mobile-nav-drawer {
    position: fixed;
    top: 0; left: 0;
    width: min(340px, 88vw);
    height: 100dvh;
    background: var(--surface);
    z-index: calc(var(--z-header) + 60);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.mobile-nav-drawer.open { transform: translateX(0); }

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.mobile-nav-close {
    width: 40px; height: 40px;
    border-radius: var(--radius-xs);
    border: none;
    background: var(--cream);
    color: var(--text-muted);
    font-size: 22px;
    display: flex; align-items: center; justify-content: center;
}
.mobile-nav-links {
    padding: 16px 16px;
    flex: 1;
}
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
}
.mobile-nav-link i { font-size: 22px; }
.mobile-nav-link:hover, .mobile-nav-link.active {
    color: var(--primary);
    background: var(--primary-soft);
    font-weight: 600;
}
.mobile-nav-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* ── 8. NOTIFICATION DROPDOWN ─────────────────────────── */
.notif-wrapper { position: relative; }
.notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-pop);
    z-index: var(--z-dropdown);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition);
    overflow: hidden;
}
.notif-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.notif-drop-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.notif-drop-header h4 { font-size: 17px; }
.notif-mark-read { font-size: 13px; color: var(--primary); font-weight: 600; background: none; border: none; cursor: pointer; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}
.notif-item:hover { background: var(--cream); }
.notif-item.unread { background: var(--primary-soft); }
.notif-item.unread:hover { background: rgba(181,41,20,0.12); }
.notif-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.notif-icon.red    { background: var(--primary-soft); color: var(--primary); }
.notif-icon.gold   { background: var(--gold-bg); color: var(--gold-dark); }
.notif-icon.green  { background: var(--green-bg); color: var(--success); }
.notif-content { flex: 1; min-width: 0; }
.notif-text { font-size: 14px; line-height: 1.5; color: var(--text-main); }
.notif-text strong { font-weight: 600; }
.notif-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }
.notif-drop-footer {
    padding: 14px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}
.notif-drop-footer a { font-size: 14px; font-weight: 600; color: var(--primary); }

/* ── 9. MODALS ────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45,36,28,0.55);
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    backdrop-filter: blur(6px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-pop);
    width: 100%;
    max-width: 560px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    transform: scale(0.95) translateY(16px);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-wide { max-width: 720px; }

.modal-header {
    padding: 28px 32px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0;
    background: var(--surface);
    z-index: 1;
}
.modal-header h3 { font-size: 20px; }
.modal-close {
    width: 40px; height: 40px;
    border-radius: var(--radius-xs);
    border: none;
    background: var(--cream);
    color: var(--text-muted);
    font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: var(--primary-soft); color: var(--primary); }
.modal-body { padding: 28px 32px; }
.modal-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    position: sticky; bottom: 0;
    background: var(--surface);
}

/* ── 10. FORMS ────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text-main); }
.form-control {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--cream);
    font-size: 16px;
    color: var(--text-main);
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-control::placeholder { color: var(--text-muted); }
.form-hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.form-error { font-size: 13px; color: var(--danger); margin-top: 6px; display: none; }
.form-group.has-error .form-control { border-color: var(--danger); }
.form-group.has-error .form-error { display: block; }

/* ── 11. TOAST / NOTIFICATION ─────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 280px;
    max-width: 380px;
    pointer-events: all;
    animation: toastIn 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
}
.toast.out { animation: toastOut 0.35s ease forwards; }
.toast-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.toast-msg { font-size: 13px; color: var(--text-muted); }
.toast.success { border-left: 4px solid var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }
.toast.info    .toast-icon { color: var(--info); }
@keyframes toastIn  { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:scale(1); } to { opacity:0; transform:scale(0.9); } }

/* ── 12. SECTION HEADERS ──────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; flex-wrap: wrap; gap: 16px; }
.section-title {
    font-size: 26px;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: var(--gold);
    border-radius: 2px;
}
.section-center { text-align: center; }
.section-center .section-title::after { left: 50%; transform: translateX(-50%); }
.section-desc { color: var(--text-muted); font-size: 17px; line-height: 1.7; margin-top: 12px; }

/* ── 13. BREADCRUMB ───────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); padding: 24px 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-main); font-weight: 600; }
.breadcrumb i { font-size: 12px; }

/* ── 14. TAGS / PILLS ─────────────────────────────────── */
.tag-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid transparent;
    background: var(--cream);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.tag-pill:hover  { border-color: var(--primary); color: var(--primary); }
.tag-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Role badges */
.role-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.role-badge.gold  { background: var(--gold-bg); color: var(--gold-dark); }
.role-badge.red   { background: var(--primary-soft); color: var(--primary); }
.role-badge.green { background: var(--green-bg); color: var(--success); }
.role-badge.blue  { background: rgba(45,156,219,0.08); color: var(--info); }
.verified-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--green-bg);
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

/* ── 15. PROGRESS BAR ─────────────────────────────────── */
.progress-wrap { margin: 14px 0; }
.progress-track { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #E8C84A); border-radius: 5px; transition: width 0.8s ease; }
.progress-fill.fill-green { background: linear-gradient(90deg, #27AE60, #4CD080); }
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.progress-meta .raised { color: var(--text-main); }
.progress-meta .target { color: var(--text-muted); }

/* ── 16. AVATAR STACK ─────────────────────────────────── */
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .av {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    object-fit: cover;
    margin-left: -10px;
}
.avatar-stack .av:first-child { margin-left: 0; }
.avatar-stack .av-more {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    background: var(--gold-bg);
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-left: -10px;
}

/* ── 17. FOOTER ───────────────────────────────────────── */
.site-footer { background: #2A211B; color: rgba(255,255,255,0.8); padding: 80px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2.5fr 1fr 1fr 1.5fr; gap: 60px; padding-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-brand-logo .logo-box { width: 42px; height: 42px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; }
.footer-brand-logo h3 { font-size: 20px; color: #fff; }
.footer-desc { font-size: 15px; line-height: 1.7; color: rgba(255,255,255,0.55); max-width: 280px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); font-weight: 700; margin-bottom: 20px; }
.footer-links-list { display: flex; flex-direction: column; gap: 12px; }
.footer-links-list a { font-size: 15px; color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-links-list a:hover { color: var(--gold); padding-left: 4px; }
.footer-contact-list { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-contact-list li i { color: var(--gold); font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.footer-bottom { padding: 24px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.35); }
.footer-bottom .footer-social { display: flex; gap: 12px; }
.footer-bottom .social-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: rgba(255,255,255,0.5); font-size: 18px; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.footer-bottom .social-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── 18. PAGE HERO ────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0 72px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url('https://www.transparenttextures.com/patterns/clean-gray-paper.png');
    opacity: 0.08;
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero h1  { font-size: 44px; color: #fff; margin-bottom: 16px; }
.page-hero p   { font-size: 18px; color: rgba(255,255,255,0.85); max-width: 600px; }
.page-hero .breadcrumb a { color: rgba(255,255,255,0.65); }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero .breadcrumb span { color: rgba(255,255,255,0.9); }
.page-hero .breadcrumb i { color: rgba(255,255,255,0.5); }

/* ── 19. PLACEHOLDER PAGE ─────────────────────────────── */
.placeholder-section { padding: 80px 0; }
.placeholder-box {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-dark);
    padding: 80px 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.placeholder-icon { font-size: 64px; color: var(--gold); margin-bottom: 24px; display: block; opacity: 0.7; }
.placeholder-box h3 { font-size: 24px; margin-bottom: 12px; }
.placeholder-box p { color: var(--text-muted); font-size: 17px; margin-bottom: 28px; }

/* ── 20. LIGHTBOX ─────────────────────────────────────── */
.lightbox-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.lightbox-overlay.open { opacity: 1; pointer-events: all; }
.lightbox-inner { position: relative; max-width: 1000px; width: 100%; }
.lightbox-img { width: 100%; max-height: calc(100dvh - 160px); object-fit: contain; border-radius: var(--radius-md); }
.lightbox-caption { text-align: center; color: rgba(255,255,255,0.7); margin-top: 16px; font-size: 15px; }
.lightbox-close { position: absolute; top: -48px; right: 0; background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 28px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); }
.lightbox-close:hover { background: var(--primary); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 28px; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); }
.lightbox-prev { left: -72px; }
.lightbox-next { right: -72px; }
.lightbox-prev:hover, .lightbox-next:hover { background: var(--primary); }

/* ── 21. EMPTY STATE ──────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 32px; color: var(--text-muted); }
.empty-state i { font-size: 52px; margin-bottom: 16px; display: block; opacity: 0.5; }
.empty-state h4 { font-size: 20px; margin-bottom: 8px; color: var(--text-main); }
.empty-state p  { font-size: 15px; }

/* ── 22. RESPONSIVE ───────────────────────────────────── */
@media (max-width: 1200px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .lightbox-prev { left: -60px; }
    .lightbox-next { right: -60px; }
}
@media (max-width: 1024px) {
    :root { --header-h: 72px; }
    .container { padding: 0 28px; }
    .desktop-nav { display: none; }
    .hamburger { display: flex; }
    .page-hero h1 { font-size: 36px; }
    .lightbox-prev, .lightbox-next { width: 44px; height: 44px; font-size: 22px; }
    .lightbox-prev { left: -52px; }
    .lightbox-next { right: -52px; }
}
@media (max-width: 768px) {
    :root { --header-h: 64px; }
    .container { padding: 0 20px; }
    .user-info { display: none; }
    .user-chevron { display: none; }
    .section-title { font-size: 22px; }
    .page-hero h1 { font-size: 28px; }
    .page-hero p { font-size: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .lightbox-prev, .lightbox-next { position: fixed; top: auto; bottom: 24px; transform: none; }
    .lightbox-prev { left: calc(50% - 60px); }
    .lightbox-next { right: calc(50% - 60px); }
}
@media (max-width: 480px) {
    .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin-top: auto; max-height: 90dvh; }
    .modal-overlay { align-items: flex-end; padding: 0; }
    .btn { font-size: 14px; }
}

/* ── 23. ANIMATIONS ───────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ── 24. MARKETPLACE / TRADING ────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 32px; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); border-bottom: 4px solid transparent; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-bottom-color: var(--gold); }
.product-img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #eee; }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-img { transform: scale(1.05); }
.product-badge { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); color: #fff; padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.product-body { padding: 20px; }
.product-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text-main); line-height: 1.4; min-height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.product-price { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.product-seller { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.seller-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.seller-name { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.member-verified-badge { font-size: 11px; color: var(--gold); border: 1px solid var(--gold-border); padding: 1px 6px; border-radius: 4px; font-weight: 700; }

.status-badge { display: inline-flex; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.status-new       { background: var(--primary-soft); color: var(--primary); }
.status-contacted { background: rgba(142,68,173,0.1); color: #8E44AD; }
.status-process   { background: rgba(45,156,219,0.1); color: #2D9CDB; }
.status-done      { background: var(--green-bg); color: var(--success); }
.status-cancel    { background: rgba(127,140,141,0.1); color: #7F8C8D; }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* ── 24. SCROLLBAR ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── 25. SELECTION ────────────────────────────────────── */
::selection { background: rgba(181,41,20,0.15); color: var(--primary-dark); }

/* ── 26. TASK STATUS BADGES ───────────────────────────── */
.task-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.badge-active {
    background: rgba(39,174,96,0.12);
    color: #1a7a44;
    border: 1px solid rgba(39,174,96,0.25);
}
.badge-done {
    background: rgba(45,156,219,0.1);
    color: #1a6399;
    border: 1px solid rgba(45,156,219,0.2);
}
.badge-pending {
    background: rgba(242,153,74,0.12);
    color: #8a5400;
    border: 1px solid rgba(242,153,74,0.25);
}

/* ── 27. FOCUS-VISIBLE GLOBAL ─────────────────────────── */
/* Applies a clear focus ring to all interactive elements */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}
/* Skip built-in focus for mouse users */
:focus:not(:focus-visible) { outline: none; }

.nav-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.mobile-nav-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Clickable cards – add visible focus ring when tabbed into */
[tabindex="0"]:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* ── 28. SKIP LINK (accessibility) ───────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── 29. HEADER SCROLLED STATE ───────────────────────── */
.site-header.scrolled {
    box-shadow: 0 4px 24px rgba(45,36,28,0.1);
}

/* ── 30. NOTIF BADGE HIDDEN STATE ────────────────────── */
.notif-badge[style*="display: none"],
.notif-badge[data-count="0"] {
    display: none !important;
}

/* ── 31. MODAL CLOSE FOCUS RING ──────────────────────── */
.modal-close:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* ── 32. USER MENU DROPDOWN ──────────────────────────── */
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
    min-width: 200px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: var(--transition);
    z-index: var(--z-dropdown);
}
.user-menu-dropdown.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.umd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-main);
    font-family: var(--font-body);
}
.umd-item:hover { background: var(--cream); color: var(--primary); }
.umd-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ── 33. MISSING BUTTON VARIANTS ─────────────────────── */
.btn-gold {
    background: var(--gold);
    color: var(--gold-dark);
    border-color: var(--gold);
    font-weight: 700;
}
.btn-gold:hover {
    background: var(--gold-dark);
    color: #fff;
    border-color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(197,163,66,0.3);
}
.btn-outline-light {
    background: transparent;
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.4);
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}
.btn-block { width: 100%; display: flex; }
.btn.btn-block { display: flex; width: 100%; }
button.btn-block { width: 100%; display: flex; }

/* ── 34. USER MENU DIVIDER ────────────────────────────── */
.umd-divider {
    margin: 4px 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* ── 35. LIGHTBOX (complete) ─────────────────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.lightbox-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    object-fit: contain;
}
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev, .lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-caption {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    text-align: center;
    margin-top: 12px;
}
