/* Dashboard CSS - DJI Cloud API Platform */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

.header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.header p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.config-display {
    display: grid;
    gap: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.config-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.config-label {
    font-weight: 600;
    color: #495057;
}

.config-value {
    color: #6c757d;
    word-break: break-all;
}

.config-value.masked {
    color: #28a745;
}

.config-value.loading {
    color: #ffc107;
}

.config-value.error {
    color: #dc3545;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.status-indicators {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-connected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-disconnected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.logs-container {
    grid-column: 1 / -1;
}

.logs {
    background: #2c3e50;
    border-radius: 10px;
    padding: 20px;
    height: 400px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Courier New', monospace;
    color: #ecf0f1;
    line-height: 1.6;
    resize: none;
    max-width: 100%;
}

.logs::-webkit-scrollbar {
    width: 8px;
}

.logs::-webkit-scrollbar-track {
    background: #34495e;
    border-radius: 4px;
}

.logs::-webkit-scrollbar-thumb {
    background: #7f8c8d;
    border-radius: 4px;
}

.log-entry {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    background: rgba(52, 73, 94, 0.3);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.log-timestamp {
    color: #95a5a6;
    font-size: 0.9em;
}

.log-message {
    margin-left: 10px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.log-success { border-left: 3px solid #27ae60; }
.log-error { border-left: 3px solid #e74c3c; }
.log-info { border-left: 3px solid #3498db; }
.log-warning { border-left: 3px solid #f39c12; }

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

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

    .button-group {
        flex-direction: column;
    }

    .btn {
        flex: none;
    }
}
