/* ============================================================
   TabangTa — Main Stylesheet
   File: css/style.css
   Design: Warm community-focused, orange accent, teal primary
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --primary:       #3aafa9;   /* teal */
    --primary-dark:  #2c8a85;
    --primary-light: #d4f0ee;
    --accent:        #f97316;   /* orange */
    --accent-dark:   #ea6c0a;
    --accent-light:  #fff3e8;
    --bg:            #fdf6f0;   /* warm cream */
    --bg-card:       #ffffff;
    --bg-sidebar:    #f9f4ef;
    --text:          #1e293b;
    --text-muted:    #64748b;
    --text-light:    #94a3b8;
    --border:        #e8ddd5;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     22px;
    --radius-full:   999px;
    --font-head:     'Poppins', sans-serif;
    --font-body:     'Nunito', sans-serif;
    --transition:    all .2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

/* ── Utility ───────────────────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-4   { margin-top: 16px; }
.mb-4   { margin-bottom: 16px; }
.text-sm    { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.font-bold  { font-weight: 700; }
.font-head  { font-family: var(--font-head); }

/* ── Layout ────────────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 16px;
    gap: 24px;
}

/* ── Header / Nav ──────────────────────────────────────────── */
.top-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
}

.brand-logo {
    width: 40px; height: 40px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 18px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58,175,169,.35);
}

.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249,115,22,.35);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary-light);
}

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

.btn-danger {
    background: #ef4444;
    color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    width: 38px; height: 38px;
    padding: 0;
    border-radius: 50%;
    background: var(--bg-sidebar);
    color: var(--text-muted);
    position: relative;
}
.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 88px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}
.sidebar-item:hover {
    background: var(--bg-sidebar);
    color: var(--primary);
    border-left-color: var(--primary);
}
.sidebar-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}
.sidebar-item .icon { font-size: 18px; }

.sidebar-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-light);
    padding: 16px 20px 6px;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}
.msg-badge {
    position: absolute;
    top: 8px;
    right: 12px;
    background: #ff4b2b; /* Bright red/orange */
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none; 
}

.nav-msg-btn, .header-actions .msg-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-msg-btn .msg-badge {
    top: -2px;
    right: -2px;
    transform: scale(0.9);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ── Feed / Cards ──────────────────────────────────────────── */
.feed-area { flex: 1; min-width: 0; }

.feed-header {
    margin-bottom: 20px;
}

.welcome-text {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}
.welcome-sub {
    color: var(--text-muted);
    font-size: 14px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: var(--radius-full);
    padding: 10px 18px;
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
}
.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    outline: none;
}
.search-bar input::placeholder { color: var(--accent); opacity: .7; }
.search-bar .search-icon { color: var(--accent); font-size: 18px; }

/* Filter chips */
.filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.chip {
    padding: 5px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.chip:hover, .chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.chip.active {
    background-color: var(--primary); /* The teal color */
    color: white;
    border-color: var(--primary);
}

/* Post card */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: fadeInUp .3s ease both;
}
.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.post-card.copied-flash {
    background-color: var(--primary-light) !important;
    border-color: var(--primary) !important;
    transform: scale(1.02); /* Slight pop-out effect */
    box-shadow: 0 0 20px rgba(58, 175, 169, 0.3);
    z-index: 10;
}

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

.post-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: var(--primary);
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.post-user-info { flex: 1; min-width: 0; }
.post-user-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}
.post-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.badge-need  { background: #dcfce7; color: #16a34a; }
.badge-offer { background: #ede9fe; color: #7c3aed; }
.badge-emergency { background: #fee2e2; color: #dc2626; }
.badge-resolved  { background: #f1f5f9; color: #64748b; }

.urgency-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.urgency-low      { background: #22c55e; }
.urgency-medium   { background: #f59e0b; }
.urgency-high     { background: #f97316; }
.urgency-emergency { background: #ef4444; animation: pulse 1.2s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

.post-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 6px;
}

.post-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tags {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-sidebar);
    color: var(--text-muted);
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-sidebar);
    color: var(--text-muted);
}
.action-btn:hover { background: var(--primary-light); color: var(--primary); }
.action-btn.danger:hover { background: #fee2e2; color: #ef4444; }

/* ── Floating Action Button ────────────────────────────────── */
.fab-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200;
}

.fab-label {
    background: var(--text);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
}
.fab-container:hover .fab-label {
    opacity: 1;
    transform: translateX(0);
}

.fab {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(249,115,22,.4);
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.fab:hover {
    background: var(--accent-dark);
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 8px 28px rgba(249,115,22,.5);
}

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: slideUp .25s ease;
    overflow: hidden;
}

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

.modal-header {
    padding: 24px 28px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.modal-title {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}
.modal-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 3px;
}

.modal-close {
    background: var(--bg-sidebar);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.modal-close:hover { background: #fee2e2; color: #ef4444; }

.modal-body {
    padding: 25px; /* Gives the whole form breathing room */
}

.auth-tabs {
    margin-bottom: 25px;
}

#registerForm .form-control, 
#loginForm .form-control {
    margin-bottom: 15px; /* This is the most important part */
    height: 48px;        /* Makes inputs taller and easier to tap */
    padding: 10px 15px;  /* Adds space inside the boxes */
    border-radius: 8px;  /* Smoother corners */
}

#registerForm button, 
#loginForm button {
    margin-top: 15px;
    height: 50px;
    font-weight: 600;
    font-size: 16px;
}

.form-group {
    margin-bottom: 15px;
}

.hidden {
    display: none !important;
}

/* Tab switcher */
.auth-tabs {
    display: flex;
    background: var(--bg-sidebar);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 20px;
}
.auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}
.auth-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Form fields */
.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    background: var(--bg-card);
    outline: none;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58,175,169,.12);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.swal2-html-container .form-group {
    margin-bottom: 15px;
}
.swal2-html-container .form-label {
    margin-bottom: 5px;
    display: block;
    font-weight: bold;
    font-size: 13px;
}

/* ── Profile / Avatar Chip ─────────────────────────────────── */
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-sidebar);
    border-radius: var(--radius-full);
    padding: 5px 14px 5px 5px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
}
.user-chip:hover { border-color: var(--primary); }
.user-chip .avatar { width: 32px; height: 32px; font-size: 14px; }
.user-chip .name   { font-size: 14px; font-weight: 700; color: var(--text); }

/* Notification badge */
.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    width: 16px; height: 16px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 52px; margin-bottom: 12px; }
.empty-state h3 { font-family: var(--font-head); font-size: 18px; color: var(--text); margin-bottom: 6px; }

/* ── Messages panel ────────────────────────────────────────── */
.messages-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 520px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
}

.conv-list {
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.conv-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}
.conv-item:hover, .conv-item.active { background: var(--primary-light); }
.conv-item .preview {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}
.conv-item.unread .preview { font-weight: 700; color: var(--text); }

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

.message-bubble {
    max-width: 70%;
    padding: 9px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}
.message-bubble.sent {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}
.message-bubble.received {
    align-self: flex-start;
    background: var(--bg-sidebar);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.chat-input-bar {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
}
.chat-input-bar input {
    flex: 1;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
}
.chat-input-bar input:focus { border-color: var(--primary); }

/* ── Admin Analytics ───────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-number {
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}
.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: 4px;
}

/* ── Toast / Loading ───────────────────────────────────────── */
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hero (Guest landing) ─────────────────────────────────── */
.hero {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 72px 24px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -80px;
    width: 280px; height: 280px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -60px;
    width: 220px; height: 220px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}
.hero h1 {
    font-family: var(--font-head);
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
}
.hero p {
    font-size: 16px;
    opacity: .88;
    max-width: 520px;
    margin: 0 auto 28px;
    position: relative;
}
.hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    position: relative;
}
.hero-btns .btn-outline {
    border-color: white;
    color: white;
}
.hero-btns .btn-outline:hover {
    background: rgba(255,255,255,.15);
}

.public-feed-wrapper {
    max-width: 800px; /* Limits width to look like a clean card stack */
    margin: 0 auto;   /* Perfect horizontal centering */
    padding: 30px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guest-container {
    max-width: 760px; /* This makes the feed narrow and professional */
    margin: 40px auto; /* Centers the whole thing horizontally */
    padding: 0 20px;
    width: 100%;
}

.guest-search-style {
    border: 2px solid var(--accent) !important; /* Forces the orange border */
    background: #ffffff !important;
    margin-bottom: 25px !important;
    box-shadow: var(--shadow-md) !important;
}

/* Ensure the cards stack vertically in a clean line */
.guest-container #feedList {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.guest-container .post-card {
    width: 100%;
    margin-bottom: 0;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .sidebar { display: none; }
    .hero h1 { font-size: 28px; }
    .fab-container { bottom: 20px; right: 20px; }
    .messages-layout { grid-template-columns: 1fr; }
    .conv-list { border-right: none; border-bottom: 1px solid var(--border); height: 200px; }
    .form-row { grid-template-columns: 1fr; }
}

/* ── SweetAlert customization ──────────────────────────────── */
.swal2-popup {
    font-family: var(--font-body) !important;
    border-radius: var(--radius-lg) !important;
}
.swal2-title { font-family: var(--font-head) !important; }
.swal2-confirm {
    background: var(--primary) !important;
    border-radius: var(--radius-full) !important;
}
.swal2-deny, .swal2-cancel {
    border-radius: var(--radius-full) !important;
}

/* Fix the disappearing category text */
select.form-control {
    height: 42px !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
    color: var(--text) !important;
    background-color: #ffffff !important;
}

/* Ensure options are visible */
select.form-control option {
    color: #1e293b;
    padding: 10px;
    background: #fff;
}

/* Profile Page Custom Styles */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px;
    margin-bottom: 20px;
}

/* @media (max-width: 500px) {
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr); 
} */

.stat-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-val {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-head);
}

.stat-lab {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.profile-info-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.info-section-title {
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--text);
}

.info-item {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.info-icon { font-size: 20px; width: 24px; }

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
}

.info-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.profile-actions {
    display: flex;
    gap: 12px;
}
/* ── Profile panel (JS-rendered) ──────────────────────────── */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.profile-title-area h2 {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-val {
    font-size: 26px;
    font-weight: 800;
    font-family: var(--font-head);
    line-height: 1.1;
}
.stat-lab {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .04em;
    margin-top: 4px;
}

.profile-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.info-section-title {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}
.info-item:last-child { margin-bottom: 0; }
.info-icon { font-size: 20px; width: 24px; flex-shrink: 0; margin-top: 2px; }
.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}
.info-value { font-size: 14px; color: var(--text); font-weight: 600; }

.profile-actions {
    display: flex;
    gap: 12px;
}

.cat-tag {
    padding: 4px 12px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
    border-radius: 6px;
}

.chip {
    padding: 6px 16px;
    font-weight: 700;
}

/* --- TabangTa Clean Grid Management --- *//* Table Layout Fixes */
.tt-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.tt-table th {
    text-align: left;
    padding: 16px 20px;
    background: var(--bg-sidebar);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.tt-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #f9f6f2;
    vertical-align: middle;
}

/* User Info Cell Fix */
.tt-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tt-avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0; /* Prevents avatar from getting squished */
}

.tt-name { font-weight: 700; color: var(--text); line-height: 1.2; }
.tt-sub { font-size: 12px; color: var(--text-light); }

/* Status Pills */
.tt-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
}

.pill-teal { background: var(--primary-light); color: var(--primary-dark); }


.pill-orange {
    background: #fff7ed; /* Very light orange */
    color: #ea580c;      /* Deep orange text */
    border: 1px solid #fdba74;
}
/* Action Buttons */
.tt-action-link {
    background: none;
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 6px;
    color: var(--text);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}
.tt-action-link:hover {
    background: var(--bg-sidebar);
}

/* 1. The Container for stats (No background, no border) */
.stats-row-minimal {
    display: flex;
    justify-content: space-between; /* This spreads the 5 items perfectly */
    gap: 20px; /* Reduced gap */
    margin: 30px 0 50px 0;
    padding: 10px 5px;
}

/* 2. The Individual Stat (Just text, no box) */
.stat-item-clean {
    text-align: left;
}

.stat-label-top {
    font-size: 13px;
    text-transform: uppercase;
    color: #94a3b8; /* Soft gray */
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-value-big {
    font-size: 42px; /* Very large and bold */
    font-weight: 900;
    color: #1e293b;
    line-height: 1;
}

/* 3. The Containers below (Optional styling for the chart area) */
.report-card-flat {
    background: white;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    padding: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03);
}

.card-header-clean {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 20px;
    color: #334155;
}

.chart-container-large {
    height: 300px;
}

/* 4. CLEAN TABLE STYLE */
.report-table-clean {
    width: 100%;
    border-collapse: collapse;
}
.report-table-clean th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #f1f5f9;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
}
.report-table-clean td {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f5f9;
}



/* ── Verification Banner ─────────────────────────────── */
@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
