/* ============================================
   Shaad Nexus - Public Dashboard Styles
   وابسته به متغیرهای تعریف‌شده در SNEXUSCommon.css
   ============================================ */

.snexus-root {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}
.snexus-layout {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}
.snexus-main {
    flex: 1;
    min-width: 0;
}

/* ---------- کارت‌های پروژه و جدول ---------- */
.snexus-main .card {
    border: none;
    border-radius: var(--snexus-radius);
    background: var(--snexus-bg-card);
    transition: transform 0.2s, box-shadow 0.2s;
    /* box-shadow: var(--snexus-shadow-sd); */
    box-shadow: 0 2px 1px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.snexus-main .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.4);
}
.snexus-main .card-body {
    flex: 1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    border-radius: inherit;
}
.snexus-main .card h5 {
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--snexus-text-dark, #1d2327);
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
}
/* .snexus-main .clickable-card {
    transition: all 0.25s ease;
    border-radius: 24px;
    backdrop-filter: blur(2px);
    cursor: pointer;
}
.snexus-main .clickable-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.2);
    filter: brightness(0.97);
} */
/* .snexus-main .clickable-card[style*="background-image"] .card-body {
    color: var(--snexus-text-light, #ffffff);
} */
.snexus-main .card-project-tag {
    position: absolute;
    left: 7px;
    border-radius: 30px;
    padding: 2px 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: transparent;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 -1px 0 rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
}
.snexus-main .card-project-name {
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 30px;
    color: var(--snexus-text-dark, #1d2327);
    font-weight: 500;
    letter-spacing: 0.3px;
    z-index: 1;
}
.snexus-main .card .card-footer-info {
    position: absolute;
    bottom: 8px;
    right: 12px;
}
.snexus-main .card .table-count {
    padding: 2px 8px;
}
.snexus-main .card[data-type="project"] {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--snexus-primary, #2271b1);
}
.snexus-main .card[data-type="table"] {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.snexus-main .card[data-type="table"] .card-icon {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.25);
}



/* ---------- دکمه بازگشت ---------- */
.snexus-main .btn-back {
    background: var(--snexus-primary);
    border: none;
    border-radius: 40px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 2px 1px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 1);   
}
.snexus-main .btn-back:hover {
    background: var(--snexus-primary-dark);
}

/* ---------- هدر و تولبار ---------- */
.snexus-main #table-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.snexus-main .page-title-text {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    background: var(--snexus-gradient-title, linear-gradient(135deg, #1e3c72, #2a5298));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.snexus-main #inner-toolbar {
    background: var(--snexus-bg-light, #f8fafc);
    border-radius: 40px;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---------- نوتیفیکیشن ---------- */
.snexus-main #notification-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--snexus-bg-hover, #f1f5f9);
    border-radius: 40px;
    padding: 4px 10px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    min-width: 36px;
    height: 32px;
}
.snexus-main #notification-bell:hover {
    background: #e2e8f0;
}
.snexus-main #notification-bell .dashicons-bell {
    font-size: 18px;
    color: var(--snexus-primary, #2271b1);
    line-height: 1;
}
.snexus-main #notif-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--snexus-danger, #dc3232);
    color: var(--snexus-text-light, #ffffff);
    border-radius: 30px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
    line-height: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: inline-block;
}
.snexus-main #notification-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: auto;
    right: 0;          /* هم‌راستا با دکمه */
    width: 280px;
    max-height: 340px;
    overflow-y: auto;
    background: var(--snexus-bg-card, #ffffff);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.05);
    z-index: 1060;
    display: none;
    border: 1px solid var(--snexus-border-light, #e2e8f0);
    padding: 4px 0;
}
.snexus-main #notification-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 14px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.04));
}
.snexus-main .notif-item {
    padding: 8px 14px;
    border-bottom: 1px solid var(--snexus-border-light, #e2e8f0);
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.snexus-main .notif-item:last-child {
    border-bottom: none;
}
.snexus-main .notif-item:hover {
    background-color: var(--snexus-bg-hover, #f1f5f9);
}
.snexus-main .notif-item strong {
    color: var(--snexus-secondary, #1e3c72);
    font-size: 0.8rem;
    font-weight: 600;
}
.snexus-main .notif-item .notif-message {
    font-size: 0.75rem;
    color: #334155;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.snexus-main .notif-item small {
    font-size: 0.6rem;
    color: var(--snexus-text-muted, #6c757d);
    margin-top: 2px;
    opacity: 0.8;
}
.snexus-main .notif-empty {
    padding: 20px 14px;
    text-align: center;
    color: var(--snexus-text-muted, #6c757d);
    font-size: 0.8rem;
    font-weight: 400;
}

/* ============================================
   External Links Button Styles
   ============================================ */

.snexus-main .external-links-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
}
 
.snexus-root .external-link-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    letter-spacing: 0.3px;
    margin: 2px 4px;
    position: relative;
    overflow: hidden;
}

/* انیمیشن shimmer روی دکمه */
.snexus-root .external-link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.snexus-root .external-link-btn:hover::before {
    left: 100%;
}

/* هاور */
.snexus-root .external-link-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 2px 1px rgba(0, 0, 0, 0.5);
    filter: brightness(1.1) saturate(1.2);
    border-color: rgba(255, 255, 255, 1);
}

.snexus-root .external-link-btn:active {
    transform: translateY(0px) scale(0.95);
}

/* حالت ویژه برای دکمه‌هایی که رنگ تیره دارند (متن سفید) */
.snexus-root .external-link-btn.dark-text {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* حالت ویژه برای دکمه‌هایی که رنگ روشن دارند (متن تیره) */
.snexus-root .external-link-btn.light-text {
    color: #1a1a1a !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

.snexus-root .external-link-icon-only {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.snexus-root .external-link-icon-only .dashicons {
    font-size: 20px !important;
    margin-right: 0 !important;
    line-height: 1;
}

#admin-panel-link .btn {
    background: var(--snexus-secondary);
    color: white;
    text-decoration: none;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 2px 1px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 1);    
 
}
#admin-panel-link .btn:hover {
    background: var(--snexus-primary-dark);
   
}


/* ریسپانسیو */
@media (max-width: 576px) {
    .snexus-root .external-link-btn {
        padding: 4px 12px;
        font-size: 0.65rem;
        margin: 2px;
    }
}

/* ---------- واکنشگرایی (موبایل) ---------- */
@media (max-width: 768px) {
    .snexus-main .card-body {
        padding: 1rem;
    }
    .snexus-main #table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .snexus-chat-floating-container .chat-floating-container {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}