/* Professional Dark Theme - Email Gateway Admin UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Dark Background Palette */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-elevated: #30363d;

    /* Accent Colors - CyberFrame Blue Gradient */
    --accent-primary: #2a96fb;
    --accent-danger: #f85149;
    --accent-success: #3fb950;
    --accent-warning: #d29922;
    --gradient-blue: linear-gradient(135deg, #2a96fb 0%, #1a7cd8 100%);

    /* Text Colors */
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9;
    --text-muted: #b1bac4;

    /* Border & Divider */
    --border-color: #30363d;
    --border-hover: #484f58;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
}

/* Global Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Smooth Transitions */
a, button, .btn, .card, .badge, .alert {
    transition: all 0.2s ease;
}

/* Table Column Visibility - Default visible until JavaScript loads preferences */
table th[data-column-id],
table td[data-column-id] {
    display: table-cell;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #1a2332 0%, #161b22 100%) !important;
    border-bottom: 2px solid var(--accent-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem !important;
}

.navbar-brand {
    font-weight: 900;
    color: var(--text-primary) !important;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.navbar-brand:hover {
    color: var(--text-primary) !important;
}

.nav-link {
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--text-primary) !important;
}

/* Dropdown Menus */
.dropdown-menu {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-radius: 0.375rem;
}

.dropdown-item {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.dropdown-header {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.dropdown-item-text {
    color: var(--text-muted);
}

.dropdown-divider {
    border-top-color: var(--border-color);
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.card-body {
    color: var(--text-secondary);
}

/* Stats Cards */
.stat-card {
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-icon {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.stat-card:hover .stat-icon {
    color: var(--accent-primary);
}

/* Tables */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text-secondary) !important;
    --bs-table-border-color: var(--border-color) !important;
    --bs-table-striped-bg: var(--bg-tertiary) !important;
    --bs-table-hover-bg: var(--bg-tertiary) !important;
    background: transparent !important;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0;
}

.table-responsive {
    background: transparent !important;
}

.table thead th {
    color: var(--text-primary) !important;
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.025em;
    padding: 0.75rem 1rem;
}

.table tbody {
    background: transparent !important;
}

.table tbody tr {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.table tbody tr:hover {
    background: var(--bg-tertiary) !important;
}

.table tbody td {
    background: transparent !important;
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: var(--border-color) !important;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: var(--bg-tertiary) !important;
    --bs-table-color-state: var(--text-secondary) !important;
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* Role Badges */
.role-super-admin {
    background: var(--accent-danger);
}

.role-platform-support {
    background: var(--text-muted);
}

.role-tenant-admin {
    background: var(--accent-primary);
}

.role-tenant-manager {
    background: var(--accent-success);
}

.role-tenant-viewer {
    background: var(--text-muted);
}

/* Status Badges */
.status-quarantine {
    background: var(--accent-warning);
    color: #000;
}

.status-released {
    background: var(--accent-success);
}

.status-deleted {
    background: var(--accent-danger);
}

/* Premium Buttons */
.btn {
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.25);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
}

.btn-group-sm > .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8125rem;
}

/* Primary - CyberFrame Blue Gradient */
.btn-primary {
    background: linear-gradient(135deg, #2a96fb 0%, #1a7cd8 100%);
    border: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(42, 150, 251, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3da8ff 0%, #2a96fb 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(42, 150, 251, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(88, 166, 255, 0.3);
}

/* Success - Green glow */
.btn-success {
    background: linear-gradient(135deg, #3fb950 0%, #2ea043 100%);
    border: none;
    color: #000;
    box-shadow: 0 2px 8px rgba(63, 185, 80, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #56d364 0%, #3fb950 100%);
    color: #000;
    box-shadow: 0 4px 16px rgba(63, 185, 80, 0.4);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(63, 185, 80, 0.3);
}

/* Danger - Red glow */
.btn-danger {
    background: linear-gradient(135deg, #f85149 0%, #da3633 100%);
    border: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(248, 81, 73, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff7b72 0%, #f85149 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(248, 81, 73, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(248, 81, 73, 0.3);
}

/* Warning - Amber glow */
.btn-warning {
    background: linear-gradient(135deg, #d29922 0%, #bb8009 100%);
    border: none;
    color: #000;
    box-shadow: 0 2px 8px rgba(210, 153, 34, 0.25);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e3b341 0%, #d29922 100%);
    color: #000;
    box-shadow: 0 4px 16px rgba(210, 153, 34, 0.4);
}

.btn-warning:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(210, 153, 34, 0.3);
}

/* Secondary - Subtle */
.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Outline Primary - Glassy */
.btn-outline-primary {
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.5);
    color: #58a6ff;
}

.btn-outline-primary:hover {
    background: rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
    color: #79b8ff;
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.3);
}

.btn-outline-primary:active {
    background: rgba(88, 166, 255, 0.2);
}

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

.btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* Outline Success - Glassy */
.btn-outline-success {
    background: rgba(63, 185, 80, 0.08);
    border: 1px solid rgba(63, 185, 80, 0.5);
    color: #3fb950;
}

.btn-outline-success:hover {
    background: rgba(63, 185, 80, 0.15);
    border-color: #3fb950;
    color: #56d364;
    box-shadow: 0 0 12px rgba(63, 185, 80, 0.3);
}

.btn-outline-success:active {
    background: rgba(63, 185, 80, 0.2);
}

/* Outline Danger - Glassy */
.btn-outline-danger {
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.5);
    color: #f85149;
}

.btn-outline-danger:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: #f85149;
    color: #ff7b72;
    box-shadow: 0 0 12px rgba(248, 81, 73, 0.3);
}

.btn-outline-danger:active {
    background: rgba(248, 81, 73, 0.2);
}

/* Outline Warning - Glassy */
.btn-outline-warning {
    background: rgba(210, 153, 34, 0.08);
    border: 1px solid rgba(210, 153, 34, 0.5);
    color: #d29922;
}

.btn-outline-warning:hover {
    background: rgba(210, 153, 34, 0.15);
    border-color: #d29922;
    color: #e3b341;
    box-shadow: 0 0 12px rgba(210, 153, 34, 0.3);
}

.btn-outline-warning:active {
    background: rgba(210, 153, 34, 0.2);
}

/* Outline Info - Glassy (same as primary) */
.btn-outline-info {
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.5);
    color: #58a6ff;
}

.btn-outline-info:hover {
    background: rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
    color: #79b8ff;
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.3);
}

.btn-outline-info:active {
    background: rgba(88, 166, 255, 0.2);
}

/* Button Group Polish */
.btn-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.btn-group > .btn {
    border-radius: 0;
}

.btn-group > .btn:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.btn-group > .btn:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.btn-group-sm {
    border-radius: 0.375rem;
}

.btn-group-sm > .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group-sm > .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Forms */
.form-label {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.form-control, .form-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.form-control:focus, .form-select:focus {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
    color: var(--text-primary);
}

/* Multi-select specific styling */
.form-select[multiple] {
    background: var(--bg-tertiary);
}

.form-select[multiple] option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.375rem 0.5rem;
}

.form-select[multiple] option:checked {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Alerts */
.alert {
    border: 1px solid;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.alert-danger {
    background: rgba(248, 81, 73, 0.1);
    border-color: var(--accent-danger);
    color: #ff7b72;
}

.alert-success {
    background: rgba(63, 185, 80, 0.1);
    border-color: var(--accent-success);
    color: #56d364;
}

.alert-warning {
    background: rgba(210, 153, 34, 0.1);
    border-color: var(--accent-warning);
    color: #e3b341;
}

.btn-close {
    filter: invert(1);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Login Page */
.min-vh-100 {
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border {
    border-color: var(--accent-primary);
    border-right-color: transparent;
}

/* Text Utilities */
.text-truncate-custom {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* CyberFrame Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #2a96fb 0%, #1a7cd8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.025em;
}

/* Section Headings (h6 with gradient text) */
h6.gradient-text {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(42, 150, 251, 0.2);
}

/* Dashboard Stat Cards - Premium Design */
.stat-card {
    border: 1px solid var(--border-color);
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(33, 38, 45, 0.8) 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, #1a7cd8 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(42, 150, 251, 0.25), 0 0 40px rgba(42, 150, 251, 0.1) !important;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-content {
    text-align: center;
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, currentColor 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(42, 150, 251, 0.3);
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Stat Card Color Variants */
.stat-card-primary .stat-card-value {
    color: var(--accent-primary);
}

.stat-card-warning .stat-card-value {
    color: var(--accent-warning);
}

.stat-card-success .stat-card-value {
    color: var(--accent-success);
}

.stat-card-danger .stat-card-value {
    color: var(--accent-danger);
}

/* Responsive */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.8125rem;
    }

    .navbar-brand {
        font-size: 0.875rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Bootstrap Utility Overrides for Dark Theme */
.bg-light {
    background: var(--bg-tertiary) !important;
}

.bg-white {
    background: var(--bg-secondary) !important;
}

.text-dark {
    color: var(--text-primary) !important;
}

/* Warning Badge - Ensure Readable on Dark */
.bg-warning {
    background: var(--accent-warning) !important;
    color: #000 !important;
}

/* Override for badges with explicit text-white class */
.badge.bg-warning.text-white {
    color: #fff !important;
}

/* Code Block Styling */
pre {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    border-radius: 0.375rem;
    padding: 1rem;
}

pre code {
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-family: 'Courier New', Courier, monospace;
}

code {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
}

/* Table Variants Override */
.table-light {
    --bs-table-bg: var(--bg-tertiary) !important;
    --bs-table-color: var(--text-primary) !important;
}

.table-warning {
    --bs-table-bg: rgba(210, 153, 34, 0.15) !important;
    --bs-table-color: var(--text-primary) !important;
}

/* Modal Dark Theme */
.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.modal-body {
    color: var(--text-secondary);
}

/* Pagination Dark Theme */
.page-link {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.page-link:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
}

.page-item.disabled .page-link {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* Card Footer */
.card-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

/* Form Check Dark Theme */
.form-check {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    min-height: 1.5rem;
    display: block;
}

.form-check-input {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    margin-top: 0.125rem;
    margin-left: -1.5rem;
    float: left;
}

.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.form-check-label {
    color: var(--text-primary);
    padding-left: 0.5rem;
    line-height: 1.5;
    display: inline-block;
}

/* Breadcrumb Dark Theme */
.breadcrumb {
    background: transparent;
}

.breadcrumb-item a {
    color: var(--accent-primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #79b8ff;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* Alert Info */
.alert-info {
    background: rgba(88, 166, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Horizontal Rule */
hr {
    border-color: var(--border-color);
    opacity: 1;
}

/* Nav Tabs (for tenant detail page) */
.nav-tabs {
    border-bottom-color: var(--border-color);
    gap: 0.5rem;
}

.nav-tabs .nav-link {
    background: transparent;
    color: white;
    border: 1px solid transparent;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    letter-spacing: 0.01em;
}

.nav-tabs .nav-link:hover {
    background: transparent;
    color: #ccc;
}

.nav-tabs .nav-link.active {
    background: transparent;
    border-color: var(--border-color) var(--border-color) var(--bg-secondary);
    color: white;
    font-weight: 700;
}

/* Tab Content */
.tab-content {
    background: var(--bg-secondary);
}

/* Info Badge */
.nav-tabs .badge.bg-info {
    background: rgba(var(--accent-primary-rgb, 45, 127, 210), 0.15) !important;
    color: var(--accent-primary) !important;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.bg-info {
    background: transparent !important;
    color: var(--accent-primary) !important;
}

/* List Group (if used) */
.list-group-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.list-group-item:hover {
    background: var(--bg-tertiary);
}

/* === Premium UI Components for Message Details === */

/* Tooltip System */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    z-index: 9999;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 300px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 10px);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.tooltip-wrapper:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--bg-elevated) transparent transparent transparent;
}

/* Severity Badges with Gradients */
.severity-critical {
    background: linear-gradient(135deg, #f85149 0%, #da3633 100%);
    color: #fff;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.8125rem;
    box-shadow: 0 2px 8px rgba(248, 81, 73, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.severity-high {
    background: linear-gradient(135deg, #ff7b72 0%, #f85149 100%);
    color: #fff;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.8125rem;
    box-shadow: 0 2px 8px rgba(255, 123, 114, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.severity-medium {
    background: linear-gradient(135deg, #d29922 0%, #bb8009 100%);
    color: #000;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.8125rem;
    box-shadow: 0 2px 8px rgba(210, 153, 34, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.severity-low {
    background: linear-gradient(135deg, #e3b341 0%, #d29922 100%);
    color: #000;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.8125rem;
    box-shadow: 0 2px 8px rgba(227, 179, 65, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.severity-clean {
    background: linear-gradient(135deg, #3fb950 0%, #2ea043 100%);
    color: #000;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.8125rem;
    box-shadow: 0 2px 8px rgba(63, 185, 80, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Risk Score Meter */
.risk-meter {
    position: relative;
    width: 100%;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.risk-bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.8s ease, background 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
}

.risk-bar.critical {
    background: linear-gradient(90deg, #f85149 0%, #da3633 100%);
    box-shadow: 0 0 12px rgba(248, 81, 73, 0.6);
}

.risk-bar.high {
    background: linear-gradient(90deg, #ff7b72 0%, #f85149 100%);
    box-shadow: 0 0 12px rgba(255, 123, 114, 0.6);
}

.risk-bar.medium {
    background: linear-gradient(90deg, #d29922 0%, #bb8009 100%);
    box-shadow: 0 0 12px rgba(210, 153, 34, 0.6);
}

.risk-bar.low {
    background: linear-gradient(90deg, #e3b341 0%, #d29922 100%);
    box-shadow: 0 0 12px rgba(227, 179, 65, 0.6);
}

.risk-bar.clean {
    background: linear-gradient(90deg, #3fb950 0%, #2ea043 100%);
    box-shadow: 0 0 12px rgba(63, 185, 80, 0.6);
}

.risk-label {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Interactive Cards with Lift Effect */
.info-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--border-hover);
}

/* Premium Section Spacing */
.premium-spacing {
    margin-bottom: 2rem;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
    margin: 2rem 0;
}

/* Glass Panel Effect */
.glass-panel {
    background: rgba(33, 38, 45, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Attachment Item with Hover Info */
.attachment-item {
    position: relative;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    background: var(--bg-tertiary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.attachment-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.attachment-hover-info {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 1000;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    border-radius: 0.5rem;
    padding: 1rem;
    width: 350px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.attachment-item:hover .attachment-hover-info {
    visibility: visible;
    opacity: 1;
}

/* URL Item with Hover Info */
.url-item {
    position: relative;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    background: var(--bg-tertiary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.url-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.url-item.url-warning {
    border-left: 3px solid var(--accent-warning);
}

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

.url-hover-info {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 1000;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    border-radius: 0.5rem;
    padding: 1rem;
    width: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.url-item:hover .url-hover-info {
    visibility: visible;
    opacity: 1;
}

/* Score Breakdown Progress Bars */
.score-progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.score-progress-bar {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.score-progress-bar.positive {
    background: linear-gradient(90deg, #f85149 0%, #da3633 100%);
}

.score-progress-bar.negative {
    background: linear-gradient(90deg, #3fb950 0%, #2ea043 100%);
}

.score-progress-bar.neutral {
    background: linear-gradient(90deg, #8b949e 0%, #6e7681 100%);
}

/* Premium Card Shadows */
.card.premium-shadow {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.card.premium-shadow:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Reputation Score Display */
.reputation-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.reputation-score.score-high {
    background: linear-gradient(135deg, #3fb950 0%, #2ea043 100%);
    color: #000;
}

.reputation-score.score-medium {
    background: linear-gradient(135deg, #d29922 0%, #bb8009 100%);
    color: #000;
}

.reputation-score.score-low {
    background: linear-gradient(135deg, #f85149 0%, #da3633 100%);
    color: #fff;
}

/* === COMPACT LAYOUT OVERRIDES === */

/* Reduce Bootstrap container padding */
.container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 0 !important;
}

/* Reduce card spacing */
.card {
    margin-bottom: 1rem !important;
}

.card-body {
    padding: 1rem !important;
}

.card-header {
    padding: 0.625rem 1rem !important;
}

/* Reduce margin utilities */
.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 0.75rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.my-1 {
    margin-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
}

.my-2 {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.my-3 {
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

.my-4 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

/* Reduce padding utilities */
.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 0.75rem !important;
}

.p-4 {
    padding: 1rem !important;
}

/* Reduce row spacing */
.row {
    margin-left: -0.5rem !important;
    margin-right: -0.5rem !important;
}

.row > * {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Reduce table padding for more compact tables */
.table thead th {
    padding: 0.5rem 0.75rem !important;
}

.table tbody td {
    padding: 0.5rem 0.75rem !important;
}

/* Reduce form spacing */
.form-group {
    margin-bottom: 0.75rem !important;
}

/* Reduce hr spacing */
hr {
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

/* Reduce alert padding */
.alert {
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.75rem !important;
}

/* Reduce button spacing in groups */
.btn-group, .btn-toolbar {
    gap: 0.25rem;
}

/* More compact breadcrumb */
.breadcrumb {
    padding: 0.5rem 0 !important;
    margin-bottom: 0.75rem !important;
}

/* Column Customization UI */
.sortable-column-item {
    cursor: grab;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.sortable-column-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.sortable-column-item[draggable="false"] {
    cursor: default;
}

.sortable-column-item:active {
    cursor: grabbing;
}

.drag-handle {
    cursor: grab;
    font-size: 1.1rem;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Column visibility transitions */
table th,
table td {
    transition: opacity 0.2s ease;
}

table th.d-none,
table td.d-none {
    display: none !important;
}

/* Modal styling for column customizer */
#columnCustomizerModal .modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

#columnCustomizerModal .modal-header {
    border-bottom: 1px solid var(--border-color);
}

#columnCustomizerModal .modal-footer {
    border-top: 1px solid var(--border-color);
}

#columnCustomizerModal .list-group-item {
    margin-bottom: 0.375rem;
    border-radius: 0.375rem;
}

#columnCustomizerModal .list-group-item:last-child {
    margin-bottom: 0;
}

/* Toast Notification - Floating Bubble */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
}

.toast-notification {
    min-width: 300px;
    max-width: 500px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 40px rgba(42, 150, 251, 0.2);
    animation: slideInRight 0.3s ease-out;
    margin-bottom: 1rem;
}

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

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

.toast-notification.toast-warning {
    border-left: 4px solid var(--accent-warning);
}

.toast-notification.toast-info {
    border-left: 4px solid var(--accent-primary);
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.toast-notification.hiding {
    animation: fadeOut 0.3s ease-out forwards;
}
