/* ─── CedolinoGO Admin Dashboard — Premium Dark Theme ─── */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f35;
    --border: rgba(255, 255, 255, 0.06);
    --text-primary: #f0f0f5;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);
    --accent-primary: #6366f1;
    --accent-secondary: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --sidebar-width: 260px;
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ─── Auth Screen ─────────────────────────────────────────── */
.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.08), transparent 60%);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 40px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand .brand-icon {
    margin: 0 auto 16px;
}

.auth-brand h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.auth-form input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: border-color 0.2s;
}

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

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 12px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer span {
    font-size: 11px;
    color: var(--text-muted);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* ─── App Container ──────────────────────────────────────── */
#app-container {
    display: flex;
}

/* ─── Session Timer & Logout ─────────────────────────────── */
.session-timer {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-secondary);
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 8px;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 4px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

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

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: white;
}

.brand-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

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

.env-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.env-dev {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.env-staging {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.env-production {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ─── Main Content ──────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

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

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.status-dot.online {
    background: #10b981;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

/* ─── Sections ──────────────────────────────────────────────── */
.section {
    display: none;
    padding: 32px;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Stats Grid ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

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

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

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

/* ─── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
}

.card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-description {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 24px;
}

.card-description code {
    background: rgba(99, 102, 241, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent-primary);
}

.card-row {
    display: flex;
    gap: 24px;
}

.card.half {
    flex: 1;
}

/* ─── Forms ────────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

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

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

.form-group input,
.form-group select {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s;
}

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

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.input-secret {
    display: flex;
    gap: 8px;
}

.input-secret input {
    flex: 1;
}

.btn-toggle-visibility {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-toggle-visibility:hover {
    background: var(--bg-card-hover);
}

.form-actions {
    display: flex;
    gap: 12px;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #5558e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

/* ─── Plans Grid ──────────────────────────────────────────── */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.plan-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
}

.plan-card.plan-pro {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.08);
}

.plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.plan-free .plan-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.plan-pro .plan-badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.plan-enterprise .plan-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.plan-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 32px;
    font-weight: 800;
    margin: 16px 0;
}

.plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.plan-features {
    list-style: none;
    margin: 16px 0;
    text-align: left;
}

.plan-features li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-features li::before {
    content: '✓ ';
    color: var(--accent-secondary);
}

.plan-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
}

.plan-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-secondary);
}

/* ─── Coupons ──────────────────────────────────────────────── */
.coupon-form {
    margin-bottom: 20px;
}

.coupon-form .form-group {
    margin-bottom: 12px;
}

.coupon-list {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.coupon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    margin-bottom: 8px;
}

.coupon-code {
    font-family: monospace;
    font-weight: 700;
    color: var(--accent-primary);
}

.coupon-discount {
    color: var(--accent-secondary);
    font-weight: 600;
}

.coupon-delete {
    background: none;
    border: none;
    color: var(--accent-danger);
    cursor: pointer;
    font-size: 16px;
}

/* ─── Build Section ───────────────────────────────────────── */
.build-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.build-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
}

.build-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.build-card h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.build-card p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
}

.build-meta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.build-meta span {
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-build {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.btn-build:hover {
    background: #5558e6;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-build-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.btn-build-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* ─── Build Log ───────────────────────────────────────────── */
.build-log {
    margin-top: 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.build-log h4 {
    margin-bottom: 12px;
    font-size: 14px;
}

.build-log pre {
    background: #000;
    color: #10b981;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

/* ─── Command Box ─────────────────────────────────────────── */
.command-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 12px;
}

.command-box code {
    flex: 1;
    font-size: 13px;
    color: var(--accent-secondary);
    word-break: break-all;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* ─── File Upload ─────────────────────────────────────────── */
.file-upload input[type="file"] {
    display: none;
}

.file-label {
    display: block;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.file-label:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.file-label.uploaded {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    border-style: solid;
}

/* ─── Services Grid ───────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.service-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.service-dot.up {
    background: #10b981;
}

.service-dot.down {
    background: #ef4444;
}

.service-name {
    font-size: 13px;
    font-weight: 500;
}

/* ─── Toast ───────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

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

.toast.success {
    border-left: 3px solid var(--accent-secondary);
}

.toast.error {
    border-left: 3px solid var(--accent-danger);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .card-row {
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .build-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Footer ───────────────────────────────────────────────── */
.admin-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 12px 32px;
    margin-left: var(--sidebar-width);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 11px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.version-tag {
    color: var(--accent-secondary);
    font-weight: 600;
}

/* Adjust main content bottom padding to avoid footer overlap */
.main-content {
    padding-bottom: 60px;
}

/* ─── Admin Tables ────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--surface-card);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--surface-light);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ─── Badges ──────────────────────────────────────────────── */
.role-badge,
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.role-admin {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.role-worker {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.role-support {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.status-none {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

/* ─── UI Utilities ────────────────────────────────────────── */
.flex-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.search-box input {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--surface-light);
    color: var(--text-primary);
    width: 280px;
    font-size: 13px;
    outline: none;
}

.search-box input:focus {
    border-color: var(--accent-primary);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: transform 0.2s;
    opacity: 0.7;
}

.btn-icon:hover {
    transform: scale(1.2);
    opacity: 1;
}

.form-divider {
    grid-column: span 2;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 16px;
    letter-spacing: 0.1em;
}

textarea#email-body {
    width: 100%;
    padding: 16px;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

/* ─── Role & Action Badges ────────────────────────────────── */
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.role-superadmin {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.role-admin {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.role-support {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.action-login-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.action-login-failure {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-system-updated {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.action-user-modified {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* ─── Modal ────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

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

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    width: 440px;
    max-width: 90vw;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}