@import url("https://rsms.me/inter/inter.css");
/* DIS Corporate Identity */
:root {
    --dis-red: #286fb7;
    --dis-blue-rgb: 66, 153, 225;
    --dis-dark: #4b4f56;
    --dis-bronze: #cd7f32;
    --dis-silver: #a8a8a8;
    --dis-gold: #f5b81b;
}

.status-gold {
    background-color: #f5b81b;
    color: #2c2c2c;
}

.status-platin {
    background-color: #e5e4e2;
    color: #2c2c2c;
}

.status-silver {
    background-color: #a8a8a8;
    color: #2c2c2c;
}

.status-bronze {
    background-color: #cd7f32;
    color: #2c2c2c;
}

.badge-full {
    display: block;
    width: 100%;
    text-align: center;
}

.table-sm-cockpit td,
.table-sm-cockpit th {
    padding: 0.2rem 0.4rem !important;
}

/* Utility Classes */
.bg-dis-red {
    background-color: var(--dis-red);
}

.bg-dis-blue {
    background-color: #286fb7;
}

.bg-dis-green {
    background-color: #2fb344;
}

.bg-dis-red-lt {
    background-color: rgba(var(--dis-red-rgb), 0.08);
}

.bg-dis-blue-lt {
    background-color: rgba(66, 153, 225, 0.4);
}

.text-dis-red {
    color: var(--dis-red);
}

.btn-dis-red {
    background-color: var(--dis-red);
    border-color: var(--dis-red);
    color: white;
}

.btn-dis-red:hover {
    background-color: #a11926;
    border-color: #a11926;
    color: white;
}

/* Status Badges - einheitliche Breite */
.badge-fixed110 {
    min-width: 120px;
    padding: 5px;
}

.badge-fixed150 {
    width: 210px;
    padding: 3px;
}

/* Status Colors */
.status-gold {
    background-color: var(--dis-gold);
    color: #2c2c2c;
}

.status-silver {
    background-color: var(--dis-silver);
    color: #2c2c2c;
}

.status-bronze {
    background-color: var(--dis-bronze);
    color: #2c2c2c;
}

/* Blink Animation für kritische Badges */
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.blink-badge {
    animation: blink 1s step-start infinite;
}

/* Light Backgrounds */
.bg-primary-lt {
    background-color: rgba(6, 111, 209, 0.08);
}

.bg-secondary-lt {
    background-color: rgba(107, 114, 128, 0.08);
}

.bg-warning-lt {
    background-color: rgba(245, 159, 0, 0.08);
}

.bg-success-lt {
    background-color: rgba(47, 179, 68, 0.08);
}

.bg-danger-lt {
    background-color: rgba(214, 57, 57, 0.08);
}

.bg-info-lt {
    background-color: rgba(66, 153, 225, 0.08);
}

/* Table Padding */
.table-sm-cockpit td,
.table-sm-cockpit th {
    padding: 0.2rem 0.4rem !important;
}

.blink-red-fast {
    animation: blinkRed 0.3s infinite alternate;
}

@keyframes blinkRed {
    0% {
        opacity: 1;
        filter: drop-shadow(0 0 1px rgba(255, 0, 0, 0.7));
    }

    100% {
        opacity: 0.4;
        filter: drop-shadow(0 0 3px rgba(255, 0, 0, 1));
    }
}

.blink-red-slow {
    animation: blinkRed2 0.6s infinite alternate;
}

@keyframes blinkRed2 {
    0% {
        opacity: 1;
        filter: drop-shadow(0 0 0px rgba(255, 0, 0, 0.8));
    }

    100% {
        opacity: 0.4;
        filter: drop-shadow(0 0 0px rgba(255, 0, 0, 1));
    }
}

/* کلاس چشمک‌زنی آرام برای نارنجی */
.blink-orange-slow {
    animation: blinkOrange 1.5s infinite ease-in-out;
}

@keyframes blinkOrange {
    0%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 0px rgba(255, 165, 0, 0.5));
    }

    50% {
        opacity: 0.6;
        filter: drop-shadow(0 0 1px rgba(255, 140, 0, 1));
    }
}

.contract-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    white-space: nowrap;
}

.contract-number {
    text-align: right;
    font-weight: bold;
    direction: ltr;
}

/* آیکن‌ها بدون دایره */
.icon-up,
.icon-down,
.icon-steady {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* چشمک زدن تند برای فلش قرمز (تنزل) */
.blink-red-fast {
    animation: blinkRed 0.3s infinite alternate;
}

@keyframes blinkRed {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

/* چشمک زدن آرام برای فلش سبز (ارتقا) */
.blink-green-slow {
    animation: blinkGreen 1.5s infinite ease-in-out;
}

@keyframes blinkGreen {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* چشمک زدن خیلی آرام برای خط تیره (ثابت) */
.blink-gray-steady {
    animation: blinkGray 2s infinite ease-in-out;
}

@keyframes blinkGray {
    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.badge-fixed {
    min-width: 70px;
    display: inline-block;
}

/* ====== NOTIFICATION BELL - NO BORDER RADIUS ====== */
.notification-bell {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9998;
    cursor: pointer;
    background: white;
    padding: 12px 20px 12px 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.14),
        0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.96);
}

.notification-bell:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.notification-bell .bell-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell .bell-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--tblr-red);
    stroke-width: 2.2;
    fill: none;
}

.notification-bell .badge-count {
    position: absolute;
    top: -10px;
    right: -12px;
    background: var(--tblr-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 9px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(191, 30, 46, 0.35);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.notification-bell .bell-text {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.notification-bell .bell-text small {
    display: block;
    font-weight: 400;
    color: #888;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    margin-top: -2px;
}

/* ====== NOTIFICATION PANEL - NO BORDER RADIUS ====== */
.notification-panel {
    position: fixed;
    bottom: 95px;
    left: 30px;
    width: 440px;
    max-width: calc(100vw - 60px);
    max-height: 580px;
    background: white;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.22),
        0 4px 16px rgba(0, 0, 0, 0.04);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpPanel 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.98);
}

.notification-panel.open {
    display: flex;
}

@keyframes slideUpPanel {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.panel-header {
    padding: 1.2rem 1.5rem 0.8rem;
    border-bottom: 2px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a1a1a;
}

.panel-header h4 svg {
    width: 22px;
    height: 22px;
    stroke: var(--tblr-red);
    stroke-width: 2.2;
    fill: none;
}

.panel-header .header-actions {
    display: flex;
    gap: 6px;
}

.panel-header .header-actions button {
    border: none;
    background: #f1f3f5;
    padding: 5px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    transition: all 0.2s;
    cursor: pointer;
}

.panel-header .header-actions button:hover {
    background: #e5e8eb;
    color: #222;
}

.panel-header .header-actions .close-btn {
    background: none;
    padding: 4px 10px;
    color: #999;
    font-size: 1.2rem;
    font-weight: 300;
}

.panel-header .header-actions .close-btn:hover {
    background: #f1f3f5;
    color: #333;
}

.panel-body {
    padding: 0.8rem 1.2rem 1.2rem;
    overflow-y: auto;
    flex: 1;
}

.panel-body::-webkit-scrollbar {
    width: 4px;
}

.panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.panel-body::-webkit-scrollbar-thumb {
    background: #d0d5da;
}

/* ====== NOTIFICATION CARDS - NO BORDER RADIUS ====== */
.notif-card {
    background: #f9fafb;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.7rem;
    transition: all 0.2s;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    cursor: default;
}

.notif-card:hover {
    background: #f2f4f6;
    transform: translateX(4px);
}

.notif-card .n-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(var(--tblr-red), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-card .n-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--dis-red);
    stroke-width: 2;
    fill: none;
}

.notif-card .n-content {
    flex: 1;
    min-width: 0;
}

.notif-card .n-content .n-title {
    font-weight: 600;
    font-size: 0.67rem;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.notif-card .n-content .n-desc {
    font-size: 0.6rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notif-card .n-content .n-meta {
    /*display: flex;*/
    align-items: center;
    gap: 10px;
    font-size: 0.65rem;
    color: #555;
}

.notif-card .n-content .n-meta .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--tblr-red);
    animation: blinkDot 1.8s infinite;
}

@keyframes blinkDot {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}

.notif-card .n-content .n-meta .tag {
    background: #eef2f6;
    padding: 1px 12px;
    font-weight: 600;
    color: #555;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.notif-card .n-content .n-meta .tag.high {
    background: rgba(var(--tblr-red), 0.1);
    color: var(--tblr-red);
}

.panel-footer {
    padding: 0.7rem 1.5rem 1rem;
    border-top: 2px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fafbfc;
}

.panel-footer .info-text {
    font-size: 0.75rem;
    color: #aaa;
}

.panel-footer .info-text strong {
    color: #555;
}

.panel-footer .btn-mark-read {
    border: none;
    background: var(--tblr-red);
    color: white;
    padding: 6px 22px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
    cursor: pointer;
}

.panel-footer .btn-mark-read:hover {
    background: #a11926;
    transform: scale(1.02);
}

/* ====== TOAST - NO BORDER RADIUS ====== */
.toast-container-custom .toast {
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 576px) {
    .notification-panel {
        left: 15px;
        right: 15px;
        width: auto;
        max-width: none;
        bottom: 85px;
        max-height: 70vh;
    }

    .notification-bell {
        bottom: 20px;
        left: 20px;
        padding: 10px 16px 10px 14px;
    }

    .notification-bell .bell-text {
        display: none;
    }

    .panel-body {
        padding: 0.6rem 0.8rem 1rem;
    }

    .notif-card {
        padding: 0.8rem 1rem;
    }
}

/* دکمه DIS سفارشی با رنگ قرمز برند */
.btn-dis-red {
    background-color: var(--dis-red);
    border-color: var(--dis-red);
    color: white;
}

.btn-dis-red:hover {
    background-color: #a11926;
    border-color: #a11926;
    color: white;
}

/* استایل کارت‌های آمار - یکدست و حرفه‌ای */
.stat-card {
    border: none;
    transition: all 0.2s ease;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dis-red);
}

/* دکمه‌های عملیاتی در ردیف جدول */
.action-btn {
    padding: 0.25rem 0.5rem;
    margin: 0 2px;
    color: #6c757d;
}

.action-btn:hover {
    color: var(--dis-red);
    border-color: var(--dis-red);
}

.action-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* فیلترهای فعال */
.filter-btn.active {
    background-color: var(--dis-red);
    color: white;
    border-color: var(--dis-red);
}

.filter-btn:hover:not(.active) {
    background-color: rgba(191, 30, 46, 0.1);
    border-color: var(--dis-red);
    color: var(--dis-red);
}
