
/*----------------------------------------PanelPage css----------------------------------------*/

.user-panel-menu{
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.user-panel-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-mobile{
    font-weight: 800;
    font-size: 15px;
    color: #111827;
}

.user-edit-btn{
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    transition: 0.2s;
}

.user-edit-btn:hover{
    background: #eff6ff;
    border-color: #bfdbfe;
}

.user-panel-divider{
    margin: 14px 0 12px;
    border-color: #e5e7eb;
}

.user-panel-links{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-panel-link{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: #111827;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
    border: 1px solid transparent;
}

.user-panel-link .menu-icon{
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.user-panel-link:hover{
    background: #f9fafb;
    border-color: #e5e7eb;
}

.user-panel-link.active{
    background: #fff1f2;
    border-color: #fecdd3;
    color: #b91c1c;
}

.user-panel-link.active .menu-icon{
    color: #dc2626 !important;
}

.user-panel-link.logout:hover{
    background: #fff1f2;
    border-color: #fecdd3;
}

/* --- Mobile menu toggle button --- */
.user-menu-toggle-btn{
    border: none;
    background: transparent;
    font-weight: 900;
    font-size: 13px;
    color: #111827;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;

    border: 1px solid #c1c1c1;
    padding: 10px 10px;
    width: fit-content;

    position: sticky;
    top: 0;
    z-index: 20;

    backdrop-filter: blur(6px);
}

/* آیکون پیکان سمت چپ */
.user-menu-toggle-btn i{
    font-size: 16px;
    color: #2563eb;
}

.user-panel-content{
    position: relative;
    padding-top: 6px;
}

/* --- Mobile offcanvas behavior --- */
@media (max-width: 991.98px){

    /* منوی سمت راست تبدیل به پنل ثابت میشه */
    #userPanelMenu{
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 85%;
        max-width: 360px;
        z-index: 99999;

        transform: translateX(110%);
        transition: 0.25s ease;

        border-radius: 0;
        overflow-y: auto;
        padding-top: 10px;
    }

    /* وقتی باز شد */
    #userPanelMenu.open{
        transform: translateX(0);
    }

    /* هدر موبایل داخل منو */
    .user-panel-mobile-header{
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 12px 10px;
        margin-bottom: 6px;
    }

    .mobile-menu-title{
        font-weight: 900;
        font-size: 14px;
        color: #111827;
    }

    .mobile-menu-close{
        width: 42px;
        height: 42px;
        border-radius: 14px;
        border: 1px solid #eba09d;
        background: #f9fafb;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #111827;
    }

    /* بک‌دراپ */
    .user-panel-backdrop{
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 99998;
        opacity: 0;
        visibility: hidden;
        transition: 0.25s ease;
    }

    .user-panel-backdrop.show{
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 991.98px){
    .col-12.col-lg-8{
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    .col-12.col-lg-4{
        margin-top: 0 !important;
    }

    .user-menu-toggle-btn{
        margin-top: 0 !important;
    }
}

/* ===========================
   LEFT CONTENT - USER ACCOUNT
=========================== */

.user-panel-content-box{
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.user-panel-content-title{
    font-size: 20px;
    font-weight: 900;
    color: #111827;
    margin-bottom: 18px;
}

.user-account-form .form-label{
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.user-account-form .form-control{
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: 0.2s ease;
}

.user-account-form .form-control:focus{
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.15);
}

.user-save-btn{
    border-radius: 16px !important;
    font-size: 16px;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
    transition: 0.2s ease;
}

.user-save-btn:hover{
    transform: translateY(-2px);
}

/* Placeholder style */
.user-account-form .form-control::placeholder{
    color: #9ca3af;   /* کمرنگ */
    font-size: 14px;  /* ریزتر */
    font-weight: 400;
}

.is-invalid {
    border: 2px solid #ff6b6b !important;
    background-color: #ffecec !important;
}

.custom-switch:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}
.bg-light { background-color: #f8f9fa !important; }
.form-control:disabled { background-color: #e9ecef; cursor: not-allowed; }

/*----------------------------------------DashboardPage css----------------------------------------*/

/* Dashboard Styles */
.dashboard-wrapper {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

/* Header */
.dashboard-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3436;
    position: relative;
    padding-right: 15px;
}

.dashboard-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.dashboard-date {
    font-size: 0.9rem;
    margin-right: 15px;
}

/* Welcome Card */
.welcome-card {
    border-radius: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.welcome-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50%;
    z-index: 0;
}

.avatar-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.avatar-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.welcome-title {
    font-size: 1.2rem;
    color: #2d3436;
}

.welcome-badges .badge {
    padding: 6px 12px;
    font-weight: 500;
    margin-left: 8px;
}

.account-status-card {
    background: linear-gradient(135deg, #f1f3f5 0%, #ffffff 100%);
    border: 1px solid rgba(0,0,0,0.05);
}

/* Stats Cards */
.stat-card {
    border-radius: 16px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 3px 30px rgba(0,0,0,0.1) !important;
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-icon-wrapper i {
    font-size: 1.8rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3436;
}

.stat-change {
    display: inline-block;
    margin-right: 5px;
}

/* Order Status */
.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-processing {
    background-color: rgba(255, 193, 7, 0.1);
    color: #f39c12;
}

.status-delivered {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-shipped {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

/* Activity Feed */
.activity-feed {
    max-height: 300px;
    overflow-y: auto;
    padding-left: 5px;
}

.activity-feed::-webkit-scrollbar {
    width: 4px;
}

.activity-feed::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.activity-feed::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.activity-item {
    position: relative;
    padding-right: 15px;
}

.activity-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.2;
}

.activity-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-icon i {
    font-size: 1.2rem;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.quick-action-item {
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 12px;
}

.quick-action-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
}

.quick-action-item:hover .quick-action-icon {
    transform: scale(1.1);
}

.quick-action-icon i {
    font-size: 1.5rem;
}

.quick-action-item span {
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Offers */
.offer-item {
    transition: all 0.3s ease;
}

.offer-item:hover {
    background-color: #f8f9fa;
    padding: 5px;
    border-radius: 8px;
}

.offer-item img {
    border: 1px solid #e9ecef;
}

/* Table */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
    border-bottom-width: 2px;
}

.table tbody td {
    vertical-align: middle;
    padding: 12px 8px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-wrapper {
        padding: 15px;
    }

    .dashboard-title {
        font-size: 1.3rem;
    }

    .avatar-circle {
        width: 50px;
        height: 50px;
    }

    .avatar-text {
        font-size: 1.1rem;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-icon-wrapper {
        width: 40px;
        height: 40px;
    }

    .stat-icon-wrapper i {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .welcome-card .row > div:first-child {
        margin-bottom: 15px;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .quick-action-item {
        display: flex;
        align-items: center;
        text-align: right;
    }

    .quick-action-icon {
        margin: 0 0 0 15px;
    }

    .table {
        font-size: 0.85rem;
    }

    .table td, .table th {
        padding: 8px 5px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .activity-item, .offer-item {
    animation: slideIn 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Messages Styles */
.messages-list {
    max-height: 400px;
    overflow-y: auto;
    padding-left: 5px;
}

.messages-list::-webkit-scrollbar {
    width: 4px;
}

.messages-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.messages-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.message-item {
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 12px;
}

.message-item:hover {
    background-color: #f8f9fa;
    transform: translateX(-5px);
}

.message-avatar {
    flex-shrink: 0;
}

.avatar-circle-message {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.avatar-circle-message i {
    font-size: 1.3rem;
}

.message-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3436;
}

.message-content p {
    font-size: 0.85rem;
    line-height: 1.5;
}

.message-content .badge {
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Responsive for Messages */
@media (max-width: 576px) {
    .message-item {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .message-avatar {
        margin-bottom: 10px;
        margin-left: 0 !important;
    }

    .message-content h6 {
        font-size: 0.9rem;
    }

    .message-content p {
        font-size: 0.8rem;
    }
}

/* Animation for messages */
.message-item {
    animation: slideInMessage 0.5s ease forwards;
    opacity: 0;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-item:nth-child(1) { animation-delay: 0.1s; }
.message-item:nth-child(2) { animation-delay: 0.2s; }
.message-item:nth-child(3) { animation-delay: 0.3s; }
.message-item:nth-child(4) { animation-delay: 0.4s; }