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

:root {
    --primary-purple: #667eea;
    --secondary-purple: #764ba2;
    --dark-purple: #4c1d95;
    --light-purple: #a78bfa;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.1);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-light: #fafbfc;
    --bg-card-light: #ffffff;
    --bg-card-hover-light: #f8fafc;
    --text-primary-light: #0f172a;
    --text-secondary-light: #475569;
    --text-muted-light: #94a3b8;
    --border-color-light: rgba(148, 163, 184, 0.25);
    --hover-bg-light: #f1f5f9;
    --input-bg-light: #ffffff;
    --shadow-sm-light: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md-light: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg-light: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl-light: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

body.light-mode {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: var(--text-primary-light);
    min-height: 100vh;
}

body.light-mode .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-right-color: rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-md-light);
}

body.light-mode .sidebar::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.08);
}

body.light-mode .sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
}

body.light-mode .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

body.light-mode .sidebar-title-text {
    background: linear-gradient(135deg, #4338ca 0%, var(--primary-purple) 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .sidebar-logo {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.18);
}

body.light-mode .sidebar nav a {
    color: var(--text-secondary-light);
    background: transparent;
    border: 1px solid transparent;
}

body.light-mode .sidebar nav a:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: var(--text-primary-light);
    border-color: rgba(102, 126, 234, 0.15);
}

body.light-mode .sidebar nav a.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.25);
    font-weight: 600;
}

body.light-mode .sidebar nav a .icon-api {
    color: #0891b2;
}

body.light-mode .sidebar nav a .icon-map {
    color: #059669;
}

body.light-mode .sidebar nav a .icon-logout {
    color: #dc2626;
}

body.light-mode .header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-sm-light);
}

body.light-mode .header h1 {
    background: linear-gradient(135deg, #1e293b 0%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .clock {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary-light);
    box-shadow: var(--shadow-sm-light);
}

body.light-mode .user-info {
    color: var(--text-secondary-light);
}

body.light-mode .stat-card {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-md-light);
}

body.light-mode .stat-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: var(--shadow-lg-light);
}

body.light-mode .stat-card i {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-mode .stat-purple i {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: #4338ca;
}

body.light-mode .stat-cyan i {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(8, 145, 178, 0.08) 100%);
    color: #0891b2;
}

body.light-mode .stat-pink i {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(219, 39, 119, 0.08) 100%);
    color: #db2777;
}

body.light-mode .stat-green i {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.08) 100%);
    color: #059669;
}

body.light-mode .stat-value {
    background: linear-gradient(135deg, #1e293b 0%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .stat-label {
    color: var(--text-muted-light);
    font-weight: 500;
}

body.light-mode .section {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-md-light);
}

body.light-mode .section-header h2 {
    color: var(--text-primary-light);
}



body.light-mode .section-header h2 i {
    color: #4338ca;
}

body.light-mode .form-control {
    background: #fafbfc;
    color: var(--text-primary-light);
    border-color: rgba(148, 163, 184, 0.25);
}

body.light-mode .form-control:focus {
    background: #ffffff;
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

body.light-mode .form-control::placeholder {
    color: var(--text-muted-light);
}

body.light-mode .form-control:hover {
    border-color: rgba(148, 163, 184, 0.4);
}

body.light-mode select.form-control option {
    background: #ffffff;
    color: var(--text-primary-light);
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

body.light-mode select.form-control option:hover {
    background: rgba(102, 126, 234, 0.08);
}

body.light-mode select.form-control option:checked {
    background: rgba(102, 126, 234, 0.15);
    color: #4338ca;
}

body.light-mode .form-group label {
    color: var(--text-primary-light);
}

body.light-mode .btn-secondary {
    background: #f1f5f9;
    color: var(--text-primary-light);
    border-color: rgba(148, 163, 184, 0.3);
}

body.light-mode .btn-secondary:hover {
    background: #e2e8f0;
    border-color: rgba(102, 126, 234, 0.3);
}

body.light-mode .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: white;
}

body.light-mode .btn-danger:hover {
    box-shadow: 0 10px 32px rgba(239, 68, 68, 0.5);
}

body.light-mode .table-container {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .data-table thead {
    background: #f1f5f9;
}

body.light-mode .data-table th {
    color: var(--text-secondary-light);
    font-weight: 600;
}

body.light-mode .data-table td {
    border-bottom-color: rgba(148, 163, 184, 0.1);
    color: var(--text-primary-light);
}

body.light-mode .data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.06);
}

body.light-mode #apiList tr.selected {
    background: rgba(102, 126, 234, 0.08);
}

body.light-mode .action-btn.move-up {
    color: #0891b2;
    background: rgba(8, 145, 178, 0.1);
}

body.light-mode .action-btn.move-down {
    color: #4338ca;
    background: rgba(102, 126, 234, 0.1);
}

body.light-mode .action-btn.edit {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

body.light-mode .action-btn.test {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

body.light-mode .action-btn.delete {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

body.light-mode .modal-content {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-xl-light);
}

body.light-mode .modal-header {
    color: white;
}

body.light-mode .close {
    color: white;
}

body.light-mode .modal-body::-webkit-scrollbar-track,
body.light-mode .tab-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .modal-body::-webkit-scrollbar-thumb,
body.light-mode .tab-panel::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
}

body.light-mode .mobile-header {
    background: #ffffff;
    border-bottom-color: rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-sm-light);
}

body.light-mode .mobile-header h1 {
    background: linear-gradient(135deg, #1e293b 0%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .mobile-header .mobile-menu-btn {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.15);
    color: var(--text-secondary-light);
}

body.light-mode .mobile-header .mobile-menu-btn:hover {
    background: rgba(102, 126, 234, 0.12);
    color: #4338ca;
}

body.light-mode .user-icon {
    color: var(--text-secondary-light);
}

body.light-mode .sidebar.active {
    background: #ffffff;
    box-shadow: var(--shadow-xl-light);
}

body.light-mode .sidebar-header {
    background: #ffffff;
    border-bottom-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .sidebar-close-btn {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary-light);
}

body.light-mode .sidebar-close-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary-light);
}

body.light-mode .mobile-stat-card {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-sm-light);
}

body.light-mode .mobile-stat-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: var(--shadow-md-light);
}

body.light-mode .mobile-stat-card .stat-value {
    color: var(--text-primary-light);
}

body.light-mode .mobile-stat-card .stat-label {
    color: var(--text-muted-light);
}

body.light-mode .mobile-stat-card .stat-icon.api {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: #4338ca;
}

body.light-mode .mobile-stat-card .stat-icon.map {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
    color: #0891b2;
}

body.light-mode .mobile-stat-card .stat-icon.success {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    color: #059669;
}

body.light-mode .mobile-stat-card .stat-icon.total {
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.12) 0%, rgba(236, 72, 153, 0.08) 100%);
    color: #db2777;
}

body.light-mode .mobile-card {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow-sm-light);
}

body.light-mode .mobile-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: var(--shadow-md-light);
}

body.light-mode .mobile-card .card-title h3 {
    color: var(--text-primary-light);
}

body.light-mode .mobile-card .card-body p {
    color: var(--text-secondary-light);
}

body.light-mode .mobile-card .card-body .badge-info {
    background: rgba(102, 126, 234, 0.08);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.15);
}

body.light-mode .mobile-card .card-body .badge-success {
    background: rgba(5, 150, 105, 0.08);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.15);
}

body.light-mode .mobile-card .card-body .badge-warning {
    background: rgba(217, 119, 6, 0.08);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.15);
}

body.light-mode .mobile-card .card-body .badge-danger {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.15);
}

body.light-mode .mobile-card .card-body .card-remark {
    color: var(--text-primary-light);
}

body.light-mode .mobile-card .card-body .related-label {
    color: var(--text-muted-light);
}

body.light-mode .mobile-card .card-body .related-value {
    color: var(--text-primary-light);
}

body.light-mode .badge {
    border: 1px solid transparent;
}

body.light-mode .badge-secondary {
    background: #f1f5f9;
    color: var(--text-secondary-light);
}

body.light-mode .badge-success {
    background: rgba(5, 150, 105, 0.08);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.15);
}

body.light-mode .badge-warning {
    background: rgba(217, 119, 6, 0.08);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.15);
}

body.light-mode .badge-danger {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.15);
}

body.light-mode .badge-info {
    background: rgba(102, 126, 234, 0.08);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.15);
}

body.light-mode .purpose-checkbox {
    background: #fafbfc;
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--text-secondary-light);
}

body.light-mode .purpose-checkbox:hover {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.2);
}

body.light-mode .purpose-checkbox:has(input[type="checkbox"]:checked) {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    color: #4338ca;
}

body.light-mode .custom-purpose-list {
    background: #fafbfc;
    border-color: rgba(148, 163, 184, 0.2);
}

body.light-mode .api-selector-dropdown {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-md-light);
}

body.light-mode .selected-apis {
    background: #fafbfc;
    border-color: rgba(148, 163, 184, 0.2);
}

body.light-mode .path-hint {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary-light);
}

body.light-mode .path-hint strong {
    color: var(--text-primary-light);
}

body.light-mode .batch-controls {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
}

body.light-mode .slider {
    background: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.3);
}

body.light-mode .slider:before {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.light-mode input:checked+.slider:before {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

body.light-mode .path-hint-toggle {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.15);
    color: #4338ca;
}

body.light-mode .path-hint-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.25);
}

body.light-mode .path-hint {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
}

body.light-mode .api-tag {
    background: rgba(102, 126, 234, 0.08);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.15);
}

body.light-mode .custom-purpose-tag {
    background: rgba(217, 119, 6, 0.08);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.15);
}

body.light-mode .example-tag {
    background: rgba(102, 126, 234, 0.08);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.2);
}

body.light-mode .example-tag:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.35);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: auto;
    min-width: 240px;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, rgba(30, 30, 50, 0.95) 0%, rgba(20, 20, 40, 0.98) 100%);
    backdrop-filter: blur(20px);
    padding: 28px 22px;
    z-index: 100;
    border-right: 1px solid var(--border-color);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 50%, var(--accent-pink) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sidebar-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.sidebar-logo:hover::before {
    left: 100%;
}

.sidebar-logo:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

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

.sidebar-title-text {
    font-size: 19px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--light-purple) 0%, var(--primary-purple) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    color: var(--text-secondary);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-weight: 500;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}

.theme-toggle:hover {
    background: rgba(102, 126, 234, 0.15);
    color: var(--text-primary);
    transform: translateX(6px);
    border-color: rgba(102, 126, 234, 0.3);
}

body.light-mode .theme-toggle {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary-light);
}

body.light-mode .theme-toggle:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.2);
}

.sidebar-bottom .nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-weight: 500;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.sidebar-bottom .nav-link:hover {
    background: rgba(102, 126, 234, 0.15);
    color: var(--text-primary);
    transform: translateX(6px);
    border-color: rgba(102, 126, 234, 0.3);
}

.sidebar-bottom .nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: var(--light-purple);
    font-weight: 600;
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.sidebar-bottom .nav-link .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

body.light-mode .sidebar-bottom .nav-link {
    color: var(--text-secondary-light);
    background: transparent;
    border: 1px solid transparent;
}

body.light-mode .sidebar-bottom .nav-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: var(--text-primary-light);
    border-color: rgba(102, 126, 234, 0.15);
}

body.light-mode .sidebar-bottom .nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.25);
    font-weight: 600;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-weight: 500;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.logout-link:hover {
    background: rgba(102, 126, 234, 0.15);
    color: var(--text-primary);
    transform: translateX(6px);
    border-color: rgba(102, 126, 234, 0.3);
}

body.light-mode .logout-link {
    background: #f1f5f9;
    color: var(--text-secondary-light);
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .logout-link:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-weight: 500;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.sidebar nav a:hover {
    background: rgba(102, 126, 234, 0.15);
    color: var(--text-primary);
    transform: translateX(6px);
    border-color: rgba(102, 126, 234, 0.3);
}

.sidebar nav a.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: var(--light-purple);
    font-weight: 600;
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.sidebar nav a .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.sidebar nav a .icon-api {
    color: #22d3ee;
}

.sidebar nav a .icon-map {
    color: #34d399;
}

.sidebar nav a .icon-logout {
    color: #f87171;
}

.sidebar nav a .icon-home {
    color: #fbbf24;
}

.sidebar nav a .icon-settings {
    color: #a78bfa;
}

.sidebar nav a .icon-logs {
    color: #60a5fa;
}

.sidebar-bottom .nav-link .icon-settings {
    color: #a78bfa;
}

.sidebar-bottom .nav-link .icon-logs {
    color: #60a5fa;
}

body.light-mode .sidebar nav a .icon-home {
    color: #d97706;
}

body.light-mode .sidebar nav a .icon-settings {
    color: #7c3aed;
}

body.light-mode .sidebar nav a .icon-logs {
    color: #2563eb;
}

body.light-mode .sidebar-bottom .nav-link .icon-settings {
    color: #7c3aed;
}

body.light-mode .sidebar-bottom .nav-link .icon-logs {
    color: #2563eb;
}

.nav-group {
    margin-bottom: 8px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-weight: 500;
    font-size: 14px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.nav-group-header:hover {
    background: rgba(102, 126, 234, 0.15);
    color: var(--text-primary);
    border-color: rgba(102, 126, 234, 0.25);
}

.nav-group-header .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.15);
}

.nav-group-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.nav-group.expanded .nav-group-arrow {
    transform: rotate(90deg);
    background: rgba(102, 126, 234, 0.2);
}

.nav-group-content {
    display: none;
    padding: 6px 16px;
    margin-top: 4px;
    margin-left: 8px;
    gap: 3px;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 0 12px 12px;
    border-left: 2px solid rgba(102, 126, 234, 0.3);
}

.nav-group.expanded .nav-group-content {
    display: flex;
}

.nav-item {
    display: block !important;
    padding: 8px 16px 8px 28px !important;
    color: var(--text-muted) !important;
    text-decoration: none;
    border-radius: 8px !important;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 400 !important;
    font-size: 13px !important;
    background: transparent !important;
    border: none !important;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--text-secondary) !important;
    background: rgba(102, 126, 234, 0.06) !important;
}

.nav-item:hover::before {
    background: var(--light-purple);
    width: 6px;
    height: 6px;
}

.nav-item.active {
    color: var(--light-purple) !important;
    font-weight: 500 !important;
    background: rgba(102, 126, 234, 0.1) !important;
}

.nav-item.active::before {
    background: var(--light-purple);
    width: 8px;
    height: 8px;
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

.sidebar nav a .icon-panel {
    color: #fb923c;
}

.sidebar nav a .icon-dispatch {
    color: #f472b6;
}

.sidebar nav a .icon-users {
    color: #34d399;
}

.sidebar nav a .icon-payment {
    color: #60a5fa;
}

.sidebar nav a .icon-interaction {
    color: #fb923c;
}

.sidebar nav a .icon-advertisement {
    color: #a78bfa;
}

body.light-mode .nav-group-header {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.1);
    color: var(--text-secondary-light);
}

body.light-mode .nav-group-header:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary-light);
    border-color: rgba(102, 126, 234, 0.15);
}

body.light-mode .nav-group-header .icon-wrapper {
    background: rgba(102, 126, 234, 0.1);
}

body.light-mode .nav-group-arrow {
    color: var(--text-secondary-light);
    background: rgba(148, 163, 184, 0.1);
}

body.light-mode .nav-group.expanded .nav-group-arrow {
    background: rgba(102, 126, 234, 0.15);
}

body.light-mode .nav-group-content {
    background: rgba(148, 163, 184, 0.05);
    border-left-color: rgba(102, 126, 234, 0.2);
}

body.light-mode .nav-item {
    color: #64748b !important;
}

body.light-mode .nav-item::before {
    background: #94a3b8;
}

body.light-mode .nav-item:hover {
    background: rgba(102, 126, 234, 0.06) !important;
    color: #334155 !important;
}

body.light-mode .nav-item:hover::before {
    background: #7c3aed;
}

body.light-mode .nav-item.active {
    background: rgba(102, 126, 234, 0.08) !important;
    color: #4338ca !important;
}

body.light-mode .nav-item.active::before {
    background: #4338ca;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
}

body.light-mode .sidebar nav a .icon-panel {
    color: #ea580c;
}

body.light-mode .sidebar nav a .icon-dispatch {
    color: #db2777;
}

body.light-mode .sidebar nav a .icon-users {
    color: #059669;
}

body.light-mode .sidebar nav a .icon-payment {
    color: #2563eb;
}

body.light-mode .sidebar nav a .icon-interaction {
    color: #ea580c;
}

body.light-mode .sidebar nav a .icon-advertisement {
    color: #7c3aed;
}

.main-content {
    margin-left: 240px;
    padding: 40px;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 32px 36px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.15) 50%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(12px);
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--light-purple) 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 14px;
}

.clock {
    font-size: 14px;
    color: var(--text-secondary);
    margin-right: 15px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(30, 30, 50, 0.8) 100%);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--secondary-purple), var(--accent-pink));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

.stat-card i {
    font-size: 40px;
    margin-bottom: 18px;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
}

.stat-purple i {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--light-purple);
}

.stat-cyan i {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #22d3ee;
}

.stat-pink i {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0.05) 100%);
    color: #f472b6;
}

.stat-green i {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #34d399;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, var(--light-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

.section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.section.hidden,
.section.hidden * {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    flex-wrap: wrap;
    gap: 16px;
}

#api-section:not(.hidden),
#map-section:not(.hidden) {
    max-height: calc(100vh - 60px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#api-section .api-content-wrapper,
#map-section .map-content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-pink));
    border-radius: 2px;
}

.header-left {
    flex: 1;
    min-width: 200px;
}

.header-left h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h2 i {
    color: var(--light-purple);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

.compact-toggle {
    white-space: nowrap;
    margin-left: 8px;
    order: 2;
    padding: 10px 18px !important;
    font-size: 13px !important;
}

.map-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 550px;
}

.map-header-actions .search-wrapper {
    flex: 1;
    min-width: 150px;
}

.map-search-input {
    width: 100%;
    box-sizing: border-box;
}

.batch-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
    order: 1;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    min-height: 48px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 50%, var(--accent-pink) 100%);
    color: white;
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
    order: 3;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(239, 68, 68, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-icon {
    padding: 10px 14px;
    background: rgba(102, 126, 234, 0.15);
    color: var(--light-purple);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

.form-group {
    margin-bottom: 26px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 14px;
}

.form-group label::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--primary-purple);
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-family: inherit;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a1a1aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 52px;
    cursor: pointer;
}

select.form-control option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 14px;
}

select.form-control option:hover {
    background: rgba(102, 126, 234, 0.2);
}

select.form-control option:checked {
    background: rgba(102, 126, 234, 0.3);
    color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(102, 126, 234, 0.08);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), 0 4px 16px rgba(102, 126, 234, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.switch-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 32px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

input:checked+.slider:before {
    transform: translateX(24px);
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.switch-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.apikey-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.apikey-input-group .form-control {
    flex: 1;
}

.apikey-input-group .btn {
    white-space: nowrap;
}

.table-container {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-top: 24px;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
}

.data-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    table-layout: auto;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    line-height: 1.5;
    vertical-align: middle;
    position: relative;
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 12px;
}

.data-table tbody tr {
    height: 56px;
    transition: all 0.3s;
}

.data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.action-group {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 160px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    flex-shrink: 0;
}

.action-btn.move-up {
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.15);
}

.action-btn.move-down {
    color: var(--light-purple);
    background: rgba(167, 139, 250, 0.15);
}

.action-btn.edit {
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
}

.action-btn.test {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.action-btn.delete {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
}

.action-btn.move-up:hover:not(:disabled) {
    background: rgba(6, 182, 212, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.action-btn.move-down:hover:not(:disabled) {
    background: rgba(167, 139, 250, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.action-btn.edit:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.action-btn.test:hover {
    background: rgba(245, 158, 11, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

#apiList tr.selected {
    background: rgba(102, 126, 234, 0.15);
    border-left: 3px solid var(--primary-purple);
}

.batch-controls .btn {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
}

.empty-state-cell {
    padding: 30px !important;
    text-align: center;
    color: var(--text-muted);
}

.empty-state {
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px dashed var(--border-color);
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(102, 126, 234, 0.15);
    color: var(--light-purple);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.data-table.compact-mode th,
.data-table.compact-mode td {
    padding: 10px 12px;
    font-size: 12px;
}

.data-table.compact-mode tbody tr {
    height: 48px;
}

.data-table.compact-mode .action-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.multi-line-cell {
    max-height: 60px;
    overflow-y: auto;
    line-height: 1.4;
    padding-right: 8px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(26, 26, 46, 0.98) 100%);
    border-radius: 24px;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 60px);
    padding: 0;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(102, 126, 234, 0.1);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(40px) scale(0.96);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 50%, var(--accent-pink) 100%);
    padding: 28px 32px;
    border-radius: 24px 24px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 24px rgba(102, 126, 234, 0.3);
}

.modal-header h3 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-body::-webkit-scrollbar,
.tab-panel::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track,
.tab-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb,
.tab-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.form-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 0 0 24px 24px;
}

.purposes-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.purpose-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.purpose-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    font-size: 14px;
    color: var(--text-secondary);
}

.purpose-checkbox:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.purpose-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-purple);
}

.purpose-checkbox:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-color: var(--primary-purple);
    color: var(--text-primary);
}

.custom-purpose-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    min-height: 52px;
    border: 1px dashed var(--border-color);
}

.custom-purpose-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.custom-purpose-input-wrapper .form-control {
    flex: 1;
    max-width: 220px;
}

.custom-purpose-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: #fbbf24;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.custom-purpose-tag i {
    cursor: pointer;
    color: #f59e0b;
    font-size: 12px;
}

.custom-purpose-tag i:hover {
    color: #d97706;
}

.path-hint-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    color: var(--light-purple);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    width: fit-content;
}

.path-hint-toggle:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.path-hint-toggle i {
    font-size: 12px;
    transition: transform 0.3s;
}

.path-hint {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
}

.path-hint strong {
    color: var(--text-secondary);
    font-size: 14px;
}

.path-hint ul {
    margin: 12px 0;
    padding-left: 24px;
    list-style: disc;
    line-height: 1.8;
}

.path-hint code {
    background: rgba(102, 126, 234, 0.2);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--light-purple);
}

.path-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.example-tag {
    display: inline-block;
    padding: 8px 14px;
    background: rgba(102, 126, 234, 0.15);
    color: var(--light-purple);
    border-radius: 10px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.example-tag:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.toast {
    padding: 18px 22px;
    border-radius: 14px;
    color: white;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 300px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(217, 119, 6, 0.9) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.toast-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(99, 102, 241, 0.9) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

body.light-mode .toast {
    box-shadow: var(--shadow-lg-light);
}

body.light-mode .toast-success {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.2);
    color: #059669;
}

body.light-mode .toast-error {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

body.light-mode .toast-warning {
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.2);
    color: #d97706;
}

body.light-mode .toast-info {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
    color: #4338ca;
}

.api-selector {
    margin-top: 10px;
    position: relative;
}

.selected-apis {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
    min-height: 40px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
}

.api-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.2);
    color: var(--light-purple);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.api-tag .remove-api {
    cursor: pointer;
    color: var(--light-purple);
    font-size: 12px;
}

.api-tag .remove-api:hover {
    color: white;
}

.api-selector-dropdown {
    margin-top: 14px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.icon-selector {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.icon-preview {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--light-purple);
    cursor: pointer;
    transition: all 0.3s;
}

.icon-preview:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.25) 100%);
    border-color: var(--primary-purple);
    transform: scale(1.05);
}

.icon-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.icon-input {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    height: 48px;
    box-sizing: border-box;
}

.icon-select-btn {
    flex: 0 0 auto;
    justify-content: flex-start !important;
}

.placeholder-icon {
    opacity: 0.4;
}

.icon-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    z-index: 100;
    max-height: 500px;
    overflow-y: auto;
}

.icon-dropdown-header {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.icon-dropdown-header input {
    flex: 1;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.icon-grid .icon-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-grid .icon-item:hover {
    background: rgba(102, 126, 234, 0.2);
    color: var(--light-purple);
    border-color: rgba(102, 126, 234, 0.4);
}

.icon-grid .icon-item.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.25) 100%);
    color: var(--light-purple);
    border-color: var(--primary-purple);
}

body.light-mode .icon-grid .icon-item {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary-light);
}

body.light-mode .icon-grid .icon-item:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.3);
}

body.light-mode .icon-grid .icon-item.selected {
    background: rgba(102, 126, 234, 0.1);
    color: #4338ca;
    border-color: rgba(102, 126, 234, 0.4);
}

body.light-mode .icon-dropdown {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-lg-light);
}

body.light-mode .custom-icon-item {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .custom-icon-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
}

.icon-dropdown-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.custom-icons-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.custom-icons-list {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.custom-icon-item {
    position: relative;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.custom-icon-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.custom-icon-item:hover {
    border-color: rgba(102, 126, 234, 0.4);
}

.custom-icon-item:hover .delete-icon-btn {
    opacity: 1;
}

.delete-icon-btn {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--danger-red);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 10px;
}

.call-limit-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.call-limit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.call-limit-row label {
    width: 80px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 0;
}

.call-limit-input-group {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 200px;
}

.call-limit-input-group .form-control {
    border-radius: 12px 0 0 12px;
    border-right: none;
    padding-right: 8px;
}

.call-limit-unit {
    padding: 16px 14px;
    background: rgba(102, 126, 234, 0.15);
    color: var(--light-purple);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 12px 12px 0;
    font-size: 14px;
    font-weight: 500;
}

.call-limit-hint {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    min-width: 200px;
}

.filter-bar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
}

.filter-input {
    padding: 12px 16px;
    font-size: 14px;
}

body.light-mode .filter-bar {
    background: rgba(255, 255, 255, 0.8);
}

.filter-select {
    padding: 12px 16px;
    font-size: 14px;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    background: rgba(255, 255, 255, 0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 44px;
}

.filter-select:hover {
    border-color: var(--primary-purple);
}

.filter-select:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.filter-select option {
    background: #1a1a2e;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 14px;
}

.filter-select option:checked {
    background: rgba(102, 126, 234, 0.3);
    color: #ffffff;
}

.filter-select option:first-child {
    color: var(--text-muted);
}

body.light-mode .filter-select {
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    color: var(--text-primary-light);
    border-color: rgba(148, 163, 184, 0.25);
}

body.light-mode .filter-select:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background-color: #fafbfc;
}

body.light-mode .filter-select:focus {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

body.light-mode .filter-select option {
    background: #ffffff;
    color: var(--text-primary-light);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

body.light-mode .filter-select option:hover {
    background: rgba(102, 126, 234, 0.06);
}

body.light-mode .filter-select option:checked {
    background: rgba(102, 126, 234, 0.12);
    color: #4338ca;
}

body.light-mode .filter-select option:first-child {
    color: var(--text-muted-light);
    background: #f8fafc;
}

.filter-reset {
    padding: 12px 20px;
    font-size: 14px;
    white-space: nowrap;
}

.mobile-cards {
    display: none;
}

.mobile-stats-container {
    display: none;
}

.mobile-header {
    display: none;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1200px) {
    .table-container {
        max-height: calc(100vh - 280px);
    }

    .data-table th,
    .data-table td {
        padding: 12px 14px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex !important;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(20, 20, 40, 0.95) 100%);
        backdrop-filter: blur(20px);
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-color);
        justify-content: space-between;
    }

    .mobile-header-title {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .mobile-header-logo {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 50%, var(--accent-pink) 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: white;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    }

    .mobile-header h1 {
        font-size: 17px;
        font-weight: 600;
        margin: 0;
        background: linear-gradient(135deg, var(--light-purple) 0%, white 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .mobile-header .mobile-menu-btn {
        background: none;
        border: none;
        color: var(--text-secondary);
        width: 44px;
        height: 44px;
        font-size: 24px;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-header .mobile-menu-btn:hover,
    .mobile-header .mobile-menu-btn:active {
        color: var(--light-purple);
        transform: scale(1.1);
    }

    .user-icon {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        font-size: 24px;
        cursor: pointer;
        transition: all 0.3s;
    }

    .user-icon:hover {
        color: var(--light-purple);
        transform: scale(1.1);
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
        transform: translateX(-100%);
        width: 280px;
        max-height: 100vh;
        height: 100%;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.5);
        background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(20, 20, 40, 0.99) 100%);
        backdrop-filter: blur(30px);
        border-radius: 0 24px 24px 0;
        padding: 100px 24px 32px;
        border: none;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        overflow-y: auto;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        width: 38px;
        height: 38px;
        font-size: 15px;
        cursor: pointer;
        transition: all 0.3s;
        background: none;
        border: none;
        font-weight: 500;
    }

    .sidebar-close-btn:hover {
        color: var(--text-primary);
    }

    .sidebar nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .sidebar nav a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 18px;
        color: var(--text-secondary);
        text-decoration: none;
        border-radius: 14px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 15px;
        font-weight: 500;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid transparent;
    }

    .sidebar nav a:hover {
        background: rgba(102, 126, 234, 0.15);
        color: var(--text-primary);
        border-color: rgba(102, 126, 234, 0.3);
    }

    .sidebar nav a.active {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.25) 100%);
        color: var(--light-purple);
        border-color: rgba(102, 126, 234, 0.4);
        box-shadow: 0 6px 24px rgba(102, 126, 234, 0.25);
    }

    .sidebar nav a .icon-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        flex-shrink: 0;
        width: 20px;
        height: 20px;
    }

    .sidebar nav a .icon-api {
        color: #22d3ee;
    }

    .sidebar nav a .icon-map {
        color: #34d399;
    }

    .sidebar nav a .icon-logout {
        color: #f87171;
    }

    .sidebar-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        padding: 20px;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 0 24px 0 0;
        z-index: 1001;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-overlay {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 899;
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.active {
        display: block !important;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-top: 100px;
    }

    .header {
        display: none;
    }

    .stats-container {
        display: none !important;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 18px;
        margin: 0;
    }

    .header-left,
    .header-right {
        width: 100%;
    }

    .header-right {
        flex-direction: column;
        gap: 12px;
    }

    .map-header-actions {
        flex-direction: column;
        gap: 12px;
    }

    .map-header-actions .search-wrapper {
        width: 100%;
    }

    .btn {
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 10px;
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }

    .btn-primary {
        order: 1;
    }

    .compact-toggle {
        display: none;
    }

    .batch-controls {
        order: 3;
        justify-content: center;
    }

    .table-container {
        display: none !important;
    }

    #api-section:not(.hidden),
    #map-section:not(.hidden) {
        max-height: none;
        overflow: visible;
        display: block;
    }

    #api-section .api-content-wrapper,
    #map-section .map-content-wrapper {
        overflow: visible;
        flex: none;
    }

    .filter-bar {
        padding: 14px 16px;
        margin-bottom: 16px;
    }

    .filter-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .filter-group {
        flex: 1;
        min-width: calc(50% - 6px);
        max-width: 100%;
    }

    .filter-select {
        width: 100%;
        min-width: unset;
        padding: 14px 40px 14px 16px;
        font-size: 15px;
        border-radius: 14px;
    }

    .filter-reset {
        width: 100%;
    }

    .section {
        display: block !important;
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    .section.hidden {
        display: none !important;
    }

    .mobile-cards {
        display: none;
    }

    .mobile-cards.active {
        display: block !important;
    }

    .mobile-stats-container {
        display: block !important;
        margin-bottom: 20px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-stats-container::-webkit-scrollbar {
        display: none;
    }

    .mobile-stats-grid {
        display: inline-flex;
        gap: 12px;
        padding: 8px 0;
    }

    .mobile-stat-card {
        background: var(--bg-card);
        border-radius: 16px;
        padding: 16px 20px;
        display: inline-flex;
        align-items: center;
        gap: 12px;
        border: 1px solid var(--border-color);
        flex-shrink: 0;
        min-width: 120px;
        transition: all 0.3s;
    }

    .mobile-stat-card:hover {
        transform: translateY(-4px);
        border-color: rgba(102, 126, 234, 0.4);
    }

    .mobile-stat-card .stat-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        color: white;
    }

    .mobile-stat-card .stat-icon.api {
        background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    }

    .mobile-stat-card .stat-icon.map {
        background: linear-gradient(135deg, #22d3ee, #06b6d4);
    }

    .mobile-stat-card .stat-icon.success {
        background: linear-gradient(135deg, #34d399, #10b981);
    }

    .mobile-stat-card .stat-icon.total {
        background: linear-gradient(135deg, var(--accent-pink), #ec4899);
    }

    .mobile-stat-card .stat-info {
        display: flex;
        flex-direction: column;
    }

    .mobile-stat-card .stat-value {
        font-size: 20px;
        font-weight: 700;
        color: white;
        background: none;
        -webkit-background-clip: unset;
        -webkit-text-fill-color: unset;
    }

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

    .mobile-cards:empty::after {
        content: '暂无数据';
        display: block;
        text-align: center;
        padding: 40px;
        color: var(--text-muted);
        font-size: 14px;
    }

    .mobile-card {
        background: var(--bg-card);
        border-radius: 18px;
        padding: 20px;
        margin-bottom: 16px;
        border: 1px solid var(--border-color);
        transition: all 0.3s;
    }

    .mobile-card:hover {
        transform: translateY(-4px);
        border-color: rgba(102, 126, 234, 0.4);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .mobile-card .card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .mobile-card .card-title {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-card .card-title h3 {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0;
    }

    .mobile-card .card-body {
        margin-bottom: 16px;
    }

    .mobile-card .card-body .card-url {
        font-size: 14px;
        margin-bottom: 10px;
        word-break: break-all;
        color: var(--text-secondary);
    }

    .mobile-card .card-body .card-purposes {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-card .card-body .card-empty-text {
        font-size: 13px;
        color: var(--text-muted);
    }

    .mobile-card .card-body .card-remark {
        font-size: 14px;
        margin-bottom: 8px;
        color: var(--text-primary);
    }

    .mobile-card .card-body .card-related-apis {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    .mobile-card .card-body .related-label {
        font-size: 13px;
        color: var(--text-muted);
        font-weight: 500;
    }

    .mobile-card .card-body .related-value {
        font-size: 14px;
        color: var(--text-primary);
        font-weight: 500;
    }

    .mobile-card .card-actions {
        display: flex;
        gap: 12px;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
    }

    .mobile-card .card-actions .btn {
        flex: 1;
        padding: 12px;
        font-size: 14px;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 100%;
        max-width: 480px;
        max-height: calc(100vh - 20px);
        border-radius: 20px;
        margin: 10px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        padding: 20px 24px;
        border-radius: 20px 20px 0 0;
    }

    .modal-header h3 {
        font-size: 18px;
        gap: 10px;
    }

    .close {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .modal-body {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
    }

    .form-control {
        padding: 14px;
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
        padding-top: 20px;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .purpose-options {
        gap: 8px;
    }

    .purpose-checkbox {
        padding: 10px 16px;
        font-size: 13px;
    }

    .apikey-input-group {
        flex-direction: column;
        gap: 10px;
    }

    .apikey-input-group .btn {
        width: 100%;
    }

    .custom-purpose-input-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .custom-purpose-input-wrapper .form-control {
        max-width: 100%;
    }

    .api-selector-dropdown {
        padding: 12px;
    }

    .selected-apis {
        min-height: 48px;
    }

    .toast-container {
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        font-size: 13px;
        padding: 16px 18px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
        padding-top: 90px;
    }

    .mobile-header {
        padding: 12px 16px;
    }

    .mobile-header h1 {
        font-size: 16px;
    }

    .mobile-header .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }

    .section {
        padding: 16px;
        margin-bottom: 14px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .mobile-card {
        padding: 16px;
        margin-bottom: 14px;
    }

    .mobile-card .card-title h3 {
        font-size: 16px;
    }

    .mobile-card .card-actions .btn {
        padding: 10px;
        font-size: 13px;
    }

    .sidebar {
        width: 260px;
    }

    .sidebar-header {
        width: 260px;
    }

    .sidebar nav a {
        padding: 16px 18px;
        font-size: 15px;
    }

    .sidebar nav a .icon-wrapper {
        width: 20px;
        height: 20px;
        font-size: 15px;
    }
}

/* 本地API选择器样式 */
.local-api-picker {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.local-api-picker .picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.local-api-picker .picker-header label {
    font-weight: 600;
    color: var(--text-primary);
}

.local-api-picker .search-input {
    flex: 1;
    max-width: 300px;
}

.api-file-list-container {
    max-height: 250px;
    overflow-y: auto;
}

.api-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.api-file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--input-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.api-file-item:hover {
    background: var(--hover-bg);
    border-color: var(--primary-purple);
}

.api-file-item .file-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-purple);
    color: white;
    border-radius: 8px;
    margin-right: 12px;
}

.api-file-item .file-info {
    flex: 1;
    min-width: 0;
}

.api-file-item .file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.api-file-item .file-path {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-file-item .file-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-right: 12px;
}

.api-file-item .suggested-name {
    font-size: 12px;
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.api-file-item .suggested-purposes {
    font-size: 11px;
    color: var(--success-color);
}

.api-file-item .select-arrow {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.api-file-item:hover .select-arrow {
    color: var(--primary-purple);
}

/* 批量导入样式 */
.batch-import-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.batch-import-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    font-weight: 500;
}

.batch-import-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.batch-import-list {
    max-height: 400px;
    overflow-y: auto;
}

.batch-import-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-import-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.batch-import-item:hover {
    background: var(--hover-bg);
}

.batch-import-item .batch-import-checkbox {
    margin-right: 12px;
    margin-top: 6px;
}

.batch-import-info {
    display: flex;
    flex: 1;
    gap: 12px;
}

.file-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-purple);
    color: white;
    border-radius: 8px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-details .file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.file-details .file-path {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.file-details .file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-details .file-meta .suggested-name {
    font-size: 12px;
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.file-details .file-meta .suggested-purposes {
    font-size: 12px;
    color: var(--success-color);
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.summary-text {
    margin-top: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.summary-text #selectedCount {
    color: var(--primary-purple);
    font-weight: 700;
}

/* 文件管理器样式 */
.file-manager-modal {
    max-width: 950px;
    width: 95%;
    max-height: 90vh;
}

.file-manager-modal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
}

.file-manager-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 50%, var(--accent-pink) 100%);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 文件管理器头部 */
.file-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.file-manager-header-actions {
    display: flex;
    gap: 10px;
}

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

.file-manager-modal .header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    backdrop-filter: blur(10px);
}

.file-manager-modal .header-info h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.file-manager-modal .header-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.file-manager-modal .close-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-manager-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.file-manager-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--card-bg);
}

/* 文件管理器工具栏 */
.fm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.fm-nav {
    flex: 1;
    margin-right: 20px;
}

.file-path-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.file-path-nav .nav-item {
    padding: 8px 14px;
    background: var(--input-bg);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.file-path-nav .nav-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--primary-purple);
}

.file-path-nav .nav-item.active {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.file-path-nav .nav-separator {
    color: var(--text-secondary);
    padding: 0 4px;
    font-size: 14px;
}

.fm-actions {
    display: flex;
    gap: 10px;
}

.fm-actions .btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.fm-actions .btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.fm-actions .btn-outline:hover {
    background: var(--hover-bg);
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

.fm-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.fm-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.upload-btn {
    cursor: pointer;
}

/* 选择栏 */
.fm-selection-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.select-all-container input[type="checkbox"] {
    display: none;
}

.select-all-container .checkmark {
    width: 18px;
    height: 18px;
    background: var(--input-bg);
    border-radius: 5px;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
    position: relative;
}

.select-all-container:hover .checkmark {
    border-color: var(--primary-purple);
}

.select-all-container input[type="checkbox"]:checked+.checkmark {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
}

.select-all-container input[type="checkbox"]:checked+.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.select-all-container .label-text {
    font-weight: 500;
}

.selection-count {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

.selection-count strong {
    color: var(--primary-purple);
    font-size: 16px;
}

.fm-selection-bar .btn-danger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: #c084fc;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    border-radius: 0;
}

.fm-selection-bar .btn-danger:hover {
    color: #e9d5ff;
}

/* 文件管理工具栏 */
.file-manager-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.file-manager-toolbar .batch-import-checkbox {
    font-weight: 500;
    color: var(--text-primary);
}

.file-manager-toolbar #fmSelectedCount {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

.file-manager-toolbar .btn-danger {
    background: rgb(219, 64, 67);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(219, 64, 67, 0.4);
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-manager-toolbar .btn-danger:hover {
    background: rgb(219, 64, 67);
    transform: none;
    box-shadow: 0 4px 12px rgba(219, 64, 67, 0.4);
}

/* 文件列表容器 */
.file-manager-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 12px;
}

/* 文件网格容器 */
.file-manager-grid-container {
    max-height: calc(90vh - 280px);
    overflow-y: auto;
    padding: 8px 16px;
}

.file-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

/* 文件项 */
.file-manager-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    min-height: 120px;
}

.file-manager-item:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
}

.file-manager-item.selected {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--primary-purple);
}

/* 文件图标 */
.file-manager-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
    border-radius: 6px;
    transition: border-radius 0.2s;
}

.file-manager-icon.clickable {
    cursor: pointer;
}

.folder-color {
    color: #f59e0b;
    background: none;
    text-shadow: none;
    filter: none;
}

.file-color {
    color: var(--primary-purple);
    background: none;
}

.file-manager-item:hover .folder-color {
    background: none;
    transform: none;
}

.file-manager-item:hover .file-color {
    background: none;
    transform: none;
}

/* 文件信息 */
.file-manager-info {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.file-manager-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 6px;
    word-break: break-word;
    line-height: 1.4;
}

.file-manager-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--text-secondary);
}

.file-manager-meta span {
    opacity: 0.8;
}

/* 操作按钮 */
.file-manager-item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    transform: translateY(-5px);
    z-index: 20;
}

.file-manager-item:hover .file-manager-item-actions {
    opacity: 1;
    transform: translateY(0);
}

.file-manager-item-actions .action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.file-manager-item-actions .action-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.1);
}

.file-manager-item-actions .preview-file-btn:hover {
    background: rgba(59, 130, 246, 0.9);
}

.file-manager-item-actions .add-api-btn:hover {
    background: rgba(34, 197, 94, 0.9);
}

/* 文件管理器复选框 */
.file-manager-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    transform: scale(0.9);
    z-index: 15;
}

.file-manager-item:hover .file-manager-checkbox,
.file-manager-item.selected .file-manager-checkbox {
    opacity: 1;
    transform: scale(1);
}

.file-manager-checkbox input[type="checkbox"] {
    display: none;
}

.file-manager-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.file-manager-checkbox:hover .checkmark {
    background: rgba(139, 92, 246, 0.6);
    border-color: var(--primary-purple);
}

.file-manager-checkbox input[type="checkbox"]:checked+.checkmark {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    border-color: var(--primary-purple);
}

.file-manager-checkbox input[type="checkbox"]:checked+.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 空文件夹提示 */
.empty-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-folder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-folder p {
    font-size: 14px;
    margin: 0;
}

/* 浅色模式支持 */
body.light-mode .file-manager-modal .modal-body {
    background: #f8fafc;
}

body.light-mode .fm-toolbar {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .file-manager-item {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.1);
}

body.light-mode .file-manager-item:hover {
    background: #f8fafc;
    border-color: rgba(102, 126, 234, 0.25);
}

body.light-mode .file-manager-item.selected {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.35);
}



/* 加载覆盖层 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
    color: var(--light-purple);
    font-size: 20px;
}

/* 空状态和错误消息 */
.empty-folder,
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    gap: 8px;
}

.empty-folder i,
.error-message i {
    font-size: 32px;
    opacity: 0.5;
}

.error-message {
    color: var(--error-color);
}

/* 浅色模式样式 */
body.light-mode .local-api-picker {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-sm-light);
}

body.light-mode .local-api-picker .picker-header label {
    color: var(--text-primary-light);
}

body.light-mode .local-api-picker .search-input {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--text-primary-light);
}

body.light-mode .local-api-picker .search-input::placeholder {
    color: var(--text-muted-light);
}

body.light-mode .api-file-list-container {
    background: #fafbfc;
}

body.light-mode .modal-footer {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .loading-overlay {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-purple);
}

body.light-mode .empty-folder,
body.light-mode .error-message {
    color: var(--text-secondary-light);
}

/* 明亮模式 - 批量导入弹窗样式 */
body.light-mode .batch-import-header {
    color: var(--text-primary-light);
}

body.light-mode .batch-import-checkbox {
    color: var(--text-primary-light);
}

body.light-mode .batch-import-item {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
}

body.light-mode .batch-import-item:hover {
    background: #f1f5f9;
}

body.light-mode .file-details .file-name {
    color: var(--text-primary-light);
}

body.light-mode .file-details .file-path {
    color: var(--text-secondary-light);
}

body.light-mode .file-details .file-meta .suggested-name {
    color: #4338ca;
    background: rgba(102, 126, 234, 0.08);
}

body.light-mode .file-details .file-meta .suggested-purposes {
    color: #059669;
    background: rgba(5, 150, 105, 0.08);
}

body.light-mode .summary-text {
    color: var(--text-primary-light);
}

body.light-mode .summary-text #selectedCount {
    color: #4338ca;
}

/* 明亮模式 - 文件管理弹窗样式 */
body.light-mode .file-manager-modal .modal-body {
    background: #f8fafc;
}

body.light-mode .file-manager-header {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .file-path-nav .nav-item {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary-light);
}

body.light-mode .file-path-nav .nav-item:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    color: #4338ca;
}

body.light-mode .file-path-nav .nav-item.active {
    color: white;
}

body.light-mode .file-path-nav .nav-separator {
    color: var(--text-secondary-light);
}

body.light-mode .file-manager-item {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.1);
}

body.light-mode .file-manager-item:hover {
    background: #f8fafc;
    border-color: rgba(102, 126, 234, 0.25);
}

body.light-mode .file-manager-item.selected {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.35);
}

body.light-mode .file-manager-name {
    color: var(--text-primary-light);
}

body.light-mode .file-manager-meta {
    color: var(--text-secondary-light);
}

body.light-mode .file-manager-icon {
    background: #f8fafc;
}

body.light-mode .file-manager-icon .folder-color {
    color: #d97706;
}

body.light-mode .file-manager-icon .file-color {
    color: #4338ca;
}

body.light-mode .file-manager-toolbar {
    color: var(--text-primary-light);
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .file-manager-toolbar #fmSelectedCount {
    color: var(--text-secondary-light);
}

body.light-mode .api-file-item {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .api-file-item:hover {
    background: #f1f5f9;
    border-color: rgba(102, 126, 234, 0.25);
}

body.light-mode .api-file-item .file-name {
    color: var(--text-primary-light);
}

body.light-mode .api-file-item .file-path {
    color: var(--text-secondary-light);
}

body.light-mode .api-file-item .suggested-name {
    color: #4338ca;
    background: rgba(102, 126, 234, 0.08);
}

body.light-mode .api-file-item .suggested-purposes {
    color: #059669;
}

body.light-mode .api-file-item .select-arrow {
    color: var(--text-secondary-light);
}

body.light-mode .api-file-item:hover .select-arrow {
    color: #4338ca;
}

/* 自定义确认弹窗样式 */
.confirm-modal {
    max-width: 450px;
    width: 92%;
}

.confirm-modal .modal-content {
    border-radius: 24px;
    overflow: hidden;
    animation: confirmModalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes confirmModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confirm-modal .modal-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.confirm-modal .modal-header h3 {
    color: white;
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.confirm-modal .modal-header h3 i {
    font-size: 20px;
}

.confirm-modal .modal-header .close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-modal .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.confirm-modal .modal-body {
    padding: 32px;
    text-align: center;
    background: var(--card-bg);
}

.confirm-modal .confirm-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #ef4444;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.25);
    border: 3px solid rgba(239, 68, 68, 0.2);
}

.confirm-modal #confirmMessage {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.7;
    font-weight: 500;
}

.confirm-modal .modal-footer {
    padding: 20px 24px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 16px;
}

.confirm-modal .btn {
    flex: 1;
    max-width: 140px;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.25s;
    cursor: pointer;
}

.confirm-modal .btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.confirm-modal .btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    transform: translateY(-1px);
}

.confirm-modal .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    border: none;
    color: white;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.confirm-modal .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.5);
}

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

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

body.light-mode .confirm-modal .modal-body {
    background: #ffffff;
}

body.light-mode .confirm-modal .modal-footer {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .confirm-modal .btn-secondary {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--text-secondary-light);
}

body.light-mode .confirm-modal .btn-secondary:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    color: #4338ca;
}

/* 文件预览弹窗 */
#filePreviewModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    border-radius: 16px;
    overflow: hidden;
}

#filePreviewModal .modal-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#filePreviewModal .modal-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#filePreviewModal .modal-header .header-left i {
    font-size: 24px;
    color: white;
}

#filePreviewModal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

#filePreviewModal .preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--input-bg);
    border-bottom: 1px solid var(--border-color);
}

#filePreviewModal .preview-toolbar .btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

#filePreviewModal .file-path-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

#filePreviewModal .code-preview {
    flex: 1;
    padding: 20px;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--card-bg);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: calc(85vh - 140px);
}

#filePreviewModal .preview-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--error-color);
    gap: 12px;
}

#filePreviewModal .preview-error i {
    font-size: 48px;
    opacity: 0.5;
}

#filePreviewModal .preview-error span {
    font-size: 16px;
}

body.light-mode #filePreviewModal .preview-toolbar {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.2);
}

body.light-mode #filePreviewModal .code-preview {
    background: #f8fafc;
    color: var(--text-primary-light);
}

body.light-mode #filePreviewModal .file-path-label {
    color: var(--text-secondary-light);
}

body.light-mode #filePreviewModal .preview-error {
    color: #dc2626;
}

/* API测试弹窗样式 */
#apiTestModal .modal-body {
    display: flex;
    flex-direction: column;
    max-height: calc(85vh - 60px);
    min-height: 500px;
}

.api-test-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.api-test-url {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.method-select {
    height: 42px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.2);
    color: var(--light-purple);
    border: 1px solid rgba(102, 126, 234, 0.3);
    min-width: 80px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-select:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.method-select:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.method-select option {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 8px;
}

body.light-mode .method-select {
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-mode .method-select:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

body.light-mode .method-select option {
    background: #ffffff;
    color: #0f172a;
}

#apiTestModal .api-test-url .form-control {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
    font-size: 15px;
}

.api-test-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.api-test-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.tab-btn.active {
    background: rgba(102, 126, 234, 0.2);
    color: var(--light-purple);
}

.api-test-tab-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.tab-panel {
    display: none;
    height: 100%;
    padding: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

.tab-panel.active {
    display: flex;
    flex-direction: column;
}

.params-quick-add {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.quick-add-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.params-container,
.headers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.param-row,
.header-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.param-row .form-control,
.header-row .form-control {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.param-actions,
.header-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.param-add,
.header-add {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.param-add i,
.header-add i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.param-add-btn,
.header-add-btn {
    background: rgba(102, 126, 234, 0.2);
    color: var(--light-purple);
}

.param-add-btn:hover,
.header-add-btn:hover {
    background: rgba(102, 126, 234, 0.3);
}

.param-remove-btn,
.header-remove-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.param-remove-btn:hover,
.header-remove-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.param-remove-btn:disabled,
.header-remove-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

#requestBody {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: none;
}

.body-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.response-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.response-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.response-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.response-time {
    font-size: 13px;
    color: var(--text-muted);
}

.response-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 300px;
    gap: 12px;
}

.response-content {
    flex: 1;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    box-sizing: border-box;
    max-height: 400px;
    min-height: 200px;
}

.response-content.error {
    color: #f87171;
}

/* 明亮模式API测试弹窗样式 */
body.light-mode .api-test-toolbar {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.2);
}

body.light-mode #apiTestModal .api-test-url .form-control {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
    color: #0f172a;
}

body.light-mode .api-test-tabs {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .tab-btn {
    color: #64748b;
}

body.light-mode .tab-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

body.light-mode .tab-btn.active {
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

body.light-mode .param-row .form-control,
body.light-mode .header-row .form-control {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.2);
    color: #0f172a;
}

body.light-mode .param-row .param-add:last-child,
body.light-mode .header-row .header-add:last-child {
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
}

body.light-mode .param-row .param-add:last-child:hover,
body.light-mode .header-row .header-add:last-child:hover {
    background: rgba(99, 102, 241, 0.15);
}

body.light-mode #requestBody {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
    color: #0f172a;
}

body.light-mode .response-header {
    border-color: rgba(148, 163, 184, 0.15);
}

body.light-mode .response-status {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

body.light-mode .response-status.success {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

body.light-mode .response-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

body.light-mode .response-time {
    color: #94a3b8;
}

body.light-mode .response-content {
    background: #f8fafc;
    color: #0f172a;
}

body.light-mode .response-content.error {
    color: #dc2626;
}