/* DataRover Styles */

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

:root {
    --primary: #6366f1;
    --sidebar-bg: #f9fafb;
    --border: #e5e7eb;
    --text: #111827;
    --text-light: #6b7280;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: var(--text);
}

/* Navigation */
.nav {
    height: 85px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px 5px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 8px;
    position: relative;
    margin-right: 12px;
}

.logo::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    top: 8px;
    left: 8px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
}

/* Layout */
.layout {
    display: flex;
    margin-top: 85px;
    height: calc(100vh - 85px);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 8px 12px 24px 12px;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 85px;
    bottom: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.2s;
}

.menu-item:hover {
    background: white;
}

.menu-item.active {
    background: #ede9fe;
    color: var(--primary);
    font-weight: 600;
}

.menu-item svg {
    width: 20px;
    height: 20px;
}

/* Main */
.main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    overflow-y: auto;
}

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

.title {
    font-size: 32px;
    font-weight: 700;
}

.btn {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Search */
.search {
    margin-bottom: 24px;
}

.search input {
    width: 100%;
    max-width: 500px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Table */
.table-container {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--sidebar-bg);
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

td {
    padding: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--sidebar-bg);
}

/* Badge */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Empty */
.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

/* Stat Cards */
.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
}

/* ========================================
   MERMAID MINIMAL CLEAN NODE STYLING
   Card-based design like screenshot
   ======================================== */

.mermaid {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

/* CRITICAL: Force rounded corners on all nodes */
svg .node rect,
.mermaid .node rect,
.node > rect {
    rx: 16 !important;
    ry: 16 !important;
}

/* Node Base - Clean Card Style */
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon {
    fill: #ffffff !important;
    stroke: #e5e7eb !important;
    stroke-width: 1px !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
    transition: all 0.2s ease;
}

.mermaid .node:hover rect,
.mermaid .node:hover circle {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
    transform: translateY(-1px);
    cursor: pointer;
}

/* All node types - same white style */
.mermaid .source rect,
.mermaid .transform rect,
.mermaid .target rect {
    fill: #ffffff !important;
    stroke: #e5e7eb !important;
    stroke-width: 1px !important;
    rx: 16 !important;
    ry: 16 !important;
}

/* Label styling */
.mermaid .source .label,
.mermaid .transform .label,
.mermaid .target .label {
    fill: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
}

/* Edge Styling - Smooth curves */
.mermaid .edgePath .path {
    stroke: #d1d5db !important;
    stroke-width: 2px !important;
    filter: none;
    fill: none !important;
}

.mermaid .edgePath .arrowheadPath {
    fill: #d1d5db !important;
    stroke: #d1d5db !important;
}

/* Edge Labels - Clean Badge */
.mermaid .edgeLabel {
    background: #f3f4f6 !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    box-shadow: none !important;
}

.mermaid .edgeLabel rect {
    fill: #f3f4f6 !important;
    stroke: #e5e7eb !important;
    stroke-width: 1px !important;
    rx: 12 !important;
    ry: 12 !important;
}

/* Label Text - Clean Typography */
.mermaid .nodeLabel {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
    line-height: 1.5 !important;
}

/* Secondary text styling */
.mermaid text tspan {
    fill: #6b7280 !important;
}

/* Cluster/Subgraph - Minimal */
.mermaid .cluster rect {
    fill: #f9fafb !important;
    stroke: #e5e7eb !important;
    stroke-width: 1px !important;
    rx: 12 !important;
    ry: 12 !important;
}

.mermaid .cluster .label {
    fill: #6b7280 !important;
    font-weight: 500 !important;
}

/* ========================================
   GENERIC MODAL OVERLAY
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: modalFadeIn 0.2s ease;
    padding: 20px;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #e2e8f0;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #ef4444;
    color: white;
}

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

/* ========================================
   NODE EXPANDABLE MODAL
   ======================================== */

.node-modal-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: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.node-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.node-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.node-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

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

.node-section {
    margin-bottom: 24px;
}

.node-section:last-child {
    margin-bottom: 0;
}

.node-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.column-list {
    display: grid;
    gap: 8px;
}

.column-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.column-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.column-icon {
    font-size: 16px;
}

.column-name {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metadata-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metadata-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .node-modal {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .metadata-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   AI ASSISTANT
   ======================================== */

.ai-assistant-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.ai-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ai-header h1 {
    font-size: 24px;
    margin: 0 0 8px 0;
}

.ai-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.ai-suggestions {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    flex-wrap: wrap;
}

.suggestion-chip {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.suggestion-chip:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.ai-chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f9fafb;
}

.ai-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

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

.ai-message-user {
    flex-direction: row-reverse;
}

.ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: white;
    border: 2px solid #e5e7eb;
}

.ai-message-user .ai-avatar {
    background: #667eea;
    border-color: #667eea;
}

.ai-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    line-height: 1.6;
}

.ai-message-user .ai-message-content {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.ai-message-content p {
    margin: 0 0 8px 0;
}

.ai-message-content p:last-child {
    margin-bottom: 0;
}

.ai-message-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-message-content li {
    margin: 4px 0;
}

.ai-message-content strong {
    font-weight: 600;
    color: #1f2937;
}

.ai-message-user .ai-message-content strong {
    color: white;
}

.ai-typing-indicator {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.ai-input-container {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.ai-input-container textarea {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    transition: border-color 0.2s;
}

.ai-input-container textarea:focus {
    outline: none;
    border-color: #667eea;
}

.ai-send-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #667eea;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-send-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

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

.ai-send-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ai-message-content {
        max-width: 85%;
    }
    
    .ai-suggestions {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}

/* Timeline Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 currentColor;
    }
    70% {
        box-shadow: 0 0 0 10px transparent;
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item {
    animation: fadeInUp 0.3s ease-out;
}

/* ========================================
   USER MANAGEMENT STYLES
   ======================================== */

.users-container {
    padding: 20px;
}

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.users-search {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.users-search input,
.users-search select {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 180px;
}

.users-search input:focus,
.users-search select:focus {
    outline: none;
    border-color: #667eea;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

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

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-secondary {
    padding: 10px 20px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-sm {
    padding: 6px 10px;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-sm:hover {
    background: #e2e8f0;
}

.btn-sm.btn-danger:hover {
    background: #fee2e2;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

.roles-grid {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .users-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .users-search {
        flex-direction: column;
    }
    
    .users-search input,
    .users-search select {
        width: 100%;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

/* ============================================================
   EXTERNAL SOURCES MODULE STYLES
   ============================================================ */

/* Scanner Status */
.scanner-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-right: 12px;
}

.scanner-status.online {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.scanner-status.offline {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

.scanner-status.offline .status-dot {
    animation: none;
}

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

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Schema List */
.schema-list label {
    cursor: pointer;
    transition: background 0.2s;
}

.schema-list label:hover {
    background: var(--sidebar-bg);
}

.schema-list label:last-child {
    border-bottom: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 8px;
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    margin-bottom: 0;
}

/* Checkbox Item */
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: var(--sidebar-bg);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-badge.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Button Danger */
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
}

.toast {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    background: #16a34a;
    color: white;
}

.toast.error {
    background: #dc2626;
    color: white;
}

.toast.warning {
    background: #d97706;
    color: white;
}

.toast.info {
    background: #2563eb;
    color: white;
}

/* Code Block */
code {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
}

/* ============================================================ */
/* GLOBAL SEARCH */
/* ============================================================ */

.global-search-container {
    position: relative;
    width: 100%;
    max-width: 1300px;
    flex-shrink: 0;
}

.global-search-container::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.global-search-input {
    width: 100%;
    padding: 14px 20px;
    padding-left: 46px;
    padding-right: 80px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.2s;
    outline: none;
}

.global-search-input:focus {
    background: white;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.global-search-input::placeholder {
    color: #94a3b8;
}

.global-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
}

.global-search-results.show {
    display: block;
}

.search-result-group {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.search-result-group:last-child {
    border-bottom: none;
}

.search-result-group-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.search-result-item {
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.search-no-results-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.search-no-results-text {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}
