:root {
    --dlp-brand-red: #8b1a1a;
    --dlp-brand-black: #0a0a0a;
    --dlp-primary: #8b1a1a;
    --dlp-primary-soft: #f3e8e8;
    --dlp-accent: #b91c1c;
    --dlp-sidebar: #0a0a0a;
    --dlp-sidebar-muted: #a3a3a3;
    --dlp-header-bg: #ffffff;
    --dlp-surface: #f5f5f5;
    --dlp-border: #e5e5e5;
    --dlp-text: #0a0a0a;
    --dlp-text-muted: #525252;
    --dlp-critical: #dc2626;
    --dlp-high: #d97706;
    --dlp-medium: #2563eb;
    --dlp-low: #64748b;
    --dlp-success: #16a34a;
    --dlp-shadow: 0 1px 3px rgba(10, 10, 10, 0.08), 0 4px 16px rgba(10, 10, 10, 0.06);
}

body {
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: var(--dlp-text);
    background: var(--dlp-surface);
}

.dlp-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0a0a0a 0%, #1a0505 45%, #8b1a1a 100%);
}

.dlp-login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 14px;
    box-shadow: var(--dlp-shadow);
}

.dlp-login-logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 200px;
    width: 100%;
    height: auto;
}

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

.dlp-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
    color: #fff;
    padding: 1.25rem 1rem;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
}

.dlp-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .25rem .5rem;
}

.dlp-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    flex-shrink: 0;
}

.dlp-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #8b1a1a, #0a0a0a);
    font-size: 1.1rem;
}

.dlp-brand-title {
    font-weight: 700;
    letter-spacing: .02em;
}

.dlp-brand-sub {
    font-size: .72rem;
    color: var(--dlp-sidebar-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.dlp-nav-section {
    margin: 1rem .5rem .35rem;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #64748b;
    font-weight: 600;
}

.dlp-sidebar a {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: .55rem .75rem;
    border-radius: 8px;
    margin-bottom: .15rem;
    font-size: .9rem;
    transition: background .15s ease, color .15s ease;
}

.dlp-sidebar a:hover,
.dlp-sidebar a.active {
    background: rgba(37, 99, 235, 0.18);
    color: #fff;
}

.dlp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dlp-header {
    background: var(--dlp-header-bg);
    border-bottom: 1px solid var(--dlp-border);
    padding: .9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dlp-header-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.dlp-header-subtitle {
    font-size: .8rem;
    color: var(--dlp-text-muted);
}

.dlp-header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.btn-dlp-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--dlp-border);
    background: #fff;
    color: var(--dlp-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-dlp-icon:hover {
    background: var(--dlp-surface);
    border-color: #cbd5e1;
    color: var(--dlp-primary);
}

.btn-dlp-user {
    border: 1px solid var(--dlp-border);
    background: #fff;
    border-radius: 999px;
    padding: .25rem .65rem .25rem .25rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--dlp-text);
}

.btn-dlp-user:hover {
    background: var(--dlp-surface);
}

.dlp-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af, #0ea5e9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
}

.dlp-user-name {
    font-size: .88rem;
    font-weight: 600;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dlp-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.dlp-notif-menu {
    width: 320px;
    max-height: 380px;
    overflow-y: auto;
}

.dlp-notif-item {
    border-bottom: 1px solid var(--dlp-border);
    padding: .65rem 1rem !important;
}

.dlp-notif-item.unread {
    background: #eff6ff;
}

.dlp-content {
    flex: 1;
    padding: 1.25rem 1.5rem 1.75rem;
}

.dlp-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

.dlp-card {
    border: 1px solid var(--dlp-border);
    border-radius: 14px;
    box-shadow: var(--dlp-shadow);
    background: #fff;
}

.dlp-page-title {
    margin-bottom: 1rem;
    font-weight: 700;
}

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

.btn-dlp-primary:hover {
    background: #6b1414;
    border-color: #6b1414;
    color: #fff;
}

.dlp-metric-link {
    display: block;
    color: inherit;
}

.dlp-metric-card {
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    border-left: 4px solid transparent;
    height: 100%;
}

.dlp-metric-link:hover .dlp-metric-card {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

.dlp-metric-label {
    font-size: .78rem;
    color: var(--dlp-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}

.dlp-metric-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: .35rem;
}

.dlp-metric-hint {
    font-size: .72rem;
    color: var(--dlp-text-muted);
    margin-top: .5rem;
    opacity: 0;
    transition: opacity .15s ease;
}

.dlp-metric-link:hover .dlp-metric-hint {
    opacity: 1;
}

.dlp-accent-critical { border-left-color: var(--dlp-critical); }
.dlp-accent-critical .dlp-metric-value { color: var(--dlp-critical); }

.dlp-accent-high { border-left-color: var(--dlp-high); }
.dlp-accent-high .dlp-metric-value { color: var(--dlp-high); }

.dlp-accent-medium { border-left-color: var(--dlp-medium); }
.dlp-accent-medium .dlp-metric-value { color: var(--dlp-medium); }

.dlp-accent-low { border-left-color: var(--dlp-low); }
.dlp-accent-low .dlp-metric-value { color: var(--dlp-low); }

.dlp-accent-warning { border-left-color: var(--dlp-high); }

.dlp-clickable-row { cursor: pointer; }
.dlp-clickable-row:hover { background: rgba(30, 64, 175, .06); }

.dlp-tree .dlp-tree-node { margin-bottom: .25rem; }
.dlp-tree .dlp-tree-label { text-decoration: none; color: inherit; }
.dlp-tree .dlp-tree-node.selected > .dlp-tree-label { color: var(--dlp-primary); font-weight: 600; }
.dlp-assign-tree .dlp-tree-node { cursor: pointer; padding: .15rem .25rem; border-radius: 6px; }
.dlp-assign-tree .dlp-tree-node:hover { background: rgba(30, 64, 175, .08); }
.dlp-assign-tree .dlp-tree-node.selected { background: rgba(30, 64, 175, .12); }

[data-bs-theme="dark"] {
    --dlp-header-bg: #111827;
    --dlp-surface: #0b1220;
    --dlp-border: #1f2937;
    --dlp-text: #e5e7eb;
    --dlp-text-muted: #94a3b8;
}

[data-bs-theme="dark"] .dlp-card,
[data-bs-theme="dark"] .btn-dlp-icon,
[data-bs-theme="dark"] .btn-dlp-user {
    background: #1f2937;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .dlp-notif-item.unread {
    background: rgba(37, 99, 235, 0.15);
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .btn-dlp-icon:hover,
[data-bs-theme="dark"] .btn-dlp-user:hover {
    background: #374151;
}


.dlp-page-info {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 0.875rem;
    line-height: 1.45;
}

.dlp-page-info-icon {
    color: var(--dlp-primary);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

[data-bs-theme="dark"] .dlp-page-info {
    background: rgba(30, 64, 175, 0.2);
    border-color: rgba(96, 165, 250, 0.35);
    color: #dbeafe;
}

@media (max-width: 991px) {
    .dlp-layout { flex-direction: column; }
    .dlp-sidebar { width: 100%; }
    .dlp-user-name { display: none; }
    .dlp-header-subtitle { display: none; }
}
