/**
 * Modernes High-End Theme für Wochenabgaben Dashboard
 * Speziell abgestimmt auf GTA / FiveM / Gaming-Syndikate & Dark UI
 */

:root {
    --bg-base: #080d1a;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(24, 34, 56, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-focus: rgba(56, 189, 248, 0.5);
    
    /* Farben & Glow */
    --emerald-primary: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.25);
    --rose-primary: #f43f5e;
    --rose-glow: rgba(244, 63, 94, 0.25);
    --blue-primary: #3b82f6;
    --blue-glow: rgba(59, 130, 246, 0.25);
    --purple-primary: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.25);
    --gold-primary: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.3);
}

/* Basis & Ambient Hintergrund */
body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 40%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 40%),
        radial-gradient(at 50% 100%, rgba(168, 85, 247, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: #f1f5f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    letter-spacing: -0.01em;
}

/* Zahlen lesbar & gleichbreit formatieren */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Glassmorphism Cards */
.card-custom {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-custom:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.6);
}

/* Hero Banner */
.hero-banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* KPI Stat Cards */
.kpi-card {
    position: relative;
    overflow: hidden;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    transition: all 0.25s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5);
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.kpi-total .kpi-icon-wrapper {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.kpi-gruen .kpi-icon-wrapper {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.kpi-schwarz .kpi-icon-wrapper {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.kpi-members .kpi-icon-wrapper {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Glowing Top Accent on KPI cards */
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    opacity: 0.8;
}

.kpi-total::before { background: linear-gradient(90deg, transparent, #3b82f6, transparent); }
.kpi-gruen::before { background: linear-gradient(90deg, transparent, #10b981, transparent); }
.kpi-schwarz::before { background: linear-gradient(90deg, transparent, #f43f5e, transparent); }
.kpi-members::before { background: linear-gradient(90deg, transparent, #a855f7, transparent); }

/* Top 3 Podium Cards */
.podium-card {
    position: relative;
    padding: 20px;
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

.podium-card.rank-1 {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(17, 24, 39, 0.85) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.15);
}

.podium-card.rank-2 {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, rgba(17, 24, 39, 0.85) 100%);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.podium-card.rank-3 {
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.08) 0%, rgba(17, 24, 39, 0.85) 100%);
    border: 1px solid rgba(180, 83, 9, 0.3);
}

.podium-card:hover {
    transform: translateY(-3px);
}

.podium-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.podium-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #1e293b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    border: 2px solid transparent;
}

.podium-card.rank-1 .podium-avatar {
    border-color: #f59e0b;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}
.podium-card.rank-2 .podium-avatar {
    border-color: #94a3b8;
    box-shadow: 0 0 15px rgba(148, 163, 184, 0.3);
}
.podium-card.rank-3 .podium-avatar {
    border-color: #b45309;
    box-shadow: 0 0 15px rgba(180, 83, 9, 0.3);
}

.podium-crown {
    position: absolute;
    top: -12px;
    right: -6px;
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

/* Empfänger Duell Bar */
.duel-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 22px;
}

.duel-bar {
    height: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.duel-bar-alessio {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.6s ease;
}

.duel-bar-jaywa {
    background: linear-gradient(90deg, #a855f7, #c084fc);
    transition: width 0.6s ease;
}

/* Badges */
.badge-gruen {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
}

.badge-schwarz {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
}

.badge-alessio {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
}

.badge-jaywa {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
}

/* Quick Amount Buttons */
.btn-quick-amount {
    background-color: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 10px;
    transition: all 0.18s ease;
}

.btn-quick-amount:hover {
    background-color: #2563eb;
    border-color: #3b82f6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

/* Form Controls Dark */
.form-control-dark, .form-select-dark {
    background-color: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border-radius: 12px;
    padding: 10px 14px;
    backdrop-filter: blur(8px);
}

.form-control-dark:focus, .form-select-dark:focus {
    background-color: rgba(15, 23, 42, 0.95);
    border-color: #38bdf8;
    color: #f8fafc;
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.2);
}

/* Avatare & Ranking */
.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e293b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-badge {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.rank-badge-1 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.rank-badge-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}

.rank-badge-3 {
    background: linear-gradient(135deg, #b45309, #78350f);
    color: #fff;
}

.rank-badge-default {
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Dual-Progressbar (Grün + Schwarz Anteil) */
.dual-progress {
    height: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
}

.dual-progress-gruen {
    background-color: #10b981;
}

.dual-progress-schwarz {
    background-color: #f43f5e;
}

/* Table styling */
.table-custom {
    color: #cbd5e1;
    margin-bottom: 0;
}

.table-custom thead th {
    background-color: rgba(15, 23, 42, 0.7);
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 18px;
    font-weight: 700;
}

.table-custom tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.table-custom tbody tr {
    transition: background-color 0.15s ease;
}

.table-custom tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.035);
}

/* Navbar Polish */
.navbar-glass {
    background: rgba(11, 17, 32, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.nav-link {
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: 10px;
    transition: all 0.18s ease;
    color: #94a3b8 !important;
}

.nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.1);
    font-weight: 600;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #080d1a;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}
