.center {
    display: flex;
    align-items: center;
    justify-content: center;
}


.center-card {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 180px;
    /* ارتفاع ثابت */
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    color: #111;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.center-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 24px 24px 0 0;
}

.center-card.animate {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-title {
    margin: 0;
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-text {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4a5568;
    font-style: italic;
    position: relative;
    padding-left: 20px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* محدود کردن به 3 خط */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.testimonial-text::before {
    content: "❝";
    position: absolute;
    left: 0;
    top: -3px;
    font-size: 20px;
    color: #667eea;
    opacity: 0.6;
}

.rating {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    flex-shrink: 0;
}

.star {
    color: #fbbf24;
    font-size: 16px;
}

.orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(106, 105, 105, 0.15);
    border-radius: 9999px;
    box-sizing: border-box;
    z-index: 5;
}

.orbit1 {
    width: 700px;
    height: 330px;
}

.orbit2 {
    width: 880px;
    height: 480px;
}

/* سیاره‌ها */
.planet {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(4px);
    cursor: pointer;
    will-change: transform;
    z-index: 10;
    border: 2px solid transparent;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.planet:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow:
        0 12px 25px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.planet.active {
    border: 2px solid #667eea;
    box-shadow:
        0 0 0 4px rgba(102, 126, 234, 0.2),
        0 15px 30px rgba(102, 126, 234, 0.3);
}

.planet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* افکت انیمیشن برای clone */
.fly-to-center {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    z-index: 15;
    pointer-events: none;
    animation: flyToCenter 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

@keyframes flyToCenter {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
        filter: blur(0);
    }

    50% {
        filter: blur(2px);
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(3.5);
        opacity: 0;
        filter: blur(4px);
    }
}

/* استایل‌های ریسپانسیو برای بخش نظرات و گالری تصاویر */

/* ========== بخش نظرات ========== */
@media (max-width: 1023px) {

    /* مخفی کردن مدارها و سیاره‌ها در موبایل و تبلت */
    .orbit1,
    .orbit2,
    .planet {
        display: none !important;
    }

    /* تنظیمات برای wrapper در موبایل */
    #wrapper {
        min-height: 400px !important;
        height: 400px !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* تنظیمات کارت مرکزی در موبایل */
    .center-card {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 90% !important;
        max-width: 400px !important;
        margin: 0 auto;
        height: auto !important;
        min-height: 280px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    /* بهبود کارت در موبایل */
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .user-avatar {
        width: 60px !important;
        height: 60px !important;
    }

    .user-name {
        font-size: 18px;
    }

    .testimonial-text {
        -webkit-line-clamp: 5 !important;
        line-clamp: 5 !important;
        padding-left: 0;
        text-align: center;
    }

    .testimonial-text::before {
        display: none;
    }

    .rating {
        justify-content: center;
        margin-top: 15px;
    }
}

/* در دسکتاپ (1024px به بالا) */
@media (min-width: 1024px) {

    /* نمایش مدار و سیاره‌ها */
    .orbit1,
    .orbit2,
    .planet {
        display: block !important;
    }

    /* بازگرداندن موقعیت اصلی کارت */
    .center-card {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 320px !important;
        height: 180px !important;
    }

    .testimonial-text {
        -webkit-line-clamp: 3 !important;
        line-clamp: 3 !important;
        padding-left: 20px;
    }

    .testimonial-text::before {
        display: block;
    }

    .card-header {
        flex-direction: row;
        text-align: right;
    }
}

/* ========== بخش گالری تصاویر ========== */
@media (max-width: 768px) {

    /* بهبود تایتل گالری */
    section.flex.flex-col.gap-6 h2 {
        font-size: 1.5rem !important;
        line-height: 1.4;
    }

    /* تبدیل گالری به اسلایدر افقی */
    section.flex.flex-col.gap-6 .w-full.flex.flex-wrap {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: thin;
        scrollbar-color: #3b82f6 #f1f1f1;
        padding-bottom: 10px;
        gap: 12px !important;
        -webkit-overflow-scrolling: touch;
    }

    /* حذف گردی کامل برای نمایش بهتر */
    section.flex.flex-col.gap-6 .rounded-full {
        border-radius: 12px !important;
        flex: 0 0 auto !important;
        width: 160px !important;
        height: 120px !important;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    /* افکت هنگام hover در موبایل */
    section.flex.flex-col.gap-6 .rounded-full:hover {
        transform: scale(1.05);
    }

    /* مخفی کردن اسکرول‌بار در برخی مرورگرها */
    section.flex.flex-col.gap-6 .w-full.flex.flex-wrap::-webkit-scrollbar {
        height: 6px;
    }

    section.flex.flex-col.gap-6 .w-full.flex.flex-wrap::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    section.flex.flex-col.gap-6 .w-full.flex.flex-wrap::-webkit-scrollbar-thumb {
        background: #3b82f6;
        border-radius: 10px;
    }

    section.flex.flex-col.gap-6 .w-full.flex.flex-wrap::-webkit-scrollbar-thumb:hover {
        background: #2563eb;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {

    /* تبلت - نمایش 4 تصویر در هر ردیف */
    section.flex.flex-col.gap-6 .w-full.flex.flex-wrap {
        justify-content: center !important;
    }

    section.flex.flex-col.gap-6 .rounded-full {
        width: 180px !important;
        height: 140px !important;
        margin: 8px;
    }
}

@media (min-width: 1024px) {

    /* دسکتاپ - نمایش معمول */
    section.flex.flex-col.gap-6 .w-full.flex.flex-wrap {
        flex-wrap: wrap !important;
        overflow: visible !important;
        justify-content: center;
    }

    section.flex.flex-col.gap-6 .rounded-full {
        border-radius: 50% !important;
        width: 192px !important;
        height: 128px !important;
    }
}

/* ========== بهبود عملکرد لمسی برای موبایل ========== */
@media (max-width: 768px) {
    .planet {
        pointer-events: none;
        /* غیرفعال کردن کلیک روی سیاره‌ها در موبایل */
    }

    /* اضافه کردن دکمه‌های ناوبری برای کارت نظرات در موبایل */
    #wrapper {
        position: relative;
    }

    .testimonial-nav {
        display: flex !important;
        justify-content: space-between;
        width: 100%;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 30;
        pointer-events: none;
    }

    .testimonial-nav button {
        pointer-events: auto;
        background: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .testimonial-nav button:hover {
        background: #3b82f6;
        color: white;
    }
}

@media (min-width: 1024px) {
    .testimonial-nav {
        display: none !important;
    }
}

/* ========== انیمیشن برای تغییر نظرات در موبایل ========== */
.testimonial-fade {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== بهبود خوانایی متن‌ها در موبایل ========== */
@media (max-width: 768px) {
    .testimonial-text {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    .user-name {
        font-size: 16px !important;
    }

    .user-title {
        font-size: 14px !important;
    }
}

/* ========== اضافه کردن indicator برای گالری در موبایل ========== */
@media (max-width: 768px) {
    section.flex.flex-col.gap-6 {
        position: relative;
    }

    .gallery-indicator {
        text-align: center;
        margin-top: 10px;
        font-size: 12px;
        color: #666;
        display: block !important;
    }

    .gallery-indicator.hidden {
        display: none !important;
    }
}

/* استایل‌های دکمه‌های ناوبری کامنت */
.testimonial-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 30;
    pointer-events: none;
    padding: 0 10px;
}

.testimonial-nav-button {
    pointer-events: auto;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    color: #3b82f6;
    font-size: 20px;
    font-weight: bold;
}

.testimonial-nav-button:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.testimonial-nav-button:active {
    transform: scale(0.95);
}

.testimonial-nav-button.prev {
    right: auto;
    left: 10px;
}

.testimonial-nav-button.next {
    left: auto;
    right: 10px;
}

/* تنظیمات برای موبایل */
@media (max-width: 768px) {
    .testimonial-nav {
        padding: 0 5px;
    }

    .testimonial-nav-button {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* تنظیمات برای دسکتاپ */
@media (min-width: 1024px) {
    .testimonial-nav {
        width: 400px;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
    }

    .testimonial-nav-button.prev {
        left: -50px;
    }

    .testimonial-nav-button.next {
        right: -50px;
    }
}

/* انیمیشن برای تغییر کامنت */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.center-card.slide-left {
    animation: slideInFromLeft 0.3s ease-out;
}

.center-card.slide-right {
    animation: slideInFromRight 0.3s ease-out;
}

/* اضافه کردن شماره کامنت */
.comment-counter {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* مخفی کردن دکمه‌های ناوبری وقتی کامنت‌های کافی نداریم */
.testimonial-nav.hidden {
    display: none !important;
}

/* استایل‌های دکمه‌های ناوبری داخل کارت */
.center-card {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 180px;
    /* ارتفاع ثابت */
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    color: #111;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.center-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 24px 24px 0 0;
}

/* دکمه‌های ناوبری داخل کارت */
.nav-buttons-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.nav-button {
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #3b82f6;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #3b82f6;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    z-index: 20;
}

.nav-button:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.nav-button:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-button.prev {
    left: 8px;
}

.nav-button.next {
    right: 8px;
}

/* شماره کامنت در پایین کارت */
.comment-counter {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

/* تنظیمات برای موبایل */
@media (max-width: 768px) {
    .center-card {
        width: 90% !important;
        max-width: 320px !important;
        height: auto !important;
        min-height: 220px !important;
        padding: 16px;
    }

    .nav-button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .nav-button.prev {
        left: 5px;
    }

    .nav-button.next {
        right: 5px;
    }

    .comment-counter {
        font-size: 11px;
        padding: 3px 10px;
        bottom: -22px;
    }
}

/* تنظیمات برای تبلت */
@media (min-width: 769px) and (max-width: 1023px) {
    .center-card {
        width: 280px;
        height: 160px;
        padding: 15px;
    }

    .nav-button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .comment-counter {
        font-size: 11px;
    }
}

/* تنظیمات برای دسکتاپ */
@media (min-width: 1024px) {
    .center-card {
        width: 320px;
        height: 180px;
        padding: 20px;
    }

    .nav-button {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .nav-button.prev {
        left: 8px;
    }

    .nav-button.next {
        right: 8px;
    }
}

/* انیمیشن برای تغییر کامنت */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.center-card.slide-left .card-content {
    animation: slideInFromLeft 0.3s ease-out;
}

.center-card.slide-right .card-content {
    animation: slideInFromRight 0.3s ease-out;
}

/* محتوای کارت */
.card-content {
    position: relative;
    z-index: 5;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* استایل برای دکمه‌های غیرفعال */
.nav-button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-button.disabled:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #3b82f6;
    transform: translateY(-50%) scale(1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* بهبود نمایش کارت در موبایل */
@media (max-width: 768px) {
    .center-card {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        margin: 0 auto;
    }

    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .user-avatar {
        width: 50px !important;
        height: 50px !important;
    }

    .testimonial-text {
        -webkit-line-clamp: 4 !important;
        line-clamp: 4 !important;
        padding-left: 0;
        text-align: center;
        font-size: 13px !important;
    }

    .testimonial-text::before {
        display: none;
    }

    .rating {
        justify-content: center;
        margin-top: 10px;
    }
}

/* در دسکتاپ */
@media (min-width: 1024px) {
    .testimonial-text {
        padding-left: 20px;
    }

    .testimonial-text::before {
        display: block;
    }

    .card-header {
        flex-direction: row;
        text-align: right;
    }
}

#overlay {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#overlay.opacity-100 {
    opacity: 1;
}

/* انیمیشن برای آیکون همبرگر */
#menu-toggle.active svg path:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    transform-origin: center;
}

#menu-toggle.active svg path:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active svg path:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    transform-origin: center;
}

/* انیمیشن برای آیکون ها */
#menu-toggle svg path,
#close-menu svg path {
    transition: all 0.3s ease-in-out;
}


/* /////////////////  profile */
.sidebar-item {
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background-color: #e6f4f1;
}

.sidebar-item.active {
    background-color: #e6f4f1;
    border-right: 3px solid #1a7a6e;
}

.tag {
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
}

.drug-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
}

.nav-link {
    font-size: 14px;
    color: #374151;
}

.nav-link:hover {
    color: #1a7a6e;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.teal-header {
    background: linear-gradient(135deg, #1a7a6e 0%, #1e9a8a 100%);
}

.profile-bg {
    background: linear-gradient(135deg, #1a7a6e 0%, #0d5c52 100%);
    border-radius: 12px 12px 0 0;
}

/* Mobile styles */
@media (max-width: 768px) {
    .desktop-sidebar {
        display: none;
    }

    .desktop-breadcrumb {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .desktop-topbar {
        display: none;
    }

    .mobile-bottom-nav {
        display: flex;
    }
}

@media (min-width: 769px) {
    .mobile-header {
        display: none;
    }

    .mobile-bottom-nav {
        display: none;
    }

    .desktop-topbar {
        display: flex;
    }

    .desktop-sidebar {
        display: block;
    }

    .desktop-breadcrumb {
        display: flex;
    }
}

.exam-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: white;
}

.exam-card .read-more {
    color: #1a7a6e;
    font-size: 13px;
    cursor: pointer;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

.mobile-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

.nose-card.selected {
    border-color: #0d9488 !important;
    border-width: 2px !important;
    background: #f0fdfa !important;
}

.nose-card .badge {
    display: none;
}

.nose-card.selected .badge {
    display: block;
}

.chip.selected {
    background: #ccfbf1;
    color: #0f766e;
    border: 1.5px solid #99f6e4;
}

.upload-zone:hover {
    border-color: #0d9488;
    background: #f0fdfa;
}

.upload-zone.has-file {
    border-color: #0d9488;
    border-style: solid;
    background: #f0fdfa;
}

.drug-item {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(4rem);
    background: #0f766e;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 9999;
}

#toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.custom-check {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.custom-check.checked {
    background: #0d9488;
    border-color: #0d9488;
}

.custom-check.checked::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

input[type=file] {
    display: none;
}

.face-upload-zone {
    position: relative;
    overflow: hidden;
}

.face-upload-zone .preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.face-upload-zone .overlay-icon {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.2s;
}

.face-upload-zone:hover .overlay-icon {
    opacity: 1;
}

.sidebar-item {
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background-color: #e6f4f1;
}

.tag {
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
}

.drug-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
}

.nav-link {
    font-size: 14px;
    color: #374151;
    text-decoration: none;
}

.nav-link:hover {
    color: #1a7a6e;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.teal-header {
    background: linear-gradient(135deg, #1a7a6e 0%, #1e9a8a 100%);
}

.profile-bg {
    background: linear-gradient(135deg, #1a7a6e 0%, #0d5c52 100%);
    border-radius: 12px 12px 0 0;
}

.exam-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: white;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .profile-bg {
        border-radius: 0;
    }

    .desktop-sidebar {
        display: none !important;
    }

    .desktop-topbar {
        display: none !important;
    }

    .mobile-header {
        display: flex !important;
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

    .mobile-profile-block {
        display: flex !important;
    }

    body {
        padding-bottom: 72px;
    }
}

@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: none !important;
    }

    .mobile-profile-block {
        display: none !important;
    }

    .desktop-topbar {
        display: flex !important;
    }

    .desktop-sidebar {
        display: block !important;
    }
}

/* Hamburger drawer */
#mobile-drawer {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#mobile-drawer.open {
    transform: translateX(0);
}

#drawer-overlay {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* Bottom nav */
.mobile-bottom-nav {
    display: none;
}

.sample {

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: scale(0.97) translateY(8px);
        }

        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    @keyframes fadeOut {
        from {
            opacity: 1;
            transform: scale(1) translateY(0);
        }

        to {
            opacity: 0;
            transform: scale(0.97) translateY(8px);
        }
    }

    .modal-enter {
        animation: fadeIn 0.25s cubic-bezier(.4, 0, .2, 1) forwards;
    }

    .modal-exit {
        animation: fadeOut 0.2s cubic-bezier(.4, 0, .2, 1) forwards;
    }

    @keyframes overlayIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes overlayOut {
        from {
            opacity: 1;
        }

        to {
            opacity: 0;
        }
    }

    .overlay-enter {
        animation: overlayIn 0.22s ease forwards;
    }

    .overlay-exit {
        animation: overlayOut 0.2s ease forwards;
    }

    /* Card hover */
    .portfolio-card {
        transition: box-shadow 0.28s cubic-bezier(.4, 0, .2, 1), transform 0.28s cubic-bezier(.4, 0, .2, 1);
    }

    .portfolio-card:hover {
        box-shadow: 0 12px 40px 0 rgba(111, 58, 250, 0.14), 0 2px 8px 0 rgba(0, 0, 0, 0.06);
        transform: translateY(-4px);
    }

    /* Tab active ring */
    .tab-btn.active {
        background-color: var(--color-custom-primary);
        color: var(--color-custom-white);
    }

    .tab-btn:not(.active) {
        background-color: var(--color-custom-white);
        color: var(--color-custom-gray-600);
        border: 1.5px solid var(--color-custom-gray-100);
    }

    .tab-btn:not(.active):hover {
        background-color: var(--color-custom-primary-bg);
        color: var(--color-custom-primary);
        border-color: var(--color-custom-primary-soft);
    }

    /* Action button */
    .action-btn {
        background-color: var(--color-custom-primary-soft);
        color: var(--color-custom-primary);
        transition: background-color 0.2s, color 0.2s;
    }

    .action-btn:hover {
        background-color: var(--color-custom-primary);
        color: var(--color-custom-white);
    }

    .action-btn:hover svg {
        stroke: var(--color-custom-white);
    }

    /* View all button */
    .view-all-btn {
        border: 1.5px solid var(--color-custom-primary);
        color: var(--color-custom-primary);
        transition: background-color 0.2s, color 0.2s;
    }

    .view-all-btn:hover {
        background-color: var(--color-custom-primary);
        color: var(--color-custom-white);
    }

    /* Scrollbar for modal */
    .modal-scroll::-webkit-scrollbar {
        width: 5px;
    }

    .modal-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .modal-scroll::-webkit-scrollbar-thumb {
        background: var(--color-custom-gray-100);
        border-radius: 99px;
    }

    /* Image overlay label */
    .img-label {
        position: absolute;
        bottom: 8px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.08em;
        color: #fff;
        background: rgba(0, 0, 0, 0.38);
        border-radius: 6px;
        padding: 2px 8px;
        backdrop-filter: blur(2px);
        user-select: none;
    }

    [dir="rtl"] .img-label-before {
        right: 8px;
    }

    [dir="rtl"] .img-label-after {
        left: 8px;
    }

    [dir="ltr"] .img-label-before {
        left: 8px;
    }

    [dir="ltr"] .img-label-after {
        right: 8px;
    }

    @media (prefers-reduced-motion: reduce) {
        .portfolio-card {
            transition: none;
        }

        .modal-enter,
        .modal-exit,
        .overlay-enter,
        .overlay-exit {
            animation: none;
        }
    }
}