/* CSS Design System for Bringer Management Dashboard */

/* -------------------------------------------------------------
   1. CSS Variables & Theme Configuration
   ------------------------------------------------------------- */
:root {
    /* Font */
    --font-family: 'Cairo', system-ui, -apple-system, sans-serif;

    /* Light Theme Palette */
    --bg-app: #f4f6f9;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Brand & Accent Colors */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.1);
    --secondary: #64748b;
    --secondary-hover: #475569;
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: rgba(239, 68, 68, 0.1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
    --gradient-welcome: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);

    /* Shadows & Borders */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Palette */
body.dark-theme {
    --bg-app: #0b0f19;
    --bg-sidebar: #111827;
    --bg-card: #1f2937;
    --bg-input: #374151;
    --border-color: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --primary-light: rgba(59, 130, 246, 0.2);
    --success-light: rgba(16, 185, 129, 0.2);
    --warning-light: rgba(245, 158, 11, 0.2);
    --danger-light: rgba(239, 68, 68, 0.2);

    --gradient-welcome: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
}

/* -------------------------------------------------------------
   2. Reset & Global Styles
   ------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* -------------------------------------------------------------
   3. Main App Layout Grid
   ------------------------------------------------------------- */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-icon {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.menu-item i {
    font-size: 18px;
    transition: var(--transition);
}

.menu-item:hover {
    background-color: var(--bg-app);
    color: var(--primary);
}

.menu-item:hover i {
    transform: scale(1.1);
}

.menu-item.active {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

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

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
}

/* -------------------------------------------------------------
   4. Top Navigation Bar
   ------------------------------------------------------------- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-refresh-cache {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    margin-right: 8px;
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-input);
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-refresh-cache:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.btn-refresh-cache:active {
    transform: scale(0.96);
}

.theme-toggle-btn, .notification-bell {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover, .notification-bell:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.notification-bell {
    position: relative;
}

.notification-bell .badge {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
}

/* -------------------------------------------------------------
   5. Dashboard Welcome & Stats Card Components
   ------------------------------------------------------------- */
.welcome-banner {
    background: var(--gradient-welcome);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    left: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.welcome-text h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-text p {
    font-size: 14px;
    opacity: 0.9;
    max-width: 600px;
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon-wrapper.blue {
    background-color: var(--primary-light);
    color: var(--primary);
}

.stat-icon-wrapper.green {
    background-color: var(--success-light);
    color: var(--success);
}

.stat-icon-wrapper.purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* -------------------------------------------------------------
   6. Table Card & Table Styles
   ------------------------------------------------------------- */
.table-container-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header-title-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-title-section .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    outline: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-danger {
    background: var(--gradient-danger);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

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

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

/* Action button styles inside tables */
.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-icon-edit {
    background-color: var(--primary-light);
    color: var(--primary);
}

.btn-icon-edit:hover {
    background-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.btn-icon-delete {
    background-color: var(--danger-light);
    color: var(--danger);
}

.btn-icon-delete:hover {
    background-color: var(--danger);
    color: white;
    transform: scale(1.1);
}

/* Filters Bar */
.filter-bar {
    padding: 16px 24px;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-theme .filter-bar {
    background-color: rgba(255, 255, 255, 0.02);
}

.entries-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.entries-selector select {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-family);
    outline: none;
}

/* Data Table Grid */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.data-table th, .data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: rgba(0, 0, 0, 0.01);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

body.dark-theme .data-table th {
    background-color: rgba(255, 255, 255, 0.01);
}

.data-table td {
    color: var(--text-primary);
    font-size: 14px;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.02);
}

.data-table .serial-col {
    font-weight: 700;
    color: var(--primary);
}

.data-table .name-col {
    font-weight: 600;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table .notes-col {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table .phone-col {
    direction: ltr;
    text-align: right;
}

.actions-cell {
    display: flex;
    gap: 8px;
}

/* -------------------------------------------------------------
   7. Empty State View Styling
   ------------------------------------------------------------- */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 320px;
}

/* -------------------------------------------------------------
   8. Table Footer & Pagination
   ------------------------------------------------------------- */
.table-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

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

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

.page-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

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

.page-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* -------------------------------------------------------------
   9. Forms, Modals & Validation UI
   ------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-overlay.open .modal-card {
    transform: scale(1);
}

.modal-card.modal-wide-compact {
    max-width: 820px;
    width: 95%;
}

@media (max-width: 768px) {
    .modal-card.modal-wide-compact .modal-body > div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
    .modal-card.modal-wide-compact .form-group[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.01);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

body.dark-theme .modal-footer {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group label .required {
    color: var(--danger);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-wrapper input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.input-wrapper input:focus {
    border-color: var(--primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.error-msg {
    display: none;
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

.form-group.has-error .input-wrapper input {
    border-color: var(--danger);
    background-color: rgba(239, 68, 68, 0.02);
}

.form-group.has-error .error-msg {
    display: block;
}

/* Delete Confirmation Card styling */
.modal-confirm {
    max-width: 400px;
}

.text-center {
    text-align: center;
}

.text-danger {
    color: var(--danger);
}

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

.text-sm {
    font-size: 12px;
}

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

.confirm-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* -------------------------------------------------------------
   10. Toast Notification System
   ------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-right: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), fadeOut 0.5s ease 2.5s forwards;
    pointer-events: auto;
}

.toast-success {
    border-right-color: var(--success);
}

.toast-danger {
    border-right-color: var(--danger);
}

.toast-warning {
    border-right-color: var(--warning);
}

.toast-icon {
    font-size: 18px;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-danger .toast-icon {
    color: var(--danger);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* -------------------------------------------------------------
   11. Responsive Design Adjustments
   ------------------------------------------------------------- */
.sidebar-close-btn {
    display: none;
}
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: -260px; /* Slide sidebar out to the right (RTL layout) */
        width: 260px;
        height: 100vh;
        z-index: 1100;
        box-shadow: var(--shadow-xl);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
        border-left: 1px solid var(--border-color);
        background-color: var(--bg-sidebar);
    }

    .sidebar.open {
        right: 0; /* Slide in */
    }

    .sidebar-close-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 28px;
        color: var(--text-secondary);
        cursor: pointer;
        margin-right: auto;
    }

    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 22px;
        color: var(--text-primary);
        cursor: pointer;
        padding: 4px;
        margin-left: 12px;
        line-height: 1;
    }

    .main-content {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .top-bar-actions {
        justify-content: flex-end;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .card-header .btn {
        width: 100%;
        justify-content: center;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* -------------------------------------------------------------
   12. Safes Split Grid Layout & Active Row Highlight
   ------------------------------------------------------------- */
.safes-split-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: start;
}

.active-row-highlight {
    background-color: rgba(13, 148, 136, 0.05) !important;
    border-right: 4px solid #0d9488;
}

body.dark-theme .active-row-highlight {
    background-color: rgba(13, 148, 136, 0.15) !important;
}

.bg-subtle {
    background-color: rgba(0, 0, 0, 0.01);
}

body.dark-theme .bg-subtle {
    background-color: rgba(255, 255, 255, 0.01);
}

.btn-xs {
    padding: 6px 10px;
    font-size: 12px;
}

@media (max-width: 1200px) {
    .safes-split-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------
   13. Digital Cards & Activity Feed UI for Safes
   ------------------------------------------------------------- */
.safes-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 10px;
}

.safe-digital-card {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 24px;
    color: #ffffff;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    user-select: none;
}

.safe-digital-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.safe-digital-card.active {
    box-shadow: 0 0 0 4px var(--success), 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.safe-digital-card.warning-glow {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4), 0 4px 6px -2px rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.6);
}

.safe-digital-card.warning-glow.active {
    box-shadow: 0 0 0 4px var(--success), 0 0 20px rgba(239, 68, 68, 0.6);
}

/* Digital Card Gradients */
.card-gradient-primary {
    background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
}
.card-gradient-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.card-gradient-secondary {
    background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
}
.card-gradient-secondary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

/* Card Chip Design */
.card-chip {
    width: 40px;
    height: 28px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: var(--radius-sm);
    position: relative;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.4);
}
.card-chip::after {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    width: 16px;
    height: 100%;
    border-left: 1px solid rgba(0,0,0,0.15);
    border-right: 1px solid rgba(0,0,0,0.15);
}

/* Card Brand Icon */
.card-brand {
    position: absolute;
    left: 24px;
    top: 24px;
    font-size: 28px;
    opacity: 0.15;
    color: #ffffff;
}

.card-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 14px;
}

.card-type-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
}

.card-serial {
    font-size: 12px;
    opacity: 0.7;
    font-weight: 600;
}

.card-name {
    font-size: 16px;
    font-weight: 700;
    margin: 12px 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-balance {
    display: flex;
    flex-direction: column;
}

.currency-label {
    font-size: 11px;
    opacity: 0.6;
    margin-bottom: 2px;
}

.balance-value {
    font-size: 22px;
    font-weight: 800;
    direction: ltr;
    display: flex;
    align-items: center;
    gap: 4px;
}

.balance-value .sar {
    font-size: 14px;
    font-weight: 600;
}

/* Card Actions styling overlay */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.safe-digital-card:hover .card-actions, .safe-digital-card.active .card-actions {
    opacity: 1;
    transform: translateY(0);
}

.card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
}

.card-action-btn:hover {
    background-color: #ffffff;
    color: var(--text-primary);
    border-color: #ffffff;
}

.card-action-btn.btn-delete:hover {
    background-color: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.card-active-indicator {
    position: absolute;
    bottom: 24px;
    left: 24px;
    font-size: 11px;
    font-weight: 700;
    background-color: var(--success);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Banking Activity Feed Styles */
.activities-feed {
    display: flex;
    flex-direction: column;
    padding: 10px 24px 24px 24px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    gap: 16px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    transform: translateX(-4px);
}

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

.activity-icon.deposit {
    background-color: var(--success-light);
    color: var(--success);
}

.activity-icon.withdrawal {
    background-color: var(--danger-light);
    color: var(--danger);
}

.activity-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-desc {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-date {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.activity-amount {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    direction: ltr;
    text-align: right;
}

.activity-amount.deposit {
    color: var(--success);
}

.activity-amount.withdrawal {
    color: var(--danger);
}

/* specialized transaction items border override */
.activity-item.repayment,
.activity-item.form-payment-full,
.activity-item.form-payment-partial,
.activity-item.withdrawal,
.activity-item.deposit {
    border-bottom: none !important;
}

/* 1. سداد الديون السابقة (repayment) - Indigo Blue */
.activity-item.repayment {
    background-color: rgba(79, 70, 229, 0.06);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 6px 0;
    cursor: pointer;
    border: 1px dashed rgba(79, 70, 229, 0.3);
}
.activity-item.repayment:hover {
    background-color: rgba(79, 70, 229, 0.12);
    transform: translateX(-4px);
}
.activity-icon.repayment {
    background-color: rgba(79, 70, 229, 0.15);
    color: #4f46e5;
}
.activity-amount.repayment {
    color: #4f46e5;
}

/* 2. دفع مبلغ استمارة كاملة (form-payment-full) - Emerald Green */
.activity-item.form-payment-full {
    background-color: rgba(16, 185, 129, 0.06);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 6px 0;
    cursor: pointer;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.activity-item.form-payment-full:hover {
    background-color: rgba(16, 185, 129, 0.12);
    transform: translateX(-4px);
}
.activity-icon.form-payment-full {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.activity-amount.form-payment-full {
    color: #10b981;
}

/* 3. دفع مبلغ استمارة جزئية (form-payment-partial) - Amber Orange */
.activity-item.form-payment-partial {
    background-color: rgba(245, 158, 11, 0.06);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 6px 0;
    cursor: pointer;
    border: 1px dashed rgba(245, 158, 11, 0.3);
}
.activity-item.form-payment-partial:hover {
    background-color: rgba(245, 158, 11, 0.12);
    transform: translateX(-4px);
}
.activity-icon.form-payment-partial {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.activity-amount.form-payment-partial {
    color: #f59e0b;
}

/* 4. سحب مال من الخزينة (withdrawal) - Rose Red */
.activity-item.withdrawal {
    background-color: rgba(244, 63, 94, 0.06);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 6px 0;
    border: 1px dashed rgba(244, 63, 94, 0.3);
}
.activity-item.withdrawal:hover {
    background-color: rgba(244, 63, 94, 0.12);
    transform: translateX(-4px);
}
.activity-icon.withdrawal {
    background-color: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
}
.activity-amount.withdrawal {
    color: #f43f5e;
}

/* 5. إيداع عادي (deposit) - Teal Cyan */
.activity-item.deposit {
    background-color: rgba(20, 184, 166, 0.06);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 6px 0;
    border: 1px dashed rgba(20, 184, 166, 0.3);
}
.activity-item.deposit:hover {
    background-color: rgba(20, 184, 166, 0.12);
    transform: translateX(-4px);
}
.activity-icon.deposit {
    background-color: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}
.activity-amount.deposit {
    color: #14b8a6;
}

/* -------------------------------------------------------------
   15. Debtor Management UI Styles
   ------------------------------------------------------------- */
.debtors-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    max-height: 600px;
    overflow-y: auto;
}

.debtor-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.debtor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.debtor-card.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.debtor-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.debtor-card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.debtor-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.debtor-card-phone {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.debtor-card-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.debtor-card-balance {
    font-size: 16px;
    font-weight: 800;
    direction: ltr;
}

.debtor-card-balance.outstanding {
    color: var(--danger);
}

.debtor-card-balance.settled {
    color: var(--success);
}

.debtor-card-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

.debtor-card-badge.outstanding {
    background-color: var(--danger-light);
    color: var(--danger);
}

.debtor-card-badge.settled {
    background-color: var(--success-light);
    color: var(--success);
}

.debtor-card-actions {
    display: flex;
    gap: 6px;
}

.debtor-card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.debtor-card-action-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.debtor-card-action-btn.btn-delete:hover {
    background-color: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* ===== SEARCH BAR INSIDE PANEL (GLOBAL) ===== */
.panel-search-bar {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.01);
}
body.dark-theme .panel-search-bar {
    background: rgba(255,255,255,0.01);
}
.panel-search-inner {
    display: flex;
    gap: 8px;
    align-items: center;
}
.panel-search-input-wrap {
    position: relative;
    flex: 1;
}
.panel-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}
.panel-search-input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}
.panel-search-input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.panel-search-btn {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}
.panel-search-btn:hover {
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
    transform: translateY(-1px);
}
.panel-search-clear {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.panel-search-clear:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
}
.panel-results-info {
    padding: 6px 20px 8px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    display: none;
}
.panel-results-info.visible { display: block; }
.panel-results-info span { color: var(--primary); font-weight: 700; }

/* ===== LOGOUT BUTTON STYLING ===== */
.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.logout-btn:hover {
    color: var(--danger);
    background-color: var(--danger-light);
    transform: scale(1.05);
}

/* ===== LOGIN PAGE STYLING ===== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 90%), var(--bg-app);
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

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

.login-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.login-header h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.password-toggle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

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

.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.login-remember input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.login-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
}

.login-theme-toggle .theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    box-shadow: none;
}

/* -------------------------------------------------------------
   Users Card Grid Design & UI Enhancements
   ------------------------------------------------------------- */
.users-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    padding: 0 !important; /* reset default padding */
}

.user-profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.user-profile-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* User Card Status Badge overlay */
.user-card-status-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-card-status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.user-card-status-badge.suspended {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* User Card Header */
.user-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.user-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
    border: 3px solid var(--bg-card);
}

.user-card-fullname {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.user-card-username {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: monospace;
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* User Card Body */
.user-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.user-card-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.user-card-info-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-card-info-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* Card Role Badge customization */
.user-card-role-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Allowed Pages Progress Bar */
.user-card-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.user-card-progress-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.user-card-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

/* Active Permission List Mini Tags */
.user-card-perms-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    max-height: 80px;
    overflow-y: auto;
    padding-right: 2px;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
}

.user-card-perm-tag {
    font-size: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 3px;
}

.user-card-perm-tag.enabled {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.15);
}

/* User Card Footer Actions */
.user-card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.user-card-btn-edit {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.user-card-btn-edit:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border-color: var(--primary);
}

.user-card-btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.user-card-btn-delete:hover {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}
