/* =====================================================
   Sürücü Karnesi— driver-performance.css
   ===================================================== */

/* ── HERO STAGE ──────────────────────────────────── */
.dp-hero-stage {
    position: relative;
    min-height: 560px;
    border-radius: 30px;
    background: linear-gradient(145deg, #0f2339 0%, #143657 100%);
    overflow: hidden;
    box-shadow: 0 28px 60px rgba(12, 34, 56, 0.18);
}

.dp-stage-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(48px);
    animation: dpPulseGlow 7s ease-in-out infinite;
}

.dp-glow-a {
    width: 220px; height: 220px;
    top: 20px; right: 30px;
    background: rgba(13, 110, 253, 0.28);
}

.dp-glow-b {
    width: 160px; height: 160px;
    bottom: 40px; left: 50px;
    background: rgba(74, 222, 128, 0.18);
    animation-delay: -3s;
}

/* ── SCORECARD WINDOW ────────────────────────────── */
.dp-scorecard-window {
    position: absolute;
    top: 28px; left: 28px; right: 28px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 20px;
    z-index: 2;
    animation: dpFloatSoft 6s ease-in-out infinite;
}

.dp-sc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.dp-sc-label {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 3px;
}

.dp-sc-title-block strong {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── SCORE RING ──────────────────────────────────── */
.dp-sc-score-ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.dp-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dp-ring-arc {
    stroke-dasharray: 0 201;
    animation: dpArcDraw 1.2s .4s ease forwards;
}

.dp-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dp-ring-center strong {
    font-size: 1.3rem;
    font-weight: 800;
    color: #4ade80;
    line-height: 1;
}

.dp-ring-center span {
    font-size: .6rem;
    color: rgba(255,255,255,0.55);
}

/* ── SCORE BARS ──────────────────────────────────── */
.dp-sc-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.dp-scb-row {
    display: grid;
    grid-template-columns: 80px 1fr 28px;
    align-items: center;
    gap: 8px;
    font-size: .74rem;
    color: rgba(255,255,255,0.72);
}

.dp-scb-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    overflow: hidden;
}

.dp-scb-fill {
    height: 100%;
    border-radius: 999px;
    width: var(--w);
    animation: dpBarGrow .9s ease both;
}

.dp-scbf-green { background: linear-gradient(90deg, #4ade80, #86efac); }
.dp-scbf-amber { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.dp-scbf-red   { background: linear-gradient(90deg, #ef4444, #f87171); }

.dp-scb-val {
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    text-align: right;
}

/* ── EVENT COUNTERS ──────────────────────────────── */
.dp-sc-events {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.dp-sce-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 12px;
    text-align: center;
    transition: transform .2s ease;
}

.dp-sce-item i { font-size: .95rem; margin-bottom: 2px; }
.dp-sce-item strong { font-size: .95rem; font-weight: 800; color: #fff; }
.dp-sce-item span { font-size: .62rem; color: rgba(255,255,255,0.55); }

.dp-sce-warn   { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.2); }
.dp-sce-danger { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

.dp-sc-footer {
    display: flex;
    gap: 14px;
    font-size: .74rem;
    color: rgba(255,255,255,0.60);
    flex-wrap: wrap;
}

.dp-sc-footer i { margin-right: 4px; }
.dp-sc-zarar { color: #fcd34d; }

/* ── FLOATING CARDS ──────────────────────────────── */
.dp-float-card {
    position: absolute;
    width: 185px;
    padding: 13px 15px;
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    color: #fff;
    z-index: 10;
}

.dp-float-card span {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 4px;
}

.dp-float-card strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 3px;
}

.dp-float-card p {
    margin: 0;
    font-size: .76rem;
    color: rgba(255,255,255,0.65);
}

.dp-float-a {
    bottom: 20px;
    left: 24px;
    animation: dpFloatCardA 7s ease-in-out infinite;
}

.dp-float-b {
    bottom: 20px;
    right: 24px;
    animation: dpFloatCardB 6.5s ease-in-out infinite;
}

/* ── SHARED CARD BASE ────────────────────────────── */
.dp-dist-card, .dp-events-card, .dp-idle-card,
.dp-comp-card, .dp-rank-card, .dp-km-card, .dp-idle-visual-card {
    background: #fff;
    border: 1px solid rgba(13,34,56,0.08);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 14px 32px rgba(12,34,56,0.05);
}

.dp-card-sub {
    font-size: .86rem;
    color: #6a7a88;
    margin-bottom: 18px;
    line-height: 1.65;
}

/* ── FLEET SECTION ───────────────────────────────── */
.dp-fleet-section {
    padding-top: 20px;
    padding-bottom: 40px;
}

/* ── EKO PUAN DAĞILIMI ───────────────────────────── */
.dp-dist-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

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

.dp-dist-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-dist-badge {
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 999px;
}

.dp-badge-green { background: rgba(16,185,129,0.12); color: #059669; }
.dp-badge-blue  { background: rgba(13,110,253,0.10); color: #0d6efd; }
.dp-badge-amber { background: rgba(245,158,11,0.12); color: #d97706; }

.dp-dist-label small { color: #94a3b8; font-size: .74rem; }

.dp-dist-track {
    height: 12px;
    border-radius: 999px;
    background: #eef3f8;
    overflow: hidden;
}

.dp-dist-fill {
    height: 100%;
    border-radius: 999px;
    width: var(--w);
    animation: dpBarGrow .9s ease both;
}

.dp-df-green { background: linear-gradient(90deg, #059669, #34d399); }
.dp-df-blue  { background: linear-gradient(90deg, #0d6efd, #56a0ff); }
.dp-df-amber { background: linear-gradient(90deg, #d97706, #fbbf24); }

.dp-dist-count {
    font-size: .78rem;
    color: #6a7a88;
    align-self: flex-end;
}

/* ── AVG GAUGE ───────────────────────────────────── */
.dp-avg-gauge {
    margin-top: 8px;
    background: #f8fbfe;
    border-radius: 16px;
    padding: 14px 16px;
}

.dp-avg-label {
    font-size: .76rem;
    color: #6a7a88;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.dp-avg-track {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 40%, #10b981 100%);
    position: relative;
    margin-bottom: 6px;
}

.dp-avg-fill { display: none; }

.dp-avg-marker {
    position: absolute;
    left: var(--pos);
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: #fff;
    border: 3px solid #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dp-avg-marker span {
    font-size: .6rem;
    font-weight: 800;
    color: #0d2238;
}

.dp-avg-scale {
    display: flex;
    justify-content: space-between;
    font-size: .7rem;
    color: #94a3b8;
}

/* ── EVENT LIST ──────────────────────────────────── */
.dp-event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dp-ev-item {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: dpFadeUp .5s ease both;
}

.dp-ev-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

.dp-ev-red    { background: rgba(239,68,68,0.10);  color: #ef4444; }
.dp-ev-orange { background: rgba(249,115,22,0.10); color: #f97316; }
.dp-ev-amber  { background: rgba(245,158,11,0.10); color: #f59e0b; }
.dp-ev-blue   { background: rgba(99,102,241,0.10); color: #6366f1; }

.dp-ev-body { flex: 1; min-width: 0; }
.dp-ev-body strong { display: block; font-size: .95rem; font-weight: 700; color: #0d2238; }
.dp-ev-body span   { font-size: .76rem; color: #6a7a88; }

.dp-ev-bar {
    width: 60px;
    height: 5px;
    border-radius: 999px;
    background: #eef3f8;
    overflow: hidden;
    flex-shrink: 0;
}

.dp-ev-fill {
    height: 100%;
    border-radius: 999px;
    width: var(--w);
    animation: dpBarGrow .9s ease both;
}

/* ── IDLE CARD ───────────────────────────────────── */
.dp-idle-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.dp-idle-big {
    background: #f8fbfe;
    border-radius: 14px;
    padding: 12px 14px;
}

.dp-idle-big strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0d2238;
    line-height: 1;
    margin-bottom: 4px;
}

.dp-idle-big span { font-size: .78rem; color: #6a7a88; }
.dp-idle-loss strong { color: #d97706; }

.dp-idle-ratio { margin-bottom: 16px; }
.dp-ir-label { display: flex; justify-content: space-between; font-size: .8rem; color: #6a7a88; margin-bottom: 6px; }
.dp-ir-label strong { color: #0d2238; font-weight: 700; }

.dp-ir-track {
    height: 8px;
    border-radius: 999px;
    background: #eef3f8;
    overflow: hidden;
    margin-bottom: 5px;
}

.dp-ir-fill {
    height: 100%;
    border-radius: 999px;
    width: var(--w);
    background: linear-gradient(90deg, #f59e0b, #fcd34d);
    animation: dpBarGrow .9s ease both;
}

.dp-idle-ratio small { font-size: .74rem; color: #94a3b8; }

.dp-idle-top { background: #f8fbfe; border-radius: 14px; padding: 12px 14px; }
.dp-it-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6a7a88; margin-bottom: 8px; }

.dp-it-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eef3f8;
}
.dp-it-row:last-child { border-bottom: none; }

.dp-it-val { font-size: .82rem; font-weight: 700; color: #0d2238; }

/* ── SCORECARD SECTION ───────────────────────────── */
.dp-scorecard-section {
    padding-top: 28px;
    padding-bottom: 40px;
}

/* ── COMPONENTS ──────────────────────────────────── */
.dp-comp-list { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }

.dp-comp-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fbfe;
    animation: dpFadeUp .5s ease both;
    transition: background .2s ease;
}
.dp-comp-item:hover { background: #f0f7ff; }

.dp-comp-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}

.dp-comp-body { flex: 1; }
.dp-comp-body strong { display: block; font-size: .9rem; font-weight: 700; color: #0d2238; margin-bottom: 3px; }
.dp-comp-body p { margin: 0; font-size: .8rem; color: #6a7a88; line-height: 1.6; }

.dp-comp-weight span {
    font-size: .7rem;
    font-weight: 700;
    color: #0d6efd;
    background: rgba(13,110,253,0.08);
    padding: .25rem .5rem;
    border-radius: 8px;
    white-space: nowrap;
}

/* ── RANK CARD ───────────────────────────────────── */
.dp-rank-card-warn {
    border-color: rgba(245,158,11,0.15);
    background: linear-gradient(180deg, #fff 0%, #fffbf0 100%);
}

.dp-rank-badge {
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: 999px;
}

.dp-rank-top  { background: rgba(16,185,129,0.10); color: #059669; }
.dp-rank-warn { background: rgba(245,158,11,0.12); color: #d97706; }

.dp-rank-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.dp-rank-row {
    display: grid;
    grid-template-columns: 24px 100px 1fr 90px;
    align-items: center;
    gap: 10px;
    animation: dpFadeUp .5s ease both;
}

.dp-rank-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 800;
}
.dp-rn-gold   { background: #fef3c7; color: #92400e; }
.dp-rn-silver { background: #f1f5f9; color: #475569; }
.dp-rn-bronze { background: #fdf4e7; color: #78350f; }

.dp-warn-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    margin: 0 7px;
}

.dp-plate-tag {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .78rem;
    font-weight: 700;
    color: #0d2238;
    background: #f0f5fa;
    padding: .25rem .55rem;
    border-radius: 8px;
    white-space: nowrap;
}

.dp-plate-sm {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .74rem;
    font-weight: 600;
    color: #29455d;
}

.dp-rank-bar-wrap { flex: 1; }
.dp-rank-track {
    height: 8px;
    border-radius: 999px;
    background: #eef3f8;
    overflow: hidden;
}

.dp-rank-fill {
    height: 100%;
    border-radius: 999px;
    width: var(--w);
    animation: dpBarGrow .9s ease both;
}

.dp-rf-green { background: linear-gradient(90deg, #059669, #34d399); }
.dp-rf-red   { background: linear-gradient(90deg, #ef4444, #f87171); }
.dp-rf-amber { background: linear-gradient(90deg, #d97706, #fbbf24); }

.dp-rank-score { font-size: .78rem; font-weight: 700; text-align: right; }
.dp-rs-green { color: #059669; }
.dp-rs-red   { color: #dc2626; }
.dp-rs-amber { color: #d97706; }

/* ── KM SECTION ──────────────────────────────────── */
.dp-km-section { padding-top: 20px; padding-bottom: 20px; }

.dp-km-bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }

.dp-km-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 10px;
}

.dp-km-track {
    height: 26px;
    border-radius: 999px;
    background: #eef3f8;
    overflow: hidden;
}

.dp-km-fill {
    height: 100%;
    border-radius: 999px;
    width: var(--w);
    background: linear-gradient(90deg, #0d6efd, #56a0ff);
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: .74rem;
    color: #fff;
    font-weight: 600;
    animation: dpBarGrow .9s ease both;
    min-width: 50px;
}

.dp-km-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: rgba(13,110,253,0.04);
    border: 1px solid rgba(13,110,253,0.10);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: .82rem;
    color: #29455d;
    line-height: 1.65;
}
.dp-km-note i { color: #0d6efd; flex-shrink: 0; margin-top: 2px; }
.dp-km-note p { margin: 0; }

/* ── IDLE VISUAL ─────────────────────────────────── */
.dp-idle-donut-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.dp-idle-ring {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.dp-idle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dp-idle-arc {
    animation: dpArcDraw 1.2s .4s ease forwards;
    stroke-dasharray: 0 339;
}

.dp-idle-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dp-idle-ring-center strong { font-size: 1.4rem; font-weight: 800; color: #f59e0b; line-height: 1; }
.dp-idle-ring-center span   { font-size: .72rem; color: #6a7a88; margin-top: 3px; }

.dp-idle-ring-legend { display: flex; flex-direction: column; gap: 10px; }
.dp-irl-item { display: flex; align-items: center; gap: 8px; }
.dp-irl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dp-irl-item strong { display: block; font-size: .9rem; font-weight: 700; color: #0d2238; }
.dp-irl-item small  { display: block; font-size: .74rem; color: #6a7a88; }

.dp-idle-table { display: flex; flex-direction: column; gap: 0; }
.dp-it-head {
    display: grid;
    grid-template-columns: 1fr 80px 70px;
    padding: 0 12px 6px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6a7a88;
}
.dp-it-row2 {
    display: grid;
    grid-template-columns: 1fr 80px 70px;
    align-items: center;
    padding: 9px 12px;
    border-radius: 12px;
    background: #f8fbfe;
    margin-bottom: 4px;
    font-size: .84rem;
    animation: dpFadeUp .5s ease both;
}
.dp-it-high { color: #b91c1c; font-weight: 700; }
.dp-it-mid  { color: #d97706; font-weight: 700; }
.dp-it-loss { color: #6a7a88; font-weight: 600; }

/* ── FEATURES SECTION ────────────────────────────── */
.dp-features-section { padding-top: 20px; padding-bottom: 20px; }

.dp-feat-card {
    transition: transform .28s ease, box-shadow .28s ease;
    animation: dpFadeUp .5s ease both;
}

.dp-feat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(12,34,56,0.09);
}

/* ── KEYFRAMES ───────────────────────────────────── */
@keyframes dpPulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.08); opacity: .80; }
}

@keyframes dpFloatSoft {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

@keyframes dpFloatCardA {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

@keyframes dpFloatCardB {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

@keyframes dpFadeUp {
    0%   { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes dpBarGrow {
    0%   { transform: scaleX(0); transform-origin: left; }
    100% { transform: scaleX(1); }
}

@keyframes dpArcDraw {
    0%   { stroke-dasharray: 0 339; }
    100% { stroke-dasharray: 174 201; }
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 991.98px) {
    .dp-hero-stage { min-height: 480px; }
    .dp-scorecard-window { top: 18px; left: 18px; right: 18px; }
    .dp-float-a, .dp-float-b { display: none; }
    .dp-sc-events { grid-template-columns: repeat(2, 1fr); }
    .dp-rank-row { grid-template-columns: 24px 90px 1fr 80px; }
}

@media (max-width: 767.98px) {
    .dp-sc-events { grid-template-columns: repeat(2, 1fr); }
    .dp-rank-row { grid-template-columns: 24px 80px 1fr; }
    .dp-rank-score { display: none; }
    .dp-idle-donut-wrap { flex-direction: column; align-items: flex-start; }
    .dp-km-row { grid-template-columns: 90px 1fr; }
}
