body {
    overflow: auto;
    background-color: rgba(248, 247, 247, 1);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: #fff;
    box-shadow: 0px 14px 10px rgba(8, 15, 52, 0.06);
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar .logo img {
    max-width: 152px;
    height: auto;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 0.8rem;
}

.sidebar ul li a {
    color: rgba(39, 58, 65, 1);
    text-decoration: none;
    font-size: 16px;
    padding: .7rem;
}

.sidebar ul li.active a {
    color: #b7924f !important;
    font-weight: bold;
}

.sidebar ul li a:hover {
    color: #b7924f;
}

.sidebar .nav-link.active {
    color: #b7924f;
}

.sidebar .icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease-in-out;
}

.sidebar ul li.active .icon,
.sidebar ul li:hover .icon {
    filter: brightness(0) saturate(100%) invert(64%) sepia(29%) saturate(343%) hue-rotate(8deg) brightness(95%) contrast(90%);
    transform: scale(1.05);
}

.sidebar .nav-item:hover {
    background-color: rgba(249, 248, 244, 1);
    border-radius: 8px;
}

.sidebar .nav-item.active {
    background-color: rgba(249, 248, 244, 1);
    border-radius: 8px;
}

/* Close Button */
.sidebar-close {
    display: none;
    position: absolute;
    top: 2%;
    left: 0;
    font-size: 2rem;
    color: black;
}

/* custom container */

.custom-container {
    padding: 0 20rem 0 0;
}

/* navbar */
.search-bar {
    padding-right: 1rem;
    width: 100%;
}

.search-bar input {
    background-color: rgba(39, 58, 65, 0.05);
    border: none;
    padding: .7rem;
}

.search-bar input::placeholder {
    color: rgba(156, 156, 156, 1);
    font-size: 14px;
    padding: .5rem;
}

.search-bar input {
    background-color: #f7f7f7;
    border: none;
    padding-right: 2.5rem;
}

.search-bar input:focus {
    box-shadow: none;
    background-color: #f7f7f7;
}

.search-bar i {
    color: rgba(158, 158, 158, 1);
    font-size: 16px;
}

/* Content */
.content {
    margin-right: 270px;
    padding: 1rem 3rem;
    transition: margin-left 0.3s ease-in-out;
}



/* Responsive Sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0%);
    }

    .sidebar-close {
        display: block;
    }

    .content {
        margin-right: 0 !important;
        padding: .5rem;
    }

    .custom-container {
        padding: 0;
    }

    .search-bar {
        width: 100%;
    }
}

/* content */

.payment-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.profile-sidebar {
    background: white;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    font-size: 18px;
    text-align: end;
}


.nav-link.active {
    font-weight: bold;
    color: #a27c2a;
}


.profile-sidebar .nav-link {
    padding: 1rem;
    max-width: 100%;
}

.profile-sidebar .nav-link.active {
    color: rgba(211, 171, 85, 1) !important;
    font-weight: bold;
}

.btn-custom {
    background-color: rgba(211, 171, 85, 1);
    color: rgba(248, 247, 247, 1);
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    width: 25%;
}

.btn-custom:hover {
    background-color: rgb(211, 160, 51);
    color: rgba(248, 247, 247, 1);
}


.balance-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    text-align: start;
    height: 100%;
}

/* Table */
.user-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.active-status p {
    background-color: rgba(23, 89, 65, 0.2);
    color: rgba(23, 89, 65, 1);
    border-radius: 16px;
    padding: .5rem;
}

/* Ensure table cells don't wrap unnecessarily */
.table th,
.table td {
    white-space: nowrap;
}

.table td,
.table th {
    padding: 1.2rem;
}

.table th {
    color: rgba(63, 63, 63, 1);
    font-size: 10px;
}

.table {
    border-radius: 12px !important;
}


.btn i {
    font-size: 1.2rem;
}

@media (max-width: 767.98px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .programmes-table {
        font-size: 14px;
    }

    .pagination-controls select {
        width: 80px;
    }
}

.modal-body input::placeholder {
    color: rgba(123, 123, 123, 0.5);
    font-size: 16px;
    font-weight: 400;
    text-align: right;
}

.modal-body input[type="text"] {
    padding: 1rem;
    border-radius: 10px;
}

.modal-body label {
    margin-bottom: 1rem;
}

.modal-body input::placeholder {
    color: rgba(123, 123, 123, 0.5);
    font-size: 16px;
    font-weight: 400;
    text-align: right;
}

.image-upload-container {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.image-upload-container:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.premium-card {
    border: 2px solid transparent;
    background-clip: padding-box;
}

.golden-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700, #ffed4e);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: shimmer 3s infinite;
}

.image-upload-container:hover .golden-border {
    opacity: 0.7;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.card-preview {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.image-upload-container:hover .card-preview {
    border-color: rgba(13, 110, 253, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.upload-overlay {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(108, 117, 125, 0.9) 100%);
    border-radius: 15px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.premium-overlay {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.95) 0%, rgba(111, 66, 193, 0.95) 100%);
}

.premium-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    transition: all 0.3s ease;
}

.premium-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3) !important;
}

.btn-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-premium:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.drag-drop-zone {
    border: 2px dashed transparent;
    transition: all 0.3s ease;
}

.drag-drop-zone.drag-over {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.02);
}

.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.95) 0%, rgba(111, 66, 193, 0.95) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(15px);
}

.premium-drag {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95) 0%, rgba(13, 110, 253, 0.95) 100%);
}

.upload-icon-container {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.upload-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* أنيميشن للأزرار */
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* تصميم بطاقات المعلومات */
.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tiny {
    font-size: 0.7rem;
}

/* تأثيرات الرسائل */
.toast {
    animation: slideInFromTop 0.5s ease-out;
}

@keyframes slideInFromTop {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* تحسين مظهر المودال */
.modal-content {
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 32px 32px 0 0 !important;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.card-preview img {
    transition: all 0.3s ease;
}

/* أنيميشن ظهور الصورة */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-uploaded {
    animation: fadeInScale 0.5s ease-out;
}

/* تأثيرات الحدود الذهبية */
.golden-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700, #ffed4e);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: shimmer-gold 3s infinite;
}

.image-upload-container:hover .golden-border {
    opacity: 0.7;
}

@keyframes shimmer-gold {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* رسائل التنبيه المنزلقة */
.upload-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideInFromRight 0.5s ease-out;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: none;
}

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

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .image-upload-container {
        margin: 0 auto;
    }
    
    .card-preview {
        max-width: 250px !important;
        min-height: 150px !important;
    }
    
    #imageControls .btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .upload-alert {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .card-preview {
        max-width: 200px !important;
        min-height: 120px !important;
    }
    
    .upload-overlay p {
        font-size: 14px;
    }
    
    .upload-overlay small {
        font-size: 12px;
    }
}

/* ===== تأثيرات البطاقة المعروضة ===== */

.bank-card:hover .card-overlay {
    opacity: 1 !important;
}

.bank-card:hover #displayedCardImage {
    transform: scale(1.02);
    filter: brightness(0.8);
}

.card-overlay {
    border-radius: 20px;
}

.card-overlay:hover {
    background: rgba(0,0,0,0.8) !important;
}

/* تأثير النبض للأيقونة */
.card-overlay i {
    animation: pulse-edit 2s infinite;
}

@keyframes pulse-edit {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* تحسين مظهر البطاقة */
.bank-card {
    transition: all 0.3s ease;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===== أنيميشن التحديث ===== */

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* تحسين أزرار التحكم */
#imageControlButtons {
    opacity: 0;
    transition: all 0.3s ease;
}

.bank-card:hover #imageControlButtons {
    opacity: 1;
}

#imageControlButtons .btn {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#imageControlButtons .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}