/* ============================================================
   Rivalry – Main Stylesheet (User Pages)  v2
   ============================================================ */

:root {
    --primary:        #1a3c5e;
    --primary-light:  #2563a8;
    --primary-dark:   #122b44;
    --accent:         #e8a020;
    --accent-dark:    #c8881a;
    --success:        #16a34a;
    --danger:         #dc2626;
    --warning:        #d97706;
    --info:           #0891b2;
    --bg:             #f0f4fb;
    --card-bg:        #ffffff;
    --text:           #1e1e2e;
    --muted:          #6b7280;
    --border:         #dde3ee;
    --sidebar-w:      260px;
    --navbar-h:       62px;
    --radius:         12px;
    --radius-sm:      8px;
    --shadow:         0 2px 16px rgba(0,0,0,.07);
    --shadow-md:      0 4px 24px rgba(0,0,0,.12);
    --transition:     .2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.65; min-height: 100vh; display: flex; flex-direction: column; padding-top: var(--navbar-h); }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; }

/* ── Scrollbar ── */
/* scrollbars hidden everywhere; scrolling still works */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ── Navbar ── */
.navbar-main {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 0 1.5rem;
    height: var(--navbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.navbar-brand {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.navbar-brand:hover { color: #fff; text-decoration: none; }
.navbar-brand .brand-text span { color: var(--accent); }
.navbar-links { display: flex; gap: .5rem; align-items: center; }
.navbar-links a {
    color: #cbd5e1;
    font-size: .93rem;
    padding: .4rem .75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex; align-items: center; gap: .35rem;
}
.navbar-links a:hover, .navbar-links a.active { background: rgba(255,255,255,.13); color: #fff; }
.btn-login {
    background: var(--accent) !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: .4rem 1.2rem !important;
    font-weight: 700 !important;
    font-size: .88rem !important;
    box-shadow: 0 2px 8px rgba(232,160,32,.35);
}
.btn-login:hover { background: var(--accent-dark) !important; transform: translateY(-1px); }

/* ── Layout ── */
.page-wrapper { display: flex; flex: 1; min-height: calc(100vh - var(--navbar-h)); }
.main-content { flex: 1; padding: 2rem; overflow-x: hidden; min-width: 0; }

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    min-height: calc(100vh - var(--navbar-h));
    padding: 1.5rem 0 2rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-user { text-align: center; padding: 0 1rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 1rem; }
.sidebar-user .avatar {
    width: 68px; height: 68px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; font-weight: 800; color: #fff;
    margin: 0 auto .7rem;
    box-shadow: 0 4px 12px rgba(232,160,32,.4);
}
.sidebar-user .name { color: #fff; font-weight: 700; font-size: .96rem; }
.sidebar-user .role { color: #94a3b8; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; margin-top: .15rem; }

.sidebar-nav a {
    display: flex; align-items: center; gap: .75rem;
    padding: .62rem 1.4rem;
    color: #94a3b8;
    font-size: .9rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-left-color: var(--accent);
}
.sidebar-nav .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-nav .badge-count {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: .72rem;
    font-weight: 700;
}

/* ── Cards ── */
.card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700; font-size: .97rem;
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #fafbff 0%, #f0f4fb 100%);
}
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: #fafbff; }

/* ── Stat Cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 1.1rem; margin-bottom: 1.8rem; }
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.3rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    border-left: 4px solid var(--primary-light);
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card.accent  { border-color: var(--accent); }
.stat-card.success { border-color: var(--success); }
.stat-card.danger  { border-color: var(--danger); }
.stat-card.info    { border-color: var(--info); }
.stat-icon { font-size: 2.1rem; flex-shrink: 0; }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .79rem; color: var(--muted); margin-top: .25rem; text-transform: uppercase; letter-spacing: .3px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
thead th { background: var(--primary); color: #fff; padding: .75rem 1rem; text-align: left; font-weight: 600; font-size: .83rem; white-space: nowrap; }
thead th:first-child { border-radius: 0; }
tbody td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f5f8ff; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: .22rem .7rem; border-radius: 20px; font-size: .76rem; font-weight: 700; gap: .3rem; }
.badge-paid      { background: #dcfce7; color: #15803d; }
.badge-unpaid    { background: #fee2e2; color: #b91c1c; }
.badge-active    { background: #dbeafe; color: #1d4ed8; }
.badge-disabled  { background: #f3f4f6; color: #6b7280; }
.badge-admin     { background: #ede9fe; color: #6d28d9; }
.badge-pending   { background: #fef9c3; color: #92400e; }
.badge-approved  { background: #dcfce7; color: #15803d; }
.badge-rejected  { background: #fee2e2; color: #b91c1c; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem 1.2rem; border-radius: var(--radius-sm);
    font-size: .9rem; font-weight: 700; cursor: pointer;
    border: 2px solid transparent; transition: all var(--transition);
    white-space: nowrap; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary  { background: var(--primary-light); color: #fff; border-color: var(--primary-light); }
.btn-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-accent   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-success  { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover  { background: #b91c1c; color: #fff; }
.btn-info     { background: var(--info); color: #fff; border-color: var(--info); }
.btn-warning  { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-outline  { background: transparent; border-color: var(--primary-light); color: var(--primary-light); }
.btn-outline:hover { background: var(--primary-light); color: #fff; }
.btn-muted    { background: #e5e7eb; color: #9ca3af; border-color: #e5e7eb; cursor: not-allowed; pointer-events: none; }
.btn-sm  { padding: .32rem .85rem; font-size: .82rem; border-radius: 6px; }
.btn-xs  { padding: .2rem .6rem;   font-size: .77rem; border-radius: 5px; }
.btn-icon{ padding: .4rem .55rem; }
.btn-lg  { padding: .7rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms ── */
.form-group  { margin-bottom: 1.15rem; }
.form-label  { display: block; font-weight: 600; font-size: .86rem; color: #374151; margin-bottom: .38rem; }
.form-control {
    width: 100%; padding: .58rem .95rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: .94rem; font-family: inherit; background: #fff; color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,168,.12); }
.form-control:disabled { background: #f9fafb; color: var(--muted); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 110px; }
.form-hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }

/* ── Alert ── */
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .91rem; display: flex; align-items: flex-start; gap: .6rem; border-left: 4px solid; }
.alert-success { background: #f0fdf4; border-color: var(--success); color: #15803d; }
.alert-danger  { background: #fef2f2; border-color: var(--danger);  color: #b91c1c; }
.alert-info    { background: #f0f9ff; border-color: var(--info);    color: #0369a1; }
.alert-warning { background: #fffbeb; border-color: var(--warning); color: #92400e; }

/* ── Activity Cards ── */
.activities-wrapper { max-width: 1200px;  margin: 2.5rem auto; padding: 0 1.5rem;}

.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.6rem; }
.activity-card {  background: #fff;  border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.08); display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease;}
.activity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md);}
.activity-card img { width: 100%;  height: auto; object-fit: contain;  background: #f3f4f6;  display: block;}
.activity-card .no-img { width: 100%;  height: 220px; display: flex; align-items: center; justify-content: center;  font-size: 3rem; background: #eef2f9; color: var(--primary-light); }.activity-card .ac-body { padding: 1.1rem; }
.activity-card .ac-body-text { font-size: .88rem; color: var(--muted); margin: .4rem 0 .8rem;}
.activity-card .ac-category { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--accent); margin-bottom: .35rem; }
.activity-card .ac-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .45rem; color: var(--text); }
.activity-card .ac-meta { font-size: .78rem; color: var(--muted); display: flex; gap: .8rem; flex-wrap: wrap; }

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff; padding: 5rem 2rem; text-align: center; position: relative; overflow: hidden;
}
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero > * { position: relative; }
.hero h1 { font-size: 3rem; font-weight: 900; margin-bottom: 1.1rem; line-height: 1.15; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.15rem; max-width: 560px; margin: 0 auto 2.2rem; opacity: .88; line-height: 1.7; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-btns .btn { padding: .75rem 2rem; font-size: 1rem; border-radius: 30px; }

/* ── About Section ── */
.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding: 3rem 0; }
.about-section img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }
.about-section h2 { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; }

/* ── Contact Section ── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.2rem; }
.contact-item { display: flex; align-items: flex-start; gap: .8rem; padding: 1.1rem; background: #f8faff; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.contact-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.social-links { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.2rem; }
.social-btn { display: flex; justify-content: center; align-items: center; gap: .6rem;  width: 38px; height: 38px; border-radius: 50%; font-size: 1.87rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.social-btn.facebook  { background: #1877f2; }
.social-btn.twitter   { background: #1da1f2; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn.whatsapp  { background: #25d366; }

/* ── Chat Widget ── */
.chat-float {
    position: fixed; bottom: 1.8rem; right: 1.8rem; z-index: 990;
}
.chat-fab {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; cursor: pointer; border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transition: all var(--transition);
    position: relative;
}
.chat-fab:hover { background: var(--primary-light); transform: scale(1.08); }
.chat-fab .fab-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: #fff;
    border-radius: 50%; width: 20px; height: 20px;
    font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}
.chat-window {
    display: none;
    position: fixed; bottom: 5.5rem; right: 1.8rem;
    width: 340px; max-height: 480px;
    background: #fff; border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
    z-index: 991; flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}
.chat-window.open { display: flex; }
.chat-win-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; padding: .85rem 1.1rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.chat-win-header .title { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: .5rem; }
.chat-win-header .close-btn { background: none; border: none; color: rgba(255,255,255,.75); cursor: pointer; font-size: 1.2rem; padding: 0; }
.chat-win-header .close-btn:hover { color: #fff; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: #f8faff; }
.chat-bubble {
    max-width: 80%; padding: .55rem .9rem;
    border-radius: 18px; font-size: .88rem; line-height: 1.5;
    word-break: break-word;
}
.chat-bubble.from-user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-bubble.from-admin { background: #fff; color: var(--text); align-self: flex-start; border: 1px solid var(--border); border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.chat-bubble .bubble-time { font-size: .7rem; opacity: .65; margin-top: .2rem; }
.chat-input-area { padding: .75rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; flex-shrink: 0; background: #fff; }
.chat-input-area input { flex: 1; padding: .5rem .85rem; border: 1.5px solid var(--border); border-radius: 20px; font-size: .9rem; font-family: inherit; outline: none; }
.chat-input-area input:focus { border-color: var(--primary-light); }
.chat-send-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .95rem; flex-shrink: 0; transition: background var(--transition); }
.chat-send-btn:hover { background: var(--primary-light); }

/* ── Help / FAQ ── */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: .7rem; }
.faq-question { padding: 1rem 1.3rem; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: #fafbff; transition: background var(--transition); }
.faq-question:hover { background: #f0f4fb; }
.faq-question .icon { transition: transform .25s; font-size: .9rem; color: var(--muted); }
.faq-question.open .icon { transform: rotate(180deg); }
.faq-answer { padding: 0 1.3rem; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s; font-size: .92rem; color: #374151; line-height: 1.7; }
.faq-answer.open { padding: .8rem 1.3rem 1.1rem; max-height: 500px; }

/* ── Register / Become a Member ── */
.till-box {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; border-radius: var(--radius); padding: 1.5rem;
    text-align: center; margin-bottom: 1.5rem;
}
.till-box .till-label { font-size: .83rem; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.till-box .till-number { font-size: 2.5rem; font-weight: 900; color: var(--accent); letter-spacing: 2px; margin: .3rem 0; }
.till-box .till-amount { font-size: 1rem; opacity: .9; }

/* ── Payment list ── */
.month-selector { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* ── Footer ── */
footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #94a3b8;
    padding: 2.5rem 2rem 1.5rem;
    margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-brand { color: #fff; font-size: 1.3rem; font-weight: 800; margin-bottom: .7rem; }
.footer-brand span { color: var(--accent); }
.footer-links h4 { color: #fff; font-size: .88rem; font-weight: 700; margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.footer-links a { display: block; color: #94a3b8; font-size: .88rem; padding: .2rem 0; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.2rem; text-align: center; font-size: .85rem; }
.footer-bottom span { color: var(--accent); }

/* ── Modals ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1100; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(2px); }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); width: 100%; max-width: 500px; box-shadow: 0 10px 50px rgba(0,0,0,.25); animation: modalIn .2s ease; }
@keyframes modalIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.modal-body   { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .7rem; background: #fafbff; border-radius: 0 0 var(--radius) var(--radius); }
.modal-close  { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-close:hover { color: var(--danger); }

/* ── Section Heading ── */
.section-heading { margin-bottom: 1.8rem; }
.section-heading h2 { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.section-heading p  { color: var(--muted); margin-top: .4rem; }
.section-heading .underline { width: 50px; height: 4px; background: var(--accent); border-radius: 2px; margin-top: .5rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .main-content { padding: 1rem; }
    .hero h1 { font-size: 2rem; }
    .hero { padding: 3rem 1.5rem; }
    .navbar-links .hide-mobile { display: none; }
    .about-section { grid-template-columns: 1fr; }
    .chat-window { width: calc(100vw - 2rem); right: 1rem; bottom: 5rem; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.7rem; }
    .activity-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   v3 layout: fixed header + fixed sidebar that scroll independently
   ============================================================ */
html { scrollbar-gutter: auto; }

/* hamburger: always white, always visible */
.hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 10px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
    color: #fff; font-size: 1.25rem; cursor: pointer; line-height: 1; flex-shrink: 0;
    transition: background var(--transition);
}
.hamburger:hover { background: rgba(255,255,255,.22); }
.hamburger i { color: #fff; }
.navbar-left { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.navbar-brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }

/* sidebars: fixed, own scroll, scroll bars hidden, only scrolls when content does not fit */
.sidebar, .sidebar-guest {
    position: fixed; top: var(--navbar-h); left: 0; bottom: 0;
    width: var(--sidebar-w);
    min-height: 0; overflow-y: auto; overflow-x: hidden;
    scrollbar-width: none; -ms-overflow-style: none;
    overscroll-behavior: contain;
    z-index: 999; transition: transform .28s ease;
}
.sidebar::-webkit-scrollbar, .sidebar-guest::-webkit-scrollbar { display: none; width: 0; height: 0; }
.sidebar-guest { background: var(--primary); padding: 1rem 0 1.5rem; transform: translateX(-100%); }
.sidebar-guest.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.25); }

.sidebar-overlay { display: none; position: fixed; inset: var(--navbar-h) 0 0 0; background: rgba(0,0,0,.45); z-index: 998; }
.sidebar-overlay.show { display: block; }

/* page body sits to the right of the fixed sidebar */
body.has-sidebar { padding-left: var(--sidebar-w); transition: padding-left .28s ease; }
body.has-sidebar.sidebar-collapsed { padding-left: 0; }
body.has-sidebar.sidebar-collapsed .sidebar { transform: translateX(-100%); }
.page-wrapper { min-height: calc(100vh - var(--navbar-h)); display: block; }
.main-content { padding: 2rem; min-width: 0; }

@media (max-width: 900px) {
    body.has-sidebar { padding-left: 0; }
    .sidebar { transform: translateX(-100%); width: 250px; }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.25); }
    body.has-sidebar.sidebar-collapsed .sidebar { transform: translateX(-100%); }
    body.has-sidebar.sidebar-collapsed .sidebar.open { transform: translateX(0); }
}
.sidebar-nav .nav-icon { color: inherit; }
.sidebar-nav .badge-count { margin-left: auto; background: var(--danger); }

/* ── Footer ── */
footer { margin-top: auto; }
.footer-simple { padding: 1.1rem 1.5rem; text-align: center; font-size: .85rem; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #cbd5e1; }
.footer-simple span { color: var(--accent); font-weight: 700; }
.footer-wrap { max-width: 1100px; margin: 0 auto; }
.footer-grid { grid-template-columns: 1.3fr 1.4fr 1fr; }
.footer-links.cols-2 .link-cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
.footer-social h4 { color: #fff; font-size: .88rem; font-weight: 700; margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.footer-social .social-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: .6rem; }
.footer-social .social-row a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.1); color: #fff; font-size: 1.1rem;
    transition: transform var(--transition), background var(--transition);
}
.footer-social .social-row a:hover { transform: translateY(-2px); background: var(--accent); color: #fff; }
.footer-social .social-row a.wa { background: #25d366; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Guest "Message us" modal (small, never full screen) ── */
.chat-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 1190; }
.chat-backdrop.show { display: block; }
.chat-window.chat-modal {
    position: fixed; left: 50%; top: 50%; right: auto; bottom: auto;
    transform: translate(-50%, -50%);
    width: min(380px, calc(100vw - 2rem)); height: min(520px, calc(100vh - 2rem)); max-height: none;
    z-index: 1200; border-radius: 16px;
}
.chat-window.chat-modal .chat-messages { min-height: 0; }

/* ── Quote / reply blocks (group chat) ── */
.stat-icon i, .stat-icon .fas, .stat-icon .fa-solid { color: var(--primary-light); }
.stat-card.success .stat-icon i { color: var(--success); }
.stat-card.danger  .stat-icon i { color: var(--danger); }
.stat-card.accent  .stat-icon i { color: var(--accent); }
.stat-card.info    .stat-icon i { color: var(--info); }
.act-icon { width: 42px; height: 42px; border-radius: 50%; background: #e8f0fb; color: var(--primary-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.month-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.month-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 20px; font-size: .82rem; font-weight: 700; }
.month-chip.paid { background: #dcfce7; color: #15803d; }
.month-chip.unpaid { background: #fee2e2; color: #b91c1c; }
.auth-card { max-width: 440px; margin: 3rem auto; }
.link-muted { color: var(--muted); font-size: .86rem; }
.chat-empty { text-align:center; color:#94a3b8; font-size:.83rem; padding:1.2rem 1rem; }
.chat-empty i { display:block; font-size:1.6rem; margin-bottom:.4rem; }
body.sidebar-collapsed .chat-page.logged-in .chat-widget { left: 0; }
@media (max-width: 900px) { .chat-page.logged-in .chat-widget { left: 0 !important; } }

/* hamburger drawn with CSS so it stays visible even if the icon font is blocked */
.hamburger .hb, .hamburger .hb::before, .hamburger .hb::after { display:block; width:20px; height:2px; background:#fff; border-radius:2px; }
.hamburger .hb { position:relative; }
.hamburger .hb::before, .hamburger .hb::after { content:''; position:absolute; left:0; }
.hamburger .hb::before { top:-6px; } .hamburger .hb::after { top:6px; }
.navbar-brand { display:inline-block; }
.navbar-brand .brand-text span { color: var(--accent); }


/* Sticky footer: #root is the flex column that holds navbar, page and footer, so the footer always sits at the bottom on short pages */
#root { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 100vh; width: 100%; }
.page-main { flex: 1 0 auto; width: 100%; min-width: 0; }
footer, .footer-simple { margin-top: auto; flex-shrink: 0; }

/* centered form-style pages */
.narrow { width: 100%; margin-left: auto; margin-right: auto; }
