/* ============================================
   RiseGo Admin Panel - Premium Dark UI
   Mevcut frontend tasarımıyla uyumlu
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #07080a;
    --bg-elevated: #0f1117;
    --surface: #161921;
    --surface-hover: #1c2030;
    --surface-active: #232839;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(99, 102, 241, 0.5);
    --text: #f1f3f9;
    --text-secondary: #8b8fa7;
    --text-muted: #565b73;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-subtle: rgba(99, 102, 241, 0.08);
    --success: #34d399;
    --success-glow: rgba(52, 211, 153, 0.15);
    --error: #f87171;
    --error-glow: rgba(248, 113, 113, 0.15);
    --warning: #fbbf24;
    --gold: #f59e0b;
    --silver: #94a3b8;
    --bronze: #cd7c2f;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.08);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   Ambient Background
   ============================================ */

.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-bg::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -15%;
    width: 70%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.07) 0%, transparent 70%);
    animation: ambientFloat 20s ease-in-out infinite;
}

.ambient-bg::after {
    content: '';
    position: absolute;
    bottom: -25%;
    right: -15%;
    width: 55%;
    height: 55%;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
    animation: ambientFloat 25s ease-in-out infinite reverse;
}

@keyframes ambientFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(2%, -3%); }
    66% { transform: translate(-2%, 2%); }
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
    50% { box-shadow: 0 0 24px 4px var(--accent-glow); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* ============================================
   Admin Container
   ============================================ */

.admin-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Header
   ============================================ */

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    margin-bottom: 8px;
    animation: fadeIn 0.5s var(--ease);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #c7c9d3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-hover);
    background: var(--accent-subtle);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: pulse-glow 2s infinite;
}

.header-status.online .status-dot {
    background: var(--success);
}

.header-status.online .status-text {
    color: var(--success);
}

.header-status.error .status-dot {
    background: var(--error);
}

.header-status.error .status-text {
    color: var(--error);
}

/* ============================================
   Dashboard Grid
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    flex: 1;
    margin-bottom: 32px;
}

/* ============================================
   Admin Cards
   ============================================ */

.admin-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s var(--ease);
    transition: all 0.3s var(--ease);
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}

.admin-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.015), transparent);
    pointer-events: none;
}

.leaderboard-card {
    animation-delay: 0.1s;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s var(--ease);
}

.campaign-icon {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.15);
    color: var(--success);
}

.leaderboard-icon {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ============================================
   Campaign Card
   ============================================ */

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

.campaign-city-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.campaign-select {
    width: 100%;
    padding: 12px 14px;
    padding-right: 40px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8fa7' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

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

.campaign-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.campaign-status {
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s var(--ease);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.status-badge.active {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.status-badge.inactive {
    background: var(--error-glow);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.active .badge-dot {
    animation: pulse-glow 2s infinite;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.current-campaign-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.6;
    word-break: break-word;
}

.campaign-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Campaign Input */

.campaign-input-group {
    position: relative;
}

.input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

.campaign-textarea {
    width: 100%;
    padding: 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
    outline: none;
    transition: all 0.25s var(--ease);
}

.campaign-textarea::placeholder {
    color: var(--text-muted);
}

.campaign-textarea:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
}

.campaign-textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--surface-hover);
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

/* Action Buttons */

.campaign-actions {
    display: flex;
    gap: 12px;
}

.btn-approve,
.btn-delete {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    position: relative;
    overflow: hidden;
}

.btn-approve {
    background: var(--success);
    color: #fff;
}

.btn-approve::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn-approve:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-approve:hover:not(:disabled) {
    background: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.3);
}

.btn-approve:active:not(:disabled) {
    transform: translateY(0);
}

.btn-approve:disabled {
    background: var(--surface-active);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-delete {
    background: var(--surface);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-delete:hover:not(:disabled) {
    background: var(--error-glow);
    border-color: rgba(248, 113, 113, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(248, 113, 113, 0.15);
}

.btn-delete:active:not(:disabled) {
    transform: translateY(0);
}

.btn-delete:disabled {
    background: var(--surface);
    color: var(--text-muted);
    border-color: var(--border);
    cursor: not-allowed;
}

/* Toast Notification */

.toast {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    animation: toastIn 0.3s var(--ease);
}

.toast.show {
    display: flex;
}

.toast.success {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.toast.error {
    background: var(--error-glow);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.toast-icon::before {
    font-size: 16px;
}

.toast.success .toast-icon::before {
    content: '✓';
}

.toast.error .toast-icon::before {
    content: '✗';
}

/* ============================================
   Leaderboard Card
   ============================================ */

.leaderboard-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tarih & Şehir Filtreleme */
.leaderboard-filter {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    background: var(--surface);
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 4px;
}

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

.filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

/* Filtrele butonu tüm genişliği kaplar */
.btn-filter {
    grid-column: 1 / -1;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.btn-filter:hover:not(:disabled) {
    opacity: 0.9;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.btn-filter:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.btn-filter:disabled {
    background: var(--surface-active);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.filter-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.2s var(--ease);
}

select.filter-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8fa7' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-group-city {
    /* Grid context içinde zaten tam genişlik */
}

.filter-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.filter-input:hover:not(:focus) {
    border-color: var(--border-hover);
}

/* Date Input Fix for Chrome/Edge */
.filter-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}
.filter-input::-webkit-calendar-picker-indicator:hover {
    opacity: 0.9;
}

.period-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(168, 85, 247, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--accent-hover);
    line-height: 1.5;
    flex-wrap: wrap;
}

.period-info svg {
    flex-shrink: 0;
}

.leaderboard-content {
    min-height: 200px;
}

.leaderboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 50px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

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

.leaderboard-error {
    text-align: center;
    color: var(--error);
    padding: 40px 0;
    font-size: 14px;
}

/* Leaderboard List */

.lb-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lb-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.25s var(--ease);
    animation: slideInRight 0.4s var(--ease);
}

.lb-item:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.lb-item:nth-child(1) { animation-delay: 0.05s; }
.lb-item:nth-child(2) { animation-delay: 0.1s; }
.lb-item:nth-child(3) { animation-delay: 0.15s; }
.lb-item:nth-child(4) { animation-delay: 0.2s; }
.lb-item:nth-child(5) { animation-delay: 0.25s; }
.lb-item:nth-child(6) { animation-delay: 0.3s; }
.lb-item:nth-child(7) { animation-delay: 0.35s; }
.lb-item:nth-child(8) { animation-delay: 0.4s; }
.lb-item:nth-child(9) { animation-delay: 0.45s; }
.lb-item:nth-child(10) { animation-delay: 0.5s; }

.lb-rank {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.lb-rank-1 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #fff;
    font-size: 15px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.lb-rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    border: none;
    color: #fff;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.2);
}

.lb-rank-3 {
    background: linear-gradient(135deg, #d97706, #92400e);
    border: none;
    color: #fff;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.lb-driver-name {
    flex: 1;
    margin-left: 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-trip-badge {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    white-space: nowrap;
}

.lb-trip-label {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 3px;
}

.lb-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Leaderboard Actions (Tabs + Reload) */

.leaderboard-actions {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
}

.leaderboard-tabs {
    flex: 1;
    display: flex;
    gap: 8px;
}

.btn-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-align: center;
    line-height: 1.3;
}

.btn-tab:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-tab.active {
    background: var(--accent-subtle);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--accent-hover);
}

.btn-tab.active:hover {
    background: rgba(99, 102, 241, 0.12);
}

/* Reload Button */

.btn-reload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 11px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    white-space: nowrap;
}

.btn-reload:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    color: var(--accent-hover);
}

.btn-reload:active {
    transform: scale(0.98);
}

/* ============================================
   Spinner
   ============================================ */

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-large {
    width: 36px;
    height: 36px;
    border: 3px solid var(--surface-active);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   Footer
   ============================================ */

.admin-footer {
    padding: 24px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* ============================================
   Leaderboard Stats Row
   ============================================ */

.lb-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 20px;
}

.lb-stat {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.lb-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lb-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Responsive
   ============================================ */

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

    .admin-container {
        padding: 0 16px;
    }
}

@media (max-width: 640px) {
    .admin-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .admin-card {
        padding: 24px 20px;
    }

    /* Filtre 1 sütuna düşer, buton zaten full-width */
    .leaderboard-filter {
        grid-template-columns: 1fr 1fr;
    }

    .campaign-actions {
        flex-direction: column;
    }

    .leaderboard-actions {
        flex-direction: column;
    }

    .leaderboard-tabs {
        flex-direction: row;
    }

    .btn-reload {
        width: 100%;
    }

    .lb-item {
        padding: 12px 14px;
    }

    .lb-driver-name {
        font-size: 14px;
    }

    .lb-trip-badge {
        font-size: 13px;
        padding: 5px 10px;
    }
}

@media (max-width: 440px) {
    .leaderboard-filter {
        grid-template-columns: 1fr;
    }

    .leaderboard-tabs {
        flex-direction: column;
    }
}

@media (max-width: 380px) {
    .card-header {
        flex-direction: column;
        gap: 12px;
    }

    .lb-rank {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

/* ============================================
   Login Screen (Admin OTP)
   ============================================ */

.login-screen {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s var(--ease);
}

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

.login-header .logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-step {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-input::placeholder {
    color: var(--text-muted);
}

.login-input.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
}

.login-error {
    font-size: 13px;
    color: var(--error);
    min-height: 18px;
}

.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-login:hover:not(:disabled) {
    opacity: 0.95;
}

.btn-login:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 0;
    text-decoration: underline;
}

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

.otp-sent-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--surface-hover);
    color: var(--error);
    border-color: rgba(248, 113, 113, 0.3);
}
