/* CSS variables for consistent design tokens */
:root {
    --bg-darkest: #070a13;
    --bg-dark: #0f1423;
    --bg-panel: rgba(22, 28, 45, 0.6);
    --bg-sidebar: rgba(11, 15, 28, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(239, 68, 68, 0.4);
    
    /* Brand Accent Colors */
    --color-primary: #dc2626; /* Crimson Red */
    --color-primary-hover: #ef4444;
    --color-primary-glow: rgba(220, 38, 38, 0.25);
    
    --color-reward: #10b981; /* Emerald Green */
    --color-reward-glow: rgba(16, 185, 129, 0.2);
    
    --color-punish: #ef4444; /* Alert Red */
    --color-punish-glow: rgba(239, 68, 68, 0.2);
    
    --color-warning: #f59e0b; /* Amber Gold */
    --color-warning-glow: rgba(245, 158, 11, 0.2);
    
    --color-info: #3b82f6; /* Discord Blue */
    --color-info-glow: rgba(59, 130, 246, 0.2);

    --color-secondary: #8b5cf6; /* Purple system accent */
    --color-secondary-glow: rgba(139, 92, 246, 0.2);
    
    /* Text Colors */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-on-accent: #ffffff;
    
    /* Layout Variables */
    --sidebar-width: 280px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-glow: 0 0 20px rgba(0, 0, 0, 0.5);
    --shadow-red: 0 4px 20px rgba(220, 38, 38, 0.15);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darkest);
    background-image: 
        radial-gradient(at 10% 10%, rgba(220, 38, 38, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(15, 20, 35, 1) 0px, transparent 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

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

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary), #991b1b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.logo-icon i {
    font-size: 20px;
    color: var(--text-on-accent);
}

.logo-text h1 {
    font-size: 18px;
    line-height: 1.2;
    color: var(--text-primary);
}

.logo-text span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

.sidebar-nav {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.nav-btn i {
    font-size: 16px;
    width: 20px;
    transition: var(--transition-fast);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-btn.active {
    background: rgba(220, 38, 38, 0.15);
    color: var(--text-primary);
    border-left: 3px solid var(--color-primary);
    box-shadow: inset 5px 0 15px rgba(220, 38, 38, 0.05);
}

.nav-btn.active i {
    color: var(--color-primary-hover);
    transform: scale(1.1);
}

.nav-btn-admin {
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.project-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
}

.project-info .label {
    color: var(--text-muted);
}

.project-info .value {
    color: var(--text-secondary);
    font-weight: 500;
}

.legal-notice {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 12px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.header-title h2 {
    font-size: 28px;
    color: var(--text-primary);
}

.header-title p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-clock {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 14px;
    color: var(--color-primary-hover);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.05);
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-glow);
    transition: var(--transition-normal);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Button Styles */
.btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--text-on-accent);
    border-color: transparent;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.btn-reward {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-reward);
}

.btn-reward:hover {
    background: var(--color-reward);
    color: var(--text-on-accent);
    box-shadow: 0 4px 15px var(--color-reward-glow);
}

.btn-punish {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-punish);
}

.btn-punish:hover {
    background: var(--color-punish);
    color: var(--text-on-accent);
    box-shadow: 0 4px 15px var(--color-punish-glow);
}

.btn-danger {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-punish);
}

.btn-danger:hover {
    background: var(--color-punish);
    color: var(--text-on-accent);
}

/* Tabs Content Toggle */
.tab-content {
    display: none;
    flex-direction: column;
    gap: 32px;
    animation: fadeIn var(--transition-normal);
}

.tab-content.active {
    display: flex;
}

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

/* TAB 1: DASHBOARD STYLING */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card:nth-child(1)::before { background-color: var(--color-info); }
.stat-card:nth-child(2)::before { background-color: var(--color-reward); }
.stat-card:nth-child(3)::before { background-color: var(--color-warning); }
.stat-card:nth-child(4)::before { background-color: var(--color-primary); }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-blue { background: rgba(59, 130, 246, 0.1); color: var(--color-info); }
.icon-green { background: rgba(16, 185, 129, 0.1); color: var(--color-reward); }
.icon-yellow { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.icon-red { background: rgba(220, 38, 38, 0.1); color: var(--color-primary); }

.stat-data h3 {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    display: block;
    margin-top: 4px;
}

/* Dashboard Charts Grid */
.dashboard-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    padding: 24px;
}

.chart-header h4 {
    font-size: 18px;
    color: var(--text-primary);
}

.chart-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.chart-body {
    margin-top: 24px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* SVG Chart styling */
.chart-bar-rect {
    fill: url(#barGradient);
    transition: var(--transition-fast);
    cursor: pointer;
}

.chart-bar-rect:hover {
    fill: var(--color-primary-hover);
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.chart-bar-label {
    fill: var(--text-secondary);
    font-size: 10px;
    text-anchor: middle;
}

.chart-bar-val {
    fill: var(--text-primary);
    font-size: 11px;
    font-weight: bold;
    text-anchor: middle;
}

.chart-axis-line {
    stroke: var(--border-color);
    stroke-width: 1;
}

.donut-slice {
    transition: var(--transition-normal);
    cursor: pointer;
}

.donut-slice:hover {
    opacity: 0.95;
    transform: scale(1.02);
    transform-origin: center;
}

.donut-label {
    fill: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
    text-anchor: middle;
}

.donut-sublabel {
    fill: var(--text-muted);
    font-size: 10px;
    text-anchor: middle;
    text-transform: uppercase;
}

/* Legend Styling for Charts */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 15px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Dashboard Alerts Grid */
.dashboard-alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.alert-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.panel-header h4 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-red { color: var(--color-primary-hover); }

.panel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.panel-list::-webkit-scrollbar {
    width: 4px;
}

.panel-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
}

.alert-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary-glow);
    border: 1px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.alert-meta h5 {
    font-size: 13px;
    color: var(--text-primary);
}

.alert-meta p {
    font-size: 11px;
    color: var(--text-muted);
}

.alert-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.alert-badge-red { background: rgba(239, 68, 68, 0.15); color: var(--color-punish); border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-badge-green { background: rgba(16, 185, 129, 0.15); color: var(--color-reward); border: 1px solid rgba(16, 185, 129, 0.3); }
.alert-badge-yellow { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); border: 1px solid rgba(245, 158, 11, 0.3); }

/* TAB 2: STAFF LIST STYLING */
.filter-bar {
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-group {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    flex-grow: 1;
    min-width: 250px;
    max-width: 450px;
}

.search-group input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-size: 14px;
}

.search-group i {
    color: var(--text-muted);
}

.select-group label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.select-group select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-fast);
}

.select-group select:focus {
    border-color: var(--border-hover);
}

/* Admin Grid & Cards */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.admin-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition-normal);
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Glowing Card borders depending on Ranks */
.card-zarzad {
    border-top: 4px solid var(--color-primary);
    box-shadow: inset 0 10px 20px rgba(220, 38, 38, 0.03);
}

.card-administracja {
    border-top: 4px solid var(--color-info);
    box-shadow: inset 0 10px 20px rgba(59, 130, 246, 0.03);
}

.card-moderacja {
    border-top: 4px solid var(--color-warning);
    box-shadow: inset 0 10px 20px rgba(245, 158, 11, 0.03);
}

.card-stazysci {
    border-top: 4px solid var(--text-muted);
}

/* Card Status Badges */
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: absolute;
    top: 16px;
    right: 16px;
}

.badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-status-aktywny { background: rgba(16, 185, 129, 0.15); color: var(--color-reward); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-status-urlop { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-status-zawieszony { background: rgba(239, 68, 68, 0.15); color: var(--color-punish); border: 1px solid rgba(239, 68, 68, 0.3); }

.card-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.avatar-wrapper {
    position: relative;
}

.main-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.avatar-decor-zarzad { border: 2px solid var(--color-primary); box-shadow: 0 0 10px var(--color-primary-glow); }
.avatar-decor-administracja { border: 2px solid var(--color-info); box-shadow: 0 0 10px var(--color-info-glow); }
.avatar-decor-moderacja { border: 2px solid var(--color-warning); box-shadow: 0 0 10px var(--color-warning-glow); }

.roblox-mini-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #111;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #e5e7eb;
}

.profile-meta h4 {
    font-size: 16px;
    line-height: 1.2;
}

.profile-meta span {
    font-size: 12px;
    color: var(--color-primary-hover);
    font-weight: 600;
}

.card-details-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-row .lbl {
    color: var(--text-muted);
}

.details-row .val {
    color: var(--text-secondary);
    font-family: monospace;
    font-weight: 500;
}

.details-row .val.highlight-text {
    font-family: inherit;
    color: var(--text-primary);
    font-weight: 600;
}

/* Counters for rewards and punishments in Card */
.card-score-board {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}

.score-item {
    text-align: center;
}

.score-item span {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
}

.score-item .num {
    font-size: 18px;
    font-family: 'Outfit', sans-serif;
    font-weight: bold;
    display: inline-block;
    margin-top: 2px;
}

.score-item.score-plus .num { color: var(--color-reward); }
.score-item.score-minus .num { color: var(--color-punish); }
.score-item.score-pochwala .num { color: var(--color-warning); }

.card-footer {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.card-footer button {
    flex-grow: 1;
}

/* Danger / Rules compliance check tags in Card */
.compliance-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--color-punish);
    font-size: 11px;
}

.compliance-ok {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--color-reward);
    font-size: 11px;
}

/* TAB 3: PUNISHMENTS & REWARDS PAGE */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.rules-panel-card {
    padding: 28px;
}

.panel-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.icon-badge {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bg-green-glow {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-reward);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 15px var(--color-reward-glow);
}

.bg-blue-glow {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.bg-yellow-glow {
    background: rgba(245, 158, 11, 0.12);
    color: #facc15;
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.quick-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.04);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    min-height: 120px;
}

.quick-link-card .link-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 20px;
}

.quick-link-card h4 {
    margin: 0 0 6px;
    font-size: 16px;
}

.quick-link-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.panel-card-header h3 {
    font-size: 20px;
    color: var(--text-primary);
}

.styled-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.styled-list li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.styled-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-primary-hover);
    font-weight: bold;
    font-size: 16px;
    top: -2px;
}

.border-green { border-left: 4px solid var(--color-reward); }
.border-red { border-left: 4px solid var(--color-punish); }

.flowchart-horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: var(--radius-md);
    flex-wrap: wrap;
    justify-content: center;
}

.flow-step {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.flow-step.highlight-green {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--color-reward);
    color: var(--color-reward);
    font-weight: bold;
}

.flow-step.highlight-red {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--color-punish);
    color: var(--color-punish);
    font-weight: bold;
}

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

/* History logs design */
.logs-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.logs-header h4 {
    font-size: 18px;
}

.logs-filter {
    display: flex;
    gap: 10px;
}

.logs-filter input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.logs-filter select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 6px;
}

.logs-list::-webkit-scrollbar {
    width: 6px;
}

.logs-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.log-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    transition: var(--transition-fast);
}

.log-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

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

.log-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.indicator-plus { background-color: var(--color-reward); box-shadow: 0 0 8px var(--color-reward); }
.indicator-minus { background-color: var(--color-punish); box-shadow: 0 0 8px var(--color-punish); }
.indicator-pochwala { background-color: var(--color-warning); box-shadow: 0 0 8px var(--color-warning); }
.indicator-nagana { background-color: var(--color-primary); box-shadow: 0 0 8px var(--color-primary); }
.indicator-decyzja { background-color: var(--color-info); box-shadow: 0 0 8px var(--color-info); }
.indicator-system { background-color: var(--color-secondary); box-shadow: 0 0 8px var(--color-secondary); }

.log-msg {
    color: var(--text-secondary);
}

.log-msg strong {
    color: var(--text-primary);
}

.log-date {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    white-space: nowrap;
}

/* TAB 4: REGULATIONS & COMPLIANCE INSPECTOR SPLIT VIEW */
.split-view {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .split-view {
        grid-template-columns: 1fr;
    }
}

.reg-viewer {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.viewer-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.viewer-search {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.viewer-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-size: 13px;
}

.viewer-body {
    max-height: 550px;
    overflow-y: auto;
    padding-right: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.viewer-body::-webkit-scrollbar {
    width: 6px;
}

.viewer-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.reg-chapter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reg-chapter h4 {
    font-size: 15px;
    color: var(--color-primary-hover);
    border-left: 2px solid var(--color-primary);
    padding-left: 10px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.reg-chapter p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.reg-article-box {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: var(--transition-fast);
}

.reg-article-box.highlight {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.3);
}

.reg-article-box strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.reg-article-box span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Compliance Inspector details */
.compliance-inspector {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: flex-start;
}

.inspector-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.sparkle-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary-glow);
    border: 1px solid var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--color-primary-hover);
    margin-bottom: 12px;
}

.inspector-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.inspector-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.inspector-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    outline: none;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.form-group select:focus {
    border-color: var(--color-primary-hover);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

.inspector-results {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-section h5 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.result-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-list li {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-success { color: var(--color-reward); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-punish); }

/* TAB 5: MANAGEMENT PANEL STYLING */
.management-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .management-grid {
        grid-template-columns: 1fr;
    }
}

.management-form {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.management-form h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 4px;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.management-form input[type="text"] {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    outline: none;
    font-size: 14px;
    transition: var(--transition-fast);
}

.management-form input[type="text"]:focus {
    border-color: var(--color-primary-hover);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

.required {
    color: var(--color-primary-hover);
}

.form-tip {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.form-actions-bar {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

/* Fast Action preview panel */
.management-actions {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.management-actions h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.fast-action-card select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    outline: none;
    font-size: 14px;
    cursor: pointer;
    margin-top: 6px;
    transition: var(--transition-fast);
}

.fast-action-card select:focus {
    border-color: var(--color-primary-hover);
}

.quick-admin-preview {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.preview-header h5 {
    font-size: 14px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.preview-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.preview-item span {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
}

.preview-item strong {
    font-size: 15px;
    margin-top: 2px;
    display: inline-block;
}

.action-buttons-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.board-action-approval-panel {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.board-action-approval-panel h5 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.board-approvals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.approval-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-hover);
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.approval-text strong {
    color: var(--text-primary);
}

.approval-text span {
    color: var(--color-warning);
    font-weight: 600;
}

.approval-actions {
    display: flex;
    gap: 6px;
}

.approval-actions button {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
}

/* Modals design */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-fast);
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    position: relative;
    padding: 32px;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-header-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.modal-body-section {
    margin-bottom: 20px;
}

.modal-body-section h4 {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.timeline-event {
    font-size: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
    display: flex;
    justify-content: space-between;
}

.timeline-event.event-reward { border-left-color: var(--color-reward); }
.timeline-event.event-warning { border-left-color: var(--color-warning); }

/* Toasts Notification styling */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(11, 15, 28, 0.95);
    border: 1px solid var(--color-reward);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.toast-content i {
    color: var(--color-reward);
    font-size: 18px;
}

.toast.toast-error {
    border-color: var(--color-punish);
}

.toast.toast-error i {
    color: var(--color-punish);
}

/* --- COOKIE POLICY & ROLEPLAY BANNER --- */
.cookie-banner-box {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    z-index: 1100;
    max-height: 45vh;
    overflow-y: auto;
    padding: 20px 32px;
    background: rgba(15, 20, 35, 0.95);
    border: 1.5px solid var(--border-hover);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(239, 68, 68, 0.1);
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from { transform: translateY(120%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-icon {
    font-size: 32px;
    color: var(--color-primary-hover);
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.cookie-banner-text {
    flex-grow: 1;
    max-width: 800px;
}

.cookie-banner-text h5 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cookie-banner-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- LOGIN VIEW OVERLAY --- */
.login-view-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 13, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-fast);
}

.login-box {
    width: 90%;
    max-width: 400px;
    padding: 40px;
    border: 1.5px solid var(--border-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-lg);
}

.logo-icon-login {
    font-size: 36px;
    color: var(--color-primary-hover);
    background: var(--color-primary-glow);
    padding: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary);
    display: inline-flex;
    margin-bottom: 16px;
    box-shadow: 0 0 20px var(--color-primary-glow);
}

.login-box-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-box-header h3 {
    font-size: 22px;
    color: var(--text-primary);
}

.login-box-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- CARD DETAILS ACCORDION (Uproszczenie UI) --- */
.card-details-accordion {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease;
}

.card-details-accordion.open {
    max-height: 400px;
    opacity: 1;
    transition: max-height 0.35s ease-in-out, opacity 0.3s ease;
}

/* --- PROGRESS NOTCHES IN CARD --- */
.progress-notches {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    justify-content: center;
}

.notch {
    width: 24px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all var(--transition-fast);
}

.notch.active {
    background: var(--color-reward);
    box-shadow: 0 0 6px var(--color-reward-glow);
    border-color: rgba(16, 185, 129, 0.5);
}

.notches-gold .notch.active {
    background: var(--color-warning);
    box-shadow: 0 0 6px var(--color-warning-glow);
    border-color: rgba(245, 158, 11, 0.5);
}

.notches-red .notch.active {
    background: var(--color-punish);
    box-shadow: 0 0 6px var(--color-punish-glow);
    border-color: rgba(239, 68, 68, 0.5);
}

/* --- USER STATUS WIDGET --- */
.user-status-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-md);
}

.user-welcome {
    font-size: 13px;
    color: var(--text-secondary);
}

.user-welcome strong {
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

