/* CSS Variables */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
}

/* Base Styles */
body {
    background-color: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Account Card */
.account-card {
    transition: all 0.3s ease;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

/* Copy Button */
.copy-btn {
    transition: all 0.2s ease;
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Animations */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Refresh Icon */
.refresh-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.refresh-icon.rotating {
    animation: spin 1s linear infinite;
}

/* Rank Icons */
.rank-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.rank-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #92400e;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.rank-silver {
    background: linear-gradient(135deg, #c0c0c0, #e5e7eb);
    color: #374151;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.rank-bronze {
    background: linear-gradient(135deg, #cd7f32, #f97316);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

.rank-normal {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* Copy Info Button */
.copy-info-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transition: all 0.3s ease;
}

.copy-info-btn:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Error Card */
.error-card {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #f87171;
    color: #991b1b;
}

/* Server Badges */
.smile-server-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #92400e;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

/* Remark Edit */
.remark-edit-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remark-text {
    flex: 1;
    font-size: 14px;
    color: #4b5563;
}

.remark-edit-btn {
    padding: 4px 8px;
    font-size: 12px;
    background: #e5e7eb;
    color: #374151;
    border-radius: 4px;
    transition: all 0.2s;
}

.remark-edit-btn:hover {
    background: #d1d5db;
}

/* Call Record */
.call-record-item {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.call-record-item:hover {
    background: #f9fafb;
}

.call-record-item:last-child {
    border-bottom: none;
}

/* Monitor Card */
.monitor-card {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* Online Indicator */
.online-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.online-indicator.online {
    background: #10b981;
}

.online-indicator.offline {
    background: #ef4444;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Report Section */
.report-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.report-title {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

/* Dynamic Input */
.dynamic-input {
    position: relative;
}

.dynamic-input input:focus + label,
.dynamic-input input:not(:placeholder-shown) + label {
    transform: translateY(-20px) scale(0.9);
    color: #3b82f6;
}

.dynamic-input label {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #9ca3af;
    transition: all 0.2s;
    pointer-events: none;
}

/* Tab Content Transitions */
.tab-content-enter-active,
.tab-content-leave-active {
    transition: all 0.3s ease;
}

.tab-content-enter-from {
    opacity: 0;
    transform: translateX(20px);
}

.tab-content-leave-to {
    opacity: 0;
    transform: translateX(-20px);
}

/* Permission Card */
.permission-card {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.permission-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

/* Range Selector */
.range-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.range-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.range-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.search-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-suggestion-item:hover {
    background: #f3f4f6;
}

.search-suggestion-item.active {
    background: #3b82f6;
    color: white;
}

/* Quick Actions Panel */
.quick-actions-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    cursor: pointer;
}

.quick-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f3f4f6;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background: #f9fafb;
}

/* Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator.success {
    background: #d1fae5;
    color: #065f46;
}

.status-indicator.warning {
    background: #fed7aa;
    color: #92400e;
}

.status-indicator.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Detail Modal */
.detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.detail-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.detail-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.detail-modal-body {
    padding: 24px;
}

.detail-modal-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* No Records Card */
.no-records-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.no-records-icon {
    color: #0ea5e9;
    margin-bottom: 16px;
}

.call-records-error-card {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
}