/* Simple Log Viewer Styles */
.log-search {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--neutral-80);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-primary);
    background: var(--neutral-100);
    color: var(--neutral-20);
    transition: var(--transition-fast);
    min-width: 300px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.search-input::placeholder {
    color: var(--neutral-40);
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: var(--neutral-80);
    color: var(--neutral-100);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    background: var(--neutral-60);
}

.stat-badge.total {
    background: var(--neutral-80);
    color: white;
}

.simple-log-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--neutral-90);
    border-radius: var(--radius-md);
    background: var(--neutral-100);
}

.simple-log-entry {
    padding: 12px 16px;
    border-bottom: 1px solid var(--neutral-90);
    transition: var(--transition-fast);
}

.simple-log-entry:last-child {
    border-bottom: none;
}

.simple-log-entry:hover {
    background: var(--neutral-95);
}

.log-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.log-timestamp {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--neutral-40);
    background: var(--neutral-95);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    min-width: 140px;
}

.log-level {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    min-width: 50px;
    text-align: center;
}

.log-level.level-error {
    background: var(--error);
    color: white;
}

.log-level.level-warn {
    background: var(--warning);
    color: white;
}

.log-level.level-info {
    background: var(--primary);
    color: white;
}

.log-level.level-debug {
    background: var(--neutral-60);
    color: white;
}

.log-category {
    font-size: 12px;
    color: var(--neutral-40);
    background: var(--neutral-90);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.log-message {
    font-size: 14px;
    line-height: 1.5;
    color: var(--neutral-20);
    margin-bottom: 8px;
    word-wrap: break-word;
}

.log-context-container {
    margin-top: 8px;
}

.context-toggle-btn {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid var(--neutral-80);
    border-radius: var(--radius-sm);
    background: var(--neutral-95);
    color: var(--neutral-40);
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 8px;
}

.context-toggle-btn:hover {
    background: var(--neutral-90);
    border-color: var(--neutral-60);
}

.log-context {
    background: var(--neutral-95);
    border: 1px solid var(--neutral-90);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--neutral-40);
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}

/* Simple log list scrollbar */
.simple-log-list::-webkit-scrollbar {
    width: 8px;
}

.simple-log-list::-webkit-scrollbar-track {
    background: var(--neutral-95);
    border-radius: 4px;
}

.simple-log-list::-webkit-scrollbar-thumb {
    background: var(--neutral-80);
    border-radius: 4px;
}

.simple-log-list::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-60);
}

/* Modern 2025 Design System */
:root {
    --primary: #0078d4;
    --primary-dark: #005a9e;
    --primary-light: #c7e0f4;
    --secondary: #5c2d91;
    --accent: #107c41;
    --warning: #ff8c00;
    --error: #d13438;
    --success: #0f7b0f;
    --neutral-100: #ffffff;
    --neutral-95: #f9f9f9;
    --neutral-90: #f0f0f0;
    --neutral-80: #e0e0e0;
    --neutral-60: #bdbdbd;
    --neutral-40: #767676;
    --neutral-20: #333333;
    --neutral-10: #1f1f1f;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-primary: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'Cascadia Code', 'SF Mono', Monaco, Menlo, Consolas, 'Courier New', monospace;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --sidebar-width: 320px;
}

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

html, body { 
    height: 100%; 
    margin: 0; 
    padding: 0; 
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.5;
    color: var(--neutral-20);
    background-color: var(--neutral-95);
    overflow-x: hidden;
}

body { 
    display: flex; 
    flex-direction: column;
    height: 100vh;
}

/* Modern two-column layout */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--neutral-100);
    border-right: 1px solid var(--neutral-90);
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.app-header {
    background-color: var(--neutral-100);
    border-bottom: 1px solid var(--neutral-90);
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Status Bar */
#status-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--neutral-60);
}

.status-dot.active {
    background-color: var(--success);
}

/* Card Component */
.card {
    background-color: var(--neutral-100);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--neutral-90);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--neutral-90);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--neutral-20);
    margin: 0;
}

.card-body {
    padding: 24px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    gap: 8px;
    min-width: 100px;
    height: 40px;
    letter-spacing: 0.01em;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--neutral-100), 0 0 0 4px var(--primary);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #4a2578;
}

.btn-accent {
    background-color: var(--accent);
    color: white;
}

.btn-accent:hover {
    background-color: #0a6535;
}

.btn-outline {
    background-color: transparent;
    color: var(--neutral-20);
    border: 1px solid var(--neutral-80);
}

.btn-outline:hover {
    background-color: var(--neutral-95);
}

.btn-danger {
    background-color: var(--error);
    color: white;
}

.btn-danger:hover {
    background-color: #b02c2c;
}

/* Service Connection Section */
.service-connections {
    margin-bottom: 32px;
}

.connection-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* Test Results */
.test-results {
    background-color: var(--neutral-100);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-90);
    font-family: var(--font-mono);
    font-size: 14px;
    white-space: pre-wrap;
    overflow: auto;
    max-height: 400px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Utility Classes */
.center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none; }

/* Modern Log Viewer Styles */
.log-viewer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--neutral-100);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.log-stats {
    display: flex;
    gap: 8px;
}

.stat-badge {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    background: var(--neutral-90);
    color: var(--neutral-40);
}

.stat-badge.error {
    background: var(--error);
    color: white;
}

.stat-badge.warn {
    background: var(--warning);
    color: white;
}

.stat-badge.info {
    background: var(--primary);
    color: white;
}

.stat-badge.debug {
    background: var(--neutral-60);
    color: white;
}

.log-filters {
    display: flex;
    gap: 4px;
}

.filter-toggle {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--neutral-90);
    color: var(--neutral-40);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-toggle:hover {
    background: var(--neutral-80);
}

.filter-toggle.active {
    background: var(--primary);
    color: white;
}

.log-groups {
    max-height: 600px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    background: var(--neutral-100);
    box-shadow: var(--shadow-sm);
}

.log-level-group {
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.log-level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--neutral-95);
    border-left: 4px solid var(--neutral-80);
}

.log-level-header.level-error {
    border-left-color: var(--error);
}

.log-level-header.level-warn {
    border-left-color: var(--warning);
}

.log-level-header.level-info {
    border-left-color: var(--primary);
}

.log-level-header.level-debug {
    border-left-color: var(--neutral-60);
}

.level-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.level-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neutral-60);
}

.level-title.level-error .level-indicator {
    background: var(--error);
}

.level-title.level-warn .level-indicator {
    background: var(--warning);
}

.level-title.level-info .level-indicator {
    background: var(--primary);
}

.level-title.level-debug .level-indicator {
    background: var(--neutral-60);
}

.collapse-toggle {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--neutral-90);
    color: var(--neutral-40);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
}

.collapse-toggle:hover {
    background: var(--neutral-80);
}

.log-categories {
    padding: 0 12px 12px;
}

.log-category-group {
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    background: var(--neutral-100);
    border: 1px solid var(--neutral-90);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--neutral-95);
    border-bottom: 1px solid var(--neutral-90);
}

.category-icon {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
    position: relative;
}

.category-icon::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    top: 2px;
    left: 2px;
}

.category-icon.core-service::before {
    background: var(--accent);
}

.category-icon.controller::before {
    background: var(--primary);
}

.category-icon.module::before {
    background: var(--secondary);
}

.category-icon.service::before {
    background: var(--warning);
}

.category-icon.system::before {
    background: var(--neutral-60);
}

.category-name {
    font-weight: 500;
    color: var(--neutral-20);
}

.category-count {
    font-size: 12px;
    color: var(--neutral-40);
    background: var(--neutral-90);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.show-more {
    font-size: 11px;
    padding: 2px 6px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary-dark);
    cursor: pointer;
    margin-left: auto;
}

.log-entries {
    padding: 8px;
}

.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    background: var(--neutral-100);
    border-left: 2px solid var(--neutral-90);
    transition: var(--transition-fast);
    position: relative;
}

.log-entry:hover {
    background: var(--neutral-95);
    border-left-color: var(--primary);
}

.log-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 80px;
}

.log-time {
    font-size: 11px;
    color: var(--neutral-40);
    font-family: var(--font-mono);
}

.log-id {
    font-size: 10px;
    color: var(--neutral-60);
    font-family: var(--font-mono);
    background: var(--neutral-90);
    padding: 1px 3px;
    border-radius: 2px;
}

.log-content {
    flex: 1;
}

.log-message {
    font-size: 13px;
    line-height: 1.4;
    color: var(--neutral-20);
}

.log-context {
    margin-top: 8px;
    padding: 8px;
    background: var(--neutral-95);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--neutral-40);
    white-space: pre-wrap;
    overflow-x: auto;
}

.context-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--neutral-90);
    color: var(--neutral-40);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.context-toggle:hover {
    background: var(--neutral-80);
}

/* Recent logs container specific styles */
#recent-logs {
    max-height: none;
    overflow: visible;
}

#recent-logs::-webkit-scrollbar {
    width: 6px;
}

#recent-logs::-webkit-scrollbar-track {
    background: var(--neutral-95);
    border-radius: 3px;
}

#recent-logs::-webkit-scrollbar-thumb {
    background: var(--neutral-80);
    border-radius: 3px;
}

#recent-logs::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-60);
}

/* Device Management Styles */
.device-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--card-background);
}

.device-info {
    flex: 1;
    margin-right: 1rem;
}

.device-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 200px;
}

.device-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.device-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.device-status.authorized {
    background: var(--success-light);
    color: var(--success-dark);
}

.device-status.pending {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.device-status.expired {
    background: var(--error-light);
    color: var(--error-dark);
}

.device-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.4;
}

.device-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

.device-badge.current {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.device-badge.remote {
    background: var(--secondary-light);
    color: var(--secondary-dark);
}

.revoke-device-btn {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.revoke-device-btn:hover {
    background: var(--error-dark);
}

/* No devices state */
.no-devices {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.no-devices p {
    margin: 0.5rem 0;
}

/* Error state */
.error-state {
    text-align: center;
    padding: 2rem;
}

.error-message {
    color: var(--error-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Download buttons styling */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.download-buttons .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Device Authorization Modal Styles */
.device-auth-modal {
    max-width: 500px;
    width: 90%;
}

.device-auth-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-step {
    padding: 16px;
    background: var(--neutral-100);
    border: 1px solid var(--neutral-90);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.auth-step.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.auth-step.completed {
    border-color: var(--success);
    background: var(--success-light);
}

.auth-step.error {
    border-color: var(--error);
    background: var(--error-light);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.step-title {
    font-weight: 500;
    color: var(--neutral-20);
}

.user-code-display {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    padding: 16px;
    background: var(--neutral-100);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    margin: 12px 0;
    letter-spacing: 2px;
    color: var(--primary);
}

.verification-url-container {
    background: var(--neutral-95);
    padding: 12px;
    border-radius: var(--radius-md);
    margin: 12px 0;
}

.verification-url {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--neutral-40);
    word-break: break-all;
    margin: 4px 0;
}

.copy-url-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-top: 8px;
}

.copy-url-btn:hover {
    background: var(--primary-dark);
}

.auth-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neutral-60);
}

.status-dot.waiting {
    background: var(--warning);
    animation: pulse 2s infinite;
}

.status-dot.success {
    background: var(--success);
}

.status-dot.error {
    background: var(--error);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.auth-progress {
    width: 100%;
    height: 4px;
    background: var(--neutral-90);
    border-radius: 2px;
    overflow: hidden;
    margin: 12px 0;
}

.auth-progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .device-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .device-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .btn-sm {
        width: 100%;
    }
}

/* Service Test Results */
.testing-services {
    text-align: center;
    padding: 16px;
    color: var(--neutral-40);
    font-style: italic;
}

.service-test-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: var(--radius-sm);
    background: var(--neutral-100);
    border: 1px solid var(--neutral-90);
}

.service-test-result.success {
    border-color: var(--success);
    background: var(--success-light);
}

.service-test-result.error {
    border-color: var(--error);
    background: var(--error-light);
}

.service-name {
    font-weight: 500;
    color: var(--neutral-20);
}

.service-status {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.service-status.success {
    background: var(--success);
    color: white;
}

.service-status.error {
    background: var(--error);
    color: white;
}

/* View All Devices */
.view-all-devices {
    text-align: center;
    padding: 8px;
    border-top: 1px solid var(--neutral-90);
    margin-top: 8px;
}

.view-all-devices .btn {
    width: 100%;
}

/* Modal Close Button */
.btn-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--neutral-90);
    color: var(--neutral-40);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--neutral-80);
    color: var(--neutral-20);
}

/* Modal Header */
.modal-header {
    position: relative;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--neutral-90);
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--neutral-20);
}

/* Modal Body */
.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Modal Footer */
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--neutral-90);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Hidden class for JavaScript show/hide */
.hidden {
    display: none !important;
}

/* Authentication Section Styles */
.auth-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 0.875rem;
}

.auth-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.auth-status.connected .status-indicator {
    background: var(--success);
}

.auth-status.error .status-indicator {
    background: var(--error);
}

/* Adapter Download Section */
.adapter-section {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.adapter-download h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.adapter-download p {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.adapter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.adapter-buttons .btn {
    flex: 1;
    min-width: 140px;
}

/* Session Info Styles */
#session-info p {
    margin: 8px 0;
    font-size: 0.875rem;
}

#session-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

#session-info span {
    color: var(--text-secondary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Button States */
.btn.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.btn.btn-success:hover:not(:disabled) {
    background: var(--success-dark, #28a745);
    border-color: var(--success-dark, #28a745);
}

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

/* Utility Classes */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.hidden { display: none !important; }
.relative { position: relative; }

/* MCP Token Generation Styles */
#mcp-token-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

#mcp-token-section h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#mcp-token-section p {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.token-display {
    margin-bottom: 16px;
}

.token-display label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

#mcp-token-text {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    resize: vertical;
    word-break: break-all;
}

#mcp-token-text:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.config-example {
    margin-top: 16px;
}

.config-example label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.config-code {
    background: var(--neutral-95);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}

.config-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.config-buttons .btn {
    flex: 1;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

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

.btn-outline-secondary:hover {
    background: var(--secondary);
    color: white;
}
