:root {
    --bg-color: #0d0f14;
    --card-bg: rgba(22, 28, 45, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-color: #5856d6;
    --accent-glow: rgba(88, 86, 214, 0.35);
    
    --success: #34c759;
    --success-glow: rgba(52, 199, 89, 0.25);
    --warning: #ff9f0a;
    --warning-glow: rgba(255, 159, 10, 0.25);
    --danger: #ff453a;
    --danger-glow: rgba(255, 69, 58, 0.25);
    --pending: #007aff;
    --pending-glow: rgba(0, 122, 255, 0.25);
    
    --transition-speed: 0.15s;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Hardware-accelerated background without scroll repainting or input lag */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(at 0% 0%, rgba(88, 86, 214, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 122, 255, 0.12) 0px, transparent 50%);
    pointer-events: none;
    z-index: -1;
    transform: translateZ(0);
    will-change: transform;
}

header {
    background: rgba(13, 15, 20, 0.96);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateZ(0);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    text-decoration: none;
    border: 1px solid transparent;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
}

.btn:active {
    transform: scale(0.96) !important;
    transition-duration: 0.05s;
}

.btn-primary {
    background: linear-gradient(135deg, #5856d6 0%, #4a00e0 100%);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 86, 214, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ff453a 0%, #c92a2a 100%);
    color: #fff;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 58, 0.5);
}

.container {
    max-width: 1440px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex-grow: 1;
}

/* High-Performance Card Style (no heavy nested blur on lists) */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.25);
    margin-bottom: 2rem;
}

/* Login Screen layout */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.login-card h2 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-align: center;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

/* Dashboard Summary / Top Bar */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem !important;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

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

/* Site Table / Grid */
.sites-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(22, 28, 45, 0.65);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
    will-change: transform;
    contain: paint layout;
}

.site-row:hover {
    border-color: rgba(88, 86, 214, 0.4);
    background: rgba(28, 36, 58, 0.85);
    transform: translateX(4px);
}

/* Status Badges & Indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

.status-indicator::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    animation: pulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
    will-change: transform, opacity;
}

.status-indicator.status-ok, .status-indicator.status-active { background-color: var(--success); }
.status-indicator.status-ok::after, .status-indicator.status-active::after { border: 2px solid var(--success); }

.status-indicator.status-warning { background-color: var(--warning); }
.status-indicator.status-warning::after { border: 2px solid var(--warning); }

.status-indicator.status-inactive { background-color: var(--text-secondary); }
.status-indicator.status-inactive::after { display: none; }

.status-indicator.status-pending { background-color: var(--pending); }
.status-indicator.status-pending::after { border: 2px solid var(--pending); }

.status-indicator.status-danger { background-color: var(--danger); }
.status-indicator.status-danger::after { border: 2px solid var(--danger); }

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
}

.badge-ok, .badge-active { background: rgba(52, 199, 89, 0.15); color: var(--success); border: 1px solid rgba(52, 199, 89, 0.3); }
.badge-warning { background: rgba(255, 159, 10, 0.15); color: var(--warning); border: 1px solid rgba(255, 159, 10, 0.3); }
.badge-inactive { background: rgba(156, 163, 175, 0.15); color: var(--text-secondary); border: 1px solid rgba(156, 163, 175, 0.3); }
.badge-pending, .badge-changed { background: rgba(0, 122, 255, 0.15); color: var(--pending); border: 1px solid rgba(0, 122, 255, 0.3); }
.badge-danger { background: rgba(255, 69, 58, 0.15); color: var(--danger); border: 1px solid rgba(255, 69, 58, 0.3); }
.badge-custom { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }

@keyframes badge-pulse-anim {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.badge-pulse {
    animation: badge-pulse-anim 3s ease-in-out infinite;
    will-change: transform;
    display: inline-flex;
}

/* Custom Plugins & Vulnerabilities Highlighting */
.btn-icon {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-custom-active {
    background: rgba(168, 85, 247, 0.25) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.5) !important;
}

.custom-plugin-item {
    border-left: 3px solid #a855f7 !important;
    background: rgba(168, 85, 247, 0.04) !important;
}

.vuln-item {
    border-left: 3px solid var(--danger) !important;
    background: rgba(255, 69, 58, 0.05) !important;
}

.custom-and-vuln-item {
    border-left: 4px solid #ff453a !important;
    background: linear-gradient(90deg, rgba(255, 69, 58, 0.09) 0%, rgba(168, 85, 247, 0.08) 100%) !important;
}

.vuln-row-highlight {
    border-left: 3px solid var(--danger) !important;
    background: rgba(255, 69, 58, 0.03) !important;
}

.custom-note-inline {
    background: rgba(168, 85, 247, 0.12);
    color: #d8b4fe;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    font-size: 0.75rem;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Vulnerability Banner */
.vuln-alert-banner {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.22) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.vuln-custom-banner {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25) 0%, rgba(147, 51, 234, 0.2) 100%);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.vuln-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.custom-vuln-warning-box {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(168, 85, 247, 0.15);
    border-left: 3px solid #a855f7;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #f3e8ff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.4;
}

.custom-vuln-warning-box i {
    font-size: 1.4rem;
    color: #c084fc;
    flex-shrink: 0;
}

/* Vulnerability Drawer and Cards */
.entity-wrapper {
    display: flex;
    flex-direction: column;
}

.vuln-drawer {
    display: none;
    background: rgba(10, 14, 23, 0.85);
    border: 1px solid rgba(255, 69, 58, 0.3);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -4px;
    margin-bottom: 0.75rem;
    padding: 1rem 1.25rem;
}

.vuln-card-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.vuln-card-item:last-child {
    margin-bottom: 0;
}

/* CVSS Severity Pills */
.cvss-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cvss-critica { background: rgba(185, 28, 28, 0.25); color: #fca5a5; border: 1px solid #ef4444; }
.cvss-alta { background: rgba(190, 24, 93, 0.25); color: #f472b6; border: 1px solid #ec4899; }
.cvss-media { background: rgba(180, 83, 9, 0.25); color: #fcd34d; border: 1px solid #f59e0b; }
.cvss-bassa { background: rgba(21, 128, 61, 0.25); color: #86efac; border: 1px solid #22c55e; }
.cvss-avviso { background: rgba(148, 163, 184, 0.2); color: #e2e8f0; border: 1px solid #94a3b8; }

/* Modal Custom Plugin Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-dialog {
    background: #131722;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    padding: 1.75rem;
    color: var(--text-primary);
    animation: modal-fade-in 0.25s ease-out;
}

@keyframes modal-fade-in {
    from { transform: translateY(-10px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.75rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

/* Site Info */
.site-info-cell h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.site-info-cell a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    word-break: break-all;
}

.site-info-cell a:hover {
    color: var(--accent-color);
}

.datetime-cell {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.datetime-cell span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

/* Alert notifications */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
    border-color: rgba(255, 69, 58, 0.2);
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
    border-color: rgba(52, 199, 89, 0.2);
}

/* Details Page styles */
.site-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .site-detail-grid {
        grid-template-columns: 1fr;
    }
    .site-row {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }
    .datetime-cell, .badge-cell {
        grid-column: 2;
    }
    .actions-cell {
        grid-column: 1 / span 2;
        justify-content: flex-end;
    }
}

.detail-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    border-left: 2px solid var(--card-border);
    padding-left: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.timeline-item::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary);
    position: absolute;
    left: -6px;
    top: 5px;
    border: 2px solid var(--bg-color);
}

.timeline-item.status-ok::before { background: var(--success); }
.timeline-item.status-warning::before { background: var(--warning); }
.timeline-item.status-changed::before { background: var(--pending); }

.timeline-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.timeline-comment {
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Plugin/Theme List Display */
.entity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.entity-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.entity-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.entity-name {
    font-weight: 500;
}

.entity-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.entity-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.entity-active { background: var(--success); }
.entity-inactive { background: var(--text-secondary); }

/* Custom changes overlay */
.changed-highlight {
    border-left: 3px solid var(--warning) !important;
    background: rgba(255, 159, 10, 0.03) !important;
}

.added-highlight {
    border-left: 3px solid var(--success) !important;
    background: rgba(52, 199, 89, 0.03) !important;
}

.deleted-highlight {
    border-left: 3px solid var(--danger) !important;
    background: rgba(255, 69, 58, 0.03) !important;
    opacity: 0.7;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        opacity: 0;
    }
}

footer {
    border-top: 1px solid var(--card-border);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: rgba(13, 15, 20, 0.5);
    margin-top: auto;
}

/* Floating copy tooltip or dialog */
.copy-key-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    margin-top: 0.5rem;
}

.copy-key-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-key-input:focus {
    outline: none;
}

/* Interactive Stat Card Filters & Search */
.stat-card[data-filter] {
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
}

.stat-card[data-filter]:hover {
    transform: translateY(-3px);
    background: rgba(28, 36, 58, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
}

.stat-card[data-filter]:active {
    transform: scale(0.97);
    transition-duration: 0.05s;
}

.stat-card.active-filter {
    transform: translateY(-2px);
}

.stat-card.active-filter[data-filter="all"] {
    border-color: var(--text-secondary) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.12) !important;
}

.stat-card.active-filter[data-filter="active"] {
    border-color: var(--success) !important;
    box-shadow: 0 0 10px var(--success-glow) !important;
}

.stat-card.active-filter[data-filter="warning"] {
    border-color: var(--warning) !important;
    box-shadow: 0 0 10px var(--warning-glow) !important;
}

.stat-card.active-filter[data-filter="vulnerable"],
.stat-card.active-filter[data-filter="danger"] {
    border-color: var(--danger) !important;
    box-shadow: 0 0 10px var(--danger-glow) !important;
}

.stat-card.active-filter[data-filter="pending"] {
    border-color: var(--pending) !important;
    box-shadow: 0 0 10px var(--pending-glow) !important;
}

.site-row.is-hidden {
    display: none !important;
}

#site-search {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#site-search:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

.connection-error-highlight {
    border-left: 3px solid var(--danger) !important;
    background: rgba(255, 69, 58, 0.03) !important;
}

.badge-lock {
    background: rgba(168, 85, 247, 0.12);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* =============================================================
   MODERN DIALOGS & TOAST SYSTEM (Primotu UI)
   ============================================================= */

.primotu-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 1;
    transition: opacity 0.18s ease;
}

.primotu-dialog-overlay.closing {
    opacity: 0;
}

.primotu-dialog-box {
    background: #131722;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(88, 86, 214, 0.15);
    width: 100%;
    max-width: 500px;
    padding: 1.75rem;
    color: var(--text-primary);
    transform: scale(1) translateY(0);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    animation: dialog-pop-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.primotu-dialog-overlay.closing .primotu-dialog-box {
    transform: scale(0.96) translateY(6px);
}

@keyframes dialog-pop-in {
    from { transform: scale(0.92) translateY(-10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.primotu-dialog-header {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.primotu-dialog-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.dialog-icon-danger {
    background: rgba(255, 69, 58, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 69, 58, 0.3);
    box-shadow: 0 0 20px rgba(255, 69, 58, 0.25);
}

.dialog-icon-success {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success);
    border: 1px solid rgba(52, 199, 89, 0.3);
    box-shadow: 0 0 20px rgba(52, 199, 89, 0.25);
}

.dialog-icon-warning {
    background: rgba(255, 159, 10, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 159, 10, 0.3);
    box-shadow: 0 0 20px rgba(255, 159, 10, 0.25);
}

.dialog-icon-info {
    background: rgba(88, 86, 214, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
}

.primotu-dialog-content {
    flex: 1;
    min-width: 0;
}

.primotu-dialog-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.primotu-dialog-message {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.55;
    word-break: break-word;
}

.primotu-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
}

/* Toast Notifications */
.primotu-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.primotu-toast {
    pointer-events: auto;
    background: rgba(19, 23, 34, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.25s ease;
}

.primotu-toast.toast-success {
    border-left: 3px solid var(--success);
}
.primotu-toast.toast-danger, .primotu-toast.toast-error {
    border-left: 3px solid var(--danger);
}
.primotu-toast.toast-warning {
    border-left: 3px solid var(--warning);
}
.primotu-toast.toast-info {
    border-left: 3px solid var(--accent-color);
}

.primotu-toast.toast-fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


