/* ============================================================
   GEOINT Dashboard — Enterprise Edition CSS
   Authentication, Admin Panel, User Management, Security,
   Audit Logs, API Keys, 2FA, Session Management
   ============================================================ */

/* ---- Enterprise Domain Colors ---- */
:root {
    --domain-admin: #f59e0b;
    --domain-enterprise: #8b5cf6;
    --ent-glass-bg: rgba(10, 15, 30, 0.82);
    --ent-glass-border: rgba(30, 41, 59, 0.5);
    --ent-glass-blur: blur(20px);
    --ent-radius: 10px;
    --ent-radius-lg: 14px;
    --ent-radius-sm: 6px;
    --ent-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   1. PROFILE DROPDOWN
   ============================================================ */
.ent-profile-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ent-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--ent-glass-bg);
    border: 1px solid var(--ent-glass-border);
    border-radius: 40px;
    cursor: pointer;
    transition: var(--ent-transition);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    backdrop-filter: var(--ent-glass-blur);
}
.ent-profile-trigger:hover {
    border-color: var(--domain-enterprise);
    background: rgba(139, 92, 246, 0.08);
}

.ent-profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--domain-enterprise));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
}

.ent-profile-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.ent-profile-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.82rem;
}
.ent-profile-role {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ent-profile-role[data-role="admin"]   { color: var(--domain-admin); }
.ent-profile-role[data-role="analyst"] { color: #3b82f6; }
.ent-profile-role[data-role="viewer"]  { color: #6b7280; }

.ent-profile-chevron {
    margin-left: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.ent-profile-dropdown.open .ent-profile-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.ent-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: rgba(10, 15, 30, 0.94);
    backdrop-filter: blur(24px);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    padding: 6px 0;
    overflow: hidden;
}
.ent-profile-dropdown.open .ent-profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ent-profile-menu-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}
.ent-profile-menu-header .ent-profile-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
}
.ent-profile-menu-header .ent-profile-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.ent-profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--ent-transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}
.ent-profile-menu-item i,
.ent-profile-menu-item .ent-menu-icon {
    width: 18px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.ent-profile-menu-item:hover {
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-primary);
}
.ent-profile-menu-item:hover i,
.ent-profile-menu-item:hover .ent-menu-icon {
    color: var(--domain-enterprise);
}
.ent-profile-menu-item.danger { color: var(--red); }
.ent-profile-menu-item.danger:hover { background: rgba(239, 68, 68, 0.08); }
.ent-profile-menu-item.danger i { color: var(--red); }

.ent-profile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}

/* Role badges inline */
.ent-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ent-role-badge.admin   { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.ent-role-badge.analyst { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.ent-role-badge.viewer  { background: rgba(107, 114, 128, 0.15); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.3); }


/* ============================================================
   2. ADMIN DASHBOARD SUB-TABS & STATS
   ============================================================ */
.ent-admin-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ent-admin-subtabs {
    display: flex;
    gap: 2px;
    padding: 10px 16px;
    background: rgba(10, 15, 30, 0.6);
    border-bottom: 1px solid var(--ent-glass-border);
    overflow-x: auto;
}

.ent-admin-subtab {
    padding: 8px 16px;
    border-radius: var(--ent-radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--ent-transition);
    font-family: 'Inter', sans-serif;
}
.ent-admin-subtab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(245, 158, 11, 0.06);
}
.ent-admin-subtab.active {
    color: var(--domain-admin);
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
}
.ent-admin-subtab .ent-subtab-icon {
    font-size: 0.85rem;
}
.ent-admin-subtab .ent-subtab-badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--domain-admin);
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.ent-admin-content {
    padding: 20px;
}

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

.ent-stat-card {
    background: var(--ent-glass-bg);
    backdrop-filter: var(--ent-glass-blur);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--ent-transition);
}
.ent-stat-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.ent-stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.ent-stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.ent-stat-card-icon.users    { background: rgba(139, 92, 246, 0.15); color: var(--domain-enterprise); }
.ent-stat-card-icon.sessions { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.ent-stat-card-icon.security { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.ent-stat-card-icon.apikeys  { background: rgba(59, 130, 246, 0.15); color: var(--blue); }

.ent-stat-card-trend {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}
.ent-stat-card-trend.up   { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.ent-stat-card-trend.down { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.ent-stat-card-trend.flat { background: rgba(107, 114, 128, 0.12); color: var(--text-muted); }

.ent-stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
}
.ent-stat-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}


/* ============================================================
   3. USER MANAGEMENT TABLE
   ============================================================ */
.ent-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ent-table-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ent-data-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    background: var(--ent-glass-bg);
    backdrop-filter: var(--ent-glass-blur);
}

.ent-data-table,
.ent-user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.ent-data-table thead,
.ent-user-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}
.ent-data-table th,
.ent-user-table th {
    background: rgba(10, 15, 30, 0.95);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--ent-glass-border);
    white-space: nowrap;
    user-select: none;
}
.ent-data-table th.sortable,
.ent-user-table th.sortable {
    cursor: pointer;
}
.ent-data-table th.sortable:hover,
.ent-user-table th.sortable:hover {
    color: var(--text-secondary);
}
.ent-data-table th .sort-icon {
    margin-left: 4px;
    font-size: 0.65rem;
    opacity: 0.4;
}
.ent-data-table th.sorted .sort-icon {
    opacity: 1;
    color: var(--domain-admin);
}

.ent-data-table td,
.ent-user-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    vertical-align: middle;
}
.ent-data-table tbody tr,
.ent-user-table tbody tr {
    transition: background 0.15s;
}
.ent-data-table tbody tr:hover,
.ent-user-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.04);
}
.ent-data-table tbody tr:last-child td,
.ent-user-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table user cell */
.ent-table-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ent-table-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--domain-enterprise));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.ent-table-user-details {
    display: flex;
    flex-direction: column;
}
.ent-table-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.82rem;
}
.ent-table-user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Status pills */
.ent-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}
.ent-status-pill.active   { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.ent-status-pill.inactive { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.ent-status-pill.pending  { background: rgba(245, 158, 11, 0.12); color: var(--yellow); }
.ent-status-pill.suspended { background: rgba(107, 114, 128, 0.12); color: #9ca3af; }

.ent-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.ent-status-pill.active   .ent-status-dot { background: var(--green); }
.ent-status-pill.inactive .ent-status-dot { background: var(--red); }
.ent-status-pill.pending  .ent-status-dot { background: var(--yellow); }
.ent-status-pill.suspended .ent-status-dot { background: #9ca3af; }

/* Action buttons */
.ent-table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ent-table-action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ent-radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--ent-transition);
}
.ent-table-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--ent-glass-border);
}
.ent-table-action-btn.edit:hover   { color: var(--blue); border-color: rgba(59, 130, 246, 0.3); }
.ent-table-action-btn.delete:hover { color: var(--red); border-color: rgba(239, 68, 68, 0.3); }
.ent-table-action-btn.reset:hover  { color: var(--yellow); border-color: rgba(245, 158, 11, 0.3); }


/* ============================================================
   4. ORGANIZATION CARDS
   ============================================================ */
.ent-org-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ent-org-card {
    background: var(--ent-glass-bg);
    backdrop-filter: var(--ent-glass-blur);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    padding: 20px;
    transition: var(--ent-transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ent-org-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ent-org-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.ent-org-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}
.ent-org-card-slug {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.ent-org-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.ent-org-card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.ent-org-card-meta-item i {
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* Plan badges */
.ent-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ent-plan-badge.free       { background: rgba(107, 114, 128, 0.15); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.25); }
.ent-plan-badge.professional { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.25); }
.ent-plan-badge.enterprise { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.25); }
.ent-plan-badge.government { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }


/* ============================================================
   5. PERMISSION MATRIX
   ============================================================ */
.ent-perm-matrix-wrapper {
    overflow-x: auto;
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    background: var(--ent-glass-bg);
    backdrop-filter: var(--ent-glass-blur);
}

.ent-perm-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.ent-perm-matrix th {
    background: rgba(10, 15, 30, 0.95);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid var(--ent-glass-border);
    white-space: nowrap;
}
.ent-perm-matrix th:first-child {
    text-align: left;
    min-width: 220px;
}
.ent-perm-matrix td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    text-align: center;
    vertical-align: middle;
}
.ent-perm-matrix td:first-child {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 500;
}
.ent-perm-matrix tbody tr:hover {
    background: rgba(139, 92, 246, 0.04);
}

/* Category group header */
.ent-perm-category {
    background: rgba(245, 158, 11, 0.04) !important;
}
.ent-perm-category td {
    font-weight: 700;
    color: var(--domain-admin) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
    cursor: pointer;
}
.ent-perm-category td .collapse-icon {
    margin-right: 8px;
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.ent-perm-category.collapsed td .collapse-icon {
    transform: rotate(-90deg);
}

/* Toggle checkbox styling */
.ent-perm-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 38px;
    height: 20px;
    background: rgba(107, 114, 128, 0.3);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    outline: none;
}
.ent-perm-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.ent-perm-toggle:checked {
    background: var(--domain-enterprise);
}
.ent-perm-toggle:checked::after {
    transform: translateX(18px);
}
.ent-perm-toggle:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}


/* ============================================================
   6. API KEY TABLE
   ============================================================ */
.ent-apikey-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.ent-apikey-table th {
    background: rgba(10, 15, 30, 0.95);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--ent-glass-border);
    white-space: nowrap;
}
.ent-apikey-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    vertical-align: middle;
}
.ent-apikey-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

/* Masked key */
.ent-api-key-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: var(--ent-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}
.ent-api-key-value .copy-btn {
    font-size: 0.72rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.ent-api-key-value .copy-btn:hover {
    color: var(--accent);
}

/* Scope tags */
.ent-scope-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.ent-scope-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: lowercase;
    font-family: 'JetBrains Mono', monospace;
}
.ent-scope-tag.read  { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.ent-scope-tag.write { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.ent-scope-tag.admin { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.ent-scope-tag.all   { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }

/* Usage bar */
.ent-usage-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}
.ent-usage-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.ent-usage-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.ent-usage-bar-fill.low    { background: var(--green); }
.ent-usage-bar-fill.medium { background: var(--yellow); }
.ent-usage-bar-fill.high   { background: var(--orange); }
.ent-usage-bar-fill.full   { background: var(--red); }

.ent-usage-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: 'JetBrains Mono', monospace;
}

/* Expiry indicator */
.ent-expiry-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
}
.ent-expiry-indicator .ent-expiry-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.ent-expiry-indicator.valid   .ent-expiry-dot { background: var(--green); box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
.ent-expiry-indicator.expired .ent-expiry-dot { background: var(--red); box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
.ent-expiry-indicator.warning .ent-expiry-dot { background: var(--orange); box-shadow: 0 0 6px rgba(249, 115, 22, 0.4); }
.ent-expiry-indicator.valid   { color: var(--green); }
.ent-expiry-indicator.expired { color: var(--red); }
.ent-expiry-indicator.warning { color: var(--orange); }


/* ============================================================
   7. SECURITY DASHBOARD
   ============================================================ */

/* Threat counter cards */
.ent-security-counters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.ent-security-counter {
    background: var(--ent-glass-bg);
    backdrop-filter: var(--ent-glass-blur);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    padding: 16px;
    text-align: center;
    transition: var(--ent-transition);
    position: relative;
    overflow: hidden;
}
.ent-security-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.ent-security-counter.critical::before { background: var(--critical); }
.ent-security-counter.high::before     { background: var(--high); }
.ent-security-counter.medium::before   { background: var(--medium); }
.ent-security-counter.low::before      { background: var(--low); }

.ent-security-counter-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
}
.ent-security-counter.critical .ent-security-counter-value { color: var(--critical); }
.ent-security-counter.high     .ent-security-counter-value { color: var(--high); }
.ent-security-counter.medium   .ent-security-counter-value { color: var(--medium); }
.ent-security-counter.low      .ent-security-counter-value { color: var(--low); }

.ent-security-counter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* Event Timeline */
.ent-security-timeline {
    position: relative;
    padding-left: 28px;
}
.ent-security-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.06);
}

.ent-security-event {
    position: relative;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--ent-radius-sm);
    transition: background 0.15s;
}
.ent-security-event:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ent-security-event-dot {
    position: absolute;
    left: -22px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}
.ent-security-event.critical .ent-security-event-dot { background: var(--critical); box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.ent-security-event.high     .ent-security-event-dot { background: var(--high); box-shadow: 0 0 8px rgba(249, 115, 22, 0.5); }
.ent-security-event.medium   .ent-security-event-dot { background: var(--medium); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.ent-security-event.low      .ent-security-event-dot { background: var(--low); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.ent-security-event.info     .ent-security-event-dot { background: var(--info); box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); }

.ent-security-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.ent-security-event-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-primary);
}
.ent-security-event-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.ent-security-event-details {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* IP Blacklist Table */
.ent-security-ip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.ent-security-ip-table th {
    background: rgba(10, 15, 30, 0.95);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--ent-glass-border);
}
.ent-security-ip-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}
.ent-security-ip-table td .ip-addr {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    font-size: 0.8rem;
}
.ent-security-ip-table tbody tr:hover {
    background: rgba(239, 68, 68, 0.03);
}

/* Login attempts chart placeholder */
.ent-security-chart-area {
    background: var(--ent-glass-bg);
    backdrop-filter: var(--ent-glass-blur);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    padding: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* ============================================================
   8. AUDIT LOG
   ============================================================ */
.ent-audit-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(10, 15, 30, 0.5);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ent-audit-filter-bar select,
.ent-audit-filter-bar input[type="date"],
.ent-audit-filter-bar input[type="text"] {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius-sm);
    color: var(--text-primary);
    padding: 7px 12px;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    outline: none;
}
.ent-audit-filter-bar select:focus,
.ent-audit-filter-bar input:focus {
    border-color: var(--domain-enterprise);
}

.ent-audit-export-btn {
    margin-left: auto;
}

.ent-audit-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    overflow: hidden;
    background: var(--ent-glass-bg);
    backdrop-filter: var(--ent-glass-blur);
}

.ent-audit-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
    cursor: pointer;
}
.ent-audit-entry:last-child { border-bottom: none; }
.ent-audit-entry:hover { background: rgba(139, 92, 246, 0.04); }

.ent-audit-entry-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.ent-audit-entry-icon.create  { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.ent-audit-entry-icon.update  { background: rgba(59, 130, 246, 0.12); color: var(--blue); }
.ent-audit-entry-icon.delete  { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.ent-audit-entry-icon.login   { background: rgba(139, 92, 246, 0.12); color: var(--domain-enterprise); }
.ent-audit-entry-icon.logout  { background: rgba(107, 114, 128, 0.12); color: #9ca3af; }
.ent-audit-entry-icon.config  { background: rgba(245, 158, 11, 0.12); color: var(--yellow); }
.ent-audit-entry-icon.security { background: rgba(239, 68, 68, 0.12); color: var(--red); }

.ent-audit-entry-body {
    flex: 1;
    min-width: 0;
}
.ent-audit-entry-action {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.ent-audit-entry-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.ent-audit-entry-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.ent-audit-entry-expand {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.ent-audit-entry.expanded .ent-audit-entry-expand {
    transform: rotate(180deg);
}

/* Expandable detail row */
.ent-audit-entry-details {
    display: none;
    padding: 0 16px 12px 60px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.ent-audit-entry.expanded + .ent-audit-entry-details,
.ent-audit-entry-details.visible {
    display: block;
}
.ent-audit-entry-details pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--ent-radius-sm);
    padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
    overflow-x: auto;
    margin: 8px 0 0;
}


/* ============================================================
   9. SYSTEM HEALTH
   ============================================================ */
.ent-health-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.ent-health-card {
    background: var(--ent-glass-bg);
    backdrop-filter: var(--ent-glass-blur);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    padding: 18px;
    transition: var(--ent-transition);
}
.ent-health-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.ent-health-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ent-health-card-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ent-health-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.ent-health-status-dot.healthy  { background: var(--green); box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.ent-health-status-dot.degraded { background: var(--yellow); box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.ent-health-status-dot.critical { background: var(--red); box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }

.ent-health-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.ent-health-card-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Progress bars for resource usage */
.ent-health-progress {
    margin-top: 12px;
}
.ent-health-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.ent-health-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}
.ent-health-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.ent-health-progress-fill.low    { background: var(--green); }
.ent-health-progress-fill.medium { background: var(--yellow); }
.ent-health-progress-fill.high   { background: var(--orange); }
.ent-health-progress-fill.critical { background: var(--red); }

/* DB stats info card */
.ent-health-info-table {
    width: 100%;
    font-size: 0.78rem;
}
.ent-health-info-table tr td {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.ent-health-info-table tr:last-child td { border-bottom: none; }
.ent-health-info-table tr td:first-child {
    color: var(--text-muted);
    font-weight: 500;
}
.ent-health-info-table tr td:last-child {
    text-align: right;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

/* Cache / pie chart area */
.ent-health-chart-area {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--ent-radius-sm);
    padding: 16px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}


/* ============================================================
   10. ENHANCED LOGIN
   ============================================================ */
.ent-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
}

.ent-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--ent-glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Org branding banner */
.ent-login-branding {
    padding: 24px 28px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}
.ent-login-branding-logo {
    max-height: 48px;
    margin-bottom: 8px;
}
.ent-login-branding-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.ent-login-branding-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.ent-login-body {
    padding: 28px;
}
.ent-login-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.ent-login-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.ent-login-field {
    margin-bottom: 18px;
}
.ent-login-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ent-login-field input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.ent-login-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}
.ent-login-field input.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

/* Password strength meter */
.ent-login-strength {
    margin-top: 8px;
}
.ent-login-strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}
.ent-login-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}
.ent-login-strength-fill.weak     { width: 25%; background: var(--red); }
.ent-login-strength-fill.fair     { width: 50%; background: var(--orange); }
.ent-login-strength-fill.good     { width: 75%; background: var(--yellow); }
.ent-login-strength-fill.strong   { width: 100%; background: var(--green); }
.ent-login-strength-text {
    font-size: 0.68rem;
    font-weight: 500;
}
.ent-login-strength-text.weak   { color: var(--red); }
.ent-login-strength-text.fair   { color: var(--orange); }
.ent-login-strength-text.good   { color: var(--yellow); }
.ent-login-strength-text.strong { color: var(--green); }

.ent-login-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* 2FA Verification Step */
.ent-login-2fa {
    text-align: center;
}
.ent-login-2fa-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.ent-login-2fa-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.ent-login-2fa-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}
.ent-login-2fa-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: var(--accent);
}
.ent-login-2fa-digit:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
    background: rgba(0, 212, 255, 0.03);
}
.ent-login-2fa-digit.filled {
    border-color: var(--domain-enterprise);
    background: rgba(139, 92, 246, 0.06);
}

.ent-login-2fa-backup-link {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--accent);
    cursor: pointer;
    transition: color 0.2s;
    margin-top: 8px;
    text-decoration: none;
    border: none;
    background: none;
    font-family: inherit;
}
.ent-login-2fa-backup-link:hover {
    color: var(--domain-enterprise);
    text-decoration: underline;
}

/* Legal disclaimer */
.ent-login-disclaimer {
    padding: 16px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
}
.ent-login-disclaimer a {
    color: var(--accent);
    text-decoration: none;
}
.ent-login-disclaimer a:hover {
    text-decoration: underline;
}


/* ============================================================
   11. 2FA SETUP
   ============================================================ */
.ent-2fa-setup {
    max-width: 480px;
    margin: 0 auto;
}

.ent-2fa-qr-container {
    background: #ffffff;
    border-radius: var(--ent-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    max-width: 220px;
}
.ent-2fa-qr-container img,
.ent-2fa-qr-container canvas {
    display: block;
    max-width: 100%;
}

.ent-2fa-secret {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius-sm);
    padding: 12px 16px;
    margin: 16px 0;
}
.ent-2fa-secret-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
    word-break: break-all;
    flex: 1;
}
.ent-2fa-secret-copy {
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
    background: none;
    border: none;
    font-family: inherit;
}
.ent-2fa-secret-copy:hover {
    color: var(--accent);
}

.ent-2fa-verify-input {
    margin: 20px 0;
}

/* Backup codes grid */
.ent-2fa-backup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 16px 0;
}
.ent-2fa-backup-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--ent-radius-sm);
    padding: 10px 14px;
    text-align: center;
    letter-spacing: 1.5px;
    user-select: all;
}
.ent-2fa-backup-code.used {
    opacity: 0.35;
    text-decoration: line-through;
}


/* ============================================================
   12. SESSION WARNING BAR
   ============================================================ */
.ent-session-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
    backdrop-filter: blur(12px);
    color: #000;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(245, 158, 11, 0.3);
    font-size: 0.85rem;
    font-weight: 600;
}
.ent-session-bar.visible {
    transform: translateY(0);
}

.ent-session-bar-icon {
    font-size: 1.1rem;
}
.ent-session-bar-text {
    flex: 1;
    text-align: center;
}
.ent-session-bar-countdown {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1rem;
    min-width: 40px;
}
.ent-session-bar-btn {
    padding: 6px 18px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--ent-radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}
.ent-session-bar-btn:hover {
    background: rgba(0, 0, 0, 0.35);
}


/* ============================================================
   13. ENTERPRISE MODALS
   ============================================================ */
.ent-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    padding: 20px;
}
.ent-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.ent-modal {
    background: rgba(10, 15, 30, 0.96);
    backdrop-filter: blur(24px);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius-lg);
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.ent-modal-overlay.visible .ent-modal {
    transform: scale(1) translateY(0);
}
.ent-modal.wide {
    max-width: 720px;
}

.ent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.ent-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.ent-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ent-radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--ent-transition);
}
.ent-modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.ent-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Form rows */
.ent-form-row {
    margin-bottom: 18px;
}
.ent-form-row:last-child {
    margin-bottom: 0;
}
.ent-form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ent-form-input,
.ent-form-select,
.ent-form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.ent-form-input:focus,
.ent-form-select:focus,
.ent-form-textarea:focus {
    border-color: var(--domain-enterprise);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}
.ent-form-textarea {
    min-height: 80px;
    resize: vertical;
}
.ent-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.ent-form-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.ent-form-error {
    font-size: 0.7rem;
    color: var(--red);
    margin-top: 4px;
}

.ent-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}


/* ============================================================
   14. SHARED COMPONENTS
   ============================================================ */

/* Badge */
.ent-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ent-badge.blue   { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.ent-badge.green  { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.ent-badge.amber  { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.ent-badge.red    { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.ent-badge.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.ent-badge.gray   { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }

/* Buttons */
.ent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--ent-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--ent-transition);
    border: 1px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}
.ent-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.ent-btn.primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.ent-btn.primary:hover {
    background: #00bde0;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25);
}

.ent-btn.danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.3);
}
.ent-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.ent-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-color: var(--ent-glass-border);
}
.ent-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.ent-btn.ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}
.ent-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.ent-btn.admin-accent {
    background: rgba(245, 158, 11, 0.12);
    color: var(--domain-admin);
    border-color: rgba(245, 158, 11, 0.3);
}
.ent-btn.admin-accent:hover {
    background: rgba(245, 158, 11, 0.2);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.ent-btn.sm {
    padding: 5px 12px;
    font-size: 0.72rem;
}
.ent-btn.lg {
    padding: 12px 24px;
    font-size: 0.88rem;
    border-radius: var(--ent-radius);
}
.ent-btn.full {
    width: 100%;
}

/* Search bar */
.ent-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}
.ent-search-bar-icon {
    position: absolute;
    left: 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    pointer-events: none;
}
.ent-search-bar input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 200px;
}
.ent-search-bar input:focus {
    border-color: var(--domain-enterprise);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}
.ent-search-bar input::placeholder {
    color: var(--text-muted);
}

/* Pagination */
.ent-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    justify-content: center;
}
.ent-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: var(--ent-radius-sm);
    border: 1px solid var(--ent-glass-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ent-transition);
    font-family: 'Inter', sans-serif;
}
.ent-pagination-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.ent-pagination-btn.active {
    background: var(--domain-enterprise);
    color: #fff;
    border-color: var(--domain-enterprise);
}
.ent-pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.ent-pagination-ellipsis {
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 0 4px;
}

/* Empty state */
.ent-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}
.ent-empty-state-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}
.ent-empty-state-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.ent-empty-state-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.5;
}

/* Toast notifications */
.ent-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.ent-toast {
    background: rgba(10, 15, 30, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid var(--ent-glass-border);
    border-radius: var(--ent-radius);
    padding: 14px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s;
}
.ent-toast.visible {
    transform: translateX(0);
    opacity: 1;
}
.ent-toast.removing {
    transform: translateX(120%);
    opacity: 0;
}

.ent-toast-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.ent-toast.success .ent-toast-icon { color: var(--green); }
.ent-toast.error   .ent-toast-icon { color: var(--red); }
.ent-toast.warning .ent-toast-icon { color: var(--yellow); }
.ent-toast.info    .ent-toast-icon { color: var(--blue); }

.ent-toast.success { border-left: 3px solid var(--green); }
.ent-toast.error   { border-left: 3px solid var(--red); }
.ent-toast.warning { border-left: 3px solid var(--yellow); }
.ent-toast.info    { border-left: 3px solid var(--blue); }

.ent-toast-body {
    flex: 1;
    min-width: 0;
}
.ent-toast-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.ent-toast-message {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.ent-toast-close {
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
}
.ent-toast-close:hover {
    color: var(--text-primary);
}


/* ============================================================
   15. THEME OVERRIDES — LIGHT
   ============================================================ */
[data-theme="light"] .ent-profile-trigger {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .ent-profile-trigger:hover {
    border-color: var(--domain-enterprise);
    background: rgba(139, 92, 246, 0.05);
}
[data-theme="light"] .ent-profile-menu {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .ent-profile-menu-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ent-profile-menu-item:hover {
    background: rgba(139, 92, 246, 0.06);
}
[data-theme="light"] .ent-profile-menu-divider {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ent-admin-subtabs {
    background: rgba(255, 255, 255, 0.6);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-admin-subtab {
    color: var(--text-muted);
}
[data-theme="light"] .ent-admin-subtab:hover {
    color: var(--text-secondary);
    background: rgba(245, 158, 11, 0.05);
}
[data-theme="light"] .ent-admin-subtab.active {
    color: #b45309;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

[data-theme="light"] .ent-stat-card,
[data-theme="light"] .ent-health-card,
[data-theme="light"] .ent-org-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .ent-stat-card:hover,
[data-theme="light"] .ent-health-card:hover,
[data-theme="light"] .ent-org-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ent-data-table-wrapper,
[data-theme="light"] .ent-perm-matrix-wrapper,
[data-theme="light"] .ent-audit-list {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-data-table th,
[data-theme="light"] .ent-user-table th,
[data-theme="light"] .ent-perm-matrix th,
[data-theme="light"] .ent-apikey-table th,
[data-theme="light"] .ent-security-ip-table th {
    background: rgba(248, 249, 251, 0.98);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-data-table td,
[data-theme="light"] .ent-user-table td,
[data-theme="light"] .ent-perm-matrix td,
[data-theme="light"] .ent-apikey-table td,
[data-theme="light"] .ent-security-ip-table td {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .ent-data-table tbody tr:hover,
[data-theme="light"] .ent-user-table tbody tr:hover,
[data-theme="light"] .ent-perm-matrix tbody tr:hover,
[data-theme="light"] .ent-apikey-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.03);
}

[data-theme="light"] .ent-audit-filter-bar {
    background: rgba(248, 249, 251, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-audit-filter-bar select,
[data-theme="light"] .ent-audit-filter-bar input {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}
[data-theme="light"] .ent-audit-entry {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .ent-audit-entry:hover {
    background: rgba(139, 92, 246, 0.03);
}
[data-theme="light"] .ent-audit-entry-details pre {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ent-login-card,
[data-theme="light"] .ent-modal {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .ent-login-branding {
    background: rgba(248, 249, 251, 0.8);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ent-login-field input,
[data-theme="light"] .ent-form-input,
[data-theme="light"] .ent-form-select,
[data-theme="light"] .ent-form-textarea,
[data-theme="light"] .ent-search-bar input {
    background: #f8f9fb;
    border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .ent-login-2fa-digit {
    background: #f8f9fb;
    border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .ent-login-disclaimer {
    border-top-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ent-modal-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ent-modal-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ent-modal-overlay {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .ent-api-key-value {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-2fa-secret {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-2fa-backup-code {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ent-toast {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .ent-security-chart-area,
[data-theme="light"] .ent-health-chart-area {
    background: rgba(248, 249, 251, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ent-security-counter {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-security-timeline::before {
    background: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-security-event:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .ent-perm-toggle {
    background: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .ent-perm-toggle:checked {
    background: var(--domain-enterprise);
}
[data-theme="light"] .ent-perm-category {
    background: rgba(245, 158, 11, 0.04) !important;
}

[data-theme="light"] .ent-btn.secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
    border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .ent-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .ent-btn.ghost:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ent-pagination-btn {
    border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .ent-pagination-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ent-session-bar {
    box-shadow: 0 -4px 20px rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .ent-table-action-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ent-usage-bar {
    background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .ent-health-progress-bar {
    background: rgba(0, 0, 0, 0.06);
}


/* ============================================================
   15b. THEME OVERRIDES — MIDNIGHT
   ============================================================ */
[data-theme="midnight"] .ent-profile-trigger {
    background: rgba(5, 10, 25, 0.9);
    border-color: rgba(20, 30, 50, 0.6);
}
[data-theme="midnight"] .ent-profile-menu {
    background: rgba(5, 10, 25, 0.97);
    border-color: rgba(20, 30, 50, 0.6);
}

[data-theme="midnight"] .ent-admin-subtabs {
    background: rgba(5, 10, 25, 0.7);
    border-bottom-color: rgba(20, 30, 50, 0.6);
}

[data-theme="midnight"] .ent-stat-card,
[data-theme="midnight"] .ent-health-card,
[data-theme="midnight"] .ent-org-card,
[data-theme="midnight"] .ent-security-counter {
    background: rgba(5, 10, 25, 0.88);
    border-color: rgba(20, 30, 50, 0.6);
}

[data-theme="midnight"] .ent-data-table-wrapper,
[data-theme="midnight"] .ent-perm-matrix-wrapper,
[data-theme="midnight"] .ent-audit-list {
    background: rgba(5, 10, 25, 0.88);
    border-color: rgba(20, 30, 50, 0.6);
}
[data-theme="midnight"] .ent-data-table th,
[data-theme="midnight"] .ent-user-table th,
[data-theme="midnight"] .ent-perm-matrix th,
[data-theme="midnight"] .ent-apikey-table th,
[data-theme="midnight"] .ent-security-ip-table th {
    background: rgba(2, 8, 23, 0.98);
}

[data-theme="midnight"] .ent-login-card,
[data-theme="midnight"] .ent-modal {
    background: rgba(5, 10, 25, 0.97);
    border-color: rgba(20, 30, 50, 0.6);
}

[data-theme="midnight"] .ent-toast {
    background: rgba(5, 10, 25, 0.97);
    border-color: rgba(20, 30, 50, 0.6);
}

[data-theme="midnight"] .ent-audit-filter-bar {
    background: rgba(5, 10, 25, 0.6);
    border-color: rgba(20, 30, 50, 0.6);
}

[data-theme="midnight"] .ent-login-field input,
[data-theme="midnight"] .ent-form-input,
[data-theme="midnight"] .ent-form-select,
[data-theme="midnight"] .ent-form-textarea,
[data-theme="midnight"] .ent-search-bar input {
    background: rgba(2, 8, 23, 0.6);
    border-color: rgba(20, 30, 50, 0.6);
}

[data-theme="midnight"] .ent-security-timeline::before {
    background: rgba(20, 30, 50, 0.6);
}

[data-theme="midnight"] .ent-security-chart-area,
[data-theme="midnight"] .ent-health-chart-area {
    background: rgba(2, 8, 23, 0.5);
    border-color: rgba(20, 30, 50, 0.4);
}


/* ============================================================
   16. RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1200px) {
    .ent-admin-stats,
    .ent-security-counters,
    .ent-health-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ent-org-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ent-admin-subtabs {
        flex-wrap: wrap;
    }

    .ent-data-table-wrapper,
    .ent-perm-matrix-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ent-modal {
        max-width: 90vw;
    }
}

@media (max-width: 768px) {
    .ent-admin-stats,
    .ent-security-counters,
    .ent-health-grid {
        grid-template-columns: 1fr;
    }

    .ent-org-grid {
        grid-template-columns: 1fr;
    }

    .ent-admin-subtabs {
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px 12px;
    }
    .ent-admin-subtab {
        padding: 6px 12px;
        font-size: 0.72rem;
    }

    .ent-table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .ent-table-toolbar-actions {
        flex-wrap: wrap;
    }

    .ent-data-table-wrapper,
    .ent-perm-matrix-wrapper {
        margin: 0 -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .ent-stat-card-value {
        font-size: 1.6rem;
    }

    .ent-profile-info {
        display: none;
    }
    .ent-profile-trigger {
        padding: 4px;
        border-radius: 50%;
    }
    .ent-profile-chevron {
        display: none;
    }

    .ent-profile-menu {
        right: -10px;
        min-width: 260px;
    }

    .ent-login-card {
        max-width: 100%;
        border-radius: var(--ent-radius);
    }
    .ent-login-body {
        padding: 20px;
    }
    .ent-login-2fa-inputs {
        gap: 6px;
    }
    .ent-login-2fa-digit {
        width: 42px;
        height: 52px;
        font-size: 1.3rem;
    }

    .ent-modal {
        max-width: 100%;
        max-height: 90vh;
        margin: 10px;
        border-radius: var(--ent-radius);
    }
    .ent-modal-body {
        padding: 16px;
    }

    .ent-audit-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .ent-audit-export-btn {
        margin-left: 0;
    }

    .ent-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    .ent-toast {
        min-width: auto;
        max-width: none;
    }

    .ent-session-bar {
        flex-wrap: wrap;
        padding: 10px 16px;
        font-size: 0.78rem;
        gap: 8px;
    }

    .ent-pagination {
        flex-wrap: wrap;
    }

    .ent-2fa-backup-grid {
        grid-template-columns: 1fr;
    }

    .ent-security-timeline {
        padding-left: 24px;
    }
    .ent-security-event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}


/* ============================================================
   ANIMATIONS & UTILITY
   ============================================================ */
@keyframes ent-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.ent-loading {
    animation: ent-pulse 1.5s ease-in-out infinite;
}

.ent-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ent-spin 0.6s linear infinite;
}

/* Fade in for tab content */
.ent-admin-tab-content {
    animation: ent-fadeIn 0.2s ease;
}
@keyframes ent-fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar styling for enterprise panels */
.ent-data-table-wrapper::-webkit-scrollbar,
.ent-perm-matrix-wrapper::-webkit-scrollbar,
.ent-modal-body::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.ent-data-table-wrapper::-webkit-scrollbar-track,
.ent-perm-matrix-wrapper::-webkit-scrollbar-track,
.ent-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.ent-data-table-wrapper::-webkit-scrollbar-thumb,
.ent-perm-matrix-wrapper::-webkit-scrollbar-thumb,
.ent-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
.ent-data-table-wrapper::-webkit-scrollbar-thumb:hover,
.ent-perm-matrix-wrapper::-webkit-scrollbar-thumb:hover,
.ent-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Selection highlight in tables */
.ent-data-table tbody tr.selected,
.ent-user-table tbody tr.selected {
    background: rgba(139, 92, 246, 0.08);
    border-left: 3px solid var(--domain-enterprise);
}

/* Skeleton loading for cards */
.ent-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: ent-shimmer 1.5s ease infinite;
    border-radius: var(--ent-radius-sm);
}
@keyframes ent-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.ent-skeleton.line {
    height: 14px;
    margin-bottom: 8px;
}
.ent-skeleton.line.short { width: 60%; }
.ent-skeleton.circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
