/* ==========================================================
   حامد شریفی — مهندس مکانیک و مشاور نگهداشت صنعتی
   طراحی برگرفته از زبان بصری صنعت فولاد و ذوب: پلاک تجهیزات،
   خطوط راهنمای نقشه فنی، و تایم‌لاین مهندسی.
   ========================================================== */

:root {
    --bg: #f6f5f2;
    --panel: #ffffff;
    --panel-border: #e3e1db;
    --line: #cfccc3;
    --text: #23262b;
    --muted: #6b7280;
    --accent: #cc5209;   /* گرمای فلز مذاب */
    --accent-soft: #fbe7d6;
    --active: #2f8f45;   /* سبز ایمنی صنعتی */
    --active-bg: #e9f7ec;
    --active-border: #bfe4c8;
    --radius: 6px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.75;
}

a { color: inherit; text-decoration: none; }
h1, h2 { font-weight: 800; letter-spacing: -0.01em; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Header / Nav ---------- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-bottom: 1px solid var(--panel-border);
    box-shadow: 0 1px 0 var(--accent);
    flex-wrap: wrap;
    gap: 12px;
}

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

.site-nav { display: flex; gap: 26px; flex-wrap: wrap; }

.site-nav a { color: var(--muted); font-size: 0.92rem; }
.site-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-cta {
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 7px 16px;
    font-size: 0.85rem;
    color: var(--text);
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }
.nav-cta-secondary { color: var(--muted); border-style: dashed; }
.nav-cta-secondary:hover { border-color: var(--accent); border-style: solid; color: var(--accent); }

.lang-toggle {
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.site-main { flex: 1; max-width: 980px; margin: 0 auto; padding: 48px 24px; width: 100%; }

.site-footer {
    border-top: 1px solid var(--panel-border);
    padding: 20px 32px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}

/* ---------- Divider utility (replaces middle-dot text joins) ---------- */
.divided { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.divided > * + *::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 0.85em;
    background: var(--line);
    margin: 0 10px;
    vertical-align: middle;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 20px 0 44px;
    background-image:
        linear-gradient(var(--panel-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--panel-border) 1px, transparent 1px);
    background-size: 34px 34px;
    background-position: center top;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}

.hero-photo-mini {
    position: absolute;
    top: 4px;
    inset-inline-end: 0;
    width: 72px;
    height: 72px;
    border: 1px solid var(--panel-border);
    border-inline-start: 2px solid var(--accent);
    overflow: hidden;
}
.hero-photo-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(15%) contrast(1.03);
}

.hero-grid { max-width: 640px; padding-inline-end: 96px; }

.hero-intro h1 { font-size: 2.3rem; margin: 0 0 8px; }
.hero-sub { color: var(--accent); font-size: 1rem; font-weight: 600; margin: 0 0 16px; }
.hero-text { color: var(--muted); max-width: 520px; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 14px; }

.btn-primary, .btn-outline {
    padding: 11px 22px;
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-weight: 600;
}
.btn-primary { background: var(--accent); color: #17110b; }
.btn-primary:hover { background: #c8590a; }
.btn-outline { border: 1px solid var(--panel-border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Stat plates (equipment nameplate) ---------- */
.stats { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.stat-plate {
    flex: 1;
    min-width: 150px;
    position: relative;
    background: linear-gradient(180deg, #fbfaf7, var(--panel));
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 22px 20px;
    text-align: center;
}
.stat-plate::before, .stat-plate::after {
    content: "";
    position: absolute;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--line);
}
.stat-plate::before { right: 8px; }
.stat-plate::after { left: 8px; }
.stat-number {
    display: block;
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--accent);
}
.stat-label { color: var(--muted); font-size: 0.85rem; }

/* ---------- Generic page header ---------- */
.page-header { margin-bottom: 30px; border-bottom: 1px solid var(--panel-border); padding-bottom: 18px; }
.page-header h1 { font-size: 1.55rem; margin: 6px 0 0; }
.page-header p { color: var(--muted); margin: 0; }
.back-link { color: var(--muted); font-size: 0.85rem; }
.back-link:hover { color: var(--accent); }

/* ---------- Projects grid ---------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.project-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-inline-end: 3px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: block;
    transition: border-inline-end-color .15s ease;
}
.project-card:hover { border-inline-end-color: var(--accent); }
.project-logo-sm {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: #f0efe9;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.project-logo-sm img { width: 78%; height: 78%; object-fit: contain; }
.project-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.project-card-titles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-role { color: #4b5563; font-size: 0.82rem; margin: 8px 0 0; line-height: 1.6; }
.project-detail-logo {
    width: 140px;
    height: 140px;
    background: #f0efe9;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
}
.project-detail-logo img { width: 72%; height: 72%; object-fit: contain; }
.project-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 10px; }
.project-name { font-weight: 700; }
.badge-active {
    background: var(--active-bg);
    color: var(--active);
    border: 1px solid var(--active-border);
    border-radius: 4px;
    padding: 2px 9px;
    font-size: 0.72rem;
    white-space: nowrap;
}
.project-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }
.project-period { color: #6b7280; font-size: 0.8rem; }

.project-detail { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 24px; margin-top: 4px; }

/* ---------- Software section ---------- */
.software-pitch {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
}
.software-pitch h2 { margin: 0 0 8px; font-size: 1.15rem; }
.software-pitch p { margin: 0; color: #4b5563; line-height: 1.9; }
.software-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 0;
    overflow: hidden;
    border-inline-end: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.software-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -12px rgba(35, 38, 43, 0.25);
}
.software-card-cover {
    margin: 0 -20px 12px;
    height: 148px;
    background: #f0efe9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.software-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.software-card-icon-tile { position: relative; }
.software-card-icon-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 22px 22px, rgba(255,255,255,.14) 2px, transparent 2px);
    background-size: 26px 26px;
    opacity: .6;
}
.software-icon {
    position: relative;
    z-index: 1;
    color: #fff;
    display: inline-flex;
    width: 46px;
    height: 46px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}
.software-icon svg { width: 100%; height: 100%; }
.software-icon-lg { width: 84px; height: 84px; }
.software-card-cta { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-top: auto; }
.software-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.software-gallery-item {
    display: block;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #f0efe9;
    aspect-ratio: 4 / 3;
}
.software-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.software-hero-banner {
    position: relative;
    height: 220px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.software-hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 30px 30px, rgba(255,255,255,.12) 2.5px, transparent 2.5px);
    background-size: 34px 34px;
}
.software-detail h2 { margin: 0 0 14px; font-size: 1.05rem; }
.software-feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.software-feature-list li {
    position: relative;
    padding-inline-start: 22px;
    color: #374151;
    line-height: 1.8;
}
.software-feature-list li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    color: var(--accent);
    font-weight: 700;
}
.software-cta {
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 26px 20px;
    margin-top: 20px;
}
.software-cta h2 { margin: 0 0 8px; font-size: 1.1rem; }
.software-cta p { margin: 0 0 16px; color: var(--muted); }
.detail-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--panel-border); }
.detail-row:last-child { border-bottom: none; }
.detail-row span { color: var(--muted); min-width: 110px; }
.project-description { margin-top: 16px; color: #374151; }
.project-description.muted { color: var(--muted); font-style: italic; }

/* ---------- Resume ---------- */
.resume-header { text-align: center; margin-bottom: 36px; }
.resume-header h1 { margin: 0 0 4px; font-size: 1.8rem; }
.resume-title { color: var(--muted); margin: 0 0 6px; }
.resume-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 12px; justify-content: center; }
.resume-focus { color: var(--muted); max-width: 560px; margin: 0 auto 16px; font-size: 0.9rem; }
.contact-row { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; font-size: 0.85rem; color: #374151; }
.contact-row a:hover { color: var(--accent); }

.resume-section { margin-bottom: 36px; }
.resume-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 9px;
    margin-bottom: 18px;
    position: relative;
}
.resume-section h2::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    margin-inline-end: 10px;
    vertical-align: middle;
}
.resume-section ul { padding-inline-start: 20px; color: #4b5563; margin: 0; }
.resume-section li { margin-bottom: 7px; font-size: 0.9rem; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; }
.two-col-list { column-count: 2; column-gap: 34px; }
.two-col-list li { break-inside: avoid; }
@media (max-width: 700px) {
    .two-col { grid-template-columns: 1fr; }
    .two-col-list { column-count: 1; }
    .hero-grid { padding-inline-end: 0; padding-top: 84px; }
}

/* Timeline with square engineered markers, not circular dots */
.timeline { position: relative; padding-inline-end: 20px; border-inline-end: 1px solid var(--panel-border); }
.timeline-item { position: relative; margin-bottom: 22px; padding-inline-end: 22px; }
.timeline-item::before {
    content: "";
    position: absolute;
    inset-inline-end: -5px;
    top: 4px;
    width: 9px;
    height: 9px;
    background: var(--bg);
    border: 2px solid var(--accent);
}
.timeline-title { font-weight: 700; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.timeline-title .badge-active { flex-shrink: 0; }
.timeline-period { color: var(--muted); font-size: 0.82rem; margin: 3px 0 6px; }
.mini-entry { margin-bottom: 16px; }

.cert-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.cert-table th, .cert-table td { text-align: start; padding: 10px 10px; border-bottom: 1px solid var(--panel-border); }
.cert-table th { color: var(--muted); font-weight: 600; }
.cert-table tr:hover td { background: rgba(204,82,9,0.05); }

/* ---------- Contact / empty states ---------- */
.contact-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 24px; max-width: 480px; }
.empty-state { background: var(--panel); border: 1px dashed var(--panel-border); border-radius: var(--radius); padding: 34px; color: var(--muted); text-align: center; }

/* ---------- Auth (login) ---------- */
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 32px 28px; }
.auth-card h1 { font-size: 1.3rem; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 6px; }
.auth-card label { font-size: 0.85rem; color: #4b5563; margin-top: 10px; }
.auth-card input { background: var(--bg); border: 1px solid var(--panel-border); border-radius: 4px; padding: 10px 12px; color: var(--text); font-size: 0.95rem; }
.auth-card input:focus { outline: none; border-color: var(--accent); }
.auth-card button { margin-top: 20px; background: var(--accent); border: none; border-radius: 4px; padding: 11px; color: #17110b; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.auth-card button:hover { background: #c8590a; }
.auth-switch { margin-top: 18px; font-size: 0.85rem; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.alert-error { background: #fdecee; border: 1px solid #f3b6bd; color: #b3273a; border-radius: 4px; padding: 10px 12px; font-size: 0.85rem; margin-bottom: 14px; }

/* ---------- Client dashboard ---------- */
.dash-wrap { max-width: 760px; margin: 0 auto; width: 100%; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.dash-header h1 { font-size: 1.4rem; margin: 0; }
.btn-secondary { background: transparent; border: 1px solid var(--panel-border); color: var(--muted); border-radius: 4px; padding: 8px 16px; cursor: pointer; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.dash-empty { background: var(--panel); border: 1px dashed var(--panel-border); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--panel-border); margin-bottom: 28px; }
.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    padding: 12px 6px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    margin-inline-end: 22px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.dash-intro { color: var(--muted); margin: 0 0 30px; max-width: 640px; }
.dash-text { color: var(--muted); }
.dash-note { color: var(--muted); font-size: 0.82rem; font-style: italic; margin-top: 10px; }
.dash-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 34px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--panel-border);
}
.dash-section-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    margin-inline-end: 10px;
    vertical-align: middle;
}

/* Score bars */
.score-list { display: flex; flex-direction: column; gap: 14px; }
.score-row-top { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 5px; }
.score-value { font-weight: 700; }
.score-bar-track { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 4px; height: 8px; overflow: hidden; }
.score-bar-fill { height: 100%; }
.score-value.score-low, .audit-score.score-low { color: #c0392b; }
.score-value.score-mid, .audit-score.score-mid { color: #a9770a; }
.score-value.score-high, .audit-score.score-high { color: var(--active); }
.score-bar-fill.score-low { background: #e2544a; }
.score-bar-fill.score-mid { background: #d9a52c; }
.score-bar-fill.score-high { background: var(--active); }

/* Ideal-organization benchmark list */
.ideal-list { padding-inline-start: 20px; color: #4b5563; margin: 0 0 6px; }
.ideal-list li { margin-bottom: 9px; font-size: 0.9rem; }
.ideal-list strong { color: var(--text); }

/* Audit domain cards */
.audit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.audit-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px 20px; }
.audit-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.audit-domain-name { font-weight: 700; }
.level-tag { font-size: 0.7rem; border-radius: 4px; padding: 2px 8px; white-space: nowrap; border: 1px solid; }
.level-leadership { color: #3b5b7a; background: #eef2f7; border-color: #c7d2e0; }
.level-essential { color: #8a6d1f; background: #fbf3df; border-color: #e8d59a; }
.level-excellence { color: var(--accent); background: var(--accent-soft); border-color: #eec9a0; }
.audit-score { color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }
.audit-reason { font-size: 0.85rem; margin: 6px 0; color: #4b5563; }
.audit-reason strong { color: var(--text); }
.audit-reason.positive strong { color: var(--active); }
.audit-reason.negative strong { color: var(--accent); }

/* Roadmap */
/* Roadmap flow diagram */
.flow { position: relative; }
.flow-step { display: flex; gap: 16px; position: relative; padding-bottom: 26px; }
.flow-step:last-child { padding-bottom: 0; }
.flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: 17px;
    top: 36px;
    width: 2px;
    height: 26px;
    background: var(--panel-border);
}
.flow-node {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--panel);
    border: 2px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}
.flow-content h3 { font-size: 0.95rem; margin: 4px 0 4px; }
.flow-content p { font-size: 0.85rem; color: var(--muted); margin: 0; }

.roadmap-steps { padding-inline-start: 22px; color: #4b5563; }
.roadmap-steps li { margin-bottom: 10px; font-size: 0.92rem; }
.phase-table td, .phase-table th { font-size: 0.82rem; }
.phase-total td { font-weight: 700; color: var(--accent); border-top: 2px solid var(--panel-border); }

/* Radar chart */
.radar-wrap { display: flex; justify-content: center; margin-bottom: 8px; }
.radar-chart { width: 100%; max-width: 420px; height: auto; display: block; }
.radar-grid { fill: none; stroke: var(--panel-border); stroke-width: 1; }
.radar-axis { stroke: var(--panel-border); stroke-width: 1; }
.radar-label { fill: var(--muted); font-size: 11px; font-family: "Vazirmatn", sans-serif; }
.radar-data-polygon {
    fill: var(--accent);
    fill-opacity: 0.22;
    stroke: var(--accent);
    stroke-width: 2;
    transform-box: fill-box;
    transform-origin: center;
    animation: radarGrow 1.1s ease-out forwards;
}
.radar-dot { fill: var(--accent); }
@keyframes radarGrow {
    from { transform: scale(0.05); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .radar-data-polygon { animation: none; transform: scale(1); opacity: 1; }
}

/* ---------- Client proposal tabs (e.g. Arian) ---------- */
.proposal-stats { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.proposal-stat {
    flex: 1;
    min-width: 140px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 18px 16px;
    text-align: center;
}
.proposal-stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.proposal-stat-label { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 6px; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.module-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.module-card-head { display: flex; align-items: center; gap: 10px; }
.module-card-head h3 { margin: 0; font-size: 1.02rem; }
.module-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.module-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.module-card-icon-tool { background: var(--accent); }
.module-card-icon-tool img { width: 55%; height: 55%; object-fit: contain; }
.module-card p { font-size: 0.86rem; color: var(--muted); margin: 0; line-height: 1.6; }
.module-card-shot {
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--panel-border);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    margin-top: auto;
}
.module-card-shot-zoomable { cursor: zoom-in; transition: opacity 0.15s; }
.module-card-shot-zoomable:hover { opacity: 0.88; }

.arian-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,15,18,0.92);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}
.arian-lightbox.open { display: flex; }
.arian-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.arian-lightbox-close {
    position: absolute;
    top: 18px;
    inset-inline-end: 28px;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
}

.price-total-box {
    background: #1f2430;
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.price-total-label { color: #b8bec9; font-size: 0.9rem; }
.price-total-amount { color: var(--accent); font-size: 1.5rem; font-weight: 800; }
.price-steps { display: flex; flex-direction: column; gap: 10px; }
.price-step-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 12px 16px;
}
.price-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.price-step-desc { flex: 1; font-size: 0.92rem; }
.price-step-pct { flex-shrink: 0; font-weight: 800; color: var(--accent); font-size: 1rem; }

/* ---------- Member dashboard ---------- */
.member-welcome {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, var(--panel) 55%, var(--accent-soft));
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 30px;
}
.member-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff8f2;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.member-welcome-text { flex: 1; min-width: 180px; }
.member-welcome-text h1 { font-size: 1.3rem; margin: 0 0 6px; }
.member-welcome-text .dash-intro { margin: 0; }
.member-logout-form { flex-shrink: 0; }

.member-section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.member-section-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-inline-end: 3px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-inline-end-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.member-section-card:hover {
    border-inline-end-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -12px rgba(20, 23, 28, 0.25);
}
.member-section-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 8px;
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.member-section-card h3 { font-size: 1rem; margin: 0 0 4px; }
.member-section-card p { color: var(--muted); font-size: 0.85rem; margin: 0 0 10px; }
.member-section-cta { color: var(--accent); font-size: 0.82rem; font-weight: 700; margin-top: auto; }

/* ---------- Blog ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.blog-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color .15s ease, transform .15s ease;
    text-decoration: none;
    color: inherit;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.blog-card-title { font-size: 1rem; font-weight: 700; margin: 0; }
.blog-card-excerpt { color: #4b5563; font-size: 0.88rem; line-height: 1.7; margin: 0; }
.blog-card-locked { opacity: 0.75; }
.blog-card-locked:hover { border-color: var(--panel-border); transform: none; }
.blog-card-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
    margin: -6px 0 2px;
}

/* ---------- Blog post detail ---------- */
.blog-post-date { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }
.blog-post-body { max-width: 720px; }
.blog-post-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.blog-post-text { font-size: 0.98rem; line-height: 2; color: var(--text); }
.blog-post-text a { color: var(--accent); }
.blog-post-locked {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}
.blog-card-pm {
    text-decoration: none;
    border-color: var(--accent);
    background: linear-gradient(160deg, var(--panel) 60%, rgba(204, 82, 9, 0.10));
}
.blog-card-pm .blog-card-title,
.blog-card-pm .blog-card-excerpt { color: var(--text); }
.blog-card-pm-cta {
    align-self: flex-start;
    margin-top: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
}

/* ---------- PM page ---------- */

/* --- فرم/جعبه‌ی انتخاب روزانه --- */
.pm-daily-box {
    background: var(--panel);
    border: 1px solid var(--accent-border, var(--panel-border));
    border-inline-start: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
}
.pm-daily-box-done { border-inline-start-color: var(--active); }
.pm-daily-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; }
.pm-daily-sub { color: var(--muted); font-size: 0.88rem; margin: 0 0 14px; }
.pm-daily-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 16px;
    margin-bottom: 16px;
}
.pm-daily-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    cursor: pointer;
}
.pm-daily-opt input { accent-color: var(--accent); width: 16px; height: 16px; }

/* --- آکاردئون کلاس‌های تجهیز (جایگزین کارت‌های شبکه‌ای قبلی) --- */
.pm-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pm-acc-item {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.pm-acc-item[open] {
    border-color: var(--accent);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}
.pm-acc-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.98rem;
}
.pm-acc-summary::-webkit-details-marker { display: none; }
.pm-acc-summary::marker { content: ""; }
.pm-acc-name { flex: 1; }
.pm-acc-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.pm-acc-arrow {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-inline-end: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.pm-acc-item[open] .pm-acc-arrow { transform: rotate(225deg); border-color: var(--accent); }
.pm-acc-body { padding: 0 20px 20px; border-top: 1px solid var(--panel-border); padding-top: 16px; }

.pm-export-link {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--active);
    background: var(--active-bg);
    border: 1px solid var(--active-border);
    border-radius: 10px;
    padding: 3px 10px;
    white-space: nowrap;
}
.pm-export-link:hover { border-color: var(--active); }
.pm-simple-list { list-style: disc; padding-inline-start: 18px; margin: 0 0 12px; color: #4b5563; font-size: 0.88rem; }
.pm-simple-list li { margin-bottom: 10px; line-height: 1.6; }
.pm-item-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pm-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.pm-tag-type { background: var(--accent-soft); color: var(--accent); }
.pm-tag-exec { background: var(--active-bg); color: var(--active); }
.pm-tag-freq { background: #eef2f7; color: #3b5b7a; }
.pm-locked-hint {
    display: inline-block;
    color: var(--muted);
    font-size: 0.82rem;
    border-bottom: 1px dashed var(--panel-border);
}
.pm-locked-hint:hover { color: var(--accent); border-bottom-color: var(--accent); }
.pm-locked-hint-static { border-bottom: none; margin: 0; }
.pm-signup-banner { text-align: center; margin-top: 20px; }

/* ---------- Accessibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ==========================================================
   نقشه راه نت — برنامه زمانی، گانت، گزارش دوره‌ای (پنل کارفرما و ادمین)
   ========================================================== */
.site-main:has(.dash-wrap-wide) { max-width: 1280px; }
.dash-wrap-wide { max-width: none; }
button.btn-primary { border: none; cursor: pointer; font-family: inherit; display: inline-block; }
a.btn-secondary { display: inline-block; font-size: 0.88rem; }

.rm-muted { color: var(--muted); }
.rm-small { font-size: 0.82rem; }
.rm-nowrap { white-space: nowrap; }
.rm-link { color: var(--accent); font-weight: 600; }
.rm-link:hover { text-decoration: underline; }
.rm-late-text { color: #c0392b; font-weight: 600; }
.rm-intro { margin-bottom: 18px; font-weight: 600; color: var(--text); }

.rm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 22px; }
.rm-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rm-toolbar .btn-primary { padding: 8px 18px; font-size: 0.88rem; }
.rm-print-hint { font-size: 0.8rem; color: var(--muted); margin: -10px 0 18px; }

/* KPI cards */
.rm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.rm-kpi { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.rm-kpi-label { font-size: 0.75rem; color: var(--muted); }
.rm-kpi-value { font-size: 1.15rem; font-weight: 800; }
.rm-kpi.rm-accent { border-top: 3px solid var(--accent); }
.rm-kpi.rm-accent .rm-kpi-value { color: var(--accent); }
.rm-kpi.rm-bad { border-top: 3px solid #c0392b; }
.rm-kpi.rm-bad .rm-kpi-value { color: #c0392b; }
.rm-kpi.rm-good { border-top: 3px solid var(--active); }
.rm-kpi.rm-good .rm-kpi-value { color: var(--active); }

/* Phase cards */
.rm-phases { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rm-phase-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 14px 16px; }
.rm-phase-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rm-phase-no { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; border-radius: 4px; font-size: 0.85rem; }
.rm-phase-title { font-weight: 700; font-size: 0.92rem; }
.rm-bar-line { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.rm-bar-line b { color: var(--text); text-align: end; }
.rm-bar { height: 8px; background: var(--bg); border: 1px solid var(--panel-border); border-radius: 4px; overflow: hidden; }
.rm-bar-fill { height: 100%; }
.rm-fill-actual { background: var(--accent); }
.rm-fill-plan { background: #a9a59b; }
.rm-phase-meta { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

/* Gantt */
.rm-gantt-scroll { overflow-x: auto; background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); }
.rm-gantt { --lw: 270px; position: relative; min-width: 860px; }
.rm-g-row { display: flex; min-height: 32px; border-bottom: 1px solid #efede8; position: relative; z-index: 1; }
.rm-g-row:last-child { border-bottom: none; }
.rm-g-label { flex: 0 0 var(--lw); width: var(--lw); padding: 5px 10px; font-size: 0.76rem; line-height: 1.5; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-inline-end: 1px solid var(--panel-border); }
.rm-g-label small { font-weight: 700; white-space: nowrap; color: var(--muted); }
.rm-g-track { position: relative; flex: 1; }
.rm-g-head { background: #faf9f6; border-bottom: 1px solid var(--panel-border); min-height: 30px; }
.rm-g-head .rm-g-label { font-weight: 700; color: var(--muted); }
.rm-g-month { position: absolute; top: 0; bottom: 0; font-size: 0.7rem; color: var(--muted); text-align: center; line-height: 30px; white-space: nowrap; overflow: hidden; border-inline-start: 1px solid var(--line); }
.rm-g-body { position: relative; z-index: 0; }
.rm-g-overlay { position: absolute; top: 0; bottom: 0; inset-inline-start: var(--lw); inset-inline-end: 0; pointer-events: none; }
.rm-g-gridline { position: absolute; top: 0; bottom: 0; width: 0; border-inline-start: 1px dashed #e4e1d9; z-index: 0; }
.rm-g-today { position: absolute; top: 0; bottom: 0; width: 0; border-inline-start: 2px solid var(--accent); z-index: 3; }
.rm-g-today em { position: absolute; bottom: 2px; inset-inline-start: 3px; font-style: normal; font-size: 0.62rem; background: var(--accent); color: #fff; padding: 0 5px; border-radius: 3px; white-space: nowrap; }
.rm-g-phase { background: rgba(241, 239, 233, 0.75); }
.rm-g-phase .rm-g-label { font-weight: 700; font-size: 0.8rem; }
.rm-g-plan { position: absolute; top: 7px; height: 7px; background: #cfccc3; border-radius: 2px; }
.rm-g-plan.rm-g-sum { background: #7d7a72; height: 6px; }
.rm-g-act { position: absolute; top: 17px; height: 10px; border-radius: 2px; overflow: hidden; background: #dcdad3; }
.rm-g-act.rm-g-sum { background: var(--accent-soft); }
.rm-g-act.rm-g-sum .rm-g-fill { background: var(--accent); }
.rm-g-fill { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; background: #888; }
.rm-g-over { position: absolute; top: 17px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(45deg, #d6453a 0 3px, #f5c6c0 3px 6px); }

/* Status colors (bars, badges, text) */
.rm-g-act.st-done, .rm-g-act.st-done-late { background: #cfead6; }
.rm-g-act.st-done .rm-g-fill, .rm-g-act.st-done-late .rm-g-fill { background: var(--active); }
.rm-g-act.st-progress { background: #d6e4f3; }
.rm-g-act.st-progress .rm-g-fill { background: #2f6fb0; }
.rm-g-act.st-behind { background: #f6e6c4; }
.rm-g-act.st-behind .rm-g-fill { background: #c98a0b; }
.rm-g-act.st-late, .rm-g-act.st-start-late { background: #f6d3cf; }
.rm-g-act.st-late .rm-g-fill, .rm-g-act.st-start-late .rm-g-fill { background: #c0392b; }
.rm-st-text.st-done, .rm-st-text.st-done-late { color: var(--active); }
.rm-st-text.st-progress { color: #2f6fb0; }
.rm-st-text.st-behind { color: #a9770a; }
.rm-st-text.st-late, .rm-st-text.st-start-late { color: #c0392b; }

.rm-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; background: #eceae4; color: #5f636a; }
.rm-badge.st-done { background: var(--active-bg); color: var(--active); }
.rm-badge.st-done-late { background: #fdf1dc; color: #9a6a06; }
.rm-badge.st-progress { background: #e3eefa; color: #2f6fb0; }
.rm-badge.st-behind { background: #fdf1dc; color: #9a6a06; }
.rm-badge.st-late, .rm-badge.st-start-late { background: #fdecee; color: #b3273a; }

.rm-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.76rem; color: var(--muted); margin: 10px 2px 0; }
.rm-legend i { display: inline-block; width: 22px; height: 8px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; }
.rm-legend .lg-plan { background: #cfccc3; }
.rm-legend .lg-act { background: linear-gradient(to left, #2f6fb0 60%, #d6e4f3 60%); }
html[dir="ltr"] .rm-legend .lg-act { background: linear-gradient(to right, #2f6fb0 60%, #d6e4f3 60%); }
.rm-legend .lg-over { background: repeating-linear-gradient(45deg, #d6453a 0 3px, #f5c6c0 3px 6px); }
.rm-legend .lg-today { width: 2px; height: 14px; background: var(--accent); }
.rm-legend .lg-sc-plan { height: 3px; background: #9b978d; }
.rm-legend .lg-sc-actual { height: 3px; background: var(--accent); }

/* Tables */
.rm-table-scroll { overflow-x: auto; }
.rm-table { background: var(--panel); border: 1px solid var(--panel-border); }
.rm-table th { font-size: 0.78rem; white-space: nowrap; background: #faf9f6; }
.rm-table td { font-size: 0.82rem; vertical-align: top; }
.rm-tr-phase td { background: #f1efe9; font-weight: 700; color: var(--text); }
.rm-table tr.rm-tr-phase:hover td { background: #f1efe9; }
.rm-table .st-row-out td { color: #a3a6ab; }
.rm-forecast { color: #9a6a06; }
.rm-forecast small { font-size: 0.68rem; }
.rm-mini-bar { width: 70px; height: 5px; background: #ecebe6; border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.rm-mini-bar div { height: 100%; background: var(--accent); }
.rm-note { max-width: 260px; color: #4b5563; }

/* S-curve */
.rm-scurve { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 10px 12px 4px; }
.rm-scurve svg { width: 100%; height: 240px; display: block; }
.rm-scurve .sc-grid { stroke: #ecebe6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.rm-scurve .sc-plan { fill: none; stroke: #9b978d; stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.rm-scurve .sc-actual { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.rm-scurve .sc-dot { fill: var(--accent); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.rm-scurve-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); }

/* Report header & texts */
.rm-report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap;
    border-bottom: 2px solid var(--accent); padding-bottom: 16px; margin-bottom: 20px; }
.rm-report-kicker { font-size: 0.78rem; color: var(--accent); font-weight: 700; letter-spacing: 0.02em; }
.rm-report-title { margin: 4px 0 2px; font-size: 1.35rem; }
.rm-report-sub { color: var(--muted); font-weight: 600; }
.rm-report-meta { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; font-size: 0.85rem; }
.rm-report-meta dt { color: var(--muted); }
.rm-report-meta dd { margin: 0; font-weight: 700; }
.rm-text { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 14px 18px; font-size: 0.9rem; color: #374151; }
.rm-text-issues { border-inline-start: 3px solid #c0392b; }
.rm-signature { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--panel-border); font-size: 0.8rem; color: var(--muted); }

/* Admin */
.rm-admin-nav { display: flex; gap: 18px; flex-wrap: wrap; border-bottom: 1px solid var(--panel-border); margin: -12px 0 24px; padding-bottom: 10px; font-size: 0.88rem; }
.rm-admin-nav a { color: var(--muted); font-weight: 600; }
.rm-admin-nav a.active, .rm-admin-nav a:hover { color: var(--accent); }
.rm-alert-ok { background: var(--active-bg); border: 1px solid var(--active-border); color: var(--active); border-radius: 4px; padding: 10px 12px; font-size: 0.85rem; margin-bottom: 14px; }
.alert-error ul { margin: 6px 0 0; padding-inline-start: 18px; }
.rm-form { margin-bottom: 10px; }
.rm-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.rm-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: #4b5563; }
.rm-form label.rm-block { margin-bottom: 12px; }
.rm-form label.rm-check { flex-direction: row; align-items: center; gap: 8px; margin: 4px 0 14px; }
.rm-form input[type=text], .rm-form input[type=number], .rm-form textarea {
    font-family: inherit; background: #fff; border: 1px solid var(--panel-border); border-radius: 4px; padding: 7px 9px; font-size: 0.88rem; color: var(--text); }
.rm-form input:focus, .rm-form textarea:focus { outline: none; border-color: var(--accent); }
.rm-form .btn-primary { margin-top: 12px; }
.rm-edit-table td { vertical-align: middle; padding: 6px 6px; }
.rm-edit-table .rm-title-cell { min-width: 190px; }
.rm-form .rm-date { width: 98px; font-size: 0.8rem; padding: 5px 6px; }
.rm-form .rm-pct { width: 64px; padding: 5px 6px; }
.rm-form .rm-note-input { width: 200px; min-height: 32px; font-size: 0.8rem; padding: 5px 6px; resize: vertical; }
.rm-report-actions { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.rm-report-action-row { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; }
.rm-report-action-row form { margin: 0; }
.rm-report-action-row .btn-secondary { padding: 4px 12px; font-size: 0.78rem; }
.rm-danger:hover { border-color: #c0392b; color: #c0392b; }

@media (max-width: 700px) {
    .rm-gantt { --lw: 170px; }
    .rm-report-head { flex-direction: column; }
}

/* Print / PDF */
.rm-print-break { height: 0; }
@media print {
    @page { size: A4 landscape; margin: 10mm; }
    html, body { background: #fff !important; }
    body { font-size: 11px; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .site-header, .site-footer, .no-print, .tabs { display: none !important; }
    .site-main { padding: 0 !important; max-width: none !important; }
    .dash-wrap, .dash-wrap-wide { max-width: none !important; }
    .rm-gantt-scroll, .rm-table-scroll { overflow: visible !important; }
    .rm-gantt { min-width: 0 !important; --lw: 230px; }
    .rm-g-row { min-height: 23px; }
    .rm-g-label { padding: 2px 8px; font-size: 0.66rem; line-height: 1.35; }
    .rm-g-plan { top: 4px; height: 6px; }
    .rm-g-act, .rm-g-over { top: 12px; height: 8px; }
    .rm-g-head, .rm-g-month { min-height: 24px; line-height: 24px; }
    .rm-g-row, .rm-table tr, .rm-kpi, .rm-phase-card, .rm-text { break-inside: avoid; }
    .rm-print-break { break-before: page; }
    .rm-kpis { grid-template-columns: repeat(4, 1fr); }
    .rm-phases { grid-template-columns: repeat(4, 1fr); }
    .dash-section-title { margin-top: 18px; }
    .rm-link { color: inherit; }
    .rm-table th, .rm-table td { padding: 4px 6px; font-size: 0.68rem; line-height: 1.45; }
    .rm-badge { font-size: 0.62rem; padding: 1px 6px; }
}

/* Overall progress hero + delays + admin evaluation */
.rm-hero { display: flex; align-items: center; gap: 24px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.rm-hero-num { display: flex; flex-direction: column; min-width: 130px; }
.rm-hero-num span { font-size: 0.8rem; color: var(--muted); }
.rm-hero-num b { font-size: 2.2rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.rm-hero-bar-wrap { flex: 1; padding-top: 18px; }
.rm-hero-bar { position: relative; height: 16px; background: var(--bg); border: 1px solid var(--panel-border); border-radius: 8px; }
.rm-hero-fill { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; background: var(--accent); border-radius: 8px; }
.rm-hero-plan { position: absolute; top: -6px; bottom: -6px; width: 0; border-inline-start: 2px dashed #6b6860; }
.rm-hero-plan em { position: absolute; top: -20px; inset-inline-start: 0; transform: translateX(50%); font-style: normal; font-size: 0.7rem; color: #6b6860; white-space: nowrap; }
html[dir="ltr"] .rm-hero-plan em { transform: translateX(-50%); }
.rm-hero-scale { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted); margin-top: 4px; }
.rm-text-ok { border-inline-start: 3px solid var(--active); color: var(--active); }
.rm-reason { max-width: 380px; color: #374151; }
.rm-good-text { color: var(--active); font-weight: 600; }
.ev-row.ev-late td { background: #fff7f6; }
.rm-form textarea.ev-need { border-color: #e2544a; background: #fff3f2; }
.ev-summary { margin: 10px 0 18px; font-size: 0.88rem; }
@media (max-width: 700px) { .rm-hero { flex-direction: column; align-items: stretch; } }
@media print { .rm-hero { break-inside: avoid; } .rm-hero-num b { font-size: 1.8rem; } }
.rm-form .rm-ord { width: 58px; padding: 4px 5px; font-size: 0.8rem; }
.rm-form .rm-title-input { width: 100%; min-width: 220px; font-size: 0.82rem; padding: 5px 7px; }
.rm-form .rm-phase-input { width: 280px; font-weight: 700; font-size: 0.85rem; padding: 4px 7px; }
.rm-form select { font-family: inherit; background: #fff; border: 1px solid var(--panel-border); border-radius: 4px; padding: 7px 9px; font-size: 0.88rem; }
.base-row.base-deleted td { background: #fdecee; opacity: 0.6; text-decoration: line-through; }

/* Jalali date picker */
.rm-form input.rm-date { cursor: pointer; width: 118px; padding: 5px 6px 5px 26px !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a958a' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") no-repeat left 7px center; }
.rm-form .rm-form-grid input.rm-date { width: 100%; }
.jdp-pop { position: absolute; z-index: 1000; width: 252px; background: #fff; border: 1px solid var(--panel-border); border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.14); padding: 10px; font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 0.82rem; color: var(--text); }
.jdp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.jdp-title { display: flex; gap: 4px; }
.jdp-month, .jdp-year { font-family: inherit; font-size: 0.82rem; border: 1px solid var(--panel-border); border-radius: 4px; padding: 3px 4px; background: #fff; }
.jdp-year { width: 64px; }
.jdp-nav { width: 28px; height: 28px; border: 1px solid var(--panel-border); background: #fff; border-radius: 4px; cursor: pointer; font-size: 1rem; line-height: 1; }
.jdp-nav:hover { border-color: var(--accent); color: var(--accent); }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.jdp-wd { font-size: 0.72rem; color: var(--muted); padding: 2px 0 4px; }
.jdp-day { border: none; background: transparent; border-radius: 4px; padding: 5px 0; cursor: pointer; font-family: inherit; font-size: 0.82rem; color: var(--text); }
.jdp-day:hover { background: var(--accent-soft); }
.jdp-fri { color: #c0392b; }
.jdp-today { outline: 1px solid var(--accent); }
.jdp-sel, .jdp-sel:hover { background: var(--accent); color: #fff; }
.jdp-foot { display: flex; justify-content: space-between; margin-top: 8px; border-top: 1px solid var(--panel-border); padding-top: 8px; }
.jdp-foot button { border: none; background: transparent; color: var(--accent); font-family: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
/* Gantt: year row above month row */
.rm-g-head-year { min-height: 26px; background: #f1efe9; }
.rm-g-year { position: absolute; top: 0; bottom: 0; text-align: center; line-height: 26px; font-size: 0.74rem; font-weight: 700; color: var(--text); border-inline-start: 1px solid #b9b5ab; white-space: nowrap; overflow: hidden; }
.rm-g-month { font-size: 0.68rem; }
@media print {
  .rm-g-head-year, .rm-g-year { min-height: 20px; line-height: 20px; }
  .rm-g-month { font-size: 0.55rem; }
}
/* Assessment of implemented items */
.rm-eval-score { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 6px 16px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.rm-eval-score span { font-size: 0.82rem; color: var(--muted); }
.rm-eval-score b { font-size: 1.5rem; color: var(--accent); }
.rm-eval-score .rm-bar { height: 10px; }
.rm-eval-score small { grid-column: 1 / -1; color: var(--muted); font-size: 0.72rem; }
.rm-eval-table td:nth-child(2) { min-width: 240px; }
.rm-form .rm-eval-comment { width: 100%; min-width: 260px; }
@media print { .rm-eval-score, .rm-eval-table tr { break-inside: avoid; } }
/* Upcoming + web access note + organized print pages */
.dash-section-title small { font-size: 0.75rem; font-weight: 500; }
.rm-web-access { margin-top: 26px; background: var(--accent-soft); border: 1px solid #f1c7a4; border-radius: var(--radius); padding: 12px 16px; font-size: 0.88rem; line-height: 2; }
.rm-web-access b { color: var(--accent); margin: 0 3px; }
@media print {
  .rm-print-break { break-before: auto; }
  .rm-sec-break { break-before: page; }
  .dash-section-title { break-after: avoid; }
  .rm-hero, .rm-kpis, .rm-upcoming-table tr, .rm-delay-table tr, .rm-web-access, .rm-signature { break-inside: avoid; }
  /* نمودار زمانی کامل در یک صفحه */
  .rm-sec-gantt { break-inside: avoid; }
  .rm-sec-gantt .dash-section-title { margin: 0 0 6px; }
  .rm-sec-gantt .rm-gantt { --lw: 240px; }
  .rm-sec-gantt .rm-g-row { min-height: 17px; }
  .rm-sec-gantt .rm-g-label { padding: 0 6px; font-size: 0.58rem; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; }
  .rm-sec-gantt .rm-g-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rm-sec-gantt .rm-g-plan { top: 2px; height: 5px; }
  .rm-sec-gantt .rm-g-act, .rm-sec-gantt .rm-g-over { top: 8px; height: 6px; }
  .rm-sec-gantt .rm-g-head, .rm-sec-gantt .rm-g-month, .rm-sec-gantt .rm-g-head-year, .rm-sec-gantt .rm-g-year { min-height: 18px; line-height: 18px; }
  .rm-sec-gantt .rm-legend { margin-top: 4px; font-size: 0.6rem; }
  .rm-web-access { background: #fff; }
}
@media print {
  .rm-kpis { grid-template-columns: repeat(8, 1fr); gap: 6px; }
  .rm-kpi { padding: 6px 8px; }
  .rm-kpi-label { font-size: 0.6rem; }
  .rm-kpi-value { font-size: 0.85rem; }
  .rm-hero { padding: 8px 14px; margin-bottom: 8px; }
  .rm-report-head { padding-bottom: 8px; margin-bottom: 10px; }
}

/* ==========================================================
   گزارش دوره‌ای — ساختار جدید (۱۴۰۵/۰۷/۲۸)
   خلاصه‌ی مدیریتی + بخش اول سه‌موضوعی + وضعیت کلی + پیوست‌ها
   ========================================================== */
.rm-verdict { background: var(--panel); border: 1px solid var(--panel-border); border-inline-start: 3px solid var(--accent); border-radius: var(--radius);
    padding: 12px 16px; font-size: 0.95rem; line-height: 2; margin: 0 0 12px; color: #374151; }
.rm-kpis.rm-kpis-compact { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.rm-kpi-sub { font-size: 0.72rem; color: var(--muted); }
.rm-part-title { margin: 34px 0 4px; font-size: 0.82rem; font-weight: 800; color: var(--accent); border-top: 2px solid var(--accent); padding-top: 10px; }
.rm-sec-head { display: flex; gap: 12px; align-items: flex-start; margin: 24px 0 12px; break-after: avoid; }
.rm-sec-no { flex: 0 0 34px; height: 34px; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 800;
    display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.rm-sec-head h3 { margin: 0; font-size: 1.1rem; line-height: 1.6; }
.rm-sec-head p { margin: 2px 0 0; font-size: 0.8rem; color: var(--muted); }
.rm-text-lead { margin-bottom: 10px; }
.rm-text-cap { font-size: 0.75rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.rm-text-issues { margin-top: 18px; }
.rm-text-issues .rm-text-cap { color: #b3273a; }
.rm-sub-cap { font-size: 0.78rem; color: var(--muted); margin: 6px 2px; }
.rm-list { margin: 0; padding-inline-start: 20px; }
.rm-list li { margin: 2px 0; }
.rm-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.rm-chip { font-size: 0.78rem; background: #eceae4; color: #4b5563; padding: 3px 10px; border-radius: 999px; }
.rm-chip b { font-weight: 800; }
.rm-chip-good { background: var(--active-bg); color: var(--active); }
.rm-chip-bad { background: #fdecee; color: #b3273a; }
.rm-badge-soft { opacity: 0.7; }
.rm-trend { font-size: 0.7rem; }
.rm-trend-up { color: var(--active); }
.rm-trend-down { color: #c0392b; }
.rm-period-table td:nth-child(2), .rm-upcoming-table td:nth-child(2) { min-width: 200px; }
@media print {
  .rm-verdict, .rm-chips, .rm-text, .rm-period-table tr { break-inside: avoid; }
  .rm-sec-head { break-after: avoid; break-inside: avoid; margin: 14px 0 8px; }
  .rm-kpis.rm-kpis-compact { grid-template-columns: repeat(5, 1fr); }
  .rm-verdict { font-size: 0.8rem; padding: 6px 12px; line-height: 1.8; }
  .rm-part-title { margin-top: 14px; }
  .rm-sec-no { width: 26px; height: 26px; flex-basis: 26px; font-size: 0.85rem; }
  .rm-sec-head h3 { font-size: 0.95rem; }
}

/* ==========================================================
   فرم ثبت / ویرایش گزارش (ادمین)
   ========================================================== */
.ed-form [hidden] { display: none !important; }
.ed-step { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.ed-step-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ed-step-no { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.ed-step-head h3 { margin: 0; font-size: 1rem; line-height: 1.6; }
.ed-step-head p { margin: 2px 0 0; font-size: 0.8rem; color: var(--muted); }
.ed-empty, .ed-list-empty { background: var(--bg); border: 1px dashed var(--panel-border); border-radius: var(--radius); padding: 14px; color: var(--muted); font-size: 0.85rem; text-align: center; }
.ed-code { display: inline-block; min-width: 30px; margin-inline-end: 8px; padding: 0 6px; border-radius: 4px; background: #f1efe9; color: #5f636a; font-size: 0.75rem; font-weight: 700; text-align: center; }

/* پایش فعالیت‌های استقراریافته */
.ed-evals { display: flex; flex-direction: column; gap: 8px; }
.ed-eval { display: grid; grid-template-columns: minmax(200px, 1.1fr) auto minmax(200px, 1fr); gap: 8px 14px; align-items: center;
    padding: 10px 12px; border: 1px solid var(--panel-border); border-radius: var(--radius); background: #fcfbf9; }
.ed-eval-title { font-size: 0.88rem; font-weight: 600; }
.ed-seg { display: flex; flex-wrap: wrap; gap: 5px; }
.rm-form label.ed-seg-opt { flex-direction: row; gap: 0; margin: 0; cursor: pointer; position: relative; }
.ed-seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ed-seg-opt span { display: inline-block; padding: 4px 11px; border: 1px solid var(--panel-border); border-radius: 999px; font-size: 0.78rem; background: #fff; color: #4b5563; white-space: nowrap; }
.ed-seg-opt:hover span { border-color: #b9b5ab; }
.ed-seg-opt input:checked + span { color: #fff; border-color: transparent; font-weight: 700; }
.ed-seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-r4 input:checked + span { background: var(--active); }
.ed-r3 input:checked + span { background: #2f6fb0; }
.ed-r2 input:checked + span { background: #c98a0b; }
.ed-r1 input:checked + span { background: #c0392b; }
.ed-r0 input:checked + span { background: #8a8f98; }
.rm-form .ed-eval-comment { width: 100%; min-height: 34px; font-size: 0.8rem; padding: 6px 8px; resize: vertical; }

/* فیلتر و فهرست فعالیت‌ها */
.ed-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.ed-filter-label { font-size: 0.8rem; color: var(--muted); margin-inline-end: 4px; }
.ed-fbtn { font-family: inherit; font-size: 0.8rem; border: 1px solid var(--panel-border); background: #fff; color: #4b5563; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.ed-fbtn b { display: inline-block; min-width: 18px; margin-inline-start: 4px; padding: 0 5px; border-radius: 9px; background: #eceae4; font-size: 0.72rem; }
.ed-fbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.ed-fbtn.active b { background: rgba(255,255,255,0.25); }
.ed-hint { font-size: 0.76rem; color: var(--muted); margin: 0 0 12px; }
.ed-phase { font-weight: 800; font-size: 0.85rem; color: var(--text); margin: 14px 2px 6px; padding-bottom: 4px; border-bottom: 1px solid var(--panel-border); }
.ed-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 16px; align-items: center; padding: 10px 14px; margin-bottom: 8px;
    background: #fcfbf9; border: 1px solid var(--panel-border); border-inline-start: 4px solid #d9d6ce; border-radius: var(--radius); }
.ed-item.ev-late { border-inline-start-color: #c0392b; background: #fffafa; }
.ed-item.ed-changed { border-color: #f1c7a4; border-inline-start-color: var(--accent); }
.ed-item.ed-changed.ev-late { border-inline-start-color: #c0392b; }
.ed-item.ed-changed .ed-code { background: var(--accent); color: #fff; }
.ed-out { opacity: 0.6; grid-template-columns: 1fr; }
.ed-title { font-size: 0.9rem; font-weight: 600; line-height: 1.7; }
.ed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.ed-chip { font-size: 0.7rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: #eceae4; color: #5f636a; }
.ed-chip.st-done { background: var(--active-bg); color: var(--active); }
.ed-chip.st-done-late, .ed-chip.st-behind { background: #fdf1dc; color: #9a6a06; }
.ed-chip.st-progress { background: #e3eefa; color: #2f6fb0; }
.ed-chip.st-late, .ed-chip.st-start-late { background: #fdecee; color: #b3273a; }
.ed-prog { display: flex; align-items: center; gap: 8px; }
.ev-range { width: 140px; accent-color: var(--accent); cursor: pointer; }
.ed-pct-wrap { display: inline-flex; align-items: center; gap: 2px; }
.ed-pct-wrap i { font-style: normal; color: var(--muted); font-size: 0.85rem; }
.rm-form .ed-pct-wrap .rm-pct { width: 62px; text-align: center; font-weight: 700; }
.ed-done-btn, .ed-more-btn { font-family: inherit; font-size: 0.76rem; border: 1px solid var(--panel-border); background: #fff; color: #4b5563; border-radius: 4px; padding: 4px 9px; cursor: pointer; white-space: nowrap; }
.ed-done-btn:hover { border-color: var(--active); color: var(--active); }
.ed-more-btn:hover, .ed-more-btn.open { border-color: var(--accent); color: var(--accent); }
.ed-more-btn small { color: var(--muted); font-size: 0.7rem; }
.ed-more { grid-column: 1 / -1; display: none; grid-template-columns: repeat(3, minmax(130px, 160px)) minmax(200px, 1fr); gap: 10px; align-items: end;
    background: #fff; border: 1px dashed var(--panel-border); border-radius: 4px; padding: 10px; }
.ed-more.open { display: grid; }
.rm-form .ed-more input.rm-date { width: 100%; }
.rm-form .ed-more .rm-note-input, .rm-form .ed-reason .rm-note-input { width: 100%; }
.ed-reason { grid-column: 1 / -1; display: none; }
.ed-item.ev-late .ed-reason, .ed-item.has-reason .ed-reason { display: block; }
.ed-reason label { color: #b3273a !important; }
.ed-prevnote { background: var(--accent-soft); border: 1px solid #f1c7a4; border-radius: var(--radius); padding: 10px 14px; font-size: 0.82rem; margin-bottom: 12px; }
.ed-prevnote .rm-list { margin-top: 4px; }

/* نوار ثابت پایین فرم */
.ed-actionbar { position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap;
    background: rgba(255,255,255,0.97); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 10px 14px; margin-top: 8px; box-shadow: 0 -4px 18px rgba(0,0,0,0.07); }
.ed-actionbar .ev-summary { margin: 0; font-size: 0.82rem; }
.ed-actionbar-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rm-form .ed-actionbar .btn-primary { margin-top: 0; }
.rm-form .ed-actionbar label.rm-check { margin: 0; }
.ed-actionbar .btn-primary, .ed-actionbar .btn-secondary { padding: 8px 16px; font-size: 0.86rem; font-family: inherit; }

@media (max-width: 760px) {
  .ed-item { grid-template-columns: 1fr; }
  .ed-eval { grid-template-columns: 1fr; }
  .ed-more { grid-template-columns: 1fr 1fr; }
  .ed-more .ed-wide { grid-column: 1 / -1; }
  .ev-range { flex: 1; width: auto; }
  .ed-actionbar { flex-direction: column; align-items: stretch; }
}
/* برچسب‌ها: متن کمکی کنار عنوان، فیلد زیر آن */
.rm-form.ed-form label:not(.ed-seg-opt):not(.rm-check) { display: block; }
.rm-form.ed-form label:not(.ed-seg-opt):not(.rm-check) > input[type=text],
.rm-form.ed-form label:not(.ed-seg-opt):not(.rm-check) > textarea { display: block; width: 100%; margin-top: 4px; }
.rm-form.ed-form label small { font-size: 0.72rem; }

/* فهرست فعالیت‌های تحویلی (فرم ادمین) */
.tk-list { display: flex; flex-direction: column; gap: 8px; }
.tk-row { border: 1px solid var(--panel-border); border-inline-start: 4px solid #d9d6ce; border-radius: var(--radius); background: #fcfbf9; padding: 8px 12px; }
.tk-row.tk-prev { border-inline-start-color: #2f6fb0; }
.tk-line { display: flex; align-items: center; gap: 8px; }
.tk-sub { flex-wrap: wrap; margin-top: 6px; padding-inline-start: 34px; }
.tk-no { flex: 0 0 26px; height: 26px; border-radius: 4px; background: #f1efe9; color: #5f636a; font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rm-form .tk-title { flex: 1; min-width: 0; font-weight: 600; }
.tk-from { font-size: 0.68rem; font-weight: 700; color: #2f6fb0; background: #e3eefa; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.tk-tools { display: inline-flex; gap: 2px; }
.tk-tools button { width: 26px; height: 26px; border: 1px solid var(--panel-border); background: #fff; color: #6b7280; border-radius: 4px; cursor: pointer; font-size: 0.7rem; line-height: 1; padding: 0; }
.tk-tools button:hover { border-color: var(--accent); color: var(--accent); }
.tk-tools .tk-del:hover { border-color: #c0392b; color: #c0392b; background: #fdecee; }
.rm-form .tk-owner { width: 140px; padding: 5px 7px; font-size: 0.8rem; }
.rm-form input.rm-date.tk-due { width: 118px; }
.rm-form .tk-comment { flex: 1; min-width: 180px; min-height: 32px; font-size: 0.8rem; padding: 5px 7px; resize: vertical; }
.tk-empty { background: var(--bg); border: 1px dashed var(--panel-border); border-radius: var(--radius); padding: 12px; color: var(--muted); font-size: 0.82rem; text-align: center; }
.tk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tk-actions button { font-family: inherit; font-size: 0.8rem; border: 1px dashed var(--accent); background: #fff; color: var(--accent); border-radius: 4px; padding: 5px 12px; cursor: pointer; }
.tk-actions button:hover { background: var(--accent-soft); }
.tk-actions .tk-carry, .tk-actions .tk-fromtext { border-style: solid; border-color: var(--panel-border); color: #4b5563; }
.ed-gap { margin-top: 14px; }
.rm-text-after { margin-top: 10px; }
.rm-chip-warn { background: #fdf1dc; color: #9a6a06; }
.rm-task-table td:nth-child(2) { min-width: 220px; }
@media print { .rm-task-table tr { break-inside: avoid; } }
@media (max-width: 760px) {
  .tk-sub { padding-inline-start: 0; }
  .rm-form .tk-owner, .rm-form input.rm-date.tk-due { flex: 1; width: auto; }
}

/* فهرست فعالیت‌های استقراریافته (تب ادمین) */
.cr-head, .cr-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 90px auto; gap: 10px; align-items: center; }
.cr-head { font-size: 0.76rem; color: var(--muted); font-weight: 700; padding: 0 12px 6px; }
.cr-list { display: flex; flex-direction: column; gap: 6px; }
.cr-row { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 8px 12px; }
.cr-no { height: 26px; border-radius: 4px; background: #f1efe9; color: #5f636a; font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rm-form .cr-title { width: 100%; }
.rm-form label.cr-act { flex-direction: row; align-items: center; gap: 6px; font-size: 0.8rem; }
.cr-newtag { font-size: 0.72rem; font-weight: 700; color: var(--accent); }
.cr-new { border-color: #f1c7a4; }
.cr-off .cr-title { color: var(--muted); }
.cr-deleted-msg { display: none; font-size: 0.8rem; color: #b3273a; }
.cr-deleted-msg button { font-family: inherit; border: none; background: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0; }
.cr-row.cr-removed { background: #fdecee; }
.cr-row.cr-removed .cr-title { text-decoration: line-through; opacity: 0.6; }
.cr-row.cr-removed .cr-act, .cr-row.cr-removed .tk-tools { display: none; }
.cr-row.cr-removed .cr-deleted-msg { display: inline; }
.cr-form .btn-primary { margin-top: 14px; }
@media (max-width: 760px) { .cr-head { display: none; } .cr-row { grid-template-columns: 30px 1fr; } .cr-act, .tk-tools, .cr-deleted-msg { grid-column: 2; } }
