/* =====================================================================
   نیروپالس — استایل عمومی
   رنگ‌ها: سرمه‌ای تیره، آبی انرژی، سفید و خاکستری روشن
   ===================================================================== */

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/vazirmatn/Vazirmatn-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --np-navy: #0b1f3a;
    --np-navy-soft: #13294b;
    --np-blue: #1a73e8;
    --np-blue-dark: #155fc2;
    --np-blue-soft: #e8f1fe;
    --np-bg: #f4f6fa;
    --np-surface: #ffffff;
    --np-border: #e3e8ef;
    --np-text: #1f2a3c;
    --np-muted: #6b778c;
    --np-radius: 14px;
    --np-sidebar-width: 268px;

    --bs-body-font-family: "Vazirmatn", Tahoma, sans-serif;
    --bs-body-color: var(--np-text);
    --bs-body-bg: var(--np-bg);
    --bs-primary: var(--np-blue);
    --bs-primary-rgb: 26, 115, 232;
    --bs-link-color: var(--np-blue);
    --bs-link-color-rgb: 26, 115, 232;
    --bs-border-color: var(--np-border);
}

/* حالت شب (فعلاً فقط صفحه تایید مدیرعامل از آن استفاده می‌کند) */
:root[data-bs-theme="dark"] {
    --np-bg: #0f1726;
    --np-surface: #172235;
    --np-border: #26344d;
    --np-text: #e6ebf3;
    --np-muted: #9aa8bf;
    --np-blue-soft: #1b2d4b;
    --bs-body-color: var(--np-text);
    --bs-body-bg: var(--np-bg);
    --bs-border-color: var(--np-border);
    --bs-secondary-color: var(--np-muted);
    --bs-tertiary-bg: #1d2a40;
}

body {
    font-family: var(--bs-body-font-family);
    background: var(--np-bg);
    color: var(--np-text);
}

.btn-primary {
    --bs-btn-bg: var(--np-blue);
    --bs-btn-border-color: var(--np-blue);
    --bs-btn-hover-bg: var(--np-blue-dark);
    --bs-btn-hover-border-color: var(--np-blue-dark);
    --bs-btn-active-bg: var(--np-blue-dark);
    --bs-btn-active-border-color: var(--np-blue-dark);
    --bs-btn-disabled-bg: var(--np-blue);
    --bs-btn-disabled-border-color: var(--np-blue);
    font-weight: 600;
}

.form-control:focus {
    border-color: var(--np-blue);
    box-shadow: 0 0 0 .2rem rgba(26, 115, 232, .15);
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 0;
    color: var(--np-muted);
    padding: 0;
}

.btn-icon:hover {
    background: var(--np-bg);
    color: var(--np-text);
}

/* ---------- اسکلت پنل ---------- */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 24px;
}

.app-footer {
    padding: 16px 24px;
    font-size: .8rem;
    color: var(--np-muted);
    border-top: 1px solid var(--np-border);
}

/* ---------- منوی کناری ---------- */

.app-sidebar {
    --bs-offcanvas-width: var(--np-sidebar-width);
    --bs-offcanvas-bg: var(--np-navy);
}

.sidebar-inner {
    background: var(--np-navy);
    color: #fff;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .app-sidebar {
        width: var(--np-sidebar-width);
        flex-shrink: 0;
        position: sticky;
        top: 0;
        height: 100vh;
    }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--np-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 800;
    font-size: 1.1rem;
}

.brand-tenant {
    font-size: .75rem;
    color: rgba(255, 255, 255, .6);
}

.sidebar-nav {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    font-size: .9rem;
    border-inline-start: 3px solid transparent;
    transition: background-color .15s, color .15s;
}

.sidebar-link .bi {
    font-size: 1.1rem;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(26, 115, 232, .18);
    color: #fff;
    font-weight: 600;
    border-inline-start-color: var(--np-blue);
}

.sidebar-link.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.sidebar-link.is-disabled:hover {
    background: transparent;
    color: rgba(255, 255, 255, .75);
}

.soon-badge {
    font-size: .65rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .1);
    white-space: nowrap;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, .08);
    margin: 10px 4px;
}

/* ---------- نوار بالا ---------- */

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--np-border);
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.topbar-user {
    align-items: center;
    gap: 10px;
    padding-inline-start: 12px;
    border-inline-start: 1px solid var(--np-border);
}

.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--np-blue-soft);
    color: var(--np-blue);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-role {
    font-size: .75rem;
}

.notif-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e5484d;
    color: #fff;
    font-size: .65rem;
    line-height: 18px;
    font-weight: 700;
}

.notif-menu {
    width: 300px;
    padding: 0;
    border: 1px solid var(--np-border);
    border-radius: 12px;
    overflow: hidden;
}

.notif-menu-header {
    padding: 12px 16px;
    font-weight: 700;
    font-size: .85rem;
    border-bottom: 1px solid var(--np-border);
}

.notif-item {
    padding: 10px 16px;
    font-size: .85rem;
    white-space: normal;
    border-bottom: 1px solid var(--np-border);
}

.notif-item.is-unread {
    background: var(--np-blue-soft);
    font-weight: 600;
}

.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--np-muted);
    font-size: .85rem;
}

/* ---------- کارت‌های آمار ---------- */

.stat-card {
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
}

.stat-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.tone-blue { background: var(--np-blue-soft); color: var(--np-blue); }
.tone-warning { background: #fff4e0; color: #c77700; }
.tone-danger { background: #fdecec; color: #d93b3b; }
.tone-success { background: #e6f6ec; color: #1d8a4a; }
.tone-muted { background: #eef1f5; color: var(--np-muted); }

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}

.stat-of {
    font-size: .85rem;
    font-weight: 500;
    color: var(--np-muted);
}

.stat-label {
    font-size: .85rem;
    color: var(--np-muted);
}

.api-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .7rem;
    padding: 2px 8px;
    border-radius: 20px;
}

.api-pill.is-on { background: #e6f6ec; color: #1d8a4a; }
.api-pill.is-off { background: #eef1f5; color: var(--np-muted); }

/* ---------- صفحه ورود و صفحه‌های تک‌کارتی ---------- */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background:
        radial-gradient(circle at 15% 20%, rgba(26, 115, 232, .35), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(26, 115, 232, .2), transparent 40%),
        var(--np-navy);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--np-surface);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 24px 60px rgba(4, 12, 28, .35);
}

.auth-logo {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--np-blue);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- اجزای عمومی صفحه‌ها ---------- */

.np-card {
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
}

.np-tabs {
    gap: 4px;
    border-bottom: 1px solid var(--np-border);
}

.np-tabs .nav-link {
    color: var(--np-muted);
    font-weight: 600;
    font-size: .9rem;
    padding: 10px 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.np-tabs .nav-link:hover {
    color: var(--np-text);
}

.np-tabs .nav-link.active {
    color: var(--np-blue);
    border-bottom-color: var(--np-blue);
}

.np-search {
    position: relative;
    min-width: 260px;
}

.np-search .bi {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--np-muted);
    pointer-events: none;
}

.np-search .form-control {
    padding-right: 36px;
}

.status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--np-border);
    background: var(--np-surface);
    color: var(--np-text);
    text-decoration: none;
    font-size: .8rem;
}

.status-chip span {
    color: var(--np-muted);
    font-weight: 700;
}

.status-chip:hover {
    border-color: var(--np-blue);
}

.status-chip.active {
    background: var(--np-navy);
    border-color: var(--np-navy);
    color: #fff;
}

.status-chip.active span {
    color: rgba(255, 255, 255, .7);
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.tone-purple { background: #f1ebfd; color: #6a3fc8; }
.tone-navy { background: #e4e9f2; color: var(--np-navy); }

.tone-text-success { color: #1d8a4a; }
.tone-text-warning { color: #c77700; }
.tone-text-danger { color: #d93b3b; }
.tone-text-muted { color: var(--np-muted); }

.tag-pill {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 20px;
    background: #eef1f5;
    color: var(--np-muted);
    font-size: .7rem;
}

.tag-global {
    background: var(--np-blue-soft);
    color: var(--np-blue);
}

.np-table {
    --bs-table-bg: transparent;
}

.np-table thead th {
    font-size: .75rem;
    font-weight: 600;
    color: var(--np-muted);
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid var(--np-border);
}

.np-table td {
    padding: 14px 16px;
    border-color: var(--np-border);
}

.np-table tbody tr:hover td {
    background: #fafbfd;
}

.np-row-sub {
    max-width: 420px;
}

.empty-state {
    text-align: center;
    padding: 48px 16px;
}

.empty-state > .bi {
    font-size: 2.2rem;
    color: #c4ccd8;
    display: block;
    margin-bottom: 8px;
}

/* ---------- ویرایشگر خبر ---------- */

.editor-head {
    padding: 14px 16px;
}

.editor-title {
    border-color: transparent;
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 200px;
}

.editor-title:hover:not([readonly]) {
    border-color: var(--np-border);
}

.save-state.is-dirty {
    color: #c77700;
    font-weight: 600;
}

.panel-title {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-title .bi {
    color: var(--np-blue);
}

.body-editor {
    line-height: 2;
}

textarea.auto-grow {
    resize: vertical;
    overflow: hidden;
}

.headline-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.headline-chip {
    border: 1px dashed var(--np-blue);
    background: var(--np-blue-soft);
    color: var(--np-blue-dark);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: .8rem;
    text-align: right;
}

.headline-chip.active {
    border-style: solid;
    background: var(--np-blue);
    color: #fff;
}

.fact-results {
    max-height: 420px;
    overflow-y: auto;
}

.fact-item,
.used-fact,
.comment-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--np-border);
}

.fact-item:last-child,
.used-fact:last-child,
.comment-item:last-child {
    border-bottom: 0;
}

.used-facts {
    border-top: 1px solid var(--np-border);
    padding-top: 12px;
}

.used-fact.is-used .fw-semibold {
    color: #1d8a4a;
}

.comment-date,
.fact-date {
    font-size: .7rem;
}

.feedback-text {
    white-space: normal;
}

.history-list {
    display: flex;
    flex-direction: column;
}

.history-item {
    text-align: right;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--np-border);
    padding: 12px 16px;
}

.history-item:hover {
    background: var(--np-bg);
}

.history-note {
    font-size: .75rem;
    color: var(--np-blue);
    margin-top: 2px;
}

.compare-section {
    margin-bottom: 18px;
}

.compare-text {
    white-space: pre-wrap;
    line-height: 2;
    padding: 12px;
    border: 1px solid var(--np-border);
    border-radius: 10px;
    background: #fbfcfe;
}

.diff-add {
    background: #dcf5e4;
    color: #136c39;
    text-decoration: none;
    border-radius: 3px;
}

.diff-del {
    background: #fde2e2;
    color: #b42323;
    border-radius: 3px;
}

/* ---------- بانک فکت ---------- */

.fact-row {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--np-border);
}

.fact-row:last-child {
    border-bottom: 0;
}

.fact-content {
    line-height: 1.9;
}

.min-w-0 {
    min-width: 0;
}

/* ---------- صفحه تایید مدیرعامل (موبایل‌محور) ---------- */

.approve-body {
    background: var(--np-bg);
    color: var(--np-text);
    font-size: 1.05rem;
    padding-bottom: 170px;
}

.approve-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

.approve-header {
    background: var(--np-navy);
    color: #fff;
    padding: 14px 0;
}

.approve-main {
    padding-top: 20px;
}

.approve-greeting {
    font-size: 1rem;
    margin-bottom: 10px;
}

.approve-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: .85rem;
    color: var(--np-muted);
    margin-bottom: 16px;
}

.approve-summary {
    background: var(--np-blue-soft);
    border-inline-start: 4px solid var(--np-blue);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    color: var(--np-navy);
}

[data-bs-theme="dark"] .approve-summary {
    color: var(--np-text);
}

.approve-summary ul {
    padding-inline-start: 20px;
}

.approve-summary li {
    margin-bottom: 4px;
}

.approve-article,
.approve-panel {
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-radius: 16px;
    padding: 22px 20px;
    margin-bottom: 16px;
}

.approve-subheadline {
    color: var(--np-blue);
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.approve-headline {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.7;
    margin-bottom: 14px;
}

.approve-lead {
    font-weight: 700;
    line-height: 2;
}

.approve-text p {
    line-height: 2.1;
    margin-bottom: 14px;
    text-align: justify;
}

.approve-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--np-surface);
    border-top: 1px solid var(--np-border);
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(4, 12, 28, .08);
}

.approve-secondary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.approve-secondary .btn {
    font-size: .8rem;
    padding: 8px 4px;
}

.approve-secondary .bi {
    font-size: 1.15rem;
}

.approve-result {
    text-align: center;
    padding: 80px 0 40px;
}

.approve-result > .bi {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
}

/* ---------- ماژول ۲: رسانه‌ها و خبرنگاران ---------- */

.grade-badge {
    display: inline-block;
    min-width: 22px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
    line-height: 18px;
}

.grade-badge.grade-A { background: #fde8e8; color: #c62828; }
.grade-badge.grade-B { background: #fff1db; color: #b26a00; }
.grade-badge.grade-C { background: #eef1f5; color: var(--np-muted); }

.outlet-avatar,
.clip-thumb-empty,
.report-card-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.outlet-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.outlet-avatar.grade-A,
.clip-thumb-empty.grade-A,
.report-card-placeholder.grade-A { background: #c62828; }
.outlet-avatar.grade-B,
.clip-thumb-empty.grade-B,
.report-card-placeholder.grade-B { background: #d98a00; }
.outlet-avatar.grade-C,
.clip-thumb-empty.grade-C,
.report-card-placeholder.grade-C { background: #7a8699; }

.contact-email {
    max-width: 200px;
}

.press-body {
    padding-bottom: 0;
}

.history-news {
    max-width: 260px;
}

.choice-list,
.member-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--np-border);
    border-radius: 10px;
    overflow: hidden;
}

.member-list {
    max-height: 55vh;
    overflow-y: auto;
}

.choice-row,
.member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--np-border);
    cursor: pointer;
    margin: 0;
}

.choice-row:last-child,
.member-row:last-child {
    border-bottom: 0;
}

.choice-row:hover,
.member-row:hover {
    background: var(--np-bg);
}

.choice-row.is-disabled {
    cursor: not-allowed;
    opacity: .6;
}

.clip-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--np-border);
}

.clip-row:last-child {
    border-bottom: 0;
}

.clip-row.is-excluded {
    opacity: .5;
}

.clip-thumb {
    width: 72px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--np-bg);
}

.clip-thumb-empty {
    font-size: 1.2rem;
}

.clip-headline {
    line-height: 1.8;
}

/* ---------- ماژول ۳: رادار رگولاتوری ---------- */

.severity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.severity-dot.severity-critical { background: #d93b3b; box-shadow: 0 0 0 3px rgba(217, 59, 59, .18); }
.severity-dot.severity-important { background: #e08a00; }
.severity-dot.severity-normal { background: #9aa6b8; }

.crisis-card {
    height: 100%;
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-inline-start: 4px solid #9aa6b8;
    border-radius: var(--np-radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.crisis-card.severity-critical { border-inline-start-color: #d93b3b; background: linear-gradient(to left, #fff5f5, var(--np-surface) 60%); }
.crisis-card.severity-important { border-inline-start-color: #e08a00; }

.crisis-card .d-flex.gap-2.mt-3 {
    margin-top: auto !important;
    padding-top: 12px;
}

.crisis-title {
    color: var(--np-text);
    font-weight: 700;
    line-height: 1.9;
    text-decoration: none;
}

.crisis-title:hover {
    color: var(--np-blue);
}

.alert-feed {
    display: flex;
    flex-direction: column;
}

.feed-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--np-border);
    color: var(--np-text);
    text-decoration: none;
}

.feed-row:last-child {
    border-bottom: 0;
}

.feed-row:hover {
    background: var(--np-bg);
}

.keyword-list {
    display: flex;
    flex-direction: column;
}

.keyword-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    border-top: 1px solid var(--np-border);
}

.keyword-row.is-inactive {
    opacity: .5;
}

.source-url {
    max-width: 280px;
}

.alert-title-cell {
    max-width: 520px;
    line-height: 1.8;
}

.alert-detail {
    border-inline-start-width: 4px;
}

.severity-border-critical { border-inline-start-color: #d93b3b; }
.severity-border-important { border-inline-start-color: #e08a00; }
.severity-border-normal { border-inline-start-color: #9aa6b8; }

.alert-summary {
    white-space: normal;
    color: var(--np-text);
}

.kit-text {
    line-height: 2;
    font-size: .9rem;
}

/* ---------- گزارش بازتاب ---------- */

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.report-sheet {
    max-width: 960px;
    margin: 0 auto;
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
    padding: 28px;
}

.report-cover {
    background: var(--np-navy);
    color: #fff;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.report-kicker {
    font-size: .85rem;
    opacity: .75;
}

.report-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 4px 0 0;
}

.report-mark {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
}

.report-news {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.9;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.report-period {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    font-size: .8rem;
    opacity: .75;
    margin-top: 8px;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.report-stat {
    border: 1px solid var(--np-border);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
}

.report-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--np-blue);
}

.report-stat-label {
    font-size: .8rem;
    color: var(--np-muted);
}

.report-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.report-chart {
    border: 1px solid var(--np-border);
    border-radius: 12px;
    padding: 16px;
}

.report-h2 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hbar-row {
    display: grid;
    grid-template-columns: 110px 1fr 32px;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    margin-bottom: 8px;
}

.hbar-track {
    height: 12px;
    background: var(--np-bg);
    border-radius: 6px;
    overflow: hidden;
}

.hbar-fill {
    display: block;
    height: 100%;
    background: var(--np-blue);
    border-radius: 6px;
}

.grade-fill-A { background: #c62828; }
.grade-fill-B { background: #d98a00; }
.grade-fill-C { background: #7a8699; }

.hbar-value {
    font-weight: 700;
    text-align: left;
}

.vbar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding-top: 8px;
    overflow-x: auto;
}

.vbar-col {
    flex: 1;
    min-width: 34px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.vbar-fill {
    width: 70%;
    max-width: 36px;
    background: var(--np-blue);
    border-radius: 6px 6px 0 0;
}

.vbar-value {
    font-size: .75rem;
    font-weight: 700;
}

.vbar-label {
    font-size: .7rem;
    color: var(--np-muted);
    white-space: nowrap;
}

.report-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.report-card {
    display: flex;
    gap: 12px;
    border: 1px solid var(--np-border);
    border-radius: 12px;
    padding: 12px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.report-card-image {
    width: 120px;
    height: 84px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.report-card-placeholder {
    font-size: 2rem;
}

.report-card-body {
    min-width: 0;
    flex: 1;
}

.report-card-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--np-blue-soft);
    color: var(--np-blue);
    font-size: .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.report-card-headline {
    display: block;
    color: var(--np-text);
    text-decoration: none;
    font-weight: 600;
    font-size: .85rem;
    line-height: 1.8;
}

.report-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: .7rem;
    color: var(--np-muted);
    margin-top: 4px;
}

.report-footnote {
    font-size: .75rem;
    color: var(--np-muted);
    margin: 16px 0 0;
}

@media (max-width: 767.98px) {
    .report-sheet { padding: 16px; }
    .report-charts,
    .report-cards { grid-template-columns: 1fr; }
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body,
    .app-body {
        background: #fff !important;
    }

    .app-sidebar,
    .app-topbar,
    .app-footer,
    .toast-container,
    .no-print {
        display: none !important;
    }

    .app-content {
        padding: 0 !important;
    }

    .report-sheet {
        max-width: none;
        border: 0;
        padding: 0;
    }

    .report-charts {
        grid-template-columns: 1fr 1fr;
        break-inside: avoid;
    }

    .report-cards {
        grid-template-columns: 1fr 1fr;
    }

    .report-card-headline {
        color: #1f2a3c !important;
    }

    .press-body .btn {
        display: none !important;
    }
}

/* ---------- موبایل ---------- */

@media (max-width: 575.98px) {
    .app-content { padding: 16px; }
    .app-topbar { padding: 8px 16px; }
    .auth-card { padding: 28px 20px; }
}

/* =====================================================================
   گام ۶ — آرشیو، تقویم، تنظیمات، لوگو
   ===================================================================== */

/* ---------- لوگوی سازمان ---------- */
.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo img {
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

.logo-preview {
    min-height: 120px;
    border: 1px dashed var(--np-border);
    border-radius: var(--np-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: repeating-conic-gradient(#f1f3f7 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.logo-preview img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.report-logo {
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    display: inline-flex;
    flex-shrink: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.report-logo img {
    max-width: 96px;
    max-height: 56px;
    object-fit: contain;
}

.press-signature {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--np-border);
    color: var(--np-muted);
    font-weight: 600;
}

/* ---------- آپلود ---------- */
.upload-zone {
    background: var(--np-surface);
    border: 2px dashed var(--np-border);
    border-radius: var(--np-radius);
    padding: 22px 16px;
    text-align: center;
    transition: border-color .15s, background .15s;
}

.upload-zone > .bi {
    font-size: 2rem;
    color: var(--np-blue);
}

.upload-zone.is-dragging {
    border-color: var(--np-blue);
    background: var(--np-blue-soft);
}

.upload-list {
    margin-top: 14px;
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--np-bg);
    font-size: .8rem;
}

.upload-name {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-status { color: var(--np-muted); white-space: nowrap; }
.upload-row .progress { width: 120px; height: 6px; flex-shrink: 0; }
.upload-row.is-done .upload-status { color: #1e8e3e; }
.upload-row.is-failed .upload-status { color: #d93b3b; white-space: normal; }

/* ---------- برچسب‌ها ---------- */
.tag-filter {
    border: 1px solid var(--np-border);
    background: var(--np-surface);
    color: var(--np-text);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .75rem;
}

.tag-filter span { color: var(--np-muted); }
.tag-filter:hover { border-color: var(--np-blue); }
.tag-filter.active { background: var(--np-blue); border-color: var(--np-blue); color: #fff; }
.tag-filter.active span { color: rgba(255, 255, 255, .8); }

/* ---------- شبکه فایل‌ها ---------- */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.asset-card {
    display: flex;
    flex-direction: column;
    text-align: start;
    padding: 0;
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
    background: var(--np-surface);
    color: var(--np-text);
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}

.asset-card:hover,
.asset-card:focus-visible {
    box-shadow: 0 6px 18px rgba(11, 31, 58, .1);
    transform: translateY(-2px);
}

.asset-thumb {
    aspect-ratio: 4 / 3;
    background: var(--np-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset-thumb .bi { font-size: 2.4rem; color: var(--np-muted); }
.asset-thumb.type-video .bi { color: #7b4fd6; }
.asset-thumb.type-pdf .bi { color: #d93b3b; }
.asset-thumb.type-document .bi { color: var(--np-blue); }

.asset-body { padding: 10px 12px; min-width: 0; }

.asset-title {
    font-size: .85rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-meta { font-size: .72rem; color: var(--np-muted); }

.asset-tags {
    font-size: .72rem;
    color: var(--np-blue);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-preview {
    background: var(--np-bg);
    border-radius: var(--np-radius);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.asset-preview img,
.asset-preview video { max-width: 100%; max-height: 70vh; }
.asset-preview iframe { width: 100%; height: 70vh; border: 0; }

.asset-doc { text-align: center; padding: 32px 16px; color: var(--np-muted); }
.asset-doc .bi { font-size: 3rem; color: var(--np-blue); display: block; margin-bottom: 8px; }

/* ---------- تقویم ---------- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.calendar-head {
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--np-muted);
    padding: 4px 0;
}

.calendar-cell {
    min-height: 92px;
    border: 1px solid var(--np-border);
    border-radius: 10px;
    padding: 4px;
    background: var(--np-surface);
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.calendar-cell.is-empty { border-color: transparent; background: transparent; }
.calendar-cell.is-friday .calendar-day { color: #d93b3b; }
.calendar-cell.is-today { border-color: var(--np-blue); box-shadow: inset 0 0 0 1px var(--np-blue); }
.calendar-cell.is-today .calendar-day {
    background: var(--np-blue);
    color: #fff;
    border-radius: 6px;
    padding: 0 6px;
    align-self: flex-start;
}

.calendar-day { font-size: .8rem; font-weight: 700; }

.calendar-event {
    border: 0;
    border-inline-start: 3px solid #9aa6b8;
    background: var(--np-bg);
    color: var(--np-text);
    font-size: .68rem;
    text-align: start;
    padding: 2px 5px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.calendar-event:hover { filter: brightness(.96); }
.calendar-event.priority-urgent { border-inline-start-color: #d93b3b; background: #fde8e8; }
.calendar-event.priority-important { border-inline-start-color: #e08a00; background: #fff1db; }
.calendar-event.priority-normal { border-inline-start-color: var(--np-blue); background: var(--np-blue-soft); }

.severity-dot.priority-dot-urgent { background: #d93b3b; box-shadow: 0 0 0 3px rgba(217, 59, 59, .18); }
.severity-dot.priority-dot-important { background: #e08a00; }
.severity-dot.priority-dot-normal { background: var(--np-blue); }

@media (max-width: 767.98px) {
    .calendar-cell { min-height: 64px; }
    .calendar-event { font-size: 0; height: 6px; padding: 0; border-inline-start-width: 0; }
    .calendar-event.priority-urgent { background: #d93b3b; }
    .calendar-event.priority-important { background: #e08a00; }
    .calendar-event.priority-normal { background: var(--np-blue); }
}

/* =====================================================================
   گام ۷ — ابزارها
   ===================================================================== */
.proof-diff {
    border: 1px solid var(--np-border);
    border-radius: 10px;
    padding: 12px 14px;
    min-height: 300px;
    max-height: 60vh;
    overflow: auto;
    white-space: pre-wrap;
    line-height: 2;
    background: var(--np-surface);
}

.image-tools {
    border: 1px solid var(--np-border);
    border-radius: 10px;
    padding: 8px 12px;
}

.image-tools summary { cursor: pointer; }

/* =====================================================================
   گام ۸ — فهرست فشرده خبرهای حساس
   ===================================================================== */
.crisis-list { overflow: hidden; }

.crisis-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--np-border);
    border-inline-start: 3px solid transparent;
}

.crisis-row:last-child { border-bottom: 0; }
.crisis-row:hover { background: var(--np-bg); }
.crisis-row.severity-critical { border-inline-start-color: #d93b3b; }
.crisis-row.severity-important { border-inline-start-color: #e08a00; }

.crisis-main {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.crisis-row .crisis-title {
    flex-grow: 1;
    min-width: 0;
    font-size: .86rem;
    font-weight: 600;
    color: var(--np-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crisis-row .crisis-title:hover { color: var(--np-blue); }

.crisis-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .75rem;
    color: var(--np-muted);
    flex-shrink: 0;
}

.crisis-sources {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crisis-actions { display: flex; gap: 6px; flex-shrink: 0; }

.new-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--np-blue);
    margin-inline-end: 6px;
    vertical-align: middle;
}

.alert-sources {
    border-top: 1px dashed var(--np-border);
    padding-top: 10px;
}

@media (max-width: 991.98px) {
    .crisis-main { flex-direction: column; align-items: stretch; gap: 2px; }
    .crisis-row .crisis-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .crisis-sources { max-width: 60vw; }
}
