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

/* ==========================================================================
   1. CSS VARIABLES — Design Tokens (Single Source of Truth)
   ========================================================================== */

:root {
    /* Dark mode is default */
    --bs-body-bg: #121212;
    --bs-body-color: #e0e0e0;
    --bs-primary: #3a86ff;
    --bs-primary-rgb: 58, 134, 255;
    --bs-secondary: #6c757d;
    --bs-success: #2ecc71;
    --bs-info: #3498db;
    --bs-warning: #f39c12;
    --bs-danger: #e74c3c;
    --bs-light: #343a40;
    --bs-dark: #f8f9fa;
    --bs-card-bg: #1e1e1e;
    --bs-card-border-color: #2d2d2d;
    --bs-border-color: #2d2d2d;
    --bs-nav-link-font-weight: 500;
    --bs-border-radius: 0.5rem;
    --bs-border-radius-sm: 0.25rem;
    --bs-border-radius-lg: 0.75rem;
    --bs-border-radius-xl: 1rem;
    --bs-text-muted: #adb5bd;
    --text-muted: #adb5bd;
    --bs-list-group-bg: #1e1e1e;
    --bs-list-group-border-color: #2d2d2d;
    --bs-modal-bg: #1e1e1e;
    --bs-modal-border-color: #2d2d2d;
}

[data-theme="light"] {
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
    --bs-primary: #0d6efd;
    --bs-primary-rgb: 13, 110, 253;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-card-bg: #ffffff;
    --bs-card-border-color: #dee2e6;
    --bs-border-color: #dee2e6;
    --bs-text-muted: #6c757d;
    --text-muted: #6c757d;
    --bs-list-group-bg: #ffffff;
    --bs-list-group-border-color: #dee2e6;
    --bs-modal-bg: #ffffff;
    --bs-modal-border-color: #dee2e6;
}

/* ==========================================================================
   2. TAILWIND CUSTOM STYLES & ANIMATIONS
   ========================================================================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #3a3b3c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e4f50;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #ced0d4;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #bcc0c4;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Animations */
.modal-enter {
    animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.view-enter {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   5. PAGE HEADER
   ========================================================================== */

.page-header {
    position: relative;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.page-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #2196f3;
    border-radius: 3px;
}

.page-header h1 {
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 0;
    color: var(--bs-body-color);
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(45deg, #3a86ff, #4361ee);
    border: none;
    box-shadow: 0 2px 10px rgba(58, 134, 255, 0.3);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #4361ee, #3a0ca3);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.4);
}

.btn-secondary {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
}

.btn-secondary:hover {
    background-color: #3d3d3d;
    border-color: #4d4d4d;
}

.btn-outline-primary {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: transparent;
    box-shadow: 0 2px 5px rgba(58, 134, 255, 0.15);
}

.btn-outline-primary:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(58, 134, 255, 0.2);
}

/* Small outline button */
.btn-outline-primary-sm {
    border-color: #d0e8ff;
    color: #2196f3;
    background: transparent;
    padding: 3px 8px;
    font-size: 11px;
}

.btn-outline-primary-sm:hover {
    background-color: #2196f3;
    border-color: #2196f3;
}

[data-theme="light"] .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

[data-theme="light"] .btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

/* ==========================================================================
   7. ALERTS
   ========================================================================== */

.alert {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInDown 0.3s ease forwards;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    border-left-color: #28a745;
    color: #2ecc71;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.2);
    border-left-color: #dc3545;
    color: #e74c3c;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.2);
    border-left-color: #ffc107;
    color: #f39c12;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.2);
    border-left-color: #17a2b8;
    color: #3498db;
}

.alert-debug {
    color: black;
    background-color: white;
    border-color: #d6e9c6;
}

.alert-error {
    color: #b94a48;
    background-color: #f2dede;
    border-color: #eed3d7;
}

[data-theme="light"] .alert-info {
    background-color: #cfe2ff;
    border-color: #b6d4fe;
    color: #084298;
}

[data-theme="light"] .alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

[data-theme="light"] .alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

[data-theme="light"] .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.close {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.close:hover {
    opacity: 1;
}

/* Close button (for alerts and modals) */
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="light"] .btn-close {
    filter: none;
}

/* ==========================================================================
   8. CARDS
   ========================================================================== */

.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background-color: var(--bs-card-bg);
    border-color: var(--bs-card-border-color);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.25rem;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--bs-border-color);
}

[data-theme="light"] .card-header {
    background-color: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .card-footer {
    background-color: rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   9. FORMS
   ========================================================================== */

.form-control {
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-card-bg);
    color: var(--bs-body-color);
    transition: all 0.2s;
}

.form-control:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.4);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
    background-color: var(--bs-card-bg);
    color: var(--bs-body-color);
}

.form-control::placeholder {
    color: var(--bs-text-muted);
    opacity: 0.7;
}

.input-group-text {
    background-color: var(--bs-card-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.markdownx .markdownx-editor {
    border-style: none solid solid solid;
    width: 100%;
    margin-bottom: 25px;
}

/* Form switch styling */
.form-check-input {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.custom-control-input:checked~.custom-control-label::before {
    background-color: #2196f3;
    border-color: #2196f3;
}

[data-theme="light"] .form-control {
    background-color: #fff;
    border-color: #ced4da;
    color: #212529;
}

[data-theme="light"] .form-control:focus {
    background-color: #fff;
}

[data-theme="light"] .form-check-input {
    background-color: #dee2e6;
    border-color: #ced4da;
}

/* ==========================================================================
   10. MODALS
   ========================================================================== */

.modal-content {
    background-color: var(--bs-modal-bg);
    border-color: var(--bs-modal-border-color);
}

.modal-header {
    border-bottom-color: var(--bs-modal-border-color);
}

.modal-footer {
    border-top-color: var(--bs-modal-border-color);
}

/* ==========================================================================
   11. LIST GROUPS
   ========================================================================== */

.list-group-item {
    background-color: var(--bs-list-group-bg);
    border-color: var(--bs-list-group-border-color);
    color: var(--bs-body-color);
}

/* ==========================================================================
   12. TABLES
   ========================================================================== */

.table {
    color: var(--bs-body-color);
}

.table-bordered,
.table-bordered th,
.table-bordered td {
    border-color: var(--bs-border-color);
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--bs-body-color);
}

[data-theme="light"] .table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--bs-body-color);
}

/* ==========================================================================
   13. BADGES
   ========================================================================== */

.badge.bg-light {
    background-color: #fff !important;
    color: var(--bs-body-color);
}

[data-theme="light"] .badge.bg-light {
    background-color: #f8f9fa !important;
    color: #212529;
}

.badge.bg-primary {
    background-color: var(--bs-primary) !important;
}

/* ==========================================================================
   14. BORDERS
   ========================================================================== */

.border,
.border-top,
.border-end,
.border-bottom,
.border-start {
    border-color: var(--bs-border-color) !important;
}

/* ==========================================================================
   15. POPOVERS
   ========================================================================== */

.popover {
    max-width: 350px;
    width: 350px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: none;
    background-color: var(--bs-card-bg);
    border-color: var(--bs-border-color);
}

.popover-header {
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom-color: var(--bs-border-color);
}

.popover-body {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    color: var(--bs-body-color);
}

.popover ul {
    padding: 0;
    margin: 0;
}

.popover ul li {
    list-style: none;
    border-bottom: 1px solid var(--bs-border-color);
    padding: .4em 0;
}

.popover ul li:last-child {
    border-bottom: none;
}

.popover ul li .user-picture {
    width: 45px;
    float: left;
}

.popover ul li p {
    font-size: .9em;
    padding: 0 0 0 .6em;
    margin-left: 45px;
    margin-bottom: 0;
}

/* Popover arrows */
.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,
.bs-popover-top>.popover-arrow::after {
    border-top-color: var(--bs-card-bg);
}

.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,
.bs-popover-bottom>.popover-arrow::after {
    border-bottom-color: var(--bs-card-bg);
}

.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,
.bs-popover-start>.popover-arrow::after {
    border-left-color: var(--bs-card-bg);
}

.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,
.bs-popover-end>.popover-arrow::after {
    border-right-color: var(--bs-card-bg);
}

/* ==========================================================================
   16. NOTIFICATION BADGES (Navbar)
   ========================================================================== */

.notification-badge .badge:empty,
.nav-icon-badge:empty {
    display: none;
}

/* ─── Navbar icon buttons (bell, messages) ── */
.nav-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #e4e6eb;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

[data-theme="light"] .nav-icon-btn {
    background: #e4e6e9;
    color: #1c1e21;
}

[data-theme="light"] .nav-icon-btn:hover {
    background: #d0d2d6;
    color: #1877F2;
}

.nav-icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 0.6rem;
    font-weight: 700;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    min-width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #242526;
    line-height: 1;
}

[data-theme="light"] .nav-icon-badge {
    border-color: #ffffff;
}

/* ─── Navbar avatar ──────────────────────── */
.nav-profile-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 2px;
    border-radius: 50%;
    transition: opacity 0.15s;
}

.nav-profile-btn:hover {
    opacity: 0.85;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .nav-avatar {
    border-color: rgba(0, 0, 0, 0.1);
}

/* ─── Navbar search ──────────────────────── */
.nav-search {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #e4e6eb !important;
    border-radius: 1.5rem !important;
    padding: 0.4rem 1rem !important;
    font-size: 0.85rem !important;
    width: 200px;
    transition: width 0.25s, background 0.2s;
}

.nav-search::placeholder {
    color: #b0b3b8 !important;
}

.nav-search:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    width: 260px;
    box-shadow: none !important;
}

[data-theme="light"] .nav-search {
    background: #f0f2f5 !important;
    color: #1c1e21 !important;
}

[data-theme="light"] .nav-search::placeholder {
    color: #8a8d91 !important;
}

[data-theme="light"] .nav-search:focus {
    background: #e4e6e9 !important;
}

/* ─── Profile dropdown ───────────────────── */
.nav-dropdown {
    width: 280px !important;
    max-width: 280px !important;
    padding: 0.5rem !important;
}

.dropdown-header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
}

.dropdown-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-user-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--bs-body-color);
    line-height: 1.3;
}

.dropdown-user-handle {
    font-size: 0.78rem;
    color: var(--bs-text-muted, #B0B3B8);
}

.bell-notifications,
.inbox-notifications {
    font-size: 1.2em !important;
    padding: 0.5rem !important;
    border-radius: 50% !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    width: 36px !important;
    height: 36px !important;
    color: white !important;
    text-decoration: none !important;
    margin-right: 0 !important;
}

.bell-notifications:hover,
.inbox-notifications:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    text-decoration: none !important;
}

.bell-notifications .badge,
.inbox-notifications .badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    border-radius: 50% !important;
    font-size: 0.6rem !important;
    padding: 0.25rem 0.4rem !important;
    background-color: #FF5252 !important;
    border: 2px solid #2e3f54 !important;
    transition: all 0.2s !important;
}

/* ==========================================================================
   17. NOTIFICATIONS (Popover detail items)
   ========================================================================== */

ul.notif {
    padding: 0;
    margin: 0;
    list-style: none;
}

.notification-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 10px 15px;
    border-bottom: 1px solid var(--bs-border-color);
    transition: background-color 0.2s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.notification-item.unread {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.notification-avatar {
    margin-right: 10px;
    flex-shrink: 0;
}

.notification-avatar .user-picture {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-content {
    flex-grow: 1;
    margin-right: 25px;
}

.notification-text {
    margin: 0 0 5px;
    font-size: 0.9em;
}

.notification-time {
    margin: 0;
    color: var(--bs-text-muted);
    font-size: 0.8em;
}

.pop-notification {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
}

.notifications-footer {
    text-align: center;
    padding: 8px;
    border-top: 1px solid var(--bs-border-color);
}

.see-all-link {
    color: #3484e0;
    font-weight: 500;
    font-size: 0.9em;
}

.empty-notification {
    padding: 20px;
    text-align: center;
    color: var(--bs-text-muted);
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* ==========================================================================
   18. SEARCH INPUT
   ========================================================================== */

input[name="query"]#searchInput {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s !important;
    margin: 0px 15px;
    outline: none;
    text-indent: 10px;
    box-shadow: none;
    font-size: 14px;
    line-height: 21px;
    width: auto;
}

input[name="query"]#searchInput:hover,
input[name="query"]#searchInput:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

input[name="query"]#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ==========================================================================
   19. AVATARS & USER IMAGES
   ========================================================================== */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Avatar size utilities */
.avatar-xs {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-38 {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-50 {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* Generic object-fit cover utility */
.obj-cover {
    object-fit: cover;
}

.user-image {
    margin-right: 15px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-info {
    font-size: 0.9em;
}

/* ==========================================================================
   20. SHARED LAYOUT UTILITIES
   ========================================================================== */

.no-data {
    text-align: center;
    padding: 1em 0;
}

/* Section header — shared across articles, groups, etc. */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-actions {
    display: flex;
    gap: 0.75rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Sidebar card — shared across articles, groups */
.sidebar-card {
    border-radius: 1rem;
    overflow: hidden;
    background-color: var(--bs-card-bg);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.sidebar-card .card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1.25rem;
    font-weight: 600;
}

.sidebar-card .card-body {
    padding: 1.25rem;
}

.sidebar-card .card-footer {
    background-color: transparent;
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem 1.25rem;
    text-align: center;
}

/* Empty state — shared */
.empty-state {
    text-align: center;
    padding: 3rem;
    background-color: var(--bs-card-bg);
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.empty-state-icon {
    margin-bottom: 1.5rem;
    font-size: 3rem;
    color: var(--bs-text-muted);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--bs-text-muted);
    margin-bottom: 1.5rem;
}

/* Pagination styling — shared */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.pagination .page-item .page-link {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
    color: var(--bs-primary);
    background-color: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.pagination .page-item .page-link:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-color: var(--bs-primary);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Thumbnail placeholder (no image available) */
.thumbnail-placeholder {
    height: 200px;
}

.thumbnail-sm {
    width: 64px;
    height: 64px;
}

/* Font size utilities */
.fs-7 {
    font-size: 0.85rem !important;
}

.fs-8 {
    font-size: 0.75rem !important;
}

/* Error page margin */
.error-text {
    margin-top: 1.2em;
}

/* ==========================================================================
   21. ANIMATIONS
   ========================================================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   22. FOOTER
   ========================================================================== */

.footer-container {
    background-color: #f8f9fa;
    border-top: 1px solid #eaeaea;
}

.footer-heading {
    position: relative;
    font-size: 0.9rem;
    color: #555;
}

.footer-heading:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background-color: #2196f3;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #2196f3;
    text-decoration: none;
}

.social-icons {
    display: flex;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #eee;
    color: #555;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: #2196f3;
    color: white;
    transform: translateY(-3px);
}

/* ==========================================================================
   23. NEWS SIDEBAR WIDGETS
   ========================================================================== */

/* Friends Activity Widget */
.friends-activity-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 20px;
}

.friends-activity-card .card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px;
}

.activity-section {
    padding: 15px;
    border-bottom: 1px solid var(--bs-border-color);
}

.activity-section:last-child {
    border-bottom: none;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bs-border-color);
}

.activity-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.activity-avatar img,
.suggestion-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.activity-content {
    margin-left: 12px;
    flex-grow: 1;
}

.activity-content p {
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.4;
}

.user-link {
    font-weight: 600;
    color: var(--bs-body-color);
}

.activity-time {
    font-size: 11px;
    color: var(--bs-text-muted);
}

/* Calendar Styles */
.calendar-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-item:last-child {
    margin-bottom: 0;
}

.calendar-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
}

.calendar-date {
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

.calendar-content {
    margin-left: 12px;
}

.event-title {
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 600;
}

.event-time {
    font-size: 11px;
    color: var(--bs-text-muted);
}

/* Suggested Friends */
.suggested-friend {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bs-border-color);
}

.suggested-friend:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.suggestion-content {
    margin-left: 12px;
    flex-grow: 1;
}

.suggestion-name {
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 600;
}

.mutual-friends {
    font-size: 11px;
    color: var(--bs-text-muted);
}

/* Trending Topics */
.trending-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.trending-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 20px;
    color: var(--bs-primary);
    font-size: 12px;
    transition: all 0.2s;
}

.trending-tag:hover {
    background-color: var(--bs-primary);
    color: #fff;
    text-decoration: none;
}

/* Quick Actions */
.friends-activity-card .card-footer {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 12px 15px;
    border-top: 1px solid var(--bs-border-color);
}

.quick-actions {
    display: flex;
    justify-content: space-between;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--bs-text-muted);
    transition: all 0.2s;
    font-size: 12px;
}

.quick-action-btn i {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--bs-primary);
}

.quick-action-btn:hover {
    color: var(--bs-primary);
    text-decoration: none;
}

/* Popular Groups Card */
.popular-groups-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: none;
}

.popular-groups-card .card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px;
}

.group-list {
    padding: 8px 0;
}

.group-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    transition: background-color 0.2s;
    color: inherit;
    text-decoration: none;
}

.group-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    text-decoration: none;
    color: inherit;
}

.group-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.group-icon i {
    font-size: 18px;
}

.group-info {
    flex-grow: 1;
}

.group-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.group-members {
    font-size: 12px;
    color: var(--bs-text-muted);
}

/* Dark Mode Styles for Widgets */
[data-theme="dark"] .friends-activity-card,
[data-theme="dark"] .popular-groups-card {
    background-color: #222632;
}

[data-theme="dark"] .friends-activity-card .card-header,
[data-theme="dark"] .popular-groups-card .card-header {
    background-color: #2c3141;
    border-bottom-color: #353c4e;
}

[data-theme="dark"] .activity-section {
    border-bottom-color: #353c4e;
}

[data-theme="dark"] .friends-activity-card .card-footer {
    background-color: #2c3141;
    border-top-color: #353c4e;
}

[data-theme="dark"] .activity-item,
[data-theme="dark"] .suggested-friend {
    border-bottom-color: #353c4e;
}

[data-theme="dark"] .calendar-icon {
    background-color: #353c4e;
}

[data-theme="dark"] .trending-tag {
    background-color: #353c4e;
}

[data-theme="dark"] .quick-action-btn {
    color: #aaa;
}

[data-theme="dark"] .group-item:hover {
    background-color: #2a2f3a;
}

/* ==========================================================================
   24. NEWS CARDS (Dark mode overrides)
   ========================================================================== */

.news-body {
    background-color: var(--bs-card-bg);
    border-color: var(--bs-border-color);
}

.news-body .card-header {
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom-color: var(--bs-border-color);
}

[data-theme="light"] .news-body .card-header {
    background-color: rgba(0, 0, 0, 0.03);
}

.interaction a {
    color: var(--bs-text-muted);
}

.interaction a:hover {
    color: var(--bs-primary);
}

.meta.card {
    background-color: rgba(0, 0, 0, 0.15);
    color: var(--bs-body-color);
}

[data-theme="light"] .meta.card {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--bs-body-color);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.app-toast {
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 300px;
    max-width: 380px;
    background: var(--bs-card-bg, #242526);
    border: 1px solid var(--bs-border-color, #3A3B3C);
    border-left: 4px solid #1877F2;
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    /* Start off-screen to the right, invisible */
    opacity: 0;
    transform: translateX(calc(100% + 2rem));
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* Slide in when .toast-visible is added */
.app-toast.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide out when .toast-hiding is added */
.app-toast.toast-hiding {
    opacity: 0;
    transform: translateX(calc(100% + 2rem));
    transition: opacity 0.25s ease, transform 0.3s ease;
}

/* ─── Message type colors ─────────────────── */
.toast-success {
    border-left-color: #42B72A;
}

.toast-error,
.toast-danger {
    border-left-color: #F02849;
}

.toast-warning {
    border-left-color: #F7B928;
}

.toast-info {
    border-left-color: #1877F2;
}

/* ─── Icon ───────────────────────────────── */
.toast-icon-wrap {
    flex-shrink: 0;
    font-size: 1.3rem;
    line-height: 1;
}

.toast-success .toast-icon-wrap {
    color: #42B72A;
}

.toast-danger .toast-icon-wrap,
.toast-error .toast-icon-wrap {
    color: #F02849;
}

.toast-warning .toast-icon-wrap {
    color: #F7B928;
}

.toast-info .toast-icon-wrap {
    color: #1877F2;
}

/* ─── Body text ──────────────────────────── */
.toast-body-wrap {
    flex: 1;
    min-width: 0;
}

.toast-msg {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--bs-body-color, #E4E6EB);
    line-height: 1.4;
}

/* ─── Close button ───────────────────────── */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--bs-text-muted, #B0B3B8);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.toast-close:hover {
    color: var(--bs-body-color, #E4E6EB);
}

/* ─── Progress bar ───────────────────────── */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    border-radius: 0 0 0.75rem 0.75rem;
    background: currentColor;
    opacity: 0.35;
}

.toast-success .toast-progress {
    background: #42B72A;
}

.toast-danger .toast-progress,
.toast-error .toast-progress {
    background: #F02849;
}

.toast-warning .toast-progress {
    background: #F7B928;
}

.toast-info .toast-progress {
    background: #1877F2;
}

/* ─── Light mode overrides ───────────────── */
[data-theme="light"] .app-toast {
    background: #ffffff;
    border-color: #dde1e7;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .toast-msg {
    color: #1c1e21;
}

[data-theme="light"] .toast-close {
    color: #8a8d91;
}

[data-theme="light"] .toast-close:hover {
    color: #1c1e21;
}