:root {
    --bg-app: #05070a;
    --bg-sidebar: rgba(13, 17, 23, 0.95);
    --bg-card: rgba(22, 27, 34, 0.7);
    --bg-hover: rgba(31, 38, 45, 0.8);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #58a6ff;
    --primary-gradient: linear-gradient(135deg, #58a6ff 0%, #388bfd 100%);
    --accent: #bc8fff;
    --accent-gradient: linear-gradient(135deg, #bc8fff 0%, #8957e5 100%);
    --text-main: #f0f6fc;
    --text-secondary: #8b949e;
    --border: #30363d;
    --success: #3fb950;
    --warning: #d29922;
    --danger: #f85149;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.6);
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #111e31 0%, #05070a 100%);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    flex-shrink: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 24px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    margin-right: 12px;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.4);
    font-size: 0.9rem;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

nav {
    flex: 1;
}

nav a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
}

nav a i {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

nav a:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
    padding-left: 28px;
}

nav a.active {
    background-color: rgba(88, 166, 255, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-footer {
    padding: 0 24px;
}

.status-badge {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 10px rgba(63, 185, 80, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
}

/* Main Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.view {
    display: none;
    flex-direction: column;
    gap: 32px;
}

.view.active {
    display: flex;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.header-info h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(to right, #fff, #8b949e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-info p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* UI Elements */
.region-selector-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.region-select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding-right: 24px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2358a6ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
}

.region-select:hover {
    color: var(--primary);
}

/* Dropdown menu styling */
.region-select option {
    background: #161b22;
    color: var(--text-main);
    padding: 12px 16px;
    font-weight: 500;
    border: none;
}

.region-select option:hover,
.region-select option:checked {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(168, 85, 247, 0.2));
    color: var(--primary);
}

.deep-scan-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border-color: var(--glass-border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.stats-grid.merchant-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    background: rgba(22, 27, 34, 0.9);
}

.merchant-stats .stat-card {
    padding: 12px 16px;
    gap: 12px;
    border-radius: var(--radius-md);
}

.merchant-stats .stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.merchant-stats .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1rem;
}

.merchant-stats .stat-icon svg {
    width: 18px;
    height: 18px;
}

.stat-icon.music {
    background: rgba(188, 143, 255, 0.15);
    color: #bc8fff;
}

.stat-icon.sports {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.stat-icon.culture {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.stat-icon.total {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.stat-icon.discard {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.stat-details h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.merchant-stats .stat-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
}

.stat-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.merchant-stats .stat-details p {
    font-size: 0.75rem;
}

/* POI Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-action svg {
    width: 16px;
    height: 16px;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-action.approve:hover {
    color: #3fb950;
    border-color: rgba(63, 185, 80, 0.5);
    background: rgba(63, 185, 80, 0.1);
}

.btn-action.discard:hover {
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.5);
    background: rgba(248, 81, 73, 0.1);
}

.btn-action.active-approved {
    color: #3fb950;
    border-color: rgba(63, 185, 80, 0.5);
    background: rgba(63, 185, 80, 0.15);
}

.btn-action.active-discarded {
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.5);
    background: rgba(248, 81, 73, 0.15);
}

/* Table Section */
.filters-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--bg-card);
    padding: 10px 16px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    flex-wrap: nowrap;
    position: relative;
    z-index: 1000;
}

.filters-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border: 1px solid var(--glass-border);
    border-top: none;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    margin-bottom: 0;
}

.search-input {
    width: 180px;
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 1;
}

.search-input i {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 5;
}

.search-input input {
    width: 100%;
    padding: 0 10px 0 34px;
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    height: 38px;
    font-size: 0.85rem;
}

.search-input input:focus {
    border-color: var(--primary);
    background: rgba(13, 17, 23, 0.9);
}

.select-wrapper select,
.custom-select {
    padding: 0 12px;
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    cursor: pointer;
    height: 38px;
    min-width: 110px;
    max-width: 180px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Custom MultiSelect */
.custom-multiselect {
    position: relative;
    min-width: 140px;
    user-select: none;
}

.multiselect-trigger {
    height: 38px;
    padding: 0 12px;
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.85rem;
    gap: 8px;
}

.multiselect-trigger:hover {
    border-color: var(--primary);
}

.multiselect-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 220px;
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    display: none;
    animation: fadeInDown 0.2s ease-out;
}

.multiselect-dropdown.active {
    display: block;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.multiselect-option:hover {
    background: var(--bg-hover);
}

.multiselect-option input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.multiselect-option span {
    font-size: 0.85rem;
    color: var(--text-main);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selection-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-left: auto;
    background: rgba(88, 166, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.btn-sm {
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    height: 34px !important;
}

.btn-danger {
    background: rgba(218, 54, 51, 0.1);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: #da3633;
    color: white;
}

.table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 20px;
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    background: rgba(13, 17, 23, 0.4);
}

td {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

tr:hover td {
    background: var(--bg-hover);
}

.event-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-thumb:hover {
    transform: scale(1.15) rotate(2deg);
    border-color: var(--primary);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.event-thumb-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.event-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.event-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-city {
    background: var(--bg-hover);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.badge-category {
    background: rgba(88, 166, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.icon-link {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.icon-link:hover {
    color: var(--primary);
}

.icon-link i {
    width: 16px;
    height: 16px;
}

/* Details Expansion */
.details-row td {
    background: #080a0e;
    padding: 0;
}

.details-expanded-content {
    padding: 32px 120px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-bottom: 2px solid var(--primary);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.details-section h4 {
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.details-section p {
    line-height: 1.7;
    color: var(--text-main);
    font-size: 1rem;
}

.image-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.copy-on-click {
    padding: 6px 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-on-click:hover {
    border-color: var(--primary);
    background: rgba(88, 166, 255, 0.1);
}

/* Toasts */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notification.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s;
}

@keyframes toastIn {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 700px;
    max-width: 95%;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

.modal-body textarea {
    width: 100%;
    height: 350px;
    background: #080a0e;
    color: #58a6ff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: 'Courier New', monospace;
    outline: none;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    text-align: right;
}

/* Operational Hubs View */
.location-pill {
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.region-icon-box {
    width: 40px;
    height: 40px;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.supported-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.supported-cities span {
    padding: 4px 10px;
    background: var(--bg-hover);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-gradient);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-weight: 600;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}