/* ═════════════════════════════════════════════════════════════
   TRATOK ECOSYSTEM — Global Design Override
   This file overrides legacy styles across ALL ecosystem pages
   when loaded via header.php. Place in /styles/ecosystem-global.css
   ═════════════════════════════════════════════════════════════ */

/* ── Base Reset & Typography ── */
html { scroll-behavior: smooth; }

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
}

/* ── Ambient Layer ── */
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(59, 181, 168, 0.035) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(232, 99, 74, 0.025) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ══════════════════════════════════════════
   LAYOUT — Main Container & Content
   ══════════════════════════════════════════ */
.main-container {
    display: flex;
    max-width: 1360px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    gap: 1.75rem;
    min-height: calc(100vh - 68px);
}

.content {
    flex: 1;
    min-width: 0;
}

/* ══════════════════════════════════════════
   HERO SECTIONS (Interior Pages)
   ══════════════════════════════════════════ */
.hero-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(212, 168, 83, 0.12);
}

.hero-section h1 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.3rem;
    color: #f0ede8;
}

.hero-section p {
    color: #8a96b0 !important;
    font-size: 0.92rem;
}

/* ══════════════════════════════════════════
   CARDS & CONTAINERS
   ══════════════════════════════════════════ */
.container, .search-box, .balance-summary,
.chat-container, .meet-container, .optin-section {
    background: rgba(26, 37, 64, 0.72) !important;
    border: 1px solid rgba(212, 168, 83, 0.15) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ══════════════════════════════════════════
   SEARCH PAGE — Tabs & Forms
   ══════════════════════════════════════════ */
.tab-nav {
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem;
    background: rgba(19, 27, 46, 0.8);
    border-radius: 14px;
    border: 1px solid rgba(212, 168, 83, 0.12);
    margin-bottom: 1.25rem;
}

.tab-link {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #8a96b0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.tab-link:hover {
    color: #f0ede8;
    background: rgba(42, 58, 92, 0.5);
}

.tab-link.active {
    background: linear-gradient(135deg, #e8634a, #d94a30) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(232, 99, 74, 0.25);
}

.tab-link i {
    font-size: 0.9rem;
}

.search-box {
    padding: 2rem !important;
}

.search-box form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row > div {
    flex: 1;
    min-width: 160px;
}

.search-box label {
    display: block;
    margin-bottom: 0.4rem;
    color: #b8c0d0;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
}

.search-box input[type="text"],
.search-box input[type="number"],
.search-box select,
.search-box .custom-datepicker,
.search-box .custom-select-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 8px !important;
    background: rgba(42, 58, 92, 0.35) !important;
    color: #f0ede8 !important;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box input:focus,
.search-box select:focus {
    outline: none;
    border-color: #d4a853 !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.12) !important;
}

.search-box input::placeholder {
    color: #8a96b0;
    opacity: 0.6;
}

.search-box button[type="submit"],
.search-box button[type="button"] {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e8634a, #d94a30) !important;
    color: #fff !important;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 16px rgba(232, 99, 74, 0.2);
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(232, 99, 74, 0.3) !important;
}

/* Custom Select Override */
.custom-select-toggle {
    cursor: pointer;
}

.custom-select-options {
    background: #131b2e !important;
    border: 1px solid rgba(212, 168, 83, 0.15) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden;
}

.custom-select-option {
    padding: 0.6rem 1rem;
    color: #b8c0d0;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select-option:hover {
    background: rgba(42, 58, 92, 0.5);
    color: #f0ede8;
}

/* Suggestions */
.suggestions-list {
    list-style: none;
    background: #131b2e;
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.suggestions-list li {
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.suggestions-list li:hover {
    background: rgba(42, 58, 92, 0.5);
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestion-content {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.suggestion-icon {
    color: #d4a853;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.suggestion-main {
    color: #f0ede8;
    font-size: 0.9rem;
    font-weight: 500;
}

.suggestion-sub {
    color: #8a96b0;
    font-size: 0.8rem;
}

/* Date Group */
.date-group {
    display: flex;
    gap: 0.75rem;
}

.date-input {
    flex: 1;
}

/* Checkbox Override */
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #b8c0d0;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 0.75rem 0;
}

.checkbox-group input[type="checkbox"] {
    accent-color: #e8634a;
    width: 16px;
    height: 16px;
}

/* ══════════════════════════════════════════
   TRATOKVERSE FEED
   ══════════════════════════════════════════ */
.feed-item {
    background: rgba(26, 37, 64, 0.6);
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feed-item:hover {
    border-color: rgba(212, 168, 83, 0.22);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.feed-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.feed-item-header .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 168, 83, 0.2);
}

.feed-item-header .username {
    font-weight: 600;
    color: #f0ede8;
    font-size: 0.92rem;
}

.feed-item-header .action-text {
    color: #8a96b0;
    font-size: 0.82rem;
    margin-left: 0.4rem;
}

.feed-item-header .timestamp {
    color: #8a96b0;
    font-size: 0.78rem;
    display: block;
}

.feed-item-header a {
    text-decoration: none;
}

.feed-item-content {
    margin-bottom: 0.75rem;
}

.feed-item-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #f0ede8;
}

.feed-item-content p {
    color: #b8c0d0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.feed-item-content img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 0.75rem;
}

.content-link {
    text-decoration: none;
    color: inherit;
}

.feed-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.action-btn, .like-button {
    background: none !important;
    border: 1px solid rgba(212, 168, 83, 0.12) !important;
    border-radius: 8px !important;
    color: #8a96b0 !important;
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.action-btn:hover, .like-button:hover {
    color: #e8634a !important;
    border-color: rgba(232, 99, 74, 0.3) !important;
}

.action-btn.liked, .like-button.liked {
    color: #e8634a !important;
    border-color: rgba(232, 99, 74, 0.3) !important;
    background: rgba(232, 99, 74, 0.08) !important;
}

.rating {
    color: #d4a853;
    font-size: 0.82rem;
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 1.25rem;
}

.filter-bar select {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: 8px;
    background: rgba(42, 58, 92, 0.35);
    color: #f0ede8;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
}

/* Name Card */
.name-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    background: rgba(42, 58, 92, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    margin-top: 0.5rem;
}

.name-card img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-top: 0 !important;
}

.name-card .name {
    font-size: 0.85rem;
    color: #b8c0d0;
}

.name-card-link { text-decoration: none; }

/* No feed */
.no-feed {
    text-align: center;
    color: #8a96b0;
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

/* Show More */
.show-more {
    display: block;
    margin: 1.5rem auto 0;
    padding: 0.7rem 2.5rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e8634a, #d94a30);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(232, 99, 74, 0.2);
}

.show-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 99, 74, 0.3);
}

/* ══════════════════════════════════════════
   WALL PAGE
   ══════════════════════════════════════════ */
.profile-header {
    background: rgba(26, 37, 64, 0.72);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.comment, article.comment {
    background: rgba(26, 37, 64, 0.5);
    border: 1px solid rgba(212, 168, 83, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.comment:hover {
    border-color: rgba(212, 168, 83, 0.18);
}

.comment-header {
    display: flex;
    gap: 0.75rem;
}

.comment-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 168, 83, 0.18);
    cursor: pointer;
}

.comment-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: #f0ede8;
}

.comment-message {
    color: #b8c0d0;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.comment-actions button {
    background: none;
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: 6px;
    color: #8a96b0;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.comment-actions button:hover {
    color: #f0ede8;
    border-color: rgba(212, 168, 83, 0.25);
    background: rgba(42, 58, 92, 0.3);
}

.comment-actions .delete-button:hover {
    color: #e8634a;
    border-color: rgba(232, 99, 74, 0.3);
}

/* Wall Sidebar */
aside .sidebar-section {
    background: rgba(26, 37, 64, 0.6);
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

aside h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #f0ede8;
}

.gallery-container img {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.gallery-container img:hover {
    transform: scale(1.03);
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.friend-item:hover {
    background: rgba(42, 58, 92, 0.4);
}

.friend-item img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-item span {
    font-size: 0.85rem;
    color: #b8c0d0;
}

.view-all-friends {
    background: none;
    border: none;
    color: #d4a853;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    padding: 0;
    margin-bottom: 0.5rem;
}

.view-all-friends:hover {
    color: #e8c36a;
}

/* ══════════════════════════════════════════
   FRIENDS PAGE
   ══════════════════════════════════════════ */
.secondary-header {
    background: rgba(19, 27, 46, 0.9) !important;
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
    backdrop-filter: blur(12px);
}

.secondary-header .header-container {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0.75rem 2rem;
    gap: 1.5rem;
}

.secondary-header .logo a {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #f0ede8;
    text-decoration: none;
}

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid rgba(212, 168, 83, 0.12);
    border-radius: 8px;
    background: rgba(42, 58, 92, 0.3);
    color: #f0ede8;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
}

.header-search input:focus {
    outline: none;
    border-color: #d4a853;
}

.header-search button {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8a96b0;
    cursor: pointer;
}

.friend-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(212, 168, 83, 0.06);
    transition: all 0.2s ease;
}

.friend-entry:hover {
    background: rgba(42, 58, 92, 0.25);
}

.friend-entry:last-child {
    border-bottom: none;
}

.friend-entry img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 168, 83, 0.18);
}

.friend-details h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0ede8;
}

.friend-buttons {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.friend-buttons button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(212, 168, 83, 0.12);
    background: rgba(42, 58, 92, 0.3);
    color: #b8c0d0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-buttons .view-button:hover { color: #3bb5a8; border-color: rgba(59, 181, 168, 0.3); }
.friend-buttons .chat-button:hover { color: #d4a853; border-color: rgba(212, 168, 83, 0.3); }
.friend-buttons .accept-button:hover { color: #3bb5a8; border-color: rgba(59, 181, 168, 0.3); background: rgba(59, 181, 168, 0.08); }
.friend-buttons .reject-button:hover, .friend-buttons .pending-button:hover { color: #e8634a; border-color: rgba(232, 99, 74, 0.3); }

.no-friends {
    text-align: center;
    color: #8a96b0;
    padding: 3rem;
}

/* ══════════════════════════════════════════
   CHATS PAGE
   ══════════════════════════════════════════ */
.chat-container {
    display: flex;
    border-radius: 14px;
    overflow: hidden;
    min-height: 500px;
}

.chat-sidebar {
    width: 320px;
    border-right: 1px solid rgba(212, 168, 83, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(212, 168, 83, 0.08);
}

.sidebar-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
}

.new-chat-button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(212, 168, 83, 0.15);
    background: rgba(42, 58, 92, 0.3);
    color: #d4a853;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-chat-button:hover {
    background: rgba(212, 168, 83, 0.1);
    border-color: #d4a853;
}

.chat-search {
    padding: 0.75rem 1rem;
}

.chat-search input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    background: rgba(42, 58, 92, 0.3);
    color: #f0ede8;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
}

.chat-search input:focus {
    outline: none;
    border-color: #d4a853;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.chat-item:hover {
    background: rgba(42, 58, 92, 0.35);
}

.chat-item .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 168, 83, 0.15);
}

.chat-details { flex: 1; min-width: 0; }

.chat-details .name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #f0ede8;
}

.chat-details .last-message {
    font-size: 0.82rem;
    color: #8a96b0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-details .time {
    font-size: 0.75rem;
    color: #8a96b0;
}

.unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e8634a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.35rem;
}

.no-chats {
    text-align: center;
    color: #8a96b0;
    padding: 3rem 1rem;
}

/* ══════════════════════════════════════════
   MEET TRATOKIANS
   ══════════════════════════════════════════ */
.meet-container {
    padding: 2rem;
}

.optin-section {
    text-align: center;
    padding: 3rem 2rem !important;
}

.optin-section p {
    color: #b8c0d0;
    margin-bottom: 1rem;
}

.optin-section .disclaimer {
    font-size: 0.8rem;
    color: #8a96b0;
    margin-top: 1rem;
}

.btn-optin {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e8634a, #d94a30) !important;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(232, 99, 74, 0.25);
}

.btn-optin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 99, 74, 0.35);
}

.user-card-wrapper {
    display: flex;
    justify-content: center;
}

.user-card {
    background: rgba(26, 37, 64, 0.6);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.no-users {
    text-align: center;
    color: #8a96b0;
    padding: 2rem;
}

/* ══════════════════════════════════════════
   FINANCES / WALLET
   ══════════════════════════════════════════ */
.balance-summary {
    padding: 1.5rem !important;
    margin-bottom: 1.5rem;
}

.balance-summary h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

.balance-summary table {
    width: 100%;
    border-collapse: collapse;
}

.balance-summary th,
.balance-summary td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(212, 168, 83, 0.08);
    font-size: 0.9rem;
}

.balance-summary th {
    color: #8a96b0;
    font-weight: 500;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.balance-summary td {
    color: #f0ede8;
    font-weight: 600;
}

.form-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.4rem !important;
    margin-bottom: 1.5rem;
}

/* ══════════════════════════════════════════
   ACCOUNT PAGE
   ══════════════════════════════════════════ */
.account-section, .settings-section {
    background: rgba(26, 37, 64, 0.6);
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

/* ══════════════════════════════════════════
   MODALS (Global)
   ══════════════════════════════════════════ */
.modal,
#commentFormOverlay,
#editFormOverlay,
#friendsModalOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(12, 18, 32, 0.85) !important;
    backdrop-filter: blur(12px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.comment-form-container,
.edit-form-container,
.friends-modal-container {
    background: #131b2e !important;
    border: 1px solid rgba(212, 168, 83, 0.15) !important;
    border-radius: 16px !important;
    padding: 2rem !important;
    max-width: 500px;
    width: 95%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    max-height: 85vh;
    overflow-y: auto;
}

.comment-form-container h3,
.edit-form-container h3,
.friends-modal-container h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

/* ══════════════════════════════════════════
   BUTTONS — Global Legacy Overrides
   ══════════════════════════════════════════ */
.button-style {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.35rem !important;
    text-decoration: none;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    font-family: 'DM Sans', sans-serif !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    color: #fff !important;
    background: linear-gradient(135deg, #e8634a, #d94a30) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 3px 12px rgba(232, 99, 74, 0.2) !important;
    justify-content: center;
    min-width: 110px !important;
    height: 42px !important;
    line-height: 1;
}

.button-style:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 20px rgba(232, 99, 74, 0.3) !important;
}

.button-style.cancel-button {
    background: #2a3a5c !important;
    box-shadow: none !important;
}

.button-style.cancel-button:hover {
    background: #1a2540 !important;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.pagination-button {
    padding: 0.5rem 1.15rem;
    border: 1px solid rgba(212, 168, 83, 0.12) !important;
    border-radius: 8px !important;
    background: rgba(42, 58, 92, 0.3) !important;
    color: #b8c0d0 !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    border-color: #d4a853 !important;
    color: #d4a853 !important;
    background: rgba(212, 168, 83, 0.06) !important;
}

/* Scroll-to-top */
.scroll-to-top, .back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(26, 37, 64, 0.8) !important;
    border: 1px solid rgba(212, 168, 83, 0.15) !important;
    color: #d4a853 !important;
    border-radius: 50% !important;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    z-index: 50;
    transition: all 0.3s ease;
}

.scroll-to-top:hover, .back-to-top:hover {
    background: #1a2540 !important;
    border-color: #d4a853 !important;
    transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   SWEETALERT2 OVERRIDES
   ══════════════════════════════════════════ */
.swal2-popup {
    background: #131b2e !important;
    border: 1px solid rgba(212, 168, 83, 0.15) !important;
    border-radius: 16px !important;
    color: #f0ede8 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #e8634a, #d94a30) !important;
    border-radius: 8px !important;
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 600 !important;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        padding: 1rem;
    }
    .chat-sidebar { width: 100%; }
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem !important;
    }
    .hero-section h1 { font-size: 1.4rem !important; }
    .form-row { flex-direction: column; }
    .friend-entry { padding: 0.75rem; }
}
