/* ==========================================
   POLIZEIBOT WEB PORTAL - MAIN STYLESHEET
   ========================================== */

/* === ROOT VARIABLES === */
:root {
    --primary-color: #5865F2;
    --primary-dark: #4752C4;
    --secondary-color: #57F287;
    --danger-color: #ED4245;
    --warning-color: #FEE75C;
    --success-color: #57F287;
    --info-color: #00AFF4;
    --accent-gradient: linear-gradient(135deg, #5865F2, #57F287);
    
    --bg-primary: #ffffff;
    --bg-secondary: #f6f6f7;
    --bg-tertiary: #e3e5e8;
    --bg-dark: #2b2d31;
    --bg-darker: #1e1f22;
    
    --text-primary: #060607;
    --text-secondary: #4e5058;
    --text-muted: #80848e;
    --text-light: #ffffff;
    
    --border-color: #e3e5e8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: all 0.3s ease;
}

/* === DARK THEME OVERRIDES === */
body.theme-dark {
    --bg-primary: #111827;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1f2937;
    --bg-dark: #0b1020;
    --bg-darker: #060a17;
    --text-primary: #e5e7eb;
    --text-secondary: #cbd5e1;
    --text-muted: #9ca3af;
    --border-color: #1f2937;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
    --shadow-md: 0 6px 12px rgba(0,0,0,0.35);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.4);
}

/* === GLOBAL STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* === NAVBAR === */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
}

.nav-brand a:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: var(--text-light);
}

.nav-icon {
    font-size: 1.1rem;
}

.nav-user {
    position: relative;
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
}

.theme-toggle {
    width: 44px;
    height: 36px;
    padding: 0;
    font-size: 1rem;
}

.gradient-select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    font-weight: 600;
}

.user-dropdown {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.user-button:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* === CARDS === */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.card h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-light);
}

body[class*="gradient-"] .btn-primary,
body[class*="gradient-"] .nav-link.active,
body[class*="gradient-"] .badge-primary {
    background-image: var(--accent-gradient);
    color: var(--text-light);
    border: none;
}

body[class*="gradient-"] .btn-primary:hover,
body[class*="gradient-"] .nav-link.active:hover {
    filter: brightness(1.05);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-discord {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-discord:hover {
    background: var(--primary-dark);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
    color: var(--text-light);
}

.badge-success {
    background: var(--success-color);
    color: var(--text-primary);
}

.badge-danger {
    background: var(--danger-color);
    color: var(--text-light);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--text-primary);
}

.badge-info {
    background: var(--info-color);
    color: var(--text-light);
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* === GRADIENT PALETTES (Booster) === */
body.gradient-purpleblue {
    --accent-gradient: linear-gradient(135deg, #7c3aed, #38bdf8);
    --primary-color: #7c3aed;
    --primary-dark: #5b21b6;
}

body.gradient-sunset {
    --accent-gradient: linear-gradient(135deg, #ff6b6b, #f5c15d);
    --primary-color: #ff6b6b;
    --primary-dark: #e05353;
}

body.gradient-cyber {
    --accent-gradient: linear-gradient(135deg, #0ea5e9, #7c3aed);
    --primary-color: #0ea5e9;
    --primary-dark: #0284c7;
}

.badge-sm {
    padding: 2px 6px;
    font-size: 0.75rem;
}

/* === LANDING PAGE === */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.landing-hero {
    text-align: center;
    color: white;
}

.logo {
    margin-bottom: 30px;
}

.landing-hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.3rem;
    margin-bottom: 50px;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 50px 0;
    max-width: 1200px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-card .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
}

.cta {
    margin-top: 50px;
}

/* === LOGIN PAGE === */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-secondary);
}

.login-box {
    background: var(--bg-primary);
    padding: 50px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 450px;
    width: 100%;
}

.login-box h1 {
    margin-bottom: 20px;
}

.login-info {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.back-link {
    margin-top: 20px;
}

/* === DASHBOARD === */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-secondary);
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.stats-card {
    grid-column: 1 / -1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* === TICKETS === */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.filter-card {
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.ticket-table {
    overflow-x: auto;
}

.ticket-table table {
    width: 100%;
    border-collapse: collapse;
}

.ticket-table th {
    text-align: left;
    padding: 12px;
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
}

.ticket-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.ticket-row {
    transition: var(--transition);
}

.ticket-row:hover {
    background: var(--bg-secondary);
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-new {
    background: #57F28720;
    color: #3BA55D;
}

.status-progress {
    background: #FEE75C20;
    color: #FAA81A;
}

.status-management {
    background: #00AFF420;
    color: #00AFF4;
}

.status-finished {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.status-quiz {
    background: #a855f720;
    color: #a855f7;
}

.status-closed {
    background: #ED424520;
    color: #ED4245;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* === EVENTS (Trainings/Meetings) === */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-item {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.event-item:hover {
    background: var(--bg-tertiary);
}

.event-date {
    flex-shrink: 0;
}

.date-large {
    background: var(--primary-color);
    color: white;
    padding: 10px;
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 60px;
}

.date-large .day {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.date-large .month {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.time {
    margin-top: 5px;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
}

.event-info {
    flex: 1;
}

.event-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.event-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === INFO MESSAGES === */
.info-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-message {
    padding: 12px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.info-message:hover {
    background: var(--bg-tertiary);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.info-header strong {
    color: var(--text-primary);
    font-weight: 600;
}

.info-timestamp {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-content {
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
}

/* === HIRE LIST === */
.hire-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hire-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.hire-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.hire-name {
    color: var(--text-primary);
}

.hire-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.training-item,
.meeting-item {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.training-header,
.meeting-header {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.training-topics ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.training-topics li {
    padding: 5px 0;
    color: var(--text-secondary);
}

.training-status,
.meeting-status {
    margin-top: 15px;
}

details {
    margin-top: 15px;
}

summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.participant-list,
.absence-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.participant-badge,
.absence-badge {
    padding: 4px 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* === WORKTIME === */
.status-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.status-indicator {
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 1.2rem;
    font-weight: 600;
}

.status-online {
    background: rgba(87, 242, 135, 0.2);
    color: var(--success-color);
}

.status-offline {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
}

.status-dot.pulsing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.session-info {
    margin-top: 15px;
    font-size: 0.95rem;
}

.session-timer {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
}

.worktime-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    gap: 15px;
    background: var(--bg-primary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    transition: width 0.5s ease;
}

.progress-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* === UPRANK SYSTEM === */
.uprank-card {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(88, 101, 242, 0.05));
    border-left: 4px solid var(--primary-color);
}

.uprank-requirements {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.requirement-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--text-muted);
    transition: var(--transition);
}

.requirement-item.fulfilled {
    border-left-color: var(--success-color);
    background: rgba(87, 242, 135, 0.08);
}

.requirement-item.pending {
    border-left-color: var(--warning-color);
}

.requirement-item:hover {
    background: var(--bg-tertiary);
}

.requirement-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.requirement-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.requirement-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.requirement-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.requirement-missing {
    color: var(--warning-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.uprank-ready {
    padding: 20px;
    background: rgba(87, 242, 135, 0.15);
    border: 2px solid var(--success-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.uprank-ready p {
    margin: 8px 0;
    color: var(--text-primary);
    font-weight: 500;
}

.uprank-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 12px !important;
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* === PROFILE === */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.profile-card {
    grid-column: 1 / -1;
}

.profile-header {
    display: flex;
    gap: 20px;
    align-items: center;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
}

.profile-info h2 {
    margin-bottom: 5px;
}

.profile-username {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.profile-join-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.warning-status {
    text-align: center;
    padding: 20px;
}

.warning-count {
    margin-bottom: 15px;
}

.warning-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.warning-count.has-warnings .warning-number {
    color: var(--danger-color);
}

.warning-label {
    display: block;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.warning-info {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.roles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.role-badge {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-lg);
    font-weight: 600;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .dashboard-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero h1 {
        font-size: 2rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .event-item {
        flex-direction: column;
    }

    .training-header,
    .meeting-header {
        flex-direction: column;
    }
}

/* === UTILITIES === */
.view-all {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 15px;
    color: var(--primary-color);
    font-weight: 600;
    border-top: 1px solid var(--border-color);
}

.view-all:hover {
    background: var(--bg-secondary);
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.ticket-item:hover {
    background: var(--bg-tertiary);
}

.ticket-status {
    font-size: 1.5rem;
}

.ticket-info {
    flex: 1;
}

.ticket-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.ticket-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === STATISTICS / OVERVIEW === */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.overview-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.overview-content {
    flex: 1;
}

.overview-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.overview-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.overview-name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.ranking-card h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.chart-card {
    grid-column: 1 / -1;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
}

.chart-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* === LEADERBOARDS / STATISTICS === */
.leaderboard-table,
.stats-table,
.ranking-table {
    background: var(--bg-primary);
    border-collapse: collapse;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.leaderboard-table thead,
.stats-table thead,
.ranking-table thead {
    background: var(--bg-secondary);
}

.leaderboard-table th,
.stats-table th,
.ranking-table th {
    padding: 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.leaderboard-table tbody tr,
.stats-table tbody tr,
.ranking-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.leaderboard-table tbody tr:hover,
.stats-table tbody tr:hover,
.ranking-table tbody tr:hover {
    background: var(--bg-secondary);
}

.leaderboard-table td,
.stats-table td,
.ranking-table td {
    padding: 12px 14px;
    color: var(--text-primary);
}

.leaderboard-rank,
.leaderboard-name,
.leaderboard-value {
    color: var(--text-primary);
}

.leaderboard-value {
    font-weight: 600;
    color: var(--info-color);
}

.rank-badge {
    font-weight: 600;
    text-align: center;
}

.rank-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    border-radius: 50%;
    line-height: 28px;
    text-align: center;
    color: var(--text-primary);
}

/* Empty state in leaderboards */
.leaderboard-empty,
.stats-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* === STAFF LIST === */
.staff-table {
    overflow-x: auto;
}

.staff-table table {
    width: 100%;
    border-collapse: collapse;
}

.staff-table th {
    text-align: left;
    padding: 12px;
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.staff-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.staff-row {
    transition: var(--transition);
}

.staff-row:hover {
    background: var(--bg-secondary);
    cursor: pointer;
}

.staff-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.status-indicator {
    font-size: 0.8rem;
}

.status-indicator.online {
    color: var(--success-color);
}

.status-indicator.offline {
    color: var(--text-muted);
}

footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 50px;
}
