/* ==================== PERFORMANCE MODULE ==================== */

/* Search Bar */
.perf-search-bar { padding: 20px 32px 0; display: flex; flex-direction: column; gap: 12px; }
.perf-search-wrap { position: relative; display: flex; align-items: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 0 16px; max-width: 480px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.perf-search-wrap svg { flex-shrink: 0; color: #94a3b8; }
.perf-search-wrap input { flex: 1; border: none; outline: none; padding: 12px; font-size: 14px; font-family: inherit; background: transparent; }
.perf-search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; margin-top: 4px; max-height: 240px; overflow-y: auto; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,0.12); display: none; }
.perf-search-dropdown.open { display: block; }
.perf-search-item { padding: 10px 16px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 10px; transition: background 0.15s; }
.perf-search-item:hover { background: #f1f5f9; }
.perf-search-item .agent-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }

/* Period Filters */
.perf-period-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.perf-filter-btn { padding: 6px 14px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; font-size: 12px; font-weight: 500; color: #64748b; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.perf-filter-btn:hover { border-color: #0f172a; color: #0f172a; }
.perf-filter-btn.active { background: #0f172a; color: #fff; border-color: #0f172a; }
.perf-custom-date { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #64748b; }
.perf-custom-date input { padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 12px; font-family: inherit; }

/* Empty State */
.perf-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 32px; color: #94a3b8; text-align: center; }
.perf-empty h3 { margin: 16px 0 6px; font-size: 18px; color: #64748b; }
.perf-empty p { font-size: 13px; }

/* KPI Grid */
.perf-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; padding: 20px 32px 0; }
.perf-kpi-card { background: #fff; border: 1px solid #f1f5f9; border-radius: 12px; padding: 16px; position: relative; overflow: hidden; }
.perf-kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.perf-kpi-card.kpi-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.perf-kpi-card.kpi-green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.perf-kpi-card.kpi-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.perf-kpi-card.kpi-red::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.perf-kpi-card.kpi-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.perf-kpi-card.kpi-indigo::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.perf-kpi-card.kpi-teal::before { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.perf-kpi-card.kpi-pink::before { background: linear-gradient(90deg, #ec4899, #f472b6); }
.perf-kpi-card.kpi-cyan::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.perf-kpi-card.kpi-orange::before { background: linear-gradient(90deg, #f97316, #fb923c); }
.perf-kpi-card.kpi-slate::before { background: linear-gradient(90deg, #64748b, #94a3b8); }
.perf-kpi-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; margin-bottom: 4px; }
.perf-kpi-value { font-size: 24px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.perf-kpi-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* Score + Insight Row */
.perf-score-row { display: grid; grid-template-columns: 280px 1fr; gap: 16px; padding: 20px 32px 0; }
.perf-score-card { background: #fff; border: 1px solid #f1f5f9; border-radius: 14px; padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.perf-score-ring { position: relative; width: 120px; height: 120px; margin-bottom: 12px; }
.perf-score-ring svg { transform: rotate(-90deg); width: 120px; height: 120px; }
.ring-bg { fill: none; stroke: #f1f5f9; stroke-width: 8; }
.ring-fill { fill: none; stroke: #10b981; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset 1.2s ease, stroke 0.5s; }
.perf-score-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 32px; font-weight: 800; color: #0f172a; }
.perf-score-label { font-size: 14px; font-weight: 600; color: #334155; }
.perf-score-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-top: 8px; }

.perf-insight-card { background: #fff; border: 1px solid #f1f5f9; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; }
.perf-insight-card h4 { font-size: 14px; font-weight: 600; color: #0f172a; margin-bottom: 10px; }
.perf-insight-card p { font-size: 13px; color: #475569; line-height: 1.6; flex: 1; }
.perf-motivation { margin-top: 14px; padding: 12px 16px; background: linear-gradient(135deg, #f0f9ff, #eff6ff); border-radius: 10px; font-size: 12px; color: #475569; line-height: 1.6; border-left: 3px solid #3b82f6; }

/* Charts Grid */
.perf-charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; padding: 20px 32px 0; }
.perf-chart-card { background: #fff; border: 1px solid #f1f5f9; border-radius: 14px; padding: 20px; }
.perf-chart-card h4 { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 12px; }
.perf-chart-card canvas { max-height: 260px; }

/* Bottom Row */
.perf-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px 32px 0; }
.perf-activity-card, .perf-ranking-card { background: #fff; border: 1px solid #f1f5f9; border-radius: 14px; padding: 20px; max-height: 400px; overflow-y: auto; }
.perf-activity-card h4, .perf-ranking-card h4 { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 12px; }

/* Activity Timeline */
.perf-activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f8fafc; }
.perf-activity-item:last-child { border-bottom: none; }
.perf-activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.perf-activity-dot.dot-blue { background: #3b82f6; }
.perf-activity-dot.dot-green { background: #10b981; }
.perf-activity-dot.dot-amber { background: #f59e0b; }
.perf-activity-dot.dot-red { background: #ef4444; }
.perf-activity-dot.dot-purple { background: #8b5cf6; }
.perf-activity-info { flex: 1; }
.perf-activity-time { font-size: 11px; color: #94a3b8; }
.perf-activity-text { font-size: 12px; color: #334155; margin-top: 2px; }

/* Ranking */
.perf-ranking-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f8fafc; }
.perf-ranking-item:last-child { border-bottom: none; }
.perf-rank { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.perf-rank.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.perf-rank.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.perf-rank.rank-3 { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }
.perf-rank.rank-other { background: #f1f5f9; color: #64748b; }
.perf-ranking-info { flex: 1; }
.perf-ranking-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.perf-ranking-meta { font-size: 11px; color: #94a3b8; }
.perf-ranking-score { font-size: 14px; font-weight: 700; color: #0f172a; }

/* Export Bar */
.perf-export-bar { padding: 20px 32px 32px; display: flex; gap: 8px; }

.booking-export-bar { padding: 0 0 16px; display: flex; gap: 10px; }

.export-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px; border: none;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.export-btn svg { width: 14px; height: 14px; }
.export-pdf { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.export-pdf:hover { background: #fee2e2; border-color: #f87171; }
.export-excel { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.export-excel:hover { background: #dcfce7; border-color: #4ade80; }
.export-csv { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.export-csv:hover { background: #dbeafe; border-color: #60a5fa; }

/* ==================== ACCESS LOGS MODULE ==================== */

.al-security-bar { margin: 0 32px; padding: 12px 16px; background: linear-gradient(135deg, #fef2f2, #fff1f2); border: 1px solid #fecaca; border-radius: 10px; display: flex; align-items: center; gap: 10px; color: #991b1b; font-size: 13px; font-weight: 500; }
.al-tab-bar { display: flex; gap: 2px; padding: 16px 32px 0; }
.al-tab { padding: 8px 18px; border-radius: 8px; border: none; background: #f1f5f9; font-size: 13px; font-weight: 500; color: #64748b; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.al-tab.active { background: #0f172a; color: #fff; }

.al-filters { display: flex; gap: 8px; padding: 12px 32px; flex-wrap: wrap; align-items: center; }
.al-filters input, .al-filters select { padding: 7px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 12px; font-family: inherit; outline: none; background: #fff; }
.al-filters input:focus, .al-filters select:focus { border-color: #0f172a; }

.al-table-wrap { margin: 0 32px 32px; background: #fff; border-radius: 14px; border: 1px solid #f1f5f9; overflow: hidden; }
.al-table { width: 100%; border-collapse: collapse; }
.al-table th { padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #94a3b8; background: #f8fafc; border-bottom: 2px solid #f1f5f9; white-space: nowrap; }
.al-table td { padding: 10px 14px; font-size: 12px; color: #334155; border-bottom: 1px solid #f8fafc; white-space: nowrap; }
.al-table tr:hover td { background: #fafbfd; }
.al-empty { padding: 40px; text-align: center; color: #94a3b8; font-size: 13px; }

.al-status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.al-status-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.al-status-success { background: #d1fae5; color: #065f46; }
.al-status-success::before { background: #10b981; }
.al-status-failed { background: #fee2e2; color: #991b1b; }
.al-status-failed::before { background: #ef4444; }

.al-action-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.al-action-login { background: #dbeafe; color: #1e40af; }
.al-action-logout { background: #f1f5f9; color: #475569; }
.al-action-created { background: #d1fae5; color: #065f46; }
.al-action-edited { background: #fef3c7; color: #92400e; }
.al-action-deleted { background: #fee2e2; color: #991b1b; }
.al-action-status { background: #ede9fe; color: #5b21b6; }
.al-action-fare { background: #e0f2fe; color: #075985; }
.al-action-user { background: #fce7f3; color: #9d174d; }

.al-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 12px; }
.al-page-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid #e2e8f0; background: #fff; font-size: 12px; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.al-page-btn:hover { border-color: #0f172a; }
.al-page-btn.active { background: #0f172a; color: #fff; border-color: #0f172a; }
.al-page-info { font-size: 12px; color: #94a3b8; }

/* Responsive */
@media (max-width: 1024px) {
    .perf-score-row { grid-template-columns: 1fr; }
    .perf-bottom-row { grid-template-columns: 1fr; }
    .perf-charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .perf-kpi-grid { grid-template-columns: repeat(2, 1fr); padding: 12px 16px 0; }
    .perf-search-bar, .perf-score-row, .perf-charts-grid, .perf-bottom-row, .perf-export-bar,
    .al-filters, .al-table-wrap, .al-tab-bar, .al-security-bar { padding-left: 16px; padding-right: 16px; margin-left: 0; margin-right: 0; }
    .al-filters { flex-direction: column; align-items: stretch; }
}
