:root {
    --admin-red: #b31919;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #f8f9fa;
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

a, button {
    touch-action: manipulation;
}

/* Sticky Search & Filter Bar */
.filter-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
    padding-top: 12px;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
}

.search-pill {
    border: none;
    border-radius: 50px;
    background: white;
    padding: 6px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Modern Segmented Status Tabs */
.status-tab-scroll {
    scrollbar-width: none;
}
.status-tab-scroll::-webkit-scrollbar {
    display: none;
}

.status-tab {
    font-size: 0.8rem;
    border-radius: 50px;
    padding: 8px 18px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
    background: white;
    color: #6c757d;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    margin-right: 8px;
}

.status-tab.active {
    background: var(--admin-red);
    color: white;
    box-shadow: 0 4px 12px rgba(179, 25, 25, 0.3);
}

/* Sub-filter Pills */
.sub-filter-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    background: #eef0f2;
    color: #6c757d;
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
}

.sub-filter-pill.active {
    background: #212529;
    color: white;
}

/* Ticket Cards & Badges */
.ticket-card {
    border: none;
    border-radius: 20px;
    transition: transform 0.2s;
    cursor: pointer;
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
}

.badge-priority {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}
.badge-priority.prio-Urgent { background: #dc3545; color: #fff; }
.badge-priority.prio-High { background: #fd7e14; color: #fff; }
.badge-priority.prio-Medium { background: #0dcaf0; color: #000; }
.badge-priority.prio-Low { background: #6c757d; color: #fff; }

.category-tag {
    font-size: 0.7rem;
    background: #f1f3f5;
    color: #495057;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

/* Centered Bottom Navigation Bar */
.admin-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px)) !important;
    padding-top: 0.4rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
    z-index: 1040;
}

.admin-bottom-nav .nav-link {
    color: #6c757d;
    padding: 4px 2px;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: color 0.2s;
}

.admin-bottom-nav .nav-link:hover,
.admin-bottom-nav .nav-link.active-nav {
    color: #b31919 !important;
    font-weight: bold;
}

/* Inline Docked Center Button */
.footer-fab-center {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #b31919 0%, #8a1212 100%);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 12px rgba(179, 25, 25, 0.4);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
    margin-top: -4px;
}

.footer-fab-center:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(179, 25, 25, 0.5);
    color: white;
}

.footer-fab-center:active {
    transform: scale(0.92);
}

/* Mobile "bottom sheet" modal layout */
@media (max-width: 575.98px) {
    #newTicketModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        width: 100%;
        min-height: 100dvh;
        display: flex;
        align-items: flex-end;
    }
    #newTicketModal .modal-content {
        width: 100%;
        border-radius: 25px 25px 0 0 !important;
        max-height: 92dvh;
    }
    #newTicketModal .modal-body {
        overflow-y: auto;
        max-height: 92dvh;
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
    }
    #newTicketModal.fade .modal-dialog {
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }
    #newTicketModal.show .modal-dialog {
        transform: translateY(0);
    }
    #newTicketModal .modal-content::before {
        content: "";
        display: block;
        width: 40px;
        height: 4px;
        background: #dee2e6;
        border-radius: 2px;
        margin: 10px auto 0;
    }
}