/* ============================================
   RTA DASHBOARD - CLEAN & COMPACT DESIGN
   Version: 2.0
   ============================================ */

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
    overflow-x: hidden;
}

/* LAYOUT CONTAINER */
.app-container {
    max-width: 100vw;
    overflow-x: hidden;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
    overflow-x: hidden;
}

/* HEADER SECTION */
.dashboard-header {
    background: linear-gradient(135deg, #4c51bf 0%, #667eea 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(76, 81, 191, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.header-left p {
    opacity: 0.9;
    font-size: 14px;
}

.header-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* METRICS ROW */
.metrics-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.metrics-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.metric-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.metric-card:hover {
    border-color: #4c51bf;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 81, 191, 0.15);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.metric-icon.vehicles { background: #4c51bf; }
.metric-icon.trips { background: #38a169; }
.metric-icon.uptime { background: #805ad5; }
.metric-icon.violations { background: #e53e3e; }

.metric-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2px;
}

.metric-info p {
    font-size: 12px;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-change {
    font-size: 11px;
    font-weight: 600;
}

.metric-change.positive { color: #38a169; }
.metric-change.negative { color: #e53e3e; }
.metric-change.neutral { color: #718096; }

/* MAIN CONTENT GRID */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ASSESSMENTS SECTION */
.assessments-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.assessment-category {
    margin-bottom: 16px;
    border-left: 4px solid #4c51bf;
    background: #f7fafc;
    border-radius: 8px;
    padding: 12px;
}

.assessment-category.institutional {
    border-left-color: #ed8936;
}

.category-intro {
    background: #edf2f7;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #4c51bf;
}

.category-intro p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #4c51bf;
}

.institutional .category-intro {
    border-left-color: #ed8936;
}

.institutional .category-intro p {
    color: #c05621;
}

.violation-group {
    margin-bottom: 12px;
    background: white;
    border-radius: 8px;
    padding: 12px;
    border: 2px solid #e2e8f0;
}

/* Filters / Controls (used on violation detail & summary pages) */
.filters-section {
    background: transparent;
    margin-bottom: 16px;
}

.filters-grid {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.filter-group input[type="date"],
.filter-group input[type="search"],
.filter-group select,
.table-filters .filter-select,
.search-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #1f2937;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none; /* remove native arrow on some browsers */
}

.filter-group input[type="date"]::-webkit-inner-spin-button,
.filter-group input[type="date"]::-webkit-clear-button {
    display: none;
}

.filter-group input[type="date"]:focus,
.filter-group select:focus,
.filter-group input[type="search"]:focus,
.table-filters .filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

.filters-grid .btn,
.table-controls .btn {
    height: 40px;
    padding: 8px 12px;
}

/* Header style override for internal screens only */
.internal-page .page-header {
    background: linear-gradient(135deg, #4c51bf 0%, #667eea 100%);
    color: white;
    padding: 20px 22px;
    border-radius: 10px;
    margin-bottom: 18px;
    box-shadow: 0 6px 18px rgba(76,81,191,0.08);
}

.internal-page .page-header .header-content {
    align-items: center;
}

.internal-page .page-header .breadcrumb-link {
    color: rgba(255,255,255,0.9);
}

.internal-page .page-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: white;
}


.violation-group.severe { border-color: #e53e3e; }
.violation-group.medium { border-color: #ed8936; }
.violation-group.simple { border-color: #ecc94b; }

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.severe .group-icon { background: #e53e3e; }
.medium .group-icon { background: #ed8936; }
.simple .group-icon { background: #ecc94b; }

.group-title h3 {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
}

.group-count {
    background: #718096;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.violation-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.violation-item {
    background: #f7fafc;
    padding: 8px 10px;
    border-radius: 6px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    transition: all 0.2s ease;
}

.violation-item:hover {
    border-color: #4c51bf;
    background: white;
}

.item-number {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #2d3748;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
}

.item-text {
    flex: 1;
    color: #2d3748;
    line-height: 1.4;
}

/* SIDEBAR SECTION */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ALERTS WIDGET */
.alerts-widget {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.widget-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
}

.alert-item {
    background: #f7fafc;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #4c51bf;
    font-size: 12px;
}

.alert-item.critical { border-left-color: #e53e3e; }
.alert-item.warning { border-left-color: #ed8936; }

.alert-title {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.alert-description {
    color: #718096;
    margin-bottom: 4px;
    line-height: 1.3;
}

.alert-time {
    font-size: 10px;
    color: #a0aec0;
    font-weight: 600;
}

/* ACTIONS WIDGET */
.actions-widget {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.action-item {
    background: #f7fafc;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.action-item:hover {
    border-color: #4c51bf;
    background: white;
    transform: translateY(-1px);
}

.action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.action-icon.violations { background: linear-gradient(135deg, #dc2626, #ef4444); }
.action-icon.performance { background: linear-gradient(135deg, #10b981, #34d399); }
.action-icon.reports,
.action-icon.analytics { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.action-icon.users { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.action-icon.settings { background: linear-gradient(135deg, #6b7280, #9ca3af); }

.action-content h4 {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2px;
}

.action-content p {
    font-size: 11px;
    color: #718096;
}

.action-badge {
    background: #e2e8f0;
    color: #718096;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    margin-left: auto;
}

/* CHARTS SECTION */
.charts-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.chart-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
}

.chart-placeholder {
    height: 160px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 12px;
    border: 2px dashed #e2e8f0;
}

/* Charts Section */
.charts-section {
    margin-top: 20px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.chart-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-container {
    height: 250px;
    position: relative;
    margin-bottom: 16px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}

.legend-item .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item.severe .legend-color {
    background: #dc2626;
}

.legend-item.medium .legend-color {
    background: #f97316;
}

.legend-item.simple .legend-color {
    background: #eab308;
}

.chart-stats {
    font-size: 13px;
    color: #6b7280;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.chart-info {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.chart-info p {
    margin: 4px 0;
}

/* ========================================
   SUBPAGE STYLES - Consistent Design
   ======================================== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    padding: 32px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    color: white;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.breadcrumb-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: white;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.breadcrumb-current {
    color: white;
    font-weight: 600;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.action-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: white;
    color: #1e3a8a;
}

.action-btn.primary:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Summary Section */
.summary-section {
    margin-bottom: 24px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.summary-card .summary-icon {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.summary-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.summary-content p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 8px 0;
}

.summary-change {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.summary-change.positive {
    color: #059669;
}

.summary-change.negative {
    color: #dc2626;
}

.summary-change.neutral {
    color: #6b7280;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

.content-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Data Table Section */
.data-table-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f9fafb;
    padding: 12px;
    text-align: right;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.violation-id {
    font-family: monospace;
    font-weight: 600;
    color: #3b82f6;
}

.driver-info strong {
    display: block;
    color: #1f2937;
}

.driver-info span {
    font-size: 12px;
    color: #ffffff;
}

.severity-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f3f4f6;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f3f4f6;
}

.action-buttons {
    display: flex;
    gap: 4px;
}

.btn-sm {
    width: 28px;
    height: 28px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-sm.primary {
    color: #3b82f6;
}

.btn-sm.secondary {
    color: #6b7280;
}

.btn-sm:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    font-size: 14px;
    color: #6b7280;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #3b82f6;
    background: #f8fafc;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-page {
    padding: 0 12px;
    font-weight: 600;
    color: #1f2937;
}

/* Charts in subpages */
.chart-header {
    margin-bottom: 16px;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sidebar Widgets */
.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.widget-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.widget-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action-btn {
    padding: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
    font-size: 14px;
}

.quick-action-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateX(2px);
}

.quick-action-btn i {
    color: #3b82f6;
    width: 16px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.activity-icon.severe {
    background: #dc2626;
}

.activity-icon.success {
    background: #10b981;
}

.activity-icon.warning {
    background: #f97316;
}

.activity-content p {
    font-size: 14px;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.activity-content span {
    font-size: 12px;
    color: #6b7280;
}

.violators-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.violator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.violator-info strong {
    display: block;
    font-size: 14px;
    color: #1f2937;
}

.violator-info span {
    font-size: 12px;
    color: #6b7280;
}

.violator-count {
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
    background: #fef2f2;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Performance Page Specific Styles */
.top-performer {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.sector-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f3f4f6;
}

.score-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.score-badge.excellent {
    background: #10b981;
}

.score-badge.good {
    background: #3b82f6;
}

.score-badge.average {
    background: #f59e0b;
}

.rating {
    color: #f59e0b;
    font-weight: 600;
    font-size: 14px;
}

.performance-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.summary-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.summary-trend {
    font-size: 11px;
    font-weight: 600;
}

.summary-trend.positive {
    color: #059669;
}

.summary-trend.negative {
    color: #dc2626;
}

.summary-trend.neutral {
    color: #6b7280;
}

.efficiency-chart {
    height: 120px;
    margin-bottom: 12px;
}

.trend-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.trend-label {
    color: #6b7280;
}

.trend-value {
    font-weight: 600;
}

.trend-value.positive {
    color: #059669;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.recommendation-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.recommendation-icon.warning {
    background: #f97316;
}

.recommendation-icon.info {
    background: #3b82f6;
}

.recommendation-icon.success {
    background: #10b981;
}

.recommendation-content p {
    font-size: 13px;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.recommendation-content span {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

/* Analytics Page Specific Styles */
.analytics-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.analytics-controls {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.time-range-selector,
.metric-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-range-selector label,
.metric-selector label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.analytics-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.analytics-card.large {
    grid-column: span 8;
}

.analytics-card.medium {
    grid-column: span 4;
}

.analytics-card.small {
    grid-column: span 4;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-btn.active,
.chart-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.chart-container.large {
    height: 400px;
    margin-bottom: 16px;
}

.chart-insights {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.insight-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.insight-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.insight-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.insight-value.positive {
    color: #059669;
}

/* Heatmap Styles */
.heatmap-container {
    margin-bottom: 16px;
}

.heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.heatmap-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-label {
    width: 40px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.heat-cell {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid #e5e7eb;
}

.heat-cell.low {
    background: #f3f4f6;
}

.heat-cell.medium {
    background: #bfdbfe;
}

.heat-cell.high {
    background: #60a5fa;
}

.heat-cell.very-high {
    background: #2563eb;
}

.heatmap-days {
    display: flex;
    gap: 8px;
    margin-right: 48px;
}

.heatmap-days span {
    width: 24px;
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    text-align: center;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.legend-scale {
    display: flex;
    gap: 2px;
}

.scale-item {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Geo Stats */
.geo-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.geo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
}

.geo-area {
    color: #1f2937;
    font-weight: 600;
}

.geo-percentage {
    color: #3b82f6;
    font-weight: 700;
}

/* Prediction Summary */
.prediction-summary {
    margin-top: 16px;
}

.prediction-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.prediction-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.prediction-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

/* Efficiency Breakdown */
.efficiency-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.efficiency-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.efficiency-label {
    font-size: 13px;
    color: #374151;
    font-weight: 600;
}

.efficiency-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.efficiency-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.efficiency-value {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    align-self: flex-end;
}

/* Anomalies List */
.anomalies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anomaly-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.anomaly-item.critical {
    background: #fef2f2;
    border-color: #fca5a5;
}

.anomaly-item.warning {
    background: #fffbeb;
    border-color: #fcd34d;
}

.anomaly-item.info {
    background: #eff6ff;
    border-color: #93c5fd;
}

.anomaly-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.anomaly-item.critical .anomaly-icon {
    background: #ef4444;
}

.anomaly-item.warning .anomaly-icon {
    background: #f59e0b;
}

.anomaly-item.info .anomaly-icon {
    background: #3b82f6;
}

.anomaly-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.anomaly-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.anomaly-description {
    font-size: 12px;
    color: #6b7280;
}

.anomaly-time {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 600;
}

/* Insights Section */
.insights-section {
    margin-top: 32px;
}

.insights-header {
    margin-bottom: 24px;
}

.insights-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.insight-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    gap: 16px;
}

.insight-card .insight-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.insight-card .insight-icon.success {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.insight-card .insight-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.insight-card .insight-icon.info {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.insight-card .insight-content {
    flex: 1;
}

.insight-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.insight-card p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.insight-actions {
    display: flex;
    gap: 8px;
}

.insight-btn {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.insight-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Users Page Specific Styles */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info strong {
    display: block;
    color: #1f2937;
    font-size: 14px;
}

.user-info span {
    font-size: 12px;
    color: #6b7280;
}

.user-id {
    font-family: monospace;
    font-weight: 600;
    color: #3b82f6;
    font-size: 13px;
}

.user-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.user-type-badge.driver {
    background: #3b82f6;
}

.user-type-badge.operator {
    background: #10b981;
}

.user-type-badge.supervisor {
    background: #f59e0b;
}

.user-type-badge.admin {
    background: #8b5cf6;
}

.performance-score {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 60px;
}

.performance-score span {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.performance-score.excellent span {
    color: #059669;
}

.performance-score.good span {
    color: #3b82f6;
}

.performance-score.average span {
    color: #f59e0b;
}

.score-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.performance-score.excellent .score-fill {
    background: #10b981;
}

.performance-score.good .score-fill {
    background: #3b82f6;
}

.performance-score.average .score-fill {
    background: #f59e0b;
}

.user-distribution {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.distribution-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.distribution-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.distribution-label {
    font-size: 13px;
    color: #374151;
    font-weight: 600;
}

.distribution-count {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}

.distribution-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.distribution-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.distribution-fill.driver {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.distribution-fill.operator {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.distribution-fill.supervisor {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.distribution-fill.admin {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.distribution-percentage {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
}

.pending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.pending-info strong {
    display: block;
    font-size: 13px;
    color: #1f2937;
    margin-bottom: 2px;
}

.pending-info span {
    font-size: 11px;
    color: #6b7280;
}

.pending-actions {
    display: flex;
    gap: 4px;
}

.btn-xs {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.btn-xs.success {
    background: #10b981;
    color: white;
}

.btn-xs.success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-xs.danger {
    background: #ef4444;
    color: white;
}

.btn-xs.danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Table Row Hover Effect */
.data-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* Table Background and Neutral Indicators */
.table-container {
    background: #fafafa;
    border-radius: 8px;
    padding: 8px;
    margin: 16px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Remove all colored progress bars and indicators */
.utilization-bar,
.progress-bar {
    background: #f0f0f0 !important;
}

.utilization-fill,
.progress-fill {
    background: #d1d5db !important;
}

/* Neutral status indicators */
.idle-time,
.efficiency-badge {
    background: #f3f4f6 !important;
    color: #666 !important;
}

/* Responsive adjustments for users page */
@media (max-width: 1200px) {
    .analytics-card.large {
        grid-column: span 12;
    }
    
    .analytics-card.medium {
        grid-column: span 6;
    }
    
    .analytics-card.small {
        grid-column: span 12;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 8px;
    }
    
    .dashboard-header {
        padding: 16px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-left h1 {
        font-size: 24px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        gap: 12px;
    }
    
    .sidebar-section {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .metrics-section,
    .assessments-section,
    .alerts-widget,
    .actions-widget,
    .charts-section {
        padding: 12px;
    }
    
    .metric-card {
        flex-direction: column;
        text-align: center;
    }
    
    .header-meta {
        width: 100%;
        justify-content: center;
    }
}

/* === Settings Page Styles === */
.settings-container {
    display: flex;
    gap: 2rem;
    max-width: 100%;
    margin-top: 1rem;
}

.settings-nav {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem;
    width: 280px;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.settings-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-weight: 500;
}

.settings-nav .nav-item:hover {
    background: #f3f4f6;
    color: #374151;
}

.settings-nav .nav-item.active {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.settings-nav .nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.settings-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 600px;
}

.settings-section {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.settings-section.active {
    display: block;
}

.section-title {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.section-title h2 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title p {
    color: #6b7280;
    margin: 0;
}

.settings-group {
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.group-header {
    background: #f9fafb;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.group-header h3 {
    margin: 0;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.settings-row:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-info label {
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.25rem;
}

.setting-info span {
    color: #6b7280;
    font-size: 0.875rem;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-select,
.setting-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    min-width: 150px;
    font-size: 0.875rem;
}

.setting-select:focus,
.setting-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-suffix {
    color: #6b7280;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
    background-color: #3b82f6;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 0.75rem;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-option:hover {
    border-color: #9ca3af;
}

.theme-option.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.theme-preview {
    width: 32px;
    height: 20px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.theme-preview.light {
    background: linear-gradient(45deg, #ffffff 50%, #f3f4f6 50%);
}

.theme-preview.dark {
    background: linear-gradient(45deg, #1f2937 50%, #374151 50%);
}

.theme-preview.auto {
    background: linear-gradient(90deg, #ffffff 50%, #1f2937 50%);
}

.theme-option span {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-item input:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-item input:checked + .checkmark:after {
    content: "✓";
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Notification Methods */
.notification-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.method-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.method-info {
    flex: 1;
}

.method-info h4 {
    margin: 0 0 0.25rem 0;
    color: #374151;
    font-weight: 600;
}

.method-info p {
    margin: 0 0 0.75rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.method-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.method-toggle {
    margin-right: 1rem;
}

/* API Keys */
.api-keys {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-key-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.api-info {
    flex: 1;
}

.api-info h4 {
    margin: 0 0 0.25rem 0;
    color: #374151;
    font-weight: 600;
}

.api-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.api-key {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 300px;
}

.api-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    font-family: monospace;
    font-size: 0.75rem;
}

.api-btn {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.api-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Backup Actions */
.backup-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-top: 1rem;
}

.backup-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.backup-btn.primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.backup-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.backup-btn.secondary {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.backup-btn.secondary:hover {
    background: #f9fafb;
    color: #374151;
}

/* System Info */
.system-info {
    margin-bottom: 2rem;
}

.info-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #6b7280;
    font-weight: 500;
}

.info-value {
    color: #374151;
    font-weight: 600;
    font-family: monospace;
}

/* System Actions */
.system-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.system-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.system-btn.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.system-btn.warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.system-btn.info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.system-btn.info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.system-btn.secondary {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.system-btn.secondary:hover {
    background: #f9fafb;
    color: #374151;
}

/* Settings Page Mobile Responsiveness */
@media (max-width: 768px) {
    .settings-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .settings-nav {
        width: 100%;
        position: static;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .settings-nav .nav-item {
        min-width: 120px;
        flex-shrink: 0;
        margin-bottom: 0;
        margin-left: 0.5rem;
        text-align: center;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem 0.5rem;
    }
    
    .settings-nav .nav-item span {
        font-size: 0.75rem;
    }
    
    .settings-section {
        padding: 1rem;
    }
    
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .setting-control {
        width: 100%;
        justify-content: flex-start;
    }
    
    .setting-select,
    .setting-input {
        min-width: 200px;
    }
    
    .method-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .method-toggle {
        margin-right: 0;
        align-self: flex-end;
    }
    
    .api-key-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .api-key {
        width: 100%;
        min-width: auto;
    }
    
    .backup-actions,
    .system-actions {
        flex-direction: column;
    }
    
    .backup-btn,
    .system-btn {
        width: 100%;
        justify-content: center;
    }
}

/* UTILITY CLASSES */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.hidden { display: none; }

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* LOADING STATES */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === Navigation Header Styles === */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.header-left {
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-navigation {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-link i {
    font-size: 1rem;
}

.nav-link span {
    white-space: nowrap;
}

/* Action Icons */
.action-icon.users {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.action-icon.settings {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation {
        overflow-x: auto;
        padding: 0.5rem;
        width: 100%;
    }
    
    .nav-link {
        min-width: 100px;
        flex-shrink: 0;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
        text-align: center;
    }
    
    .nav-link span {
        font-size: 0.75rem;
    }
}

/* Map Vehicle Icons Override - Change to Dots */
#fleetMap .fa-car,
#fleetMap .fa-taxi,
#fleetMap .fa-bus,
#fleetMap .fa-ship,
#fleetMap .fa-truck {
    display: none;
}

#fleetMap .fa-car::before,
#fleetMap .fa-taxi::before,
#fleetMap .fa-bus::before,
#fleetMap .fa-ship::before,
#fleetMap .fa-truck::before {
    content: "●";
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
}

/* Global Vehicle Icon Override */
.fa-car::before,
.fa-taxi::before,
.fa-bus::before,
.fa-ship::before,
.fa-truck::before,
.fa-car-side::before {
    content: "●" !important;
    font-family: Arial, sans-serif !important;
    font-weight: bold !important;
}

/* Vehicle Marker Dots */
.vehicle-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    display: inline-block;
}

.vehicle-marker.active {
    background-color: #10b981;
}

.vehicle-marker.idle {
    background-color: #f97316;
}

.vehicle-marker.alert {
    background-color: #dc2626;
}

.vehicle-marker.maintenance {
    background-color: #6b7280;
}

/* Replace FontAwesome icons with dots in map controls */
.map-control-btn i.fa-car::before,
.map-control-btn i.fa-taxi::before,
.map-control-btn i.fa-bus::before,
.map-control-btn i.fa-ship::before {
    content: "●";
    font-family: Arial, sans-serif;
}