/* ==========================================================================
   EVENTPRO: Responsive & Layout Styling
   Desktop Sidebar + Topbar / Mobile Bottom Navigation & Touch Optimizations
   Print Media Styles (A4, Watermark, Margins, Page-break rules)
   ========================================================================== */

/* Main App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 260px;
    background-color: var(--surface);
    box-shadow: 6px 0 18px rgba(166, 175, 195, 0.25);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--surface-secondary);
}

.sidebar-logo {
    font-size: 28px;
}

.sidebar-brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--surface-secondary);
    color: var(--primary);
    transform: translateX(3px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #FFFFFF !important;
    box-shadow: 4px 4px 12px rgba(108, 99, 255, 0.35);
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.topbar {
    height: 70px;
    background-color: var(--surface);
    box-shadow: 0 4px 14px rgba(166, 175, 195, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background-color: var(--surface-secondary);
    border-radius: 20px;
    box-shadow: var(--clay-shadow-badge);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 24px;
}

/* Mobile Bottom Navigation (Hidden on PC) */
.mobile-bottom-nav {
    display: none;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 991px) {
    .sidebar {
        display: none; /* Hide PC sidebar on mobile */
    }

    .page-content {
        padding: 16px;
        margin-bottom: 72px; /* clearance for bottom nav */
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background-color: var(--surface);
        box-shadow: 0 -4px 18px rgba(166, 175, 195, 0.3);
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
    }

    .mobile-nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 11px;
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 600;
    }

    .mobile-nav-link.active {
        color: var(--primary);
    }

    .mobile-nav-link span.icon {
        font-size: 20px;
        margin-bottom: 2px;
    }
}

/* ==========================================================================
   A4 PRINT STYLESHEET WITH WATERMARK & MARGINS
   ========================================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    body {
        background: #FFFFFF !important;
        color: #000000 !important;
        font-size: 12px;
    }

    .sidebar, .topbar, .mobile-bottom-nav, .fab-btn, .no-print {
        display: none !important;
    }

    .app-container, .main-wrapper, .page-content {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .print-document {
        position: relative;
        background: #FFFFFF;
        width: 100%;
    }

    /* Print Watermark */
    .print-watermark {
        position: fixed;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-35deg);
        font-size: 68px;
        font-weight: 900;
        color: rgba(100, 100, 100, 0.12);
        text-transform: uppercase;
        letter-spacing: 8px;
        pointer-events: none;
        z-index: 0;
        white-space: nowrap;
    }

    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    thead {
        display: table-header-group;
    }

    .avoid-break {
        page-break-inside: avoid;
    }
}
