:root {
    --primary-color: var(--dynamic-primary, #f8445c);
    --primary-rgb: var(--dynamic-primary-rgb, 248, 68, 92);
    --bg-color: #f9fafb;
    --surface-color: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(var(--primary-rgb), 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(245, 158, 11, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

@keyframes ripple {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.shadow-soft {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-up {
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Form Elements */
input,
select,
textarea {
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 68, 92, 0.1);
}

/* Primary Color Utilities */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: #d63349 !important;
    border-color: #d63349 !important;
}

.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* RTL Helpers */
.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* =========================================
   Unified Component Styles (Member Panel)
   ========================================= */

/* --- Tab Navigation (Pill Style) --- */
.tab-btn {
    position: relative;
    padding: 0.625rem 1.25rem;
    /* px-5 py-2.5 */
    border-radius: 1rem;
    /* rounded-2xl */
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 700;
    /* font-bold */
    border: 1px solid transparent;
    /* border border-transparent */
    transition: all 0.3s ease;
    /* transition-all */
    white-space: nowrap;
    /* whitespace-nowrap */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
    /* Default State */
    background-color: white;
    /* bg-white */
    color: #6b7280;
    /* text-gray-500 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* shadow-sm */
    cursor: pointer;
}

.tab-btn:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* hover:shadow-md */
}

.dark .tab-btn {
    background-color: #1f2937;
    /* dark:bg-gray-800 */
    color: #9ca3af;
    /* dark:text-gray-400 */
}

.tab-btn.active {
    background-color: rgb(var(--primary-rgb));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.dark .tab-btn.active {
    background-color: rgb(var(--primary-rgb));
    color: white;
}

.tab-btn.active i,
.tab-btn.active .tab-indicator {
    color: rgba(255, 255, 255, 0.9);
    background-color: white;
}

/* --- Standard Card Item --- */
.card-item {
    background-color: white;
    /* bg-white */
    border-radius: 1.5rem;
    /* rounded-3xl */
    padding: 1.25rem;
    /* p-5 */
    border: 1px solid #f3f4f6;
    /* border-gray-100 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* shadow-sm */
    transition: all 0.3s ease;
    /* transition-all duration-300 */
}

.dark .card-item {
    background-color: #1f2937;
    /* dark:bg-gray-800 */
    border-color: #374151;
    /* dark:border-gray-700 */
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* hover:shadow-md */
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    /* text-center */
    padding-top: 3rem;
    /* py-12 */
    padding-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    /* animate-fade-in/slide-up */
}

.empty-state-icon {
    width: 5rem;
    /* w-20 */
    height: 5rem;
    /* h-20 */
    background-color: #f9fafb;
    /* bg-gray-50 */
    border-radius: 9999px;
    /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    /* text-4xl */
    color: #e5e7eb;
    /* text-gray-200 */
    margin-bottom: 1rem;
    /* mb-4 */
}

.dark .empty-state-icon {
    background-color: rgba(31, 41, 55, 0.5);
    /* dark:bg-gray-800/50 */
    color: #374151;
    /* dark:text-gray-700 */
}

.empty-state-title {
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 900;
    /* font-black */
    color: #1f2937;
    /* text-gray-800 */
    margin-bottom: 0.5rem;
    /* mb-2 */
}

.dark .empty-state-title {
    color: white;
    /* dark:text-white */
}

.empty-state-text {
    color: #9ca3af;
    /* text-gray-400 */
    font-size: 0.875rem;
    /* text-sm */
    max-width: 20rem;
    /* max-w-xs */
    line-height: 1.625;
    /* leading-relaxed */
}

.dark .empty-state-text {
    color: #6b7280;
    /* dark:text-gray-500 */
}