* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body.login-body {
    background: #f0f0f4; /* Soft gray background from screenshots */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px; /* Consistent spacing between all blocks */
}

/* Footer mimicking the screenshot */
.footer-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #888;
    font-size: 15px;
    line-height: 1.4;
    margin-top: 10px;
    margin-bottom: 30px;
}

.footer-logo {
    width: 45px;
    height: auto;
    margin-bottom: 12px;
}

/* ==========================================
   PAGINATION CONTROLS
   ========================================== */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0 30px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination-nav {
    background: var(--main-gradient);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-purple);
}

.pagination-nav:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 15px var(--shadow-purple);
}

.pagination-dots {
    /* display:contents dissolves this wrapper so the dots become direct
       flex children of .pagination, joining the same wrapping flow as the
       prev/next arrows. On narrow screens the back arrow stays inline with
       the first dot row and the next arrow lands on the last dot row,
       instead of stacking above/below the dots. */
    display: contents;
}

/* Full-width zero-height spacer inserted by layoutPagination() (events-list)
   to force a flex-wrap break at a computed point, so the dots split into
   balanced rows with an arrow attached to the first and last row. */
.pagination-break {
    flex-basis: 100%;
    width: 100%;
    height: 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--main-gradient);
    transform: scale(1.5);
}

.pagination-text {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
}

/* ==========================================
   SCROLL LOCK (For open modals)
   ========================================== */
body.no-scroll {
    overflow: hidden !important;
    touch-action: none; /* Stops mobile rubber-banding */
}

/* ==========================================
   PREMIUM / MAIN GRADIENT BUTTON
   ========================================== */
.premium-btn {
    background: var(--main-gradient);
    color: white;
    border: none;
    border-radius: var(--btn-radius); /* Uses your global 30px radius */
    padding: 12px 28px; /* Nice wide pill shape */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px var(--shadow-purple);
    display: inline-block;
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-purple);
    filter: brightness(1.05); /* Very subtle pop on hover */
}

.premium-btn:active {
    transform: translateY(0);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-bar {
    position: fixed;
    left: 0;
    bottom: 32px;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    /* Above all webapp overlays (panels stack 51000–54000). */
    z-index: 60000;
}

@keyframes toast-smooth-in {
    0% { opacity: 0; transform: translateY(100px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-card {
    min-width: 260px;
    max-width: 90vw;
    background: linear-gradient(135deg, #d946ef, #8b5cf6);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    color: #fff;
    font-size: 16px;
    padding: 16px 24px;
    text-align: center;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    font-weight: 600;
}

/* ERROR STATE (Red Gradient) */
.toast-card.error {
    background: linear-gradient(135deg, #ff5f57, #ff2a2a);
    box-shadow: 0 10px 30px rgba(255, 42, 42, 0.4);
}

/* SUCCESS STATE (Green Gradient) */
.toast-card.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

@media (max-width: 768px) {
    .toast-bar {
        bottom: 85px;
    }
    .toast-card {
        font-size: 15px;
        width: 88%;
        padding: 14px 20px;
    }
}

/* ==========================================
   SHELL LAYOUT (Desktop Sidebar + Header + Mobile Bar)
   Replaces the old iframe-based architecture.
   ========================================== */
body.dashboard-body {
    margin: 0;
    padding: 0;
    background: #f0f0f4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================
   DESKTOP SIDEBAR
   ========================================== */
.desktop-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to right, rgba(139, 92, 246, 0.45) 0%, rgba(139, 92, 246, 0.02) 100%);
    border-right: 1px solid rgba(0,0,0,0.05);
}

.desktop-sidebar .top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.desktop-sidebar .logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.desktop-sidebar .logotext-img { width: 140px; height: auto; }

.desktop-sidebar .sidebar-nav-wrapper { flex: 1; overflow-y: auto; padding: 10px 0; }
.desktop-sidebar .nav-links { display: flex; flex-direction: column; gap: 8px; }

.desktop-sidebar .nav-link {
    width: 85%; margin: 0 auto; padding: 12px 15px; border-radius: 12px;
    color: #555; text-decoration: none; font-weight: 600; font-size: 15px;
    display: flex; align-items: center; gap: 12px; transition: all 0.2s;
}
.desktop-sidebar .nav-link i { width: 20px; text-align: center; color: #b46dfd; }

/* Sub-item under My Events — shows the currently selected event's title.
   Narrower, slightly smaller font, and indented to the right of the parent item. */
.desktop-sidebar .nav-link.nav-link-sub {
    width: 75%;
    margin-left: 17.5%;
    margin-right: 7.5%;
    padding-left: 22px;
    font-size: 14px;
    font-weight: 500;
}
.desktop-sidebar .nav-link:hover,
.desktop-sidebar .nav-link.active {
    background: linear-gradient(135deg, #d946ef, #8b5cf6); color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}
.desktop-sidebar .nav-link:hover i,
.desktop-sidebar .nav-link.active i { color: white; }

/* Logout link — red on hover */
.desktop-sidebar .nav-link.nav-logout:hover {
    background: #ef4444 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}
.desktop-sidebar .nav-link.nav-logout:hover i {
    color: white !important;
}

/* Notification badge (small red circle with count) */
.nav-badge {
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 4px;
    box-shadow: 0 1px 4px rgba(229, 57, 53, 0.4);
}

/* Desktop sidebar: inline after text with left margin padding */
.nav-badge-desktop {
    display: inline-flex;
    margin-left: 6px;
    vertical-align: middle;
}

/* Mobile: positioned at top-right corner */
.mobile-nav-tabs .nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
}

.desktop-sidebar .sidebar-footer {
    padding: 20px; text-align: center; font-size: 13px; color: #888;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.desktop-sidebar .sidebar-footer img { width: 35px; height: auto; margin-bottom: 10px; cursor: pointer; }

/* ==========================================
   TOP HEADER BAR
   ========================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 280px; /* 260px sidebar + 20px gap */
    width: calc(100% - 260px - 40px); /* 20px gap each side */
    height: 78px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.header-nav-btn {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #d946ef, #8b5cf6);
    border: none; border-radius: 22px; color: white; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: transform 0.2s;
}
.header-nav-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(139, 92, 246, 0.3); }

.header-center { text-align: center; flex: 1; }
.header-title { font-weight: 600; font-size: 18px; color: #333; }
.header-subtitle { font-size: 13px; color: #888; display: none; margin-top: 3px; }

/* ==========================================
   MAIN CONTENT CONTAINER
   ========================================== */
.main-container {
    margin-left: 260px;
    padding: 115px 30px 40px;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Footer hidden on desktop for dashboard pages (sidebar has its own) */
.dashboard-body .rights-footer { display: none; }

/* ==========================================
   MOBILE BOTTOM NAV BAR (hidden on desktop)
   ========================================== */
.mobile-nav-tabs {
    display: none; /* Hidden on desktop, shown on mobile via media query */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    padding: 0 15px;
    background: linear-gradient(to top, rgba(139, 92, 246, 0.9) 0%, rgba(139, 92, 246, 0.05) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.tab-item {
    flex: 1;
    max-width: 130px;
    height: 52px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-item i {
    font-size: 18px;
    margin-bottom: 2px;
    color: #b444eb;
}

.tab-item span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
}

.tab-item:hover {
    background: #f8fafc;
    transform: translateY(1px);
}

.tab-item.active {
    background: linear-gradient(135deg, #d946ef, #8b5cf6) !important;
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}
.tab-item.active i { color: #ffffff !important; }

/* Logout tab — red on hover */
.tab-item.tab-logout:hover {
    background: #ef4444 !important;
    color: white !important;
    border: none;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}
.tab-item.tab-logout:hover i { color: white !important; }

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

/* Hybrid zone (769px–1068px): sidebar stays, layout tightens */
@media (min-width: 769px) and (max-width: 1068px) {
    .app-header {
        left: 280px;
        width: calc(100% - 260px - 40px);
    }
    .main-container {
        margin-left: 260px;
        padding-left: 30px;
    }
}

/* Full mobile (≤768px): sidebar hidden, bottom bar shown */
@media (max-width: 768px) {
    /* Guard against any descendant content (e.g. long pagination dot rows)
       widening the document and pushing the fixed header/bottom-nav past
       the viewport edge on narrow mobile widths. */
    body.dashboard-body { overflow-x: hidden; }
    .desktop-sidebar { display: none; }
    .app-header {
        left: 20px;
        width: calc(100% - 40px);
    }
    .main-container {
        margin-left: 0;
        padding: 100px 20px 90px; /* bottom clears the 70px mobile bottom nav */
    }
    /* App-settings has its own visible footer; let container shrink to content so footer sits right after it */
    .app-settings-body .main-container {
        min-height: 0;
        padding-bottom: 10px;
    }
    .mobile-nav-tabs { display: flex; }
    /* Mobile: hide footer on all dashboard pages EXCEPT app-settings */
    .dashboard-body.app-settings-body .rights-footer { display: block; padding: 0 0 90px; }
}

/* ==========================================
   WARNING / NOTIFICATION MODAL OVERLAY
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 20000;
    display: none; /* Hidden by default, shown via JS */
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, rgba(139,92,246,0.80), rgba(217,70,239,0.80));
}

.notification-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 18px 20px 18px;
    width: 96vw;
    max-width: 460px;
    box-shadow: 0 8px 42px rgba(139,92,246,0.17), 0 0 0 2px #ececec;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.25s cubic-bezier(.215,.61,.355,1) forwards;
}

@keyframes modalPop {
    0% { opacity: 0; transform: translateY(32px) scale(0.98); }
    100% { opacity: 1; transform: none; }
}

.notification-close {
    position: absolute;
    top: 14px; right: 16px;
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #b46dfd 70%, #ff49eb 100%);
    border-radius: 50%;
    border: 3px solid #fff;
    color: #fff;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 11px rgba(139,92,246,0.04);
    transition: background 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding-bottom: 3px;
}
.notification-close:hover { background: #d946ef; }

.notification-title {
    font-size: 23px; font-weight: 700; color: #232325;
    margin-bottom: 20px; text-align: center;
}

.notification-content {
    font-size: 17px; color: #232323; line-height: 1.45;
    max-height: 500px; overflow-y: auto; text-align: center;
}

.modal-actions {
    width: 100%; display: flex; justify-content: center;
    gap: 20px; margin-top: 38px;
}

.modal-btn {
    flex: 1 1 0; min-width: 110px; max-width: 200px;
    padding: 14px 0; border: none; border-radius: 13px;
    font-size: 1.09rem; font-weight: 600; cursor: pointer; transition: background .13s;
    background: linear-gradient(90deg, #b46dfd 63%, #8b5cf6 100%);
    color: #fff; box-shadow: 0 3px 14px rgba(154,67,255,0.10);
}
.modal-btn.cancel { background: #ebd8ff; color: #b46dfd; }

@media (max-width: 480px) {
    .notification-modal {
        width: 98vw; padding: 18px 6vw 12px 6vw; max-width: 98vw;
    }
    .notification-title { font-size: 19px; }
    .notification-content { font-size: 16px; }
}

