:root {
    --primary: #0d7377;
    --primary-light: #e6f4f4;
    --primary-dark: #095255;
    --primary-hover: #0a5c5f;
    --bg-body: #f5f6fa;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border: #e2e5eb;
    --border-light: #f0f0f0;
    --text-primary: #1a1d26;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

h1, h2, h3, h4, .logo, .btn, .nav-label {
    font-family: 'Inter', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

code, pre, .mono {
    font-family: 'IBM Plex Sans', 'IBM Plex Sans Arabic', monospace;
}

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

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header img {
    height: 36px;
    width: auto;
}

.sidebar-header .brand {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-header .brand-sub {
    font-size: 0.7em;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}

.nav-section {
    padding: 12px 0 4px;
}

.nav-label {
    font-size: 0.65em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 20px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 0.88em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.nav-item .icon {
    width: 18px;
    text-align: center;
    font-size: 1em;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 0.8em;
    color: var(--text-muted);
}

.sidebar-footer a {
    color: var(--primary);
    text-decoration: none;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-primary);
}

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

.topbar-user {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.content-area {
    padding: 24px 28px;
    flex: 1;
}

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

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

.stat-card .stat-value {
    font-size: 2em;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-card .stat-icon {
    font-size: 1.4em;
    margin-bottom: 8px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

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

.card-header h3 {
    font-size: 1em;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88em;
}

thead th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

tbody tr:hover {
    background: #f9fafb;
}

tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 600;
    line-height: 1.4;
}

.badge-active, .badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-trialing, .badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-cancelled, .badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-expired, .badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-suspended, .badge-revoked {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-deleted {
    background: #fecaca;
    color: #991b1b;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

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

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

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

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8em;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88em;
    outline: none;
    background: var(--bg-card);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(13,115,119,0.12);
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    font-size: 0.88em;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.82em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea,
.modal-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88em;
    outline: none;
    font-family: inherit;
    background: var(--bg-card);
    box-sizing: border-box;
    margin-bottom: 8px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.modal-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(13,115,119,0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 1.05em;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.88em;
    z-index: 300;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.25s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.detail-header .back-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}

.detail-header h2 {
    font-size: 1.3em;
    font-weight: 700;
}

.detail-header .status {
    margin-left: auto;
}

.key-value {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 16px;
    font-size: 0.88em;
}

.key-value dt {
    font-weight: 600;
    color: var(--text-secondary);
}

.key-value dd {
    color: var(--text-primary);
}

.clickable {
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
}

.clickable:hover {
    text-decoration: underline;
}

.login-container {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-body);
    z-index: 1000;
}

.login-container[style*="display: none"],
.login-container[style*="display:none"] {
    display: none !important;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 400px;
    max-width: 90vw;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.login-box img {
    height: 56px;
    margin-bottom: 12px;
}

.login-box h2 {
    font-size: 1.3em;
    color: var(--primary);
    margin-bottom: 4px;
}

.login-box .subtitle {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-bottom: 28px;
}

.login-box .form-group {
    text-align: left;
}

.login-box .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 11px;
    font-size: 0.95em;
}

.login-error {
    color: var(--danger);
    font-size: 0.82em;
    margin-bottom: 12px;
    display: none;
}

.section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.section h2 {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.summary-box {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 0.88em;
    color: var(--text-secondary);
    min-height: 60px;
}

.runs-by-agent {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.82em;
}

.agent-name {
    color: var(--text-primary);
    font-weight: 500;
}

.agent-count {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.85em;
    font-weight: 600;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88em;
}

.data-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

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

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 600;
    line-height: 1.4;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-running {
    background: #dbeafe;
    color: #1e40af;
}

.status-pending {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-simulated {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.status-approved, .status-executed {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.status-blocked {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.status-cancelled {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.status-notified {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-pending_approval {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.health-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.health-card .health-status {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.health-card .health-status.healthy { color: var(--success); }
.health-card .health-status.unhealthy { color: var(--danger); }

.health-detail {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0;
}

.delivery-status {
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--text-muted);
    min-height: 1.2em;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
}

.role-admin { background: rgba(13,115,119,0.1); color: var(--primary); }
.role-manager { background: rgba(229,161,0,0.12); color: var(--warning); }
.role-viewer { background: rgba(100,116,139,0.12); color: var(--text-muted); }

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(13,115,119,0.08);
}

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

.product-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.product-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.info-item {
    font-size: 13px;
}

.info-label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.info-value {
    color: var(--text-secondary);
    font-weight: 500;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.toggle-row:last-child { border-bottom: none; }

.toggle-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.toggle {
    position: relative;
    width: 40px;
    height: 22px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1;
    border-radius: 11px;
    transition: background 0.2s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

.chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    margin: 2px 4px 2px 0;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.permission-notice {
    padding: 12px 16px;
    background: rgba(229,161,0,0.08);
    border: 1px solid rgba(229,161,0,0.25);
    border-radius: 6px;
    color: var(--warning);
    font-size: 13px;
    margin-bottom: 16px;
}

.demo-banner {
    background: linear-gradient(135deg, var(--primary), #0a9396);
    color: #fff;
    text-align: center;
    font-weight: 700;
    padding: 10px 16px;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 6px;
    margin-bottom: 16px;
    display: none;
}

.product-catalog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

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

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

.catalog-card-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

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

.catalog-stat {
    text-align: center;
    padding: 10px;
    background: var(--bg-body);
    border-radius: 6px;
}

.catalog-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.catalog-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.catalog-section {
    margin-top: 12px;
}

.catalog-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.catalog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.catalog-tag {
    background: rgba(13, 115, 119, 0.1);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.catalog-tag-mode {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.catalog-tag-domain {
    background: rgba(229, 161, 0, 0.1);
    color: #b8860b;
}

.btn-emergency-pause {
    background: #dc2626;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 8px;
    border: 2px solid #b91c1c;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.15s;
}

.btn-emergency-pause:hover {
    background: #b91c1c;
}

.policy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

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

.policy-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.policy-thresholds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.policy-permissions {
    margin-bottom: 12px;
}

.perm-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.perm-toggle-row:last-child {
    border-bottom: none;
}

.perm-toggle-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.action-defs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.action-def-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.action-def-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.action-def-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.risk-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.risk-low {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.risk-medium {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.risk-high {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.risk-critical {
    background: rgba(220, 38, 38, 0.15);
    color: #991b1b;
}

.workflow-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

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

.workflow-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.workflow-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.workflow-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}

@media (max-width: 768px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .two-col {
        grid-template-columns: 1fr;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .catalog-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
