:root {
    --bg-light: #f4f7fb;
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.12);
    --text-muted: #6c757d;
}

body {
    background: var(--bg-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1 0 auto;
}

.app-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.card-highlight {
    border: none;
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.card-highlight .card-header {
    background: transparent;
    border-bottom: none;
    color: var(--accent);
    font-weight: 600;
}

.badge-pill {
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
}

.wiki-section {
    margin-bottom: 2rem;
}

.wiki-category {
    padding: 1.25rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.wiki-category h5 {
    margin-bottom: 1rem;
}

.article-card {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.chart-container {
    position: relative;
    height: 320px;
}

.wiki-article {
    max-width: 900px;
    margin: 0 auto;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 600;
    color: #1a1a1a;
}

.article-content h1 {
    font-size: 2em;
    border-bottom: 2px solid var(--accent-soft);
    padding-bottom: 0.5em;
}

.article-content h2 {
    font-size: 1.75em;
}

.article-content h3 {
    font-size: 1.5em;
}

.article-content p {
    margin-bottom: 1em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-content ul,
.article-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.5em;
}

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5em;
    margin: 1.5em 0;
    font-style: italic;
    color: #666;
    background: var(--accent-soft);
    padding: 1em 1.5em;
    border-radius: 4px;
}

.article-content code {
    background: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: #f4f4f4;
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.article-content a:hover {
    border-bottom-color: var(--accent);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.article-content table th,
.article-content table td {
    padding: 0.75em;
    border: 1px solid #ddd;
    text-align: left;
}

.article-content table th {
    background: var(--accent-soft);
    font-weight: 600;
}

.article-card h6 a {
    color: inherit;
    transition: color 0.2s;
}

.article-card h6 a:hover {
    color: var(--accent);
}

/* Server Monitoring Cards */
.server-monitor-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 4px solid var(--text-muted);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: all 0.3s ease;
}

.server-monitor-card.online {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #fff 0%, #ecfdf5 100%);
}

.server-monitor-card.offline {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
}

.server-monitor-card.unknown {
    border-left-color: #6b7280;
    background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
}

.server-monitor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.server-monitor-card .server-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1f2937;
}

.server-monitor-card .server-details {
    margin-top: 0.25rem;
}

.server-monitor-card .status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

.server-monitor-card.online .status-indicator {
    animation-name: pulse-green;
}

.server-monitor-card.offline .status-indicator {
    animation-name: pulse-red;
}

.server-monitor-card .status-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.server-monitor-card .response-time {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.server-monitor-card .last-check {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 0.75rem;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

#refreshMonitoring:disabled {
    opacity: 0.6;
}

#refreshMonitoring .bi-arrow-clockwise {
    transition: transform 0.3s ease;
}

#refreshMonitoring.loading .bi-arrow-clockwise {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* User Management Styles */
.table > tbody > tr > td {
    vertical-align: middle;
}

.form-check-label .badge {
    font-size: 0.85em;
}

.dropdown-menu-dark .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
}

.dropdown-menu-dark .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dropdown-menu-dark .dropdown-item i {
    opacity: 0.7;
}

/* Role Cards */
.card[style*="border-left"] {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card[style*="border-left"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}
