/**
 * ParkirPro - Smart Parking Management System
 * Custom Stylesheet matching Modern Dark/Navy UI Design
 */

:root {
    --pp-sidebar-bg: #0b1329;
    --pp-sidebar-hover: #16203d;
    --pp-sidebar-active: #2563eb;
    --pp-sidebar-text: #94a3b8;
    --pp-sidebar-heading: #64748b;
    --pp-primary: #2563eb;
    --pp-primary-hover: #1d4ed8;
    --pp-bg-light: #f8fafc;
    --pp-card-bg-light: #ffffff;
    --pp-border-light: #e2e8f0;
    --pp-text-light: #0f172a;
    --pp-text-muted-light: #64748b;

    /* Dark Mode variables */
    --pp-bg-dark: #070b14;
    --pp-card-bg-dark: #0f172a;
    --pp-border-dark: #1e293b;
    --pp-text-dark: #f8fafc;
    --pp-text-muted-dark: #94a3b8;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--pp-bg-light);
    color: var(--pp-text-light);
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: var(--pp-bg-dark);
    color: var(--pp-text-dark);
}

/* Wrapper Layout - Independent 2-Pane Architecture */
.app-wrapper {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Sidebar Styling - Dedicated Independent Pane */
.app-sidebar {
    width: 270px;
    height: 100vh;
    max-height: 100vh;
    position: relative;
    background-color: var(--pp-sidebar-bg);
    color: var(--pp-sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, width 0.3s ease;
    z-index: 1040;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.app-sidebar.collapsed {
    margin-left: -270px;
}

.sidebar-brand {
    padding: 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon-box {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.brand-title-group h5 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.brand-title-group small {
    font-size: 0.72rem;
    color: #94a3b8;
    display: block;
    font-weight: 500;
}

.sidebar-nav-container {
    padding: 1rem 0.85rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    overscroll-behavior: contain;
}

.sidebar-nav-container::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav-container::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar-nav-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pp-sidebar-heading);
    margin: 1.1rem 0 0.5rem 0.65rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.2rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    color: var(--pp-sidebar-text);
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link i.nav-icon {
    font-size: 1.05rem;
    width: 24px;
    margin-right: 0.65rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.sidebar-nav .nav-link .nav-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    color: #ffffff;
    background-color: var(--pp-sidebar-hover);
}

.sidebar-nav .nav-link:hover i.nav-icon {
    transform: scale(1.1);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.sidebar-nav .nav-link.active .nav-arrow {
    opacity: 1;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

/* Main Area - Dedicated Independent Content Pane */
.app-main {
    flex: 1 1 auto;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.app-main::-webkit-scrollbar {
    width: 8px;
}

.app-main::-webkit-scrollbar-track {
    background: transparent;
}

.app-main::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 4px;
}

.app-main::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

body.dark-mode .app-main {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

body.dark-mode .app-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .app-main::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Topbar Header */
.app-topbar {
    height: 68px;
    background-color: var(--pp-card-bg-light);
    border-bottom: 1px solid var(--pp-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 1020;
}

body.dark-mode .app-topbar {
    background-color: var(--pp-card-bg-dark);
    border-bottom-color: var(--pp-border-dark);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.btn-sidebar-toggle {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--pp-primary);
}

body.dark-mode .btn-sidebar-toggle {
    color: #94a3b8;
}

body.dark-mode .btn-sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Search Bar */
.search-box-group {
    position: relative;
    width: 320px;
}

.search-box-group .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
}

.search-box-group .form-control-search {
    border-radius: 20px;
    padding: 0.48rem 1rem 0.48rem 2.4rem;
    font-size: 0.85rem;
    background-color: #f1f5f9;
    border: 1px solid transparent;
    width: 100%;
    transition: all 0.2s ease;
}

.search-box-group .form-control-search:focus {
    background-color: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

body.dark-mode .search-box-group .form-control-search {
    background-color: #070b14;
    color: #f8fafc;
    border-color: #1e293b;
}

body.dark-mode .search-box-group .form-control-search:focus {
    background-color: #0f172a;
    border-color: #3b82f6;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.topbar-icon-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.15rem;
    cursor: pointer;
    position: relative;
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.2s;
}

.topbar-icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--pp-primary);
}

body.dark-mode .topbar-icon-btn {
    color: #94a3b8;
}

body.dark-mode .topbar-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.topbar-icon-btn .badge-pill-count {
    position: absolute;
    top: 3px;
    right: 3px;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

body.dark-mode .topbar-icon-btn .badge-pill-count {
    border-color: var(--pp-card-bg-dark);
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-decoration: none;
}

/* Topbar User Profile */
.topbar-user-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .topbar-user-avatar {
    border-color: rgba(59, 130, 246, 0.4);
}

.topbar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.topbar-user-avatar .avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-radius: 50%;
    user-select: none;
    line-height: 1;
}

.user-info-text {
    line-height: 1.2;
}

.user-info-text .user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--pp-text-light);
}

body.dark-mode .user-info-text .user-name {
    color: var(--pp-text-dark);
}

.user-info-text .user-role {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

body.dark-mode .user-info-text .user-role {
    color: #94a3b8;
}

/* Content Body */
.app-content {
    padding: 1.75rem;
    flex-grow: 1;
}

.page-header-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.page-header-box h2 {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.page-header-box p {
    margin: 0.2rem 0 0 0;
    font-size: 0.88rem;
    color: #64748b;
}

body.dark-mode .page-header-box p {
    color: #94a3b8;
}

/* Stat Cards */
.stat-card-wrapper {
    border-radius: 12px;
    padding: 1.35rem 1.45rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-card-blue {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.stat-card-green {
    background: linear-gradient(135deg, #064e3b, #059669);
}

.stat-card-cyan {
    background: linear-gradient(135deg, #0e7490, #0284c7);
}

.stat-card-gold {
    background: linear-gradient(135deg, #78350f, #d97706);
}

.stat-card-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #ffffff;
    flex-shrink: 0;
}

.stat-card-content {
    flex-grow: 1;
    margin-left: 1.1rem;
}

.stat-card-label {
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.stat-card-subtext {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* Custom Card Container */
.pp-card {
    background-color: var(--pp-card-bg-light);
    border: 1px solid var(--pp-border-light);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

body.dark-mode .pp-card {
    background-color: var(--pp-card-bg-dark);
    border-color: var(--pp-border-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pp-card-header {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--pp-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.dark-mode .pp-card-header {
    border-bottom-color: var(--pp-border-dark);
}

.pp-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pp-card-body {
    padding: 1.4rem;
}

/* ==========================================================================
   Modals & Dialogs (Light & Dark Mode)
   ========================================================================== */
.modal-content {
    background-color: var(--pp-card-bg-light);
    color: var(--pp-text-light);
    border: 1px solid var(--pp-border-light);
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    background-color: transparent;
    border-bottom: 1px solid var(--pp-border-light);
    padding: 1.15rem 1.4rem;
}

.modal-header .modal-title {
    color: var(--pp-text-light);
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.4rem;
    color: var(--pp-text-light);
}

.modal-footer {
    background-color: transparent;
    border-top: 1px solid var(--pp-border-light);
    padding: 1rem 1.4rem;
}

/* Dark Mode Modal */
body.dark-mode .modal-content {
    background-color: var(--pp-card-bg-dark);
    color: var(--pp-text-dark);
    border-color: var(--pp-border-dark);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

body.dark-mode .modal-header {
    border-bottom-color: var(--pp-border-dark);
}

body.dark-mode .modal-header .modal-title {
    color: var(--pp-text-dark);
}

body.dark-mode .modal-body {
    color: var(--pp-text-dark);
}

body.dark-mode .modal-footer {
    border-top-color: var(--pp-border-dark);
}

body.dark-mode .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==========================================================================
   Form Controls, Inputs, Labels & Selects (Light & Dark Mode)
   ========================================================================== */
.form-label {
    color: var(--pp-text-light);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

body.dark-mode .form-label {
    color: #e2e8f0;
}

.form-control,
.form-select {
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--pp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background-color: #ffffff;
    color: #0f172a;
}

.form-control::placeholder {
    color: #94a3b8;
}

/* Dark Mode Form Controls */
body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #070b14;
    color: #f8fafc;
    border-color: #334155;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: #0b1329;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

body.dark-mode .form-control::placeholder {
    color: #64748b;
}

body.dark-mode .form-select option {
    background-color: #0f172a;
    color: #f8fafc;
}

/* Input Group Text */
.input-group-text {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

body.dark-mode .input-group-text {
    background-color: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

/* SweetAlert2 Dark Mode */
body.dark-mode .swal2-popup {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid #1e293b;
}

body.dark-mode .swal2-title {
    color: #f8fafc !important;
}

body.dark-mode .swal2-html-container {
    color: #94a3b8 !important;
}

body.dark-mode .bg-light {
    background-color: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(51, 65, 85, 0.6) !important;
    color: var(--pp-text-dark) !important;
}

/* High Contrast Utility in Dark Mode */
body.dark-mode .text-dark:not(.badge):not(.badge *) {
    color: var(--pp-text-dark) !important;
}

body.dark-mode .text-secondary:not(.badge):not(.badge *) {
    color: #cbd5e1 !important;
}

body.dark-mode .text-muted:not(.badge):not(.badge *) {
    color: #94a3b8 !important;
}

/* Rate Card Styling (Tarif Parkir) */
.rate-detail-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

body.dark-mode .rate-detail-box {
    background-color: rgba(15, 23, 42, 0.7);
    border-color: #1e293b;
}

.rate-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.rate-item-row:not(:last-child) {
    border-bottom: 1px dashed #e2e8f0;
}

body.dark-mode .rate-item-row:not(:last-child) {
    border-bottom-color: rgba(51, 65, 85, 0.5);
}

.rate-item-label {
    color: #475569;
    font-weight: 500;
}

body.dark-mode .rate-item-label {
    color: #cbd5e1 !important;
}

.rate-item-value {
    font-weight: 700;
}

/* User Avatar & Photo Upload Styles */
.user-avatar-box {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    max-width: 42px;
    max-height: 42px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-box img,
.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.user-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-radius: 50%;
    line-height: 1;
    user-select: none;
}

.avatar-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.avatar-upload-preview {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 3px solid var(--pp-primary);
    overflow: hidden;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    position: relative;
}

body.dark-mode .avatar-upload-preview {
    background-color: #070b14;
    border-color: #3b82f6;
}

.avatar-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-preview .avatar-placeholder-icon {
    font-size: 2.2rem;
    color: #94a3b8;
}

/* Role Management Card Styling */
.role-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.role-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

body.dark-mode .role-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.role-card-title {
    color: var(--pp-text-dark);
    font-size: 1.15rem;
    font-weight: 700;
}

.role-stat-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

body.dark-mode .role-stat-box {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(51, 65, 85, 0.6);
}

.role-stat-value {
    color: var(--pp-text-dark);
    font-weight: 700;
    font-size: 0.95rem;
}

.perm-item-box {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    transition: all 0.2s ease;
}

.perm-item-box:hover {
    border-color: #3b82f6;
    background-color: #f0f7ff;
}

body.dark-mode .perm-item-box {
    background-color: rgba(30, 41, 59, 0.5);
    border-color: rgba(51, 65, 85, 0.6);
}

body.dark-mode .perm-item-box:hover {
    background-color: rgba(30, 41, 59, 0.85);
    border-color: #3b82f6;
}

.perm-item-title {
    color: var(--pp-text-dark);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Gate Status Item List */
.gate-status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gate-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

body.dark-mode .gate-status-item {
    border-bottom-color: #1e293b;
}

.gate-status-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.gate-info-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.gate-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

body.dark-mode .gate-icon-badge {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

.gate-name-text {
    font-size: 0.88rem;
    font-weight: 600;
}

.gate-sub-text {
    font-size: 0.74rem;
    color: #64748b;
}

body.dark-mode .gate-sub-text {
    color: #94a3b8;
}

/* Live Camera Snapshot Cards */
.live-camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.15rem;
}

.camera-preview-box {
    background: #020617;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.camera-preview-img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    display: block;
}

.camera-live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
}

.camera-live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.camera-caption-bar {
    padding: 0.65rem 0.85rem;
    background: #0b1329;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.camera-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.camera-subtitle {
    font-size: 0.68rem;
    color: #94a3b8;
    margin: 0;
}

/* Clean Custom Table */
.pp-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.pp-table th {
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid var(--pp-border-light);
    padding: 0.85rem 0.75rem;
    background: transparent;
}

body.dark-mode .pp-table th {
    color: #94a3b8;
    border-bottom-color: var(--pp-border-dark);
}

.pp-table td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

body.dark-mode .pp-table td {
    border-bottom-color: #1e293b;
}

.pp-table tr:last-child td {
    border-bottom: none;
}

/* Footer Copyright */
.app-footer {
    padding: 1.25rem 1.75rem;
    background-color: var(--pp-card-bg-light);
    border-top: 1px solid var(--pp-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #64748b;
    transition: all 0.3s ease;
}

body.dark-mode .app-footer {
    background-color: var(--pp-card-bg-dark);
    border-top-color: var(--pp-border-dark);
    color: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    html, body {
        overflow: auto;
        height: auto;
    }
    .app-wrapper {
        height: auto;
        max-height: none;
        overflow: visible;
        display: block;
    }
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100vh;
        margin-left: -270px;
    }
    .app-sidebar.show-mobile {
        margin-left: 0;
    }
    .app-main {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .search-box-group {
        width: 220px;
    }
}
