body.pnd-login-page {
    background-color: #f0f4f8;
}

.pnd-login-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.pnd-login-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    border-top: 5px solid #0a2d5d; /* Navy Blue */
}

.pnd-login-container h2 {
    color: #0a2d5d; /* Navy Blue */
    margin-bottom: 25px;
    font-weight: 700;
}

.pnd-login-container .form-control {
    border-radius: 4px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease-in-out;
}

.pnd-login-container .form-control:focus {
    border-color: #0a2d5d;
    box-shadow: 0 0 0 0.2rem rgba(10, 45, 93, 0.25);
}

.pnd-login-container .btn-primary {
    background-color: #0a2d5d;
    border-color: #0a2d5d;
    padding: 10px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background-color 0.3s;
}

.pnd-login-container .btn-primary:hover {
    background-color: #08244b;
    border-color: #08244b;
}

#pnd-login-message {
    margin-top: 15px;
    font-size: 14px;
}

/*--------------------------------------------------------------
# Frontend Dashboard & Single Record Styles
--------------------------------------------------------------*/
.pnd-frontend-page .pnd-dashboard-container,
.pnd-frontend-page .pnd-single-record-container {
    padding-top: 30px;
    padding-bottom: 30px;
}

.pnd-image-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: .25rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
}
.pnd-image-gallery-item img {
    transition: transform .3s ease;
}
.pnd-image-gallery-item:hover img {
    transform: scale(1.05);
}
.pnd-image-gallery-item .btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity .3s ease;
}
.pnd-image-gallery-item:hover .btn {
    opacity: 1;
}

/* RTL Specific Styles */
[dir="rtl"] .pnd-login-container,
[dir="rtl"] .pnd-dashboard-container,
[dir="rtl"] .pnd-single-record-container {
    text-align: right;
}

[dir="rtl"] .pnd-image-gallery-item .btn {
    right: auto;
    left: 10px;
}

[dir="rtl"] .pnd-login-container .form-control {
    text-align: right;
}

.pnd-frontend-page .wd-page-title {
    display: none !important;
}

.pnd-card-header {
    background-color: #0a2d5d !important; /* Navy Blue */
}

.pnd-card-header h2,
.pnd-card-header h5 {
    color: #ffffff !important;
}

.pnd-dashboard-container .table thead.thead-dark th {
    background-color: #0a2d5d;
    border-color: #0a2d5d;
    color: #ffffff;
    vertical-align: middle;
    text-align: center;
}

.pnd-pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.pnd-pagination .page-numbers.dots {
    border: none;
    background: none;
    padding: 8px 4px;
}

/* استایل برای pagination به صورت لیست */
.pnd-pagination ul.page-numbers {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.pnd-pagination ul.page-numbers li {
    margin: 0;
}

.pnd-pagination ul.page-numbers li a,
.pnd-pagination ul.page-numbers li span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    color: #0a2d5d;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 45px;
    text-align: center;
}

.pnd-pagination ul.page-numbers li a:hover {
    background-color: #0a2d5d;
    color: #ffffff;
    border-color: #0a2d5d;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(10, 45, 93, 0.2);
}

.pnd-pagination ul.page-numbers li span.current {
    background-color: #0a2d5d;
    color: #ffffff;
    border-color: #0a2d5d;
    font-weight: 700;
}

.pnd-pagination ul.page-numbers li .dots {
    border: none;
    background: none;
    padding: 10px 5px;
}

.pnd-pagination ul.page-numbers li a .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* استایل برای دکمه‌های قبلی و بعدی */
.pnd-pagination ul.page-numbers li:first-child a,
.pnd-pagination ul.page-numbers li:last-child a {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 576px) {
    .pnd-pagination ul.page-numbers li a,
    .pnd-pagination ul.page-numbers li span {
        padding: 8px 12px;
        min-width: 40px;
        font-size: 14px;
    }
}

.pnd-dashboard-container .table tbody td {
    text-align: center;
    vertical-align: middle;
}

.pnd-image-gallery-frontend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.pnd-image-gallery-frontend .pnd-image-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.pnd-image-gallery-frontend .pnd-image-item a:first-of-type {
    flex-grow: 1; /* Allows image link to fill space */
}

.pnd-image-gallery-frontend .pnd-image-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.pnd-image-gallery-frontend .pnd-image-item:hover img {
    transform: scale(1.05);
}

.pnd-image-gallery-frontend .pnd-image-item .btn {
    width: 100%;
    border-radius: 0;
    border: none;
    margin-top: auto; /* Pushes button to the bottom */
}

/* Tablet & Mobile: Button is always visible */
@media (max-width: 991px) {
    .pnd-image-gallery-frontend .pnd-image-item .btn {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop: Button appears on hover */
@media (min-width: 992px) {
    .pnd-image-gallery-frontend .pnd-image-item .btn {
        position: absolute;
        bottom: 10px;
        right: 10px;
        width: auto;
        border-radius: .25rem;
        opacity: 0;
        transition: opacity .3s ease, transform .3s ease;
        transform: translateY(10px);
    }

    .pnd-image-gallery-frontend .pnd-image-item:hover .btn {
        opacity: 1;
        transform: translateY(0);
    }

    [dir="rtl"] .pnd-image-gallery-frontend .pnd-image-item .btn {
        right: auto;
        left: 10px;
    }
}

/* Frontend File Gallery */
.pnd-file-gallery-frontend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.pnd-file-gallery-frontend .pnd-file-item {
    border: 2px dashed #72aee6; /* Light Navy Blue */
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-all;
    text-decoration: none;
    transition: background-color 0.3s, border-color 0.3s;
}

.pnd-file-gallery-frontend .pnd-file-item:hover {
    background-color: #f0f4f8;
    border-color: #0a2d5d;
}

.pnd-file-gallery-frontend .pnd-file-item .pnd-file-name {
    font-weight: bold;
    color: #0a2d5d; /* Navy Blue */
    font-size: 16px;
    margin-bottom: 5px;
}

.pnd-file-gallery-frontend .pnd-file-item .pnd-file-ext {
    font-size: 12px;
    color: #5578a4; /* Lighter Navy Blue */
    margin-bottom: 15px;
}

.pnd-file-gallery-frontend .pnd-file-item .pnd-file-download-icon {
    font-size: 24px;
    color: #0a2d5d;
}

/* New Main Header Styles */
.pnd-main-header {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 5px solid #0a2d5d;
}

.pnd-header-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pnd-header-item .dashicons {
    font-size: 36px;
    color: #0a2d5d;
}

.pnd-header-text {
    display: flex;
    flex-direction: column;
}

.pnd-header-text small {
    color: #5578a4;
    font-size: 14px;
}

.pnd-header-text strong {
    color: #0a2d5d;
    font-size: 20px;
    font-weight: 700;
}

/* Dashboard Header Styles */
.pnd-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.pnd-dashboard-title {
    margin-bottom: 0;
}

.pnd-dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
}

.pnd-dashboard-user-info .user-name {
    font-weight: bold;
}

/* Profile Warning & Form Styles */
.pnd-profile-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-right: 5px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
[dir="rtl"] .pnd-profile-warning {
    border-right: none;
    border-left: 5px solid #ffc107;
}
.pnd-profile-warning .dashicons {
    font-size: 28px;
    color: #856404;
}
.pnd-profile-warning .pnd-warning-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.pnd-profile-warning .pnd-warning-text strong {
    color: #856404;
}
.pnd-profile-warning .pnd-warning-text span {
    font-size: 14px;
    color: #856404;
}

.pnd-profile-form {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
}

#pnd-profile-message.pnd-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    padding: .75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}

#pnd-profile-message.pnd-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: .75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}

#pnd-login-form button[type="submit"] {
    color: #fff;
}

#pnd_mobile {
    text-align: left;
    direction: ltr;
}

/*--------------------------------------------------------------
# User Profile Header Shortcode
--------------------------------------------------------------*/
.pnd-user-profile-header {
    position: relative;
    display: inline-block;
}

.pnd-login-button {
    background-color: #f0f4f8;
    color: #0a2d5d;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.pnd-login-button:hover {
    background-color: #e1e8f0;
    color: #0a2d5d;
}

.pnd-login-text-short {
    display: none;
}

/* Responsive styles for login button */
@media (max-width: 768px) {
    .pnd-login-text-full {
        display: none;
    }
    .pnd-login-text-short {
        display: inline;
    }
}

.pnd-user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    background-color: #f0f4f8;
    padding: 6px 12px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.pnd-user-info:hover {
    background-color: #e1e8f0;
    text-decoration: none;
    color: inherit;
}

.pnd-user-info .fa-user {
    font-size: 18px;
    color: #0a2d5d;
    margin-right: 8px;
}
[dir="rtl"] .pnd-user-info .fa-user {
    margin-right: 0;
    margin-left: 8px;
    order: 1; /* This will visually move it to the right of the name */
}


.pnd-user-info span {
    font-weight: 600;
    color: #0a2d5d;
    font-size: 14px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[dir="rtl"] .pnd-user-info span {
    order: 2;
}

/* Mobile styles for user profile header */
@media (max-width: 768px) {
    .pnd-user-info {
        padding: 6px 12px;
        border-radius: 10px;
    }
    
    .pnd-user-info span {
        font-size: 13px;
        max-width: 150px;
    }
    
    .pnd-user-info .fa-user {
        display: none !important;
        margin: 0 !important;
    }
}

.pnd-user-info .fa-chevron-down {
    font-size: 14px;
    color: #0a2d5d;
    margin-right: 5px;
    transition: transform 0.3s ease;
}

[dir="rtl"] .pnd-user-info .fa-chevron-down {
    margin-right: 0;
    margin-left: 5px;
    order: 3;
}

.pnd-user-profile-header.open .pnd-user-info .fa-chevron-down {
    transform: rotate(180deg);
}

.pnd-user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    border: 1px solid #e1e8f0;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
}

/* Position dropdown on the right for RTL on larger screens */
@media (min-width: 769px) {
    [dir="rtl"] .pnd-user-dropdown {
        left: auto;
        right: 0;
    }
}


.pnd-user-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e1e8f0;
    text-align: right;
}

.pnd-user-dropdown a:last-child {
    border-bottom: none;
}

.pnd-user-dropdown a:hover {
    background-color: #f0f4f8;
    color: #0a2d5d;
} 