/**
 * GWG Admin Panel Styles
 * Extracted from inline styles for better performance and maintainability
 */

:root {
    --gwg-sidebar-width: 260px;
}

body {
    overflow-x: hidden;
    background: #f5f7fb;
}

.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--gwg-sidebar-width);
    background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
    color: #e5e7eb;
}

.admin-sidebar .brand {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.admin-sidebar .nav-link {
    color: #cbd5f5;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(148, 163, 184, 0.18);
    color: #ffffff;
}

.admin-sidebar .section-label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: #94a3b8;
}

.admin-sidebar .section-toggle {
    color: #94a3b8;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0;
    background: transparent;
    border: none;
    text-align: left;
}

.admin-sidebar .section-toggle .bi {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.admin-sidebar .section-toggle[aria-expanded="true"] .bi {
    transform: rotate(180deg);
}

.admin-sidebar .section-items {
    padding-top: 0.35rem;
}

.admin-main {
    min-height: 100vh;
}

.admin-main .navbar {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.admin-content {
    padding: 2rem 1.5rem;
}

.admin-card {
    border: none;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* Breadcrumbs */
.breadcrumb-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin: -2rem -1.5rem 1.5rem -1.5rem;
}

.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
    color: #94a3b8;
}

/* Dashboard Enhancements */
.stat-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-card .stat-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

.chart-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.chart-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
}

.chart-card .card-body {
    padding: 1.5rem;
}

.period-filter {
    display: inline-flex;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.75rem;
}

.period-filter .btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #64748b;
    transition: all 0.2s ease;
}

.period-filter .btn.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.period-filter .btn:hover:not(.active) {
    color: #0f172a;
}

/* Activity Table */
.activity-table {
    font-size: 0.9rem;
}

.activity-table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.activity-table .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.activity-table .badge {
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Heatmap */
.heatmap-container {
    overflow-x: auto;
}

.heatmap-cell {
    width: 30px;
    height: 30px;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.heatmap-cell:hover {
    transform: scale(1.1);
    z-index: 10;
}

.heatmap-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Loading States */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #94a3b8;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Help Button & Modal */
.help-trigger-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1040;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #6366f1;
    background: white;
    color: #6366f1;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
    transition: all 0.2s ease;
}

.help-trigger-btn:hover {
    background: #6366f1;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}

.help-modal .modal-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-bottom: none;
}

.help-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.help-modal .modal-title {
    font-weight: 600;
}

.help-section {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.help-section p {
    margin-bottom: 0;
    color: #374151;
    line-height: 1.6;
}

.help-section-purpose {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.help-section-purpose h6 {
    color: #1d4ed8;
}

.help-section-how {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.help-section-how h6 {
    color: #15803d;
}

.help-section-actions {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.help-section-actions h6 {
    color: #b45309;
}

.help-section-gameplay {
    background: #fdf2f8;
    border-left: 4px solid #ec4899;
}

.help-section-gameplay h6 {
    color: #be185d;
}

.help-modal .modal-footer {
    border-top: 1px solid #e5e7eb;
}

.help-modal .modal-footer .btn-primary {
    background: #6366f1;
    border-color: #6366f1;
}

.help-modal .modal-footer .btn-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}
