:root {
    --bg-main: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --bg-input: #FFFFFF;
    --border-color: #E2E8F0;
    --border-highlight: #3B82F6;
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-glow: rgba(37, 99, 235, 0.15);
    --accent: #6366F1;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --success: #059669;
    --success-bg: #ECFDF5;
    --success-glow: rgba(5, 150, 105, 0.15);
    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --danger-glow: rgba(220, 38, 38, 0.15);
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --info: #0284C7;
    --info-bg: #F0F9FF;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    
    --sidebar-width: 260px;
    --topbar-height: 72px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-header {
    height: var(--topbar-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.brand-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-item:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: #EFF6FF;
    color: var(--primary);
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 18px;
}

.badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
}

.badge-primary {
    background-color: #EFF6FF;
    color: var(--primary);
    border: 1px solid #BFDBFE;
}

.badge-success {
    background-color: #ECFDF5;
    color: var(--success);
    border: 1px solid #A7F3D0;
}

.badge-danger {
    background-color: #FEF2F2;
    color: var(--danger);
    border: 1px solid #FECACA;
}

.badge-secondary {
    background-color: #F1F5F9;
    color: var(--text-secondary);
    border: 1px solid #E2E8F0;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #F8FAFC;
}

.system-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.status-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.system-clock {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: var(--topbar-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.refresh-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.tab-content-container {
    padding: 32px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

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

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-md);
}

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

.kpi-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.kpi-icon {
    font-size: 20px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.kpi-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi-subtext {
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
    transition: width 0.4s ease;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.col-span-2 {
    grid-column: span 2;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.table-responsive {
    overflow-x: auto;
}

#tab-job-logs .table-responsive {
    min-height: 480px;
}

#events-master-table {
    min-width: 1350px;
}

#events-master-table th:first-child,
#events-master-table td:first-child {
    min-width: 240px;
    white-space: nowrap;
}

#events-master-table th:last-child,
#events-master-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 3;
    background-color: var(--bg-card);
    box-shadow: -4px 0 6px -2px rgba(0, 0, 0, 0.06);
    border-left: 1px solid var(--border-color);
    text-align: right;
}

#events-master-table th:last-child {
    background-color: #F8FAFC;
    z-index: 4;
}

#events-master-table tbody tr:hover td:last-child {
    background-color: var(--bg-card-hover);
}

.event-id-badge {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: all;
    transition: all 0.15s ease;
}

.event-id-badge:hover {
    color: var(--primary);
    background-color: var(--primary-glow);
}

#job-execution-logs-table tbody {
    transition: opacity 0.2s ease-in-out;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.table th {
    padding: 12px 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.table td {
    padding: 14px;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background-color: var(--bg-card-hover);
}

.table-hover tbody tr {
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1D4ED8);
    color: #FFFFFF;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background-color: #FFFFFF;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: #CBD5E1;
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
    box-shadow: 0 2px 8px var(--danger-glow);
}

.btn-danger:hover {
    filter: brightness(1.08);
}

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

.btn-outline:hover {
    background-color: #F8FAFC;
    color: var(--text-primary);
    border-color: #CBD5E1;
}

.btn-block {
    width: 100%;
}

.input-text, .select-input {
    height: 38px;
    box-sizing: border-box;
    padding: 0 14px;
    background-color: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.input-text:focus, .select-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: #FFFFFF;
}

.textarea {
    width: 100%;
    resize: vertical;
    padding: 10px 14px;
    min-height: 80px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background-color: #F8FAFC;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.filter-bar .form-group {
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
}

.responsive-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
    background-color: #F8FAFC;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.filter-field label,
.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 0;
}

.filter-field .input-text,
.filter-field .select-input {
    width: 100%;
    height: 38px;
    box-sizing: border-box;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    min-width: 0;
}

.filter-actions .btn {
    flex: 1;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .responsive-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .responsive-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .responsive-filter-grid {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
    }
}

.select-input {
    cursor: pointer;
    background-color: #FFFFFF;
    color: var(--text-primary);
}

.select-input option {
    background-color: #FFFFFF;
    color: var(--text-primary);
}

.storage-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.storage-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 8px;
}

.action-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.maintenance-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.maintenance-card {
    background-color: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.maint-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.maint-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 32px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 11px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-step-item {
    position: relative;
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.timeline-step-item:hover {
    border-color: var(--primary);
    background-color: #F8FAFC;
}

.timeline-step-item.active {
    border-color: var(--primary, #2563EB);
    background-color: #EFF6FF;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.timeline-step-item.active .timeline-step-name {
    color: var(--primary, #2563EB);
}

.timeline-step-node {
    position: absolute;
    left: -29px;
    top: 16px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.timeline-step-node.success {
    border-color: var(--success);
    background-color: var(--success);
    color: #FFFFFF;
}

.timeline-step-node.failed {
    border-color: var(--danger);
    background-color: var(--danger);
    color: #FFFFFF;
}

.timeline-step-node.skipped {
    border-color: var(--warning);
    background-color: var(--warning);
    color: #FFFFFF;
}

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

.timeline-step-name {
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-step-duration {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.timeline-step-detail {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.step-split-layout {
    display: grid;
    grid-template-columns: 430px 1fr;
    gap: 20px;
    height: calc(86vh - 160px);
    min-height: 480px;
}

@media (max-width: 992px) {
    .step-split-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
}

.step-timeline-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
    padding-right: 14px;
}

.step-timeline-pane .timeline-container {
    overflow-y: auto;
    height: 100%;
    padding-right: 10px;
    padding-bottom: 20px;
}

.step-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #F1F5F9;
}

.step-pane-header .pane-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-payload-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    overflow: hidden;
}

.step-detail-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.step-detail-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.json-code-box {
    background-color: #0F172A;
    border: 1px solid #1E293B;
    border-radius: var(--radius-sm);
    padding: 16px;
    height: 100%;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.5;
    color: #E2E8F0;
}

.json-code-box pre {
    margin: 0;
    font-family: inherit;
    white-space: pre;
}

.json-code-box code {
    font-family: inherit;
    color: inherit;
}

.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex;
}

.modal-card {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.2s ease-out;
}

.modal-card.modal-lg {
    max-width: 840px;
}

.modal-card.modal-xl {
    max-width: 1180px;
    width: 95%;
    height: 88vh;
    max-height: 92vh;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: #F8FAFC;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease-out;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.text-accent { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }
.mb-0 { margin-bottom: 0 !important; }
.d-flex { display: flex; }
.flex-column { display: flex !important; flex-direction: column !important; }
.flex-row { display: flex !important; flex-direction: row !important; }
.flex-1 { flex: 1 1 0% !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 16px !important; }
.gap-4 { gap: 24px !important; }
.w-full { width: 100% !important; }
.font-mono { font-family: var(--font-mono) !important; }
.font-bold { font-weight: 700 !important; }
.w-24 { width: 96px; }

.badge-channel-wallet {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background-color: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.badge-channel-cbs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background-color: #F0F9FF;
    color: #0284C7;
    border: 1px solid #BAE6FD;
}

.code-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
    display: inline-block;
}

.badge-outline {
    background-color: #F8FAFC;
    border: 1px solid #CBD5E1;
    color: #475569;
}

.drag-drop-zone {
    border: 2px dashed #CBD5E1;
    border-radius: var(--radius-md);
    background-color: #F8FAFC;
    padding: 20px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
    border-color: var(--primary);
    background-color: #EFF6FF;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.drag-drop-icon {
    font-size: 32px;
    line-height: 1;
}

.drag-drop-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.drag-drop-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.json-editor-container {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: #1E293B;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0F172A;
    padding: 8px 14px;
    border-bottom: 1px solid #334155;
}

.editor-toolbar-left, .editor-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-toolbar-title {
    font-size: 12px;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editor-tool-btn {
    background-color: #1E293B;
    border: 1px solid #334155;
    color: #E2E8F0;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.editor-tool-btn:hover {
    background-color: #334155;
    color: #FFFFFF;
    border-color: #475569;
}

.json-syntax-indicator {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.json-syntax-indicator.valid {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.json-syntax-indicator.invalid {
    background-color: rgba(239, 68, 68, 0.2);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.json-editor-textarea {
    width: 100% !important;
    height: 380px !important;
    min-height: 340px !important;
    max-height: 60vh !important;
    box-sizing: border-box !important;
    padding: 14px 16px !important;
    background-color: #0F172A !important;
    color: #E2E8F0 !important;
    font-family: 'Cascadia Code', 'Fira Code', Consolas, 'Courier New', monospace !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    border: none !important;
    outline: none !important;
    resize: vertical !important;
    tab-size: 2 !important;
}

.diff-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.diff-kpi-card {
    background-color: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.diff-kpi-card.kpi-total { border-left: 4px solid var(--primary); }
.diff-kpi-card.kpi-new { border-left: 4px solid var(--success); }
.diff-kpi-card.kpi-mod { border-left: 4px solid var(--warning); }
.diff-kpi-card.kpi-unc { border-left: 4px solid #94A3B8; }

.diff-kpi-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.diff-kpi-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.diff-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background-color: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.diff-search-input {
    min-width: 260px;
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    background-color: #FFFFFF;
    outline: none;
}

.diff-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.diff-table-container {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: calc(88vh - 310px);
    overflow-y: auto;
}

.diff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.diff-table th {
    background-color: #F1F5F9;
    color: #475569;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    padding: 10px 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--border-color);
}

.diff-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #E2E8F0;
    vertical-align: middle;
}

.diff-table tr:hover {
    background-color: #F8FAFC;
}

.diff-table tr.row-new {
    background-color: #F0FDF4;
}

.diff-table tr.row-modified {
    background-color: #FFFBEB;
}

.diff-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

.val-box {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    max-width: 300px;
    word-break: break-all;
    display: inline-block;
}

.val-box-old {
    background-color: #F1F5F9;
    color: #64748B;
    border: 1px solid #CBD5E1;
}

.val-box-new {
    background-color: #DCFCE7;
    color: #166534;
    border: 1px solid #86EFAC;
    font-weight: 600;
}

.cursor-pointer {
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.cursor-pointer:hover {
    transform: scale(1.08);
    opacity: 0.9;
}

.kpi-mini-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #F8FAFC;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.kpi-mini-item {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #E2E8F0;
}

.pagination-info {
    font-size: 13px;
    color: #64748B;
}

.pagination-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge-info {
    background-color: #E0F2FE;
    color: #0369A1;
    border: 1px solid #BAE6FD;
}

.storage-layout-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(560px, 2fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .storage-layout-grid {
        grid-template-columns: 1fr;
    }
}

.truncate-path {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.retention-policy-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.retention-policy-form .form-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.retention-policy-form .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.topbar-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 16px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-pill-online {
    background-color: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.badge-pill-offline {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.badge-pill-sync {
    background-color: #EFF6FF;
    color: #2563EB;
    border: 1px solid #BFDBFE;
}

.badge-pill-pending {
    background-color: #FFFBEB;
    color: #D97706;
    border: 1px solid #FDE68A;
}

.kpi-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.kpi-icon-success {
    background-color: #ECFDF5;
    color: #059669;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.15);
}

.kpi-icon-primary {
    background-color: #EFF6FF;
    color: #2563EB;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.kpi-icon-accent {
    background-color: #EEF2FF;
    color: #6366F1;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

.kpi-icon-warning {
    background-color: #FFFBEB;
    color: #D97706;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15);
}

.sync-monitor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.sync-stat-list {
    display: flex;
    flex-direction: column;
}

.sync-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}

.sync-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sync-stat-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sync-stat-icon {
    font-size: 16px;
    line-height: 1;
}

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

.sync-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.badge-code {
    display: inline-block;
    padding: 4px 10px;
    background-color: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #0F172A;
    word-break: break-all;
}

.sync-status-box {
    padding: 16px 20px;
    background: #F8FAFC;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

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

.sync-status-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.sync-status-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.sync-actions-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sync-action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sync-action-item:hover {
    border-color: #CBD5E1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.sync-action-info {
    flex: 1;
    min-width: 0;
}

.sync-action-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sync-action-icon {
    font-size: 15px;
    line-height: 1;
}

.sync-action-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.sync-action-btn {
    min-width: 140px;
    padding: 10px 18px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 8px;
    font-size: 13px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.pulse-dot-green {
    background-color: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGreen 2s infinite;
}

.pulse-dot-red {
    background-color: #EF4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulseRed 2s infinite;
}

.pulse-dot-yellow {
    background-color: #F59E0B;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: pulseYellow 2s infinite;
}

@keyframes pulseGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulseRed {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes pulseYellow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@media (max-width: 1024px) {
    .sync-monitor-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sync-action-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .sync-action-btn {
        width: 100%;
        min-width: unset;
    }
    .sync-status-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .sync-stat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .sync-stat-value {
        text-align: left;
    }
}

.badge-warning {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.badge-secondary {
    background-color: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.status-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: statusPulse 1.8s infinite;
}
@keyframes statusPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}
.status-dot-idle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #0284C7;
}
.status-dot-stopped {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #94A3B8;
}
.status-dot-standby {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #D97706;
}
.status-dot-error {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #EF4444;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.infra-health-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.infra-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: default;
    transition: all 0.2s ease;
}

.infra-pill:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.infra-pill .pill-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.infra-pill .pill-value {
    color: var(--text-primary);
    font-family: var(--font-mono, monospace);
    font-size: 11px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-green {
    background-color: #10B981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: pulseGreen 2s infinite;
}

.dot-yellow {
    background-color: #F59E0B;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
    animation: pulseYellow 2s infinite;
}

.dot-red {
    background-color: #EF4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
    animation: pulseRed 1.5s infinite;
}

.dot-gray {
    background-color: #9CA3AF;
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulseYellow {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
    70% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge-latency-good {
    background-color: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-weight: 600;
}

.badge-latency-warning {
    background-color: #FFFBEB;
    color: #D97706;
    border: 1px solid #FDE68A;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-weight: 600;
}

.badge-latency-danger {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-weight: 600;
}
