/* 
   TRÚFÉLAGAVÖKTUN DASHBOARD - DESIGN SYSTEM
   Theme: Modern Premium Dark Mode with Glassmorphism
*/

:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Theme Colors (HSL System) */
    --bg-dark: hsl(222, 25%, 6%);
    --bg-surface: hsla(222, 20%, 12%, 0.65);
    --bg-surface-solid: hsl(222, 20%, 12%);
    --bg-surface-hover: hsla(222, 20%, 18%, 0.85);
    --border-glass: hsla(222, 16%, 24%, 0.45);
    --border-glass-focus: hsla(210, 100%, 55%, 0.6);
    
    /* Text */
    --text-primary: hsl(210, 20%, 95%);
    --text-muted: hsl(215, 12%, 68%);
    --text-dark: hsl(222, 20%, 15%);
    
    /* Semantic Colors */
    --accent-blue: hsl(210, 100%, 55%);
    --accent-blue-glow: hsla(210, 100%, 55%, 0.15);
    
    --accent-green: hsl(145, 85%, 43%);
    --accent-green-glow: hsla(145, 85%, 43%, 0.15);
    
    --accent-red: hsl(355, 85%, 60%);
    --accent-red-glow: hsla(355, 85%, 60%, 0.15);
    
    --accent-gold: hsl(38, 95%, 55%);
    --accent-gold-glow: hsla(38, 95%, 55%, 0.15);
    
    /* Box Shadows & Borders */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px 2px var(--accent-blue-glow);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* App Container Layout */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    position: relative;
    background: radial-gradient(circle at 70% 30%, hsla(210, 100%, 15%, 0.2) 0%, transparent 60%),
                radial-gradient(circle at 10% 80%, hsla(145, 100%, 10%, 0.1) 0%, transparent 55%);
}

/* Sidebar Styling */
.sidebar {
    background-color: hsla(222, 25%, 8%, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, hsl(230, 80%, 60%) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

.logo-text h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
    transition: var(--transition-normal);
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
}

.nav-item.active {
    color: white;
    background-color: var(--accent-blue-glow);
    border-left: 3px solid var(--accent-blue);
    padding-left: 13px; /* account for border width */
}

.sidebar-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.version {
    font-size: 10px;
    color: var(--text-muted);
}

/* Main Content Area Styling */
.main-content {
    padding: 30px 40px;
    overflow-y: auto;
    height: 100vh;
}

/* Header Styling */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.main-header h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.main-header .subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 2px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-glass);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.date-display i {
    color: var(--accent-blue);
}

/* Stat Cards Grid */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-glass-focus);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.card-icon.blue { background-color: var(--accent-blue-glow); color: var(--accent-blue); }
.card-icon.red { background-color: var(--accent-red-glow); color: var(--accent-red); }
.card-icon.green { background-color: var(--accent-green-glow); color: var(--accent-green); }
.card-icon.gold { background-color: var(--accent-gold-glow); color: var(--accent-gold); }
.card-icon.grey { background-color: hsla(0, 0%, 50%, 0.15); color: hsl(0, 0%, 75%); }

.card-content h3 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin: 4px 0 2px 0;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
}
.stat-change.up { color: var(--accent-green); }
.stat-change.down { color: var(--accent-red); }

.stat-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

/* Card Panel Layout */
.card-panel {
    background-color: var(--bg-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.card-panel h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.panel-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.panel-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.mt-20 { margin-top: 20px; }

/* Dashboard Panels visibility */
.dashboard-panel {
    display: none;
}

.dashboard-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Charts Layout */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-container {
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.chart-wrapper {
    position: relative;
    flex-grow: 1;
    width: 100%;
    height: 100%;
}

/* Data Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-top: 10px;
}

.data-table th, .data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-glass);
    font-size: 13.5px;
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.data-table th.sortable:hover {
    color: var(--text-primary);
}

.data-table th.sortable.active {
    color: var(--accent-blue);
}

.data-table tbody tr {
    transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: var(--bg-surface-hover);
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.net-1 { background-color: hsla(0, 100%, 50%, 0.15); color: hsl(0, 100%, 65%); }
.badge.net-2 { background-color: hsla(270, 100%, 50%, 0.15); color: hsl(270, 100%, 65%); }
.badge.net-3 { background-color: hsla(120, 100%, 40%, 0.15); color: hsl(120, 100%, 60%); }
.badge.net-4 { background-color: hsla(210, 100%, 50%, 0.15); color: hsl(210, 100%, 65%); }
.badge.net-5 { background-color: hsla(38, 100%, 50%, 0.15); color: hsl(38, 100%, 60%); }
.badge.net-null { background-color: hsla(0, 0%, 50%, 0.15); color: hsl(0, 0%, 75%); }

.tag-active { background-color: hsla(145, 85%, 43%, 0.15); color: var(--accent-green); }
.tag-inactive { background-color: hsla(355, 85%, 60%, 0.15); color: var(--accent-red); }

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background-color: hsl(210, 100%, 48%);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

.btn-secondary {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
}

.btn-danger {
    background-color: hsla(355, 85%, 60%, 0.15);
    color: var(--accent-red);
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger:hover {
    background-color: var(--accent-red);
    color: white;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Filters Styles */
.filters-container {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 12px 12px 48px;
    color: white;
    font-family: var(--font-body);
    font-size: 13.5px;
    transition: var(--transition-fast);
}

.search-input-wrapper input:focus, .filter-select-wrapper select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: var(--bg-surface-solid);
}

.filter-select-wrapper select {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: white;
    font-family: var(--font-body);
    font-size: 13.5px;
    cursor: pointer;
}

/* Network Controls Card Grid */
.networks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.network-control-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: var(--shadow-sm);
}

.network-control-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
}

.network-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.network-card-body p {
    font-size: 12px;
    color: var(--text-muted);
}

.network-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-glass);
    padding-top: 15px;
}

/* iOS Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-glass);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-green);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-green);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-surface-solid);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-close-modal:hover {
    color: white;
}

/* Form controls */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input, .form-group select {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: white;
    font-family: var(--font-body);
    font-size: 13.5px;
    transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
    margin-top: 24px;
}

/* Responsive Overrides */
@media screen and (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr; /* Stack sidebar and main */
    }
    
    .sidebar {
        height: auto;
        position: relative;
        padding: 20px;
    }
    
    .sidebar-header {
        margin-bottom: 20px;
    }
    
    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav-item {
        margin-bottom: 0;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .main-content {
        padding: 20px;
        height: auto;
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
}

/* Detail Drawer styles */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.detail-drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background-color: hsla(222, 25%, 9%, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border-glass);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.drawer-overlay.active .detail-drawer {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 24px 20px 24px;
    border-bottom: 1px solid var(--border-glass);
}

.drawer-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin-top: 5px;
}

.btn-close-drawer {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-close-drawer:hover {
    color: white;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Stats grid inside drawer */
.drawer-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.drawer-stat-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.drawer-stat-item .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-stat-item .value {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}

/* Slider simulation controls */
.slider-control {
    margin-top: 15px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.slider-control input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    background: var(--border-glass);
    height: 6px;
    border-radius: 3px;
    outline: none;
}

.slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-blue-glow);
    transition: transform 0.1s ease;
}

.slider-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.drawer-footer-actions {
    margin-top: auto;
    padding-top: 20px;
}

/* Registry clickable row styling */
.data-table tbody tr.clickable-row {
    cursor: pointer;
}

.data-table tbody tr.clickable-row:hover {
    background-color: var(--bg-surface-hover);
}

/* Religion Breakdown Progress Bars */
.religion-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 15px;
}

.religion-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.religion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.religion-name {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.religion-name i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.religion-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.religion-meta .members-count {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 4px;
}

.religion-bar-track {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.religion-bar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0; /* Animated dynamically by JS */
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Colors for specific religion categories */
.bar-kristni {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

.bar-heathen {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}

.bar-humanist {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.45);
}

.bar-buddhist {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.45);
}

.bar-islam {
    background: linear-gradient(90deg, #10b981, #059669);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.bar-judaism {
    background: linear-gradient(90deg, #eab308, #ca8a04);
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.45);
}

.bar-bahai {
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.45);
}

.bar-unaffiliated {
    background: linear-gradient(90deg, #64748b, #475569);
    box-shadow: 0 0 8px rgba(100, 116, 139, 0.25);
}

.bar-other {
    background: linear-gradient(90deg, #94a3b8, #64748b);
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.2);
}

/* Segmented Toggle Control */
.toggle-segmented {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}

.btn-segment {
    flex: 1;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-segment:hover {
    color: white;
}

.btn-segment.active {
    background-color: var(--accent-blue);
    color: white;
    box-shadow: 0 0 10px var(--accent-blue-glow);
}

/* Make overview religion rows hoverable & clickable */
.religion-row {
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    margin: -6px -10px; /* Counteract padding to keep visual alignment */
}

.religion-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

/* Glassmorphic tags/chips for multi-selection comparison */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.chip:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.chip.active {
    color: white;
    background: var(--chip-color, var(--accent-blue));
    border-color: var(--chip-border, var(--accent-blue));
    box-shadow: 0 0 10px var(--chip-glow, var(--accent-blue-glow));
}

.chip .chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: 2px;
}

.chip .chip-remove:hover {
    background: rgba(255, 255, 255, 0.35);
}

