

/* ============================================================================
   Dicker Data Portal - Design System
   Corporate color palette with dd-* prefix classes
   ============================================================================ */

/* ============================================================================
   CSS Variables
   ============================================================================ */
:root {
    /* Background Colors */
    --dd-bg: #e8e8e8;
    --dd-bg-light: #f8f9fa;
    --dd-bg-white: #ffffff;

    /* Primary Colors (Slate Gray) */
    --dd-primary: #5d6d7e;
    --dd-primary-dark: #34495e;
    --dd-primary-light: #7f8c9a;

    /* Text Colors */
    --dd-text-dark: #2c3e50;
    --dd-text: #666666;
    --dd-text-light: #888888;
    --dd-text-muted: #aaaaaa;

    /* Status Colors */
    --dd-success: #27ae60;
    --dd-success-light: rgba(39, 174, 96, 0.1);
    --dd-error: #e74c3c;
    --dd-error-light: rgba(231, 76, 60, 0.1);
    --dd-warning: #e67e22;
    --dd-warning-light: rgba(230, 126, 34, 0.1);
    --dd-info: #3498db;
    --dd-info-light: rgba(52, 152, 219, 0.1);

    /* Role Colors */
    --dd-role-admin: #9b59b6;
    --dd-role-manager: #3498db;
    --dd-role-viewer: #5d6d7e;

    /* Border & Shadow */
    --dd-border: #dddddd;
    --dd-border-light: #eeeeee;
    --dd-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --dd-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.2);

    /* Sizing */
    --dd-radius: 8px;
    --dd-radius-sm: 6px;
    --dd-radius-lg: 12px;

    /* Font */
    --dd-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Warning Colors */
    --dd-warning-bg: #fff3cd;
    --dd-warning-border: #ffc107;
    --dd-warning-text: #856404;

    /* Spacing */
    --dd-gap-xs: 4px;
    --dd-gap-sm: 8px;
    --dd-gap-md: 16px;
    --dd-gap-lg: 24px;
    --dd-gap-xl: 32px;
}

/* ============================================================================
   Reset & Base Styles
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--dd-bg);
    font-family: var(--dd-font);
    font-size: 14px;
    color: var(--dd-text);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--dd-primary);
    text-decoration: none;
}

a:hover {
    color: var(--dd-primary-dark);
    text-decoration: underline;
}

/* ============================================================================
   Accessibility
   ============================================================================ */

/* Skip to main content link */
.dd-skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dd-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--dd-radius);
    font-weight: 600;
    z-index: 10000;
    text-decoration: none;
    transition: top 0.2s ease;
}

.dd-skip-link:focus {
    top: 10px;
    outline: 3px solid var(--dd-warning);
    outline-offset: 2px;
}

/* Enhanced focus indicators - WCAG 2.4.7 compliant */
:focus {
    outline: 2px solid var(--dd-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--dd-primary);
    outline-offset: 2px;
}

/* Screen reader only - visually hidden but accessible */
.dd-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================================
   Layout Components
   ============================================================================ */
.dd-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dd-main {
    flex: 1;
    padding: 30px 20px;
}

.dd-footer {
    padding: 20px;
    text-align: center;
    color: var(--dd-text-light);
    font-size: 12px;
}

/* ============================================================================
   Header / Navigation
   ============================================================================ */
.dd-header {
    background: var(--dd-bg-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dd-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.dd-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.dd-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dd-logo-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.dd-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--dd-text-dark);
}

.dd-logo-text span {
    color: var(--dd-primary);
}

.dd-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dd-nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dd-text);
    text-decoration: none;
    border-radius: var(--dd-radius-sm);
    transition: all 0.2s ease;
}

.dd-nav-link:hover {
    color: var(--dd-text-dark);
    background-color: var(--dd-bg-light);
    text-decoration: none;
}

.dd-nav-link.active {
    color: var(--dd-primary);
    background-color: rgba(93, 109, 126, 0.1);
}

/* System Selector */
.dd-system-selector {
    position: relative;
    margin-left: auto;
    margin-right: 16px;
}

.dd-system-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--dd-bg-light);
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--dd-text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dd-system-btn:hover:not(:disabled) {
    background: var(--dd-bg-white);
    border-color: var(--dd-primary-light);
}

.dd-system-btn:disabled {
    cursor: default;
    opacity: 0.8;
}

.dd-system-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 260px;
    background: var(--dd-bg-white);
    border-radius: var(--dd-radius);
    box-shadow: var(--dd-shadow-hover);
    z-index: 200;
    overflow: hidden;
}

.dd-system-dropdown-header {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dd-text-light);
    background: var(--dd-bg-light);
    border-bottom: 1px solid var(--dd-border-light);
}

.dd-system-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.dd-system-option:hover {
    background: var(--dd-bg-light);
}

.dd-system-option.active {
    background: rgba(52, 152, 219, 0.08);
}

.dd-system-option-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--dd-text-dark);
}

.dd-system-option-code {
    font-size: 12px;
    color: var(--dd-text-light);
    margin-right: 8px;
}

.dd-system-option.active .dd-system-option-name {
    color: var(--dd-info);
}

.dd-system-option svg {
    color: var(--dd-info);
}

.dd-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: var(--dd-radius-sm);
}

.dd-user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.dd-user-avatar.partner,
.dd-user-avatar.external {
    background: linear-gradient(135deg, var(--dd-info) 0%, #2980b9 100%);
}

.dd-user-avatar.vendor {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.dd-user-avatar.customer {
    background: linear-gradient(135deg, var(--dd-success) 0%, #1e8449 100%);
}

.dd-user-info {
    text-align: right;
}

.dd-user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dd-text-dark);
    line-height: 1.3;
}

.dd-user-email {
    display: block;
    font-size: 11px;
    color: var(--dd-text-light);
    line-height: 1.3;
}

.dd-user-role {
    font-size: 11px;
    color: var(--dd-text-light);
}

.dd-user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--dd-text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dd-user-btn:hover {
    background-color: var(--dd-bg-light);
    color: var(--dd-primary);
    text-decoration: none;
}

.dd-profile-btn:hover {
    background-color: rgba(39, 174, 96, 0.25);
    color: #1e8449;
}

.dd-logout-btn:hover {
    background-color: rgba(231, 76, 60, 0.25);
    color: #c0392b;
}

/* ============================================================================
   Cards
   ============================================================================ */
.dd-card {
    background: var(--dd-bg-white);
    border-radius: var(--dd-radius);
    box-shadow: var(--dd-shadow);
    position: relative;
    border-top: 2px solid var(--dd-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dd-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--dd-shadow-hover);
}

.dd-card-label {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--dd-primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-radius: 0 var(--dd-radius) 0 12px;
}

/* Cards with labels need extra top padding in body */
.dd-card-label + .dd-card-body,
.dd-card-label ~ .dd-card-body {
    padding-top: 40px;
}

.dd-card-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    width: 20px;
    height: 20px;
    background-color: var(--dd-primary);
}

.dd-card-label .dd-curve-mask {
    position: absolute;
    top: 0;
    left: -20px;
    width: 20px;
    height: 20px;
    background-color: var(--dd-bg-white);
    border-top-right-radius: 20px;
}

.dd-card-header {
    background: linear-gradient(135deg, var(--dd-primary) 0%, #4a5a6a 100%);
    padding: 24px 30px;
    position: relative;
    border-radius: var(--dd-radius) var(--dd-radius) 0 0;
}

.dd-card-header h2,
.dd-card-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.dd-card-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    margin-top: 4px;
}

.dd-card-body {
    padding: 24px;
}

.dd-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--dd-border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================================================
   Login Card (Special Variant)
   ============================================================================ */
.dd-login-card {
    background: white;
    border-radius: var(--dd-radius);
    box-shadow: var(--dd-shadow);
    padding: 0;
    position: relative;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dd-login-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--dd-shadow-hover);
}

.dd-login-brand {
    text-align: center;
    margin-bottom: 30px;
}

.dd-login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.dd-login-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(93, 109, 126, 0.3);
}

.dd-login-logo-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.dd-login-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--dd-text-dark);
    letter-spacing: -0.5px;
}

.dd-login-logo-text span {
    color: var(--dd-primary);
}

.dd-login-subtitle {
    font-size: 14px;
    color: var(--dd-text-light);
    letter-spacing: 0.3px;
}

/* ============================================================================
   Form Elements
   ============================================================================ */
.dd-form-group {
    margin-bottom: 20px;
}

.dd-form-group:last-child {
    margin-bottom: 0;
}

.dd-form-row {
    display: flex;
    gap: 16px;
}

.dd-form-row .dd-form-group {
    flex: 1;
}

.dd-form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--dd-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.dd-form-label.required::after {
    content: ' *';
    color: var(--dd-error);
}

.dd-form-input,
.dd-form-select,
.dd-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--dd-text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dd-form-input:focus,
.dd-form-select:focus,
.dd-form-textarea:focus {
    outline: none;
    border-color: var(--dd-primary);
    box-shadow: 0 0 0 3px rgba(93, 109, 126, 0.1);
}

.dd-form-input::placeholder,
.dd-form-textarea::placeholder {
    color: var(--dd-text-muted);
}

.dd-form-input:disabled,
.dd-form-select:disabled {
    background-color: var(--dd-bg-light);
    color: var(--dd-text-light);
}

.dd-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.dd-form-hint {
    font-size: 12px;
    color: var(--dd-text-light);
    margin-top: 6px;
}

.dd-form-error {
    font-size: 12px;
    color: var(--dd-error);
    margin-top: 6px;
}

/* Checkbox */
.dd-form-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dd-form-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid var(--dd-border);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.dd-form-checkbox:checked {
    background-color: var(--dd-primary);
    border-color: var(--dd-primary);
}

.dd-form-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dd-form-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 109, 126, 0.1);
}

.dd-form-checkbox-label {
    font-size: 14px;
    color: var(--dd-text-dark);
    user-select: none;
}

/* Password Toggle */
.dd-password-wrapper {
    position: relative;
}

.dd-password-wrapper .dd-form-input {
    padding-right: 44px;
}

.dd-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--dd-text-light);
    transition: color 0.2s ease;
}

.dd-password-toggle:hover {
    color: var(--dd-primary);
}

.dd-password-toggle svg {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   Buttons
   ============================================================================ */
.dd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--dd-radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dd-btn:hover {
    text-decoration: none;
}

.dd-btn svg {
    width: 18px;
    height: 18px;
}

.dd-btn-primary {
    background: linear-gradient(135deg, var(--dd-primary) 0%, #4a5a6a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(93, 109, 126, 0.3);
}

.dd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 109, 126, 0.4);
    color: white;
}

.dd-btn-secondary {
    background: var(--dd-bg-white);
    border: 1px solid var(--dd-border);
    color: var(--dd-text);
}

.dd-btn-secondary:hover {
    border-color: var(--dd-primary);
    color: var(--dd-primary);
}

.dd-btn-danger {
    background: linear-gradient(135deg, var(--dd-error) 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.dd-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    color: white;
}

.dd-btn-success {
    background: linear-gradient(135deg, var(--dd-success) 0%, #219a52 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.dd-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
    color: white;
}

.dd-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.dd-btn-lg {
    padding: 14px 24px;
    font-size: 15px;
}

.dd-btn-block {
    width: 100%;
}

.dd-btn:disabled {
    pointer-events: none;
    background: #ccc !important;
    border-color: #bbb !important;
    color: #888 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.dd-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.dd-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: dd-spin 0.8s linear infinite;
}

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

/* Action Buttons (small icon buttons) */
.dd-action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    background: var(--dd-bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dd-action-btn svg {
    width: 16px;
    height: 16px;
    color: var(--dd-text);
}

.dd-action-btn:hover {
    border-color: var(--dd-primary);
    background-color: var(--dd-bg-light);
}

.dd-action-btn:hover svg {
    color: var(--dd-primary);
}

.dd-action-btn.danger:hover {
    border-color: var(--dd-error);
    background-color: var(--dd-error-light);
}

.dd-action-btn.danger:hover svg {
    color: var(--dd-error);
}

.dd-action-buttons {
    display: flex;
    gap: 8px;
}

/* ============================================================================
   Badges
   ============================================================================ */
.dd-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.dd-status-badge.active {
    background-color: var(--dd-success-light);
    color: var(--dd-success);
}

.dd-status-badge.inactive {
    background-color: var(--dd-error-light);
    color: var(--dd-error);
}

.dd-status-badge.pending {
    background-color: rgba(241, 196, 15, 0.15);
    color: #d4a500;
}

.dd-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.dd-role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dd-role-badge.admin {
    background-color: rgba(155, 89, 182, 0.1);
    color: var(--dd-role-admin);
}

.dd-role-badge.manager {
    background-color: var(--dd-info-light);
    color: var(--dd-role-manager);
}

.dd-role-badge.viewer {
    background-color: rgba(93, 109, 126, 0.1);
    color: var(--dd-role-viewer);
}

.dd-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.dd-type-badge.internal {
    background-color: var(--dd-bg-light);
    color: var(--dd-text);
}

.dd-type-badge.partner {
    background-color: var(--dd-info-light);
    color: var(--dd-info);
}

.dd-type-badge.vendor {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.dd-type-badge.customer {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--dd-success);
}

/* ============================================================================
   Data Tables
   ============================================================================ */
.dd-data-table {
    width: 100%;
    border-collapse: collapse;
}

.dd-data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--dd-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--dd-border-light);
    white-space: nowrap;
}

.dd-data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.dd-data-table th.sortable:hover {
    color: var(--dd-primary);
}

.dd-data-table th.sortable::after {
    content: '\2195';
    margin-left: 6px;
    opacity: 0.3;
}

.dd-data-table th.sort-asc::after {
    content: '\2191';
    opacity: 1;
    color: var(--dd-primary);
}

.dd-data-table th.sort-desc::after {
    content: '\2193';
    opacity: 1;
    color: var(--dd-primary);
}

.dd-data-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--dd-text-dark);
    border-bottom: 1px solid var(--dd-border-light);
    vertical-align: middle;
}

.dd-data-table tbody tr {
    transition: background-color 0.2s ease;
}

.dd-data-table tbody tr:hover {
    background-color: var(--dd-bg-light);
}

/* User Cell */
.dd-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dd-user-details {
    min-width: 0;
}

.dd-user-cell .dd-user-name {
    font-weight: 600;
    color: var(--dd-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dd-user-cell .dd-user-email {
    font-size: 12px;
    color: var(--dd-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   Filters
   ============================================================================ */
.dd-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--dd-border-light);
    align-items: flex-end;
}

.dd-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}


/* Filter bar action buttons - right-aligned */
.dd-filters-actions {
    margin-left: auto;
    display: flex;
    gap: var(--dd-gap-sm);
    align-items: flex-end;
}

.dd-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--dd-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dd-filter-input {
    padding: 10px 14px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dd-filter-input:focus {
    outline: none;
    border-color: var(--dd-primary);
    box-shadow: 0 0 0 3px rgba(93, 109, 126, 0.1);
}

.dd-filter-input::placeholder {
    color: var(--dd-text-muted);
}

/* Radio Group (Pill Style) */
.dd-radio-group {
    display: inline-flex;
    border: 1px solid var(--dd-border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--dd-bg-white);
}

.dd-radio-option {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dd-text);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    font-family: inherit;
}

.dd-radio-option:hover {
    color: var(--dd-text-dark);
}

.dd-radio-option.active {
    background: var(--dd-primary);
    color: white;
}

/* ============================================================================
   Stats Row
   ============================================================================ */
.dd-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.dd-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius-sm);
}

.dd-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--dd-text-dark);
}

.dd-stat-label {
    font-size: 12px;
    color: var(--dd-text-light);
}

/* ============================================================================
   Pagination
   ============================================================================ */
.dd-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--dd-border-light);
}

.dd-pagination-info {
    font-size: 13px;
    color: var(--dd-text-light);
}

.dd-pagination-controls {
    display: flex;
    gap: 4px;
}

.dd-pagination-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    background: var(--dd-bg-white);
    font-size: 13px;
    font-weight: 500;
    color: var(--dd-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dd-pagination-btn:hover:not(:disabled) {
    border-color: var(--dd-primary);
    color: var(--dd-primary);
}

.dd-pagination-btn.active {
    background: var(--dd-primary);
    border-color: var(--dd-primary);
    color: white;
}

.dd-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   Modals
   ============================================================================ */
.dd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dd-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dd-modal {
    background: var(--dd-bg-white);
    border-radius: var(--dd-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.dd-modal-overlay.active .dd-modal {
    transform: translateY(0);
}

.dd-modal-header {
    background: linear-gradient(135deg, var(--dd-primary) 0%, #4a5a6a 100%);
    padding: 20px 24px;
    position: relative;
}

.dd-modal-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.dd-modal-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    margin-top: 4px;
}

.dd-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--dd-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.dd-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dd-modal-close svg {
    width: 18px;
    height: 18px;
    color: white;
}

.dd-modal-body {
    padding: 24px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.dd-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--dd-border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Delete Modal Variant */
.dd-delete-modal .dd-modal {
    max-width: 420px;
}

.dd-delete-modal .dd-modal-header {
    background: linear-gradient(135deg, var(--dd-error) 0%, #c0392b 100%);
}

.dd-delete-warning {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--dd-error-light);
    border-radius: var(--dd-radius-sm);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.dd-delete-warning-icon {
    width: 40px;
    height: 40px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dd-delete-warning-icon svg {
    width: 24px;
    height: 24px;
    color: var(--dd-error);
}

.dd-delete-warning-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: #c0392b;
    margin-bottom: 4px;
}

.dd-delete-warning-text p {
    font-size: 13px;
    color: var(--dd-text);
    line-height: 1.5;
}

/* ============================================================================
   Toast Notifications
   ============================================================================ */
.dd-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: var(--dd-text-dark);
    color: white;
    border-radius: var(--dd-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

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

.dd-toast.success {
    background: var(--dd-success);
}

.dd-toast.error {
    background: var(--dd-error);
}

.dd-toast.warning {
    background: var(--dd-warning);
}

.dd-toast svg {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   Alert Messages
   ============================================================================ */
.dd-alert {
    padding: 12px 16px;
    border-radius: var(--dd-radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
}

.dd-alert.error {
    background-color: var(--dd-error-light);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #c0392b;
}

.dd-alert.success {
    background-color: var(--dd-success-light);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: var(--dd-success);
}

.dd-alert.warning {
    background-color: var(--dd-warning-light);
    border: 1px solid rgba(230, 126, 34, 0.3);
    color: var(--dd-warning);
}

.dd-alert.info {
    background-color: var(--dd-info-light);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: var(--dd-info);
}

/* ============================================================================
   Page Header
   ============================================================================ */
.dd-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dd-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dd-text-dark);
}

.dd-page-subtitle {
    font-size: 14px;
    color: var(--dd-text-light);
    margin-top: 4px;
}

/* ============================================================================
   Empty State
   ============================================================================ */
.dd-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.dd-empty-state svg {
    width: 64px;
    height: 64px;
    color: #ccc;
    margin-bottom: 16px;
}

.dd-empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dd-text-dark);
    margin-bottom: 8px;
}

.dd-empty-state p {
    font-size: 14px;
    color: var(--dd-text-light);
}

/* ============================================================================
   Access Denied
   ============================================================================ */
.dd-access-denied {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.dd-access-denied-content {
    text-align: center;
    max-width: 400px;
}

.dd-access-denied-icon {
    width: 80px;
    height: 80px;
    background: var(--dd-error-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.dd-access-denied-icon svg {
    width: 40px;
    height: 40px;
    color: var(--dd-error);
}

.dd-access-denied h2 {
    font-size: 24px;
    color: var(--dd-text-dark);
    margin-bottom: 8px;
}

.dd-access-denied p {
    color: var(--dd-text-light);
    margin-bottom: 24px;
}

/* ============================================================================
   Login Page Specific
   ============================================================================ */
.dd-login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Login Card Header (gradient header with text) */
.dd-login-card-header {
    background: linear-gradient(135deg, #5d6d7e 0%, #4a5a6a 100%);
    padding: 24px 30px;
    position: relative;
}

.dd-login-card-header h2 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.dd-login-card-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    margin-top: 4px;
}

/* Login Card Label (semi-transparent "Secure" badge) */
.dd-login-card-label {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 0 8px 0 12px;
}

.dd-login-card-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -16px;
    width: 16px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.15);
}

.dd-login-card-label .dd-curve-mask {
    position: absolute;
    top: 0;
    left: -16px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #5d6d7e 0%, #4a5a6a 100%);
    border-top-right-radius: 16px;
}

/* Login Card Body */
.dd-login-card-body {
    padding: 30px;
}

/* Login Form Group */
.dd-login-form-group {
    margin-bottom: 20px;
}

.dd-login-form-group:last-of-type {
    margin-bottom: 24px;
}

/* Login Options Row (Remember me + Forgot password) */
.dd-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dd-login-forgot-link {
    font-size: 13px;
    color: var(--dd-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.dd-login-forgot-link:hover {
    color: var(--dd-primary-dark);
    text-decoration: underline;
}

/* Login Divider */
.dd-login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.dd-login-divider::before,
.dd-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--dd-border-light);
}

.dd-login-divider span {
    padding: 0 16px;
    font-size: 12px;
    color: var(--dd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Login SSO Button */
.dd-login-sso {
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    color: var(--dd-text-dark);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dd-login-sso:hover {
    border-color: var(--dd-primary);
    background-color: var(--dd-bg-light);
}

.dd-login-sso:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dd-login-sso svg {
    width: 20px;
    height: 20px;
}

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

.dd-login-footer p {
    font-size: 13px;
    color: var(--dd-text-light);
}

/* ============================================================================
   Divider
   ============================================================================ */
.dd-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.dd-divider::before,
.dd-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--dd-border-light);
}

.dd-divider span {
    padding: 0 16px;
    font-size: 12px;
    color: var(--dd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================================
   Responsive Breakpoints
   ============================================================================ */
@media (max-width: 768px) {
    .dd-header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 20px;
        gap: 12px;
    }

    .dd-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .dd-filters {
        flex-direction: column;
    }

    .dd-filters-actions {
        margin-left: 0;
        width: 100%;
    }

    .dd-filter-group-wide {
        width: 100%;
        max-width: none;
    }

    .dd-form-row {
        flex-direction: column;
        gap: 0;
    }

    .dd-data-table {
        display: block;
        overflow-x: auto;
    }

    .dd-pagination {
        flex-direction: column;
        gap: 16px;
    }

    .dd-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .dd-stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .dd-login-page {
        padding: 20px;
    }

    .dd-card-body {
        padding: 20px;
    }

    .dd-login-logo-text {
        font-size: 24px;
    }

    .dd-user-info {
        display: none;
    }
}

/* ============================================================================
   SPA Loading & Spinner
   ============================================================================ */
.dd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--dd-text-light);
}

.dd-loading p {
    margin-top: 16px;
    font-size: 14px;
}

.dd-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--dd-border);
    border-top-color: var(--dd-primary);
    border-radius: 50%;
    animation: dd-spin 0.8s linear infinite;
}

/* ============================================================================
   Quick Actions
   ============================================================================ */
.dd-quick-action {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--dd-border-light);
}

.dd-quick-action:hover {
    border-color: var(--dd-primary);
    transform: translateX(4px);
    background: var(--dd-bg-white);
    text-decoration: none;
}

.dd-quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--dd-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================================
   Card Links
   ============================================================================ */
.dd-card-link {
    display: block;
    margin-top: 16px;
    font-size: 13px;
    color: var(--dd-info);
    font-weight: 500;
    text-decoration: none;
}

.dd-card-link:hover {
    text-decoration: underline;
}

/* ============================================================================
   Report Cards
   ============================================================================ */
.dd-report-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-radius: var(--dd-radius);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dd-report-card:hover {
    background: var(--dd-bg-light);
    transform: translateX(4px);
    text-decoration: none;
}

.dd-report-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
    border-radius: var(--dd-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dd-report-icon svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

.dd-report-info {
    flex: 1;
    min-width: 0;
}

.dd-report-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dd-text-dark);
    margin-bottom: 2px;
}

.dd-report-info p {
    font-size: 12px;
    color: var(--dd-text-light);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dd-report-arrow {
    width: 18px;
    height: 18px;
    stroke: #ccc;
    flex-shrink: 0;
}

.dd-report-card:hover .dd-report-arrow {
    stroke: var(--dd-primary);
}

/* ============================================================================
   Dropdown Links
   ============================================================================ */
.dd-dropdown-link {
    display: block;
    padding: 10px 16px;
    color: var(--dd-text);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.dd-dropdown-link:hover {
    background-color: var(--dd-bg-light);
    text-decoration: none;
}

.dd-dropdown-link-danger {
    color: var(--dd-error);
}

.dd-dropdown-link-danger:hover {
    background-color: var(--dd-error-light);
}

/* ============================================================================
   Search Box
   ============================================================================ */
.dd-search-box {
    position: relative;
    width: 100%;
}

.dd-search-box input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    background: var(--dd-bg-white);
    outline: none;
    box-sizing: border-box;
}

.dd-search-box input::placeholder {
    color: var(--dd-text-muted);
}

.dd-search-box input:focus {
    border-color: var(--dd-primary);
    box-shadow: 0 0 0 3px rgba(93, 109, 126, 0.1);
}

.dd-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--dd-text-light);
    pointer-events: none;
}

.dd-search-box input:focus + .dd-search-icon {
    color: var(--dd-primary);
}

/* ============================================================================
   Icon Button
   ============================================================================ */
.dd-btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    background: var(--dd-bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.dd-btn-icon svg {
    width: 16px;
    height: 16px;
    color: var(--dd-text);
}

.dd-btn-icon:hover {
    border-color: var(--dd-primary);
    background-color: var(--dd-bg-light);
}

.dd-btn-icon:hover svg {
    color: var(--dd-primary);
}

/* ============================================================================
   Filter Bar (for reports)
   ============================================================================ */
.dd-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

/* ============================================================================
   Radio Pills (for filter groups)
   ============================================================================ */
.dd-radio-pill {
    display: inline-block;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dd-text);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.dd-radio-pill:first-child {
    border-radius: 20px 0 0 20px;
}

.dd-radio-pill:last-child {
    border-radius: 0 20px 20px 0;
}

.dd-radio-pill:hover {
    color: var(--dd-text-dark);
}

.dd-radio-pill.active {
    background: var(--dd-primary);
    color: white;
}

.dd-radio-pill input {
    display: none;
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

/* Layout Utilities */
.dd-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--dd-gap-md);
}

.dd-grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--dd-gap-md);
}

.dd-flex-row {
    display: flex;
    gap: var(--dd-gap-sm);
    align-items: center;
}

.dd-justify-end {
    justify-content: flex-end;
}

.dd-justify-between {
    justify-content: space-between;
}

.dd-justify-center {
    justify-content: center;
}

.dd-flex-col {
    display: flex;
    flex-direction: column;
    gap: var(--dd-gap-sm);
}

.dd-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dd-align-start {
    align-items: flex-start;
}

.dd-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dd-flex-wrap {
    flex-wrap: wrap;
}

.dd-flex-1 {
    flex: 1;
}

/* Spacing Utilities */
.dd-mb-0 { margin-bottom: 0; }
.dd-mb-xs { margin-bottom: var(--dd-gap-xs); }
.dd-mb-sm { margin-bottom: var(--dd-gap-sm); }
.dd-mb-md { margin-bottom: var(--dd-gap-md); }
.dd-mb-lg { margin-bottom: var(--dd-gap-lg); }
.dd-mb-xl { margin-bottom: var(--dd-gap-xl); }

.dd-mt-0 { margin-top: 0; }
.dd-mt-sm { margin-top: var(--dd-gap-sm); }
.dd-mt-md { margin-top: var(--dd-gap-md); }
.dd-mt-lg { margin-top: var(--dd-gap-lg); }

.dd-p-0 { padding: 0; }
.dd-p-sm { padding: var(--dd-gap-sm); }
.dd-p-md { padding: var(--dd-gap-md); }
.dd-p-lg { padding: var(--dd-gap-lg); }

.dd-gap-sm { gap: var(--dd-gap-sm); }
.dd-gap-md { gap: var(--dd-gap-md); }
.dd-gap-lg { gap: var(--dd-gap-lg); }

/* Text Utilities */
.dd-text-center { text-align: center; }
.dd-text-left { text-align: left; }
.dd-text-right { text-align: right; }

.dd-text-muted { color: var(--dd-text-light); }
.dd-text-dark { color: var(--dd-text-dark); }
.dd-text-primary { color: var(--dd-primary); }
.dd-text-success { color: var(--dd-success); }
.dd-text-error { color: var(--dd-error); }
.dd-text-warning { color: var(--dd-warning); }
.dd-text-info { color: var(--dd-info); }
.dd-text-purple { color: var(--dd-role-admin); }

/* Border Color Utilities */
.dd-border-top-info { border-top-color: var(--dd-info); }
.dd-border-top-success { border-top-color: var(--dd-success); }
.dd-border-top-purple { border-top-color: var(--dd-role-admin); }
.dd-border-top-primary { border-top-color: var(--dd-primary); }

.dd-text-sm { font-size: 12px; }
.dd-text-md { font-size: 14px; }
.dd-text-lg { font-size: 16px; }
.dd-text-xl { font-size: 20px; }

.dd-font-bold { font-weight: 700; }
.dd-font-semibold { font-weight: 600; }
.dd-font-medium { font-weight: 500; }
.dd-font-normal { font-weight: 400; }

.dd-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Display Utilities */
.dd-hidden { display: none; }
.dd-block { display: block; }
.dd-inline { display: inline; }
.dd-inline-block { display: inline-block; }

/* Width Utilities */
.dd-w-full { width: 100%; }
.dd-w-auto { width: auto; }

/* Border Utilities */
.dd-border { border: 1px solid var(--dd-border); }
.dd-border-none { border: none; }
.dd-rounded { border-radius: var(--dd-radius); }
.dd-rounded-sm { border-radius: var(--dd-radius-sm); }
.dd-rounded-lg { border-radius: var(--dd-radius-lg); }
.dd-rounded-full { border-radius: 9999px; }

/* Background Utilities */
.dd-bg-white { background-color: var(--dd-bg-white); }
.dd-bg-light { background-color: var(--dd-bg-light); }
.dd-bg-primary { background-color: var(--dd-primary); }

/* Shadow Utilities */
.dd-shadow { box-shadow: var(--dd-shadow); }
.dd-shadow-hover { box-shadow: var(--dd-shadow-hover); }
.dd-shadow-none { box-shadow: none; }

/* Visibility Utilities */
.dd-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Utilities */
.dd-focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 109, 126, 0.25);
}

/* Transition Utilities */
.dd-transition {
    transition: all 0.2s ease;
}

/* Cursor Utilities */
.dd-cursor-pointer { cursor: pointer; }
.dd-cursor-default { cursor: default; }
.dd-cursor-not-allowed { cursor: not-allowed; }

/* Overflow Utilities */
.dd-overflow-hidden { overflow: hidden; }
.dd-overflow-auto { overflow: auto; }
.dd-overflow-x-auto { overflow-x: auto; }

/* Position Utilities */
.dd-relative { position: relative; }
.dd-absolute { position: absolute; }
.dd-fixed { position: fixed; }
.dd-sticky { position: sticky; }

/* ============================================================================
   Icon Size Utilities
   ============================================================================ */
.dd-icon-xs { width: 14px; height: 14px; }
.dd-icon-sm { width: 16px; height: 16px; }
.dd-icon-md { width: 20px; height: 20px; }
.dd-icon-lg { width: 24px; height: 24px; }
.dd-icon-xl { width: 32px; height: 32px; }
.dd-icon-2xl { width: 48px; height: 48px; }
.dd-icon-3xl { width: 64px; height: 64px; }

/* Icon Box - Colored icon containers */
.dd-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--dd-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dd-icon-box svg {
    width: 24px;
    height: 24px;
}

.dd-icon-box-success {
    background: var(--dd-success-light);
    color: var(--dd-success);
}

.dd-icon-box-success svg { stroke: var(--dd-success); }

.dd-icon-box-purple {
    background: rgba(155, 89, 182, 0.1);
    color: var(--dd-role-admin);
}

.dd-icon-box-purple svg { stroke: var(--dd-role-admin); }

.dd-icon-box-info {
    background: var(--dd-info-light);
    color: var(--dd-info);
}

.dd-icon-box-info svg { stroke: var(--dd-info); }

.dd-icon-box-warning {
    background: var(--dd-warning-light);
    color: var(--dd-warning);
}

.dd-icon-box-warning svg { stroke: var(--dd-warning); }

/* Detail Grid - Label/value pairs */
.dd-detail-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    font-size: 13px;
}

/* Category Header */
.dd-category-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--dd-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 24px;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--dd-border-light);
}

.report-category:first-child .dd-category-header {
    margin-top: 0;
}

/* Report List */
.dd-report-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ============================================================================
   Grid Layout Utilities
   ============================================================================ */
.dd-grid-2col {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--dd-gap-lg);
}

.dd-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--dd-gap-md);
}

.dd-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--dd-gap-md);
}

@media (max-width: 768px) {
    .dd-grid-2col,
    .dd-grid-3col,
    .dd-grid-4col {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   Avatar Utilities
   ============================================================================ */
.dd-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
}

.dd-avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.dd-avatar-md { width: 48px; height: 48px; font-size: 16px; }
.dd-avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.dd-avatar-xl { width: 80px; height: 80px; font-size: 28px; }

/* ============================================================================
   Stat Card Utilities
   ============================================================================ */
.dd-stat-card {
    text-align: center;
    padding: var(--dd-gap-lg);
}

.dd-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dd-text-dark);
    line-height: 1.2;
}

.dd-stat-value-lg {
    font-size: 32px;
    font-weight: 700;
    color: var(--dd-text-dark);
    line-height: 1.2;
}

.dd-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--dd-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--dd-gap-xs);
}

/* ============================================================================
   Additional Margin/Padding Utilities
   ============================================================================ */
.dd-ml-auto { margin-left: auto; }
.dd-mr-auto { margin-right: auto; }
.dd-mx-auto { margin-left: auto; margin-right: auto; }

.dd-py-sm { padding-top: var(--dd-gap-sm); padding-bottom: var(--dd-gap-sm); }
.dd-py-md { padding-top: var(--dd-gap-md); padding-bottom: var(--dd-gap-md); }
.dd-py-lg { padding-top: var(--dd-gap-lg); padding-bottom: var(--dd-gap-lg); }
.dd-py-xl { padding-top: var(--dd-gap-xl); padding-bottom: var(--dd-gap-xl); }

.dd-px-sm { padding-left: var(--dd-gap-sm); padding-right: var(--dd-gap-sm); }
.dd-px-md { padding-left: var(--dd-gap-md); padding-right: var(--dd-gap-md); }
.dd-px-lg { padding-left: var(--dd-gap-lg); padding-right: var(--dd-gap-lg); }

/* ============================================================================
   Filter Control Utilities
   ============================================================================ */
.dd-filter-control {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--dd-bg-white);
}

.dd-filter-control:focus {
    outline: none;
    border-color: var(--dd-primary);
    box-shadow: 0 0 0 3px rgba(93, 109, 126, 0.1);
}

.dd-filter-select,
select.dd-filter-control,
.dd-form-select.dd-filter-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 32px;
    min-width: 140px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* ============================================================================
   Search Input with Icon
   ============================================================================ */
.dd-search-input {
    position: relative;
}

.dd-search-input .dd-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--dd-text-light);
    pointer-events: none;
}

.dd-search-input input {
    padding-left: 36px;
}

/* ============================================================================
   Layout Components - Grids and Containers
   ============================================================================ */

/* Two column layout (1:2 ratio) */
.dd-layout-sidebar {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .dd-layout-sidebar {
        grid-template-columns: 1fr;
    }
}

/* Auto-fit grid for stats/cards */
.dd-grid-auto-200 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.dd-grid-auto-280 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* ============================================================================
   Section Dividers
   ============================================================================ */
.dd-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--dd-border-light);
}

.dd-section-sm {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--dd-border-light);
}

/* ============================================================================
   Section Title
   ============================================================================ */
.dd-section-title {
    font-size: 18px;
    color: var(--dd-text-dark);
    margin-bottom: 20px;
}

.dd-section-title-sm {
    font-size: 14px;
    color: var(--dd-text-dark);
    margin-bottom: 16px;
}

.dd-section-desc {
    font-size: 13px;
    color: var(--dd-text);
    margin-bottom: 16px;
}

/* ============================================================================
   Profile/Avatar Components
   ============================================================================ */
.dd-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 28px;
    font-weight: 600;
}

.dd-avatar-partner {
    background: linear-gradient(135deg, var(--dd-info) 0%, #2980b9 100%);
}

.dd-profile-name {
    font-size: 18px;
    color: var(--dd-text-dark);
    margin-bottom: 4px;
}

.dd-profile-email {
    color: var(--dd-text-light);
    font-size: 13px;
    margin-bottom: 16px;
}

/* ============================================================================
   Info/Detail Display
   ============================================================================ */
.dd-info-label {
    font-size: 11px;
    color: var(--dd-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.dd-info-value {
    font-size: 14px;
    color: var(--dd-text-dark);
}

.dd-info-grid {
    display: grid;
    gap: 12px;
}

.dd-info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* ============================================================================
   Activity/Timeline Items
   ============================================================================ */
.dd-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dd-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius-sm);
}

.dd-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dd-activity-icon svg {
    width: 16px;
    height: 16px;
}

.dd-activity-icon-success { background: rgba(39, 174, 96, 0.15); }
.dd-activity-icon-success svg { stroke: var(--dd-success); }

.dd-activity-icon-muted { background: rgba(127, 140, 141, 0.15); }
.dd-activity-icon-muted svg { stroke: #7f8c8d; }

.dd-activity-icon-warning { background: rgba(230, 126, 34, 0.15); }
.dd-activity-icon-warning svg { stroke: var(--dd-warning); }

.dd-activity-icon-info { background: rgba(52, 152, 219, 0.15); }
.dd-activity-icon-info svg { stroke: var(--dd-info); }

.dd-activity-icon-error { background: rgba(231, 76, 60, 0.15); }
.dd-activity-icon-error svg { stroke: var(--dd-error); }

.dd-activity-content {
    flex: 1;
    min-width: 0;
}

.dd-activity-title {
    font-size: 13px;
    color: var(--dd-text-dark);
    margin: 0;
}

.dd-activity-meta {
    font-size: 11px;
    color: var(--dd-text-light);
    margin: 0;
}

/* ============================================================================
   Empty/Error States
   ============================================================================ */
.dd-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.dd-empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.dd-empty-state h3 {
    color: var(--dd-text-dark);
    margin-bottom: 8px;
}

.dd-empty-state p {
    color: var(--dd-text-light);
    margin-bottom: 20px;
}

/* ============================================================================
   Quick Action Cards
   ============================================================================ */
.dd-quick-action {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--dd-bg-white);
    border: 1px solid var(--dd-border-light);
    border-radius: var(--dd-radius);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dd-quick-action:hover {
    border-color: var(--dd-primary);
    transform: translateX(4px);
    text-decoration: none;
}

.dd-quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--dd-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dd-quick-action-icon svg {
    width: 24px;
    height: 24px;
}

.dd-quick-action-icon-purple {
    background: linear-gradient(135deg, var(--dd-role-admin) 0%, #8e44ad 100%);
}

.dd-quick-action-icon-blue {
    background: linear-gradient(135deg, var(--dd-info) 0%, #2980b9 100%);
}

.dd-quick-action-icon-orange {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.dd-quick-action-icon-green {
    background: linear-gradient(135deg, var(--dd-success) 0%, #1e8449 100%);
}

.dd-quick-action-icon-gray {
    background: linear-gradient(135deg, var(--dd-primary) 0%, var(--dd-primary-dark) 100%);
}

.dd-quick-action-title {
    font-weight: 600;
    color: var(--dd-text-dark);
    font-size: 16px;
}

.dd-quick-action-desc {
    font-size: 13px;
    color: var(--dd-text-light);
}

.dd-quick-action-disabled {
    opacity: 0.6;
    cursor: default;
}

.dd-quick-action-disabled:hover {
    border-color: var(--dd-border-light);
    transform: none;
}

/* ============================================================================
   Report Access Row
   ============================================================================ */
.dd-report-access-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius-sm);
}

.dd-report-access-name {
    flex: 1;
    font-size: 13px;
    color: var(--dd-text-dark);
}

.dd-report-access-systems {
    font-size: 10px;
    color: var(--dd-text-light);
    margin-left: 8px;
}

.dd-report-access-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--dd-text);
    cursor: pointer;
}

/* ============================================================================
   System Assignment Row
   ============================================================================ */
.dd-system-row {
    padding: 16px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius-sm);
    margin-bottom: 12px;
}

.dd-system-row-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.dd-access-keys-container {
    padding-left: 8px;
    border-left: 3px solid var(--dd-border);
}

.dd-access-keys-title {
    font-size: 11px;
    color: var(--dd-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dd-kv-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.dd-add-key-btn {
    margin-top: 8px;
    background: none;
    border: 1px dashed var(--dd-text-muted);
    color: var(--dd-text);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dd-add-key-btn:hover {
    border-color: var(--dd-primary);
    color: var(--dd-primary);
}

/* ============================================================================
   Password Requirements
   ============================================================================ */
.dd-pwd-requirements {
    margin-top: 12px;
    padding: 12px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius-sm);
}

.dd-pwd-requirements-title {
    font-size: 12px;
    color: var(--dd-text);
    margin-bottom: 8px;
    font-weight: 500;
}

.dd-pwd-requirements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dd-pwd-req {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background: #eee;
    color: var(--dd-text);
}

.dd-pwd-req.met {
    background: #d4edda;
    color: #155724;
}

.dd-pwd-summary {
    font-size: 11px;
    color: var(--dd-text-light);
    margin-top: 8px;
}

/* ============================================================================
   Key Suggestions Dropdown
   ============================================================================ */
.dd-key-suggestions {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm);
    box-shadow: var(--dd-shadow);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.dd-key-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--dd-border-light);
}

.dd-key-suggestion:hover {
    background: var(--dd-bg-light);
}

.dd-key-suggestion:last-child {
    border-bottom: none;
}

/* ============================================================================
   Stat Cards (Large Value Display)
   ============================================================================ */
.dd-stat-card {
    text-align: center;
}

.dd-stat-value-xl {
    font-size: 36px;
    font-weight: 700;
}

/* ============================================================================
   Form Actions (right-aligned buttons)
   ============================================================================ */
.dd-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--dd-border-light);
}

.dd-form-actions-simple {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ============================================================================
   Flex Utilities (additional)
   ============================================================================ */
.dd-flex-center-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dd-min-w-0 {
    min-width: 0;
}

.dd-shrink-0 {
    flex-shrink: 0;
}

/* ============================================================================
   Warning/Note Boxes
   ============================================================================ */
.dd-note {
    color: #888;
    font-size: 13px;
    padding: 12px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius-sm);
}

.dd-note-warning {
    color: var(--dd-warning);
    margin-top: 8px;
}

/* ============================================================================
   Modal Size Variants
   ============================================================================ */
.dd-modal-sm { max-width: 400px; }
.dd-modal-md { max-width: 600px; }
.dd-modal-lg { max-width: 700px; }
.dd-modal-xl { max-width: 900px; }

/* ============================================================================
   Width Utilities
   ============================================================================ */
.dd-w-100 { width: 100px; }
.dd-w-150 { width: 150px; }
.dd-w-200 { width: 200px; }

/* ============================================================================
   Italic Text
   ============================================================================ */
.dd-italic { font-style: italic; }

/* ============================================================================
   Code/Monospace Text
   ============================================================================ */
.dd-font-mono { font-family: monospace; }

.dd-report-slug {
    font-size: 11px;
    color: var(--dd-text-light);
    font-family: monospace;
}

.dd-report-desc {
    font-size: 12px;
    color: var(--dd-text);
    margin-top: 4px;
}

/* ============================================================================
   Link Styles
   ============================================================================ */
.dd-link-info {
    color: var(--dd-info);
}

/* ============================================================================
   Pagination Ellipsis
   ============================================================================ */
.dd-pagination-ellipsis {
    pointer-events: none;
}

/* ============================================================================
   Table Scroll Container
   ============================================================================ */
.dd-table-scroll {
    overflow-x: auto;
}

/* ============================================================================
   Border Utilities
   ============================================================================ */
.dd-border-top {
    border-top: 1px solid var(--dd-border-light);
}

/* ============================================================================
   Gap Utilities (extended)
   ============================================================================ */
.dd-gap-xl { gap: var(--dd-gap-xl); }
.dd-gap-2xl { gap: 40px; }
.dd-gap-3xl { gap: 60px; }

/* ============================================================================
   Quick Filters / Chips
   ============================================================================ */
.dd-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0;
}

.dd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--dd-bg-white);
    color: var(--dd-text);
    border: 1px solid var(--dd-border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dd-chip:hover {
    background: var(--dd-bg-light);
    border-color: var(--dd-primary-light);
    color: var(--dd-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.dd-chip:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 109, 126, 0.15);
}

.dd-chip.active {
    background: var(--dd-primary);
    color: white;
    border-color: var(--dd-primary);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(93, 109, 126, 0.3);
}

.dd-chip.active:hover {
    background: var(--dd-primary-dark);
    border-color: var(--dd-primary-dark);
}

/* Chip count badge */
.dd-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.dd-chip.active .dd-chip-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Chips with dynamic colors via CSS custom property */
.dd-chip[style*="--chip-color"] {
    background: var(--dd-bg-white);
    color: var(--chip-color);
    border-color: color-mix(in srgb, var(--chip-color) 25%, transparent);
}

.dd-chip[style*="--chip-color"]:hover {
    background: color-mix(in srgb, var(--chip-color) 8%, white);
    border-color: color-mix(in srgb, var(--chip-color) 40%, transparent);
}

.dd-chip[style*="--chip-color"].active {
    background: var(--chip-color);
    color: white;
    border-color: var(--chip-color);
    box-shadow: 0 2px 4px color-mix(in srgb, var(--chip-color) 40%, transparent);
}

.dd-chip[style*="--chip-color"].active:hover {
    filter: brightness(0.9);
}

/* ============================================================================
   Filter Group Variants
   ============================================================================ */
.dd-filter-group-wide {
    flex: 1;
    max-width: 400px;
}

/* ============================================================================
   Tracking Code Display
   ============================================================================ */
.dd-tracking-code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: var(--dd-bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--dd-text-dark);
}

/* ============================================================================
   Table Footer
   ============================================================================ */
.dd-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--dd-gap-md);
    padding-top: var(--dd-gap-md);
    border-top: 1px solid var(--dd-border-light);
}

/* ============================================================================
   Table Text Alignment
   ============================================================================ */
.dd-data-table .dd-text-right,
.dd-data-table th.dd-text-right,
.dd-data-table td.dd-text-right {
    text-align: right;
}

/* ============================================================================
   Checkbox Grid (for multi-select checkboxes)
   ============================================================================ */
.dd-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--dd-gap-sm);
}

.dd-checkbox-grid .dd-checkbox-label {
    padding: 8px 12px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius-sm);
    font-size: 13px;
}

.dd-checkbox-grid .dd-checkbox-label:hover {
    background: var(--dd-border-light);
}

/* ============================================================================
   System Badges (for showing system assignments)
   ============================================================================ */
.dd-systems-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dd-system-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--dd-border-light);
    border-radius: 12px;
    font-size: 11px;
    color: var(--dd-text);
}

.dd-system-badge.inactive {
    background: var(--dd-error-light);
    color: var(--dd-error);
}

/* ============================================================================
   User List Components (for modals/lists)
   ============================================================================ */
.dd-users-section {
    margin-bottom: 20px;
}

.dd-users-section h4 {
    font-size: 13px;
    color: var(--dd-text-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--dd-border-light);
}

.dd-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--dd-bg-light);
    border-radius: var(--dd-radius-sm);
    margin-bottom: 8px;
}

.dd-user-item .dd-user-info {
    flex: 1;
    text-align: left;
}

.dd-user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--dd-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.dd-user-badges {
    display: flex;
    gap: 4px;
}

/* ============================================================================
   Access Badges
   ============================================================================ */
.dd-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.dd-badge-view {
    background: var(--dd-success-light);
    color: var(--dd-success);
}

.dd-badge-export {
    background: var(--dd-info-light);
    color: var(--dd-info);
}

.dd-badge-role {
    background: var(--dd-border-light);
    color: var(--dd-text);
}

