/* استایل پایه پنل سازمانی سام آرای افق */
.sam-ofoq-page {
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
    color: #172033;
    box-sizing: border-box;
}
.sam-ofoq-page * {
    box-sizing: border-box;
}
.sam-ofoq-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #f5f7fb, #e9edf5);
}
.sam-ofoq-login-card,
.sam-ofoq-card,
.sam-ofoq-topbar {
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.sam-ofoq-login-card {
    width: 100%;
    max-width: 420px;
    padding: 30px;
}
.sam-ofoq-login-card h1,
.sam-ofoq-topbar h1,
.sam-ofoq-card h2 {
    margin: 0 0 10px;
    line-height: 1.6;
}
.sam-ofoq-muted {
    color: #6b7280;
    margin: 0 0 20px;
}
.sam-ofoq-panel {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px;
    background: #f6f7fb;
    min-height: 100vh;
}
.sam-ofoq-topbar {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 18px;
}
.sam-ofoq-topbar p {
    margin: 0;
    color: #6b7280;
}
.sam-ofoq-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}
.sam-ofoq-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sam-ofoq-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sam-ofoq-card {
    padding: 18px;
    margin-bottom: 16px;
}
.sam-ofoq-stat-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}
.sam-ofoq-stat-card strong {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}
.sam-ofoq-stat-card p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.8;
}
.sam-ofoq-form label {
    display: block;
    font-size: 13px;
    margin: 12px 0 6px;
    color: #344054;
}
.sam-ofoq-form input,
.sam-ofoq-form select,
.sam-ofoq-form textarea {
    width: 100%;
    border: 1px solid #d6dae3;
    border-radius: 12px;
    padding: 11px 12px;
    background: #fff;
    color: #172033;
    outline: none;
}
.sam-ofoq-form input:focus,
.sam-ofoq-form select:focus,
.sam-ofoq-form textarea:focus {
    border-color: #334155;
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.08);
}
.sam-ofoq-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}
.sam-ofoq-full,
.sam-ofoq-form-submit {
    grid-column: 1 / -1;
}
.sam-ofoq-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
}
.sam-ofoq-checkbox input {
    width: auto;
}
.sam-ofoq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s ease, opacity .15s ease;
}
.sam-ofoq-btn:hover {
    transform: translateY(-1px);
    opacity: .92;
}
.sam-ofoq-btn-primary {
    background: #172033;
    color: #fff;
    margin-top: 14px;
}
.sam-ofoq-btn-secondary {
    background: #475569;
    color: #fff;
}
.sam-ofoq-btn-light {
    background: #eef2f7;
    color: #172033;
}
.sam-ofoq-alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin: 12px 0 16px;
    line-height: 1.8;
}
.sam-ofoq-alert-success {
    background: #ecfdf3;
    border: 1px solid #b7ebc8;
    color: #067647;
}
.sam-ofoq-alert-error {
    background: #fff1f3;
    border: 1px solid #fecdd6;
    color: #b42318;
}
.sam-ofoq-alert-info {
    background: #eff8ff;
    border: 1px solid #b9e6fe;
    color: #175cd3;
}
.sam-ofoq-table-wrap {
    overflow-x: auto;
}
.sam-ofoq-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}
.sam-ofoq-table th,
.sam-ofoq-table td {
    text-align: right;
    border-bottom: 1px solid #edf0f5;
    padding: 12px 10px;
    vertical-align: top;
}
.sam-ofoq-table th {
    background: #f8fafc;
    color: #344054;
    font-size: 13px;
}
.sam-ofoq-attendance-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 12px 0;
    color: #344054;
}
.sam-ofoq-inline-form {
    display: inline-block;
    margin-left: 8px;
}
@media (max-width: 768px) {
    .sam-ofoq-panel {
        padding: 12px;
    }
    .sam-ofoq-topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .sam-ofoq-grid-2,
    .sam-ofoq-grid-3,
    .sam-ofoq-form-grid {
        grid-template-columns: 1fr;
    }
    .sam-ofoq-login-card {
        padding: 22px;
    }
}

/* زبانه‌های پنل سازمانی و ساختار ماژولی نسخه 1.0.1 */
.sam-ofoq-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}
.sam-ofoq-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 12px;
    color: #344054;
    background: #f8fafc;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #edf0f5;
}
.sam-ofoq-tab:hover,
.sam-ofoq-tab.is-active {
    color: #fff;
    background: #172033;
    border-color: #172033;
}
.sam-ofoq-org-tree ul {
    list-style: none;
    margin: 0 20px 0 0;
    padding: 0;
    border-right: 1px solid #e5e7eb;
}
.sam-ofoq-org-tree > ul {
    margin-right: 0;
    border-right: none;
}
.sam-ofoq-org-tree li {
    margin: 10px 0;
    padding: 0 14px 0 0;
    position: relative;
}
.sam-ofoq-org-tree li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 18px;
    width: 10px;
    border-top: 1px solid #e5e7eb;
}
.sam-ofoq-org-tree span {
    display: inline-flex;
    background: #f8fafc;
    border: 1px solid #e7eaf0;
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 700;
}
.sam-ofoq-roadmap {
    margin: 0;
    padding-right: 20px;
    line-height: 2;
}
.sam-ofoq-admin-wrap .sam-ofoq-card,
.sam-ofoq-admin-wrap .sam-ofoq-topbar {
    max-width: 1180px;
}
.sam-ofoq-admin-tabs {
    margin: 18px 0;
}
@media (max-width: 768px) {
    .sam-ofoq-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .sam-ofoq-tab {
        white-space: nowrap;
    }
}

/* قالب تمام‌صفحه و UI ورود سازمانی نسخه 1.0.2 */
body.sam-ofoq-app-body,
body.sam-ofoq-fullscreen-template {
    margin: 0;
    padding: 0;
    background: #0f172a;
    overflow-x: hidden;
}
body.sam-ofoq-app-body #wpadminbar {
    display: none !important;
}
.sam-ofoq-app-root {
    min-height: 100vh;
}
.sam-ofoq-page {
    font-family: Tahoma, Arial, sans-serif;
}
.sam-ofoq-app-login {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 28px;
    background:
        radial-gradient(circle at 15% 12%, rgba(253, 224, 71, .22), transparent 28%),
        radial-gradient(circle at 85% 20%, rgba(59, 130, 246, .20), transparent 30%),
        linear-gradient(135deg, #07111f 0%, #101827 48%, #1c1917 100%);
}
.sam-ofoq-login-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
    pointer-events: none;
    opacity: .65;
}
.sam-ofoq-login-orb-one {
    width: 260px;
    height: 260px;
    right: -90px;
    top: -80px;
    background: rgba(250, 204, 21, .20);
}
.sam-ofoq-login-orb-two {
    width: 340px;
    height: 340px;
    left: -110px;
    bottom: -120px;
    background: rgba(30, 64, 175, .24);
}
.sam-ofoq-login-shell {
    position: relative;
    z-index: 2;
    width: min(1120px, 100%);
    min-height: calc(100vh - 56px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .72fr);
    align-items: center;
    gap: 28px;
}
.sam-ofoq-login-brand {
    color: #fff;
    padding: 34px;
}
.sam-ofoq-brand-logo-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.sam-ofoq-brand-logo-box {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .22);
    margin-bottom: 0;
}
.sam-ofoq-brand-logo-box-secondary {
    background: rgba(255, 255, 255, .96);
}
.sam-ofoq-brand-logo-box img {
    max-width: 72px;
    max-height: 72px;
    object-fit: contain;
}
.sam-ofoq-login-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(255, 255, 255, .08);
    font-size: 13px;
    font-weight: 700;
}
.sam-ofoq-login-brand h1 {
    max-width: 680px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.45;
    letter-spacing: -.03em;
}
.sam-ofoq-login-brand p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 16px;
    line-height: 2.1;
}
.sam-ofoq-login-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}
.sam-ofoq-login-features span {
    display: inline-flex;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .13);
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-weight: 700;
}
.sam-ofoq-login-card {
    width: 100%;
    max-width: 460px;
    justify-self: end;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 28px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .34);
    backdrop-filter: blur(18px);
}
.sam-ofoq-login-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.sam-ofoq-login-card-head img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #eef2f7;
    padding: 6px;
}
.sam-ofoq-login-card-head h2 {
    margin: 0 0 3px;
    color: #111827;
    font-size: 22px;
    line-height: 1.6;
}
.sam-ofoq-login-form label {
    color: #344054;
    font-weight: 700;
}
.sam-ofoq-login-form input[type="text"],
.sam-ofoq-login-form input[type="password"] {
    min-height: 50px;
    border-radius: 16px;
    border-color: #d9e0ea;
    background: #f8fafc;
    font-size: 14px;
}
.sam-ofoq-login-form input[type="text"]:focus,
.sam-ofoq-login-form input[type="password"]:focus {
    background: #fff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .13);
}
.sam-ofoq-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.sam-ofoq-btn-wide {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    margin-top: 18px;
    background: linear-gradient(135deg, #111827, #334155);
    box-shadow: 0 16px 32px rgba(17, 24, 39, .22);
}
.sam-ofoq-login-help {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    line-height: 1.9;
}
.sam-ofoq-panel {
    max-width: none;
    width: 100%;
    padding: 22px;
    background: #f6f7fb;
}
.sam-ofoq-panel > .sam-ofoq-topbar,
.sam-ofoq-panel > .sam-ofoq-tabs,
.sam-ofoq-panel > .sam-ofoq-card,
.sam-ofoq-panel > .sam-ofoq-grid {
    max-width: 1220px;
    margin-right: auto;
    margin-left: auto;
}
.sam-ofoq-topbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sam-ofoq-topbar-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e7eaf0;
    padding: 6px;
}
@media (max-width: 900px) {
    .sam-ofoq-app-login {
        padding: 18px;
    }
    .sam-ofoq-login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 18px;
    }
    .sam-ofoq-login-brand {
        padding: 14px 6px 0;
        text-align: center;
    }
    .sam-ofoq-brand-logo-group {
        margin-bottom: 16px;
        justify-content: center;
    }
    .sam-ofoq-login-brand p {
        margin: 0 auto;
    }
    .sam-ofoq-login-features {
        justify-content: center;
    }
    .sam-ofoq-login-card {
        justify-self: center;
        max-width: 520px;
        border-radius: 24px;
    }
}
@media (max-width: 520px) {
    .sam-ofoq-app-login {
        padding: 12px;
    }
    .sam-ofoq-login-brand h1 {
        font-size: 28px;
    }
    .sam-ofoq-login-brand p,
    .sam-ofoq-login-features {
        display: none;
    }
    .sam-ofoq-brand-logo-group {
        gap: 8px;
    }
    .sam-ofoq-brand-logo-box {
        width: 76px;
        height: 76px;
        border-radius: 20px;
    }
    .sam-ofoq-brand-logo-box img {
        max-width: 58px;
        max-height: 58px;
    }
    .sam-ofoq-login-card {
        padding: 20px;
    }
    .sam-ofoq-login-card-head {
        align-items: flex-start;
    }
    .sam-ofoq-topbar-brand {
        align-items: flex-start;
    }
}

.sam-ofoq-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid #dbe4ff;
    white-space: nowrap;
}
.sam-ofoq-mini-btn:hover {
    background: #dfe7ff;
    color: #143a9b;
}
.sam-ofoq-edit-card {
    border-color: #bfdbfe;
    box-shadow: 0 14px 45px rgba(29, 78, 216, .10);
}
.sam-ofoq-form small.sam-ofoq-muted {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

/* نسخه 1.0.4: داشبورد هدف‌محور فروشنده و تاریخ شمسی */
.sam-ofoq-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sam-ofoq-month-filter-card {
    padding: 14px 18px;
}
.sam-ofoq-month-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.sam-ofoq-month-filter label {
    margin: 0;
    white-space: nowrap;
    font-weight: 700;
}
.sam-ofoq-month-filter select {
    max-width: 260px;
}
.sam-ofoq-month-pair {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 8px;
}
.sam-ofoq-target-card h2 {
    margin-bottom: 16px;
}
.sam-ofoq-target-pair {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f5;
}
.sam-ofoq-target-pair:last-of-type {
    border-bottom: none;
}
.sam-ofoq-target-pair span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}
.sam-ofoq-target-pair strong {
    color: #111827;
    font-size: 20px;
    text-align: left;
}
.sam-ofoq-progress-row {
    margin: 18px 0 24px;
}
.sam-ofoq-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.sam-ofoq-progress-head strong {
    font-size: 15px;
    color: #111827;
}
.sam-ofoq-progress-head span {
    font-size: 15px;
    font-weight: 800;
    color: #172033;
}
.sam-ofoq-progress {
    width: 100%;
    height: 14px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.sam-ofoq-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #172033, #475569);
    border-radius: 999px;
    transition: width .25s ease;
}
.sam-ofoq-mobile-dashboard .sam-ofoq-stat-card strong {
    font-size: 21px;
}
@media (max-width: 1024px) {
    .sam-ofoq-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .sam-ofoq-grid-4 {
        grid-template-columns: 1fr;
    }
    .sam-ofoq-month-filter {
        align-items: stretch;
        flex-direction: column;
    }
    .sam-ofoq-month-filter select {
        max-width: none;
    }
    .sam-ofoq-month-pair {
        grid-template-columns: 1fr;
    }
    .sam-ofoq-target-pair {
        align-items: flex-start;
        flex-direction: column;
    }
    .sam-ofoq-target-pair strong {
        width: 100%;
        text-align: right;
        font-size: 22px;
    }
    .sam-ofoq-progress-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* نسخه 1.0.5: اصلاح داشبورد فروشنده، ریال، ورود/خروج دستی و نوار پیشرفت سبز */
.sam-ofoq-progress span {
    background: linear-gradient(90deg, #16a34a, #22c55e) !important;
}
.sam-ofoq-date-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #067647;
    font-size: 12px;
    font-weight: 800;
    vertical-align: middle;
}
.sam-ofoq-attendance-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.sam-ofoq-time-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
    border: 1px solid #edf0f5;
    border-radius: 16px;
    background: #f8fafc;
    margin: 0;
}
.sam-ofoq-time-form label {
    font-size: 13px;
    color: #344054;
    font-weight: 700;
}
.sam-ofoq-time-form input[type="time"] {
    width: 100%;
    border: 1px solid #d6dae3;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    color: #172033;
}
.sam-ofoq-today-sales-card {
    border-color: #bbf7d0;
    box-shadow: 0 14px 45px rgba(22, 163, 74, .08);
}
@media (max-width: 768px) {
    .sam-ofoq-attendance-actions {
        grid-template-columns: 1fr;
    }
}

/* بهبودهای نسخه 1.0.6: موبایل، رنگ‌بندی، زبانه‌های یک‌ردیفه و لاین فروشگاهی */
.sam-ofoq-panel {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, .10), transparent 28%),
        radial-gradient(circle at top left, rgba(59, 130, 246, .10), transparent 30%),
        #f4f7fb;
}
.sam-ofoq-topbar {
    border: none;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}
.sam-ofoq-topbar h1,
.sam-ofoq-topbar p { color: #fff; }
.sam-ofoq-topbar p { opacity: .78; }
.sam-ofoq-card {
    border: none;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
}
.sam-ofoq-stat-card {
    position: relative;
    overflow: hidden;
}
.sam-ofoq-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #22c55e, #3b82f6);
}
.sam-ofoq-stat-card strong { color: #0f172a; }
.sam-ofoq-progress span {
    background: linear-gradient(90deg, #16a34a, #22c55e, #84cc16) !important;
}
.sam-ofoq-tabs,
.sam-ofoq-admin-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    gap: 8px;
    scrollbar-width: thin;
}
.sam-ofoq-admin-tabs .nav-tab {
    float: none !important;
    display: inline-flex;
    margin: 0 !important;
    border-radius: 10px 10px 0 0;
    white-space: nowrap;
}
.sam-ofoq-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sam-ofoq-chip {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #067647;
    border: 1px solid #bbf7d0;
    font-size: 12px;
    font-weight: 700;
}
.sam-ofoq-chip.is-muted {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}
@media (max-width: 640px) {
    .sam-ofoq-panel { padding: 10px; }
    .sam-ofoq-topbar { padding: 12px; border-radius: 16px; }
    .sam-ofoq-topbar-brand { gap: 10px; align-items: center; }
    .sam-ofoq-topbar-brand img { width: 42px; height: 42px; border-radius: 13px; }
    .sam-ofoq-topbar-brand h1 {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 2px !important;
    }
    .sam-ofoq-topbar-brand p { font-size: 11px; line-height: 1.6; }
    .sam-ofoq-tabs { padding: 8px; border-radius: 14px; }
    .sam-ofoq-tab { padding: 8px 11px; font-size: 12px; }
    .sam-ofoq-card { border-radius: 16px; padding: 14px; }
    .sam-ofoq-card h2 { font-size: 16px; }
    .sam-ofoq-stat-card strong { font-size: 20px; }
}


/* نسخه 1.0.7: آبی آسمانی، نمایش لاین/شعبه، عملیات حذف و مدیریت بهتر شعب */
.sam-ofoq-topbar {
    background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
    box-shadow: 0 18px 45px rgba(2, 132, 199, .24) !important;
}
.sam-ofoq-btn-primary,
.sam-ofoq-tab.is-active,
.sam-ofoq-tab:hover {
    background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
    border-color: #0284c7 !important;
    color: #fff !important;
}
.sam-ofoq-btn-wide {
    background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
    box-shadow: 0 16px 32px rgba(2, 132, 199, .22) !important;
}
.sam-ofoq-form input:focus,
.sam-ofoq-form select:focus,
.sam-ofoq-form textarea:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14) !important;
}
.sam-ofoq-store-label {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    margin-top: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.sam-ofoq-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sam-ofoq-delete-form {
    margin: 0;
}
.sam-ofoq-mini-btn-danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}
.sam-ofoq-mini-btn-danger:hover {
    background: #fecaca !important;
    color: #991b1b !important;
}
.sam-ofoq-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.sam-ofoq-branch-search-form {
    margin-bottom: 12px;
}
@media (max-width: 640px) {
    .sam-ofoq-store-label {
        display: flex;
        width: fit-content;
        max-width: 100%;
        margin-right: 0;
        margin-top: 5px;
        white-space: normal;
        line-height: 1.7;
    }
    .sam-ofoq-search-row {
        grid-template-columns: 1fr;
    }
    .sam-ofoq-row-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .sam-ofoq-row-actions .sam-ofoq-mini-btn,
    .sam-ofoq-row-actions button.sam-ofoq-mini-btn {
        width: 100%;
    }
}

/* نسخه 1.0.9: استانداردسازی تایپوگرافی، ریسپانسیو بهتر و صفحه‌بندی شعب */
.sam-ofoq-page,
.sam-ofoq-page input,
.sam-ofoq-page select,
.sam-ofoq-page textarea,
.sam-ofoq-page button,
.sam-ofoq-admin-wrap,
.sam-ofoq-admin-wrap input,
.sam-ofoq-admin-wrap select,
.sam-ofoq-admin-wrap textarea,
.sam-ofoq-admin-wrap button {
    font-family: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, Arial, sans-serif !important;
    font-size: 14px;
    line-height: 1.85;
}
.sam-ofoq-page h1,
.sam-ofoq-admin-wrap h1 {
    font-size: 24px;
    line-height: 1.55;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.sam-ofoq-page h2,
.sam-ofoq-admin-wrap h2,
.sam-ofoq-card h2 {
    font-size: 18px !important;
    line-height: 1.6;
    font-weight: 800;
    margin-bottom: 12px;
}
.sam-ofoq-page h3,
.sam-ofoq-admin-wrap h3 {
    font-size: 16px !important;
    line-height: 1.6;
    font-weight: 800;
}
.sam-ofoq-muted,
.sam-ofoq-stat-card p,
.sam-ofoq-form label,
.sam-ofoq-table th,
.sam-ofoq-table td {
    font-size: 13px !important;
    line-height: 1.85;
}
.sam-ofoq-stat-card strong {
    font-size: 20px !important;
    line-height: 1.45;
}
.sam-ofoq-topbar-brand h1 {
    font-size: clamp(20px, 3vw, 30px) !important;
    line-height: 1.45 !important;
}
.sam-ofoq-login-brand h1 {
    font-size: clamp(28px, 4vw, 44px) !important;
}
.sam-ofoq-card {
    border-radius: 16px;
}
.sam-ofoq-btn,
.sam-ofoq-tab,
.sam-ofoq-mini-btn {
    font-size: 13px !important;
}
.sam-ofoq-table th,
.sam-ofoq-table td {
    padding: 10px 9px !important;
}
.sam-ofoq-paged-table tbody tr[hidden] {
    display: none !important;
}
.sam-ofoq-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #edf0f5;
}
.sam-ofoq-page-btn,
.sam-ofoq-page-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 800;
    font-size: 12px;
}
.sam-ofoq-page-btn {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #0369a1;
    cursor: pointer;
}
.sam-ofoq-page-btn:hover:not(:disabled) {
    background: #dbeafe;
}
.sam-ofoq-page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.sam-ofoq-page-info {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}
@media (max-width: 768px) {
    .sam-ofoq-page,
    .sam-ofoq-page input,
    .sam-ofoq-page select,
    .sam-ofoq-page textarea,
    .sam-ofoq-page button {
        font-size: 13px !important;
    }
    .sam-ofoq-page h1,
    .sam-ofoq-admin-wrap h1 {
        font-size: 20px !important;
    }
    .sam-ofoq-card h2,
    .sam-ofoq-page h2,
    .sam-ofoq-admin-wrap h2 {
        font-size: 16px !important;
    }
    .sam-ofoq-topbar-brand h1 {
        font-size: 16px !important;
    }
    .sam-ofoq-stat-card strong {
        font-size: 18px !important;
    }
    .sam-ofoq-table {
        min-width: 720px;
    }
}

/* بهبود خوانایی نسخه 1.0.10 */
.sam-ofoq-page,
.sam-ofoq-page input,
.sam-ofoq-page select,
.sam-ofoq-page textarea,
.sam-ofoq-page button {
    font-family: Vazirmatn, IRANSansX, "Segoe UI", Tahoma, Arial, sans-serif !important;
}
.sam-ofoq-page {
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.85;
}
.sam-ofoq-card h2,
.sam-ofoq-topbar h1,
.sam-ofoq-login-card h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
}
.sam-ofoq-table th,
.sam-ofoq-table td,
.sam-ofoq-form label,
.sam-ofoq-tabs a,
.sam-ofoq-tab-link,
.sam-ofoq-btn,
.sam-ofoq-mini-btn {
    font-weight: 650;
}
.sam-ofoq-form input,
.sam-ofoq-form select,
.sam-ofoq-form textarea {
    font-size: 14px;
    font-weight: 550;
}
.sam-ofoq-help-text {
    font-size: 12.5px;
    color: #64748b;
    margin: 6px 0 0;
}
.sam-store-branch-select[multiple] {
    min-height: 150px;
    line-height: 1.8;
}
@media (max-width: 768px) {
    .sam-ofoq-page { font-size: 13.5px; }
    .sam-ofoq-card h2 { font-size: 18px; }
    .sam-ofoq-form input,
    .sam-ofoq-form select,
    .sam-ofoq-form textarea { font-size: 13.5px; }
}

/* بهینه‌سازی خوانایی و انتخاب شعبه نسخه 1.0.11 */
.sam-ofoq-page,
.sam-ofoq-admin-wrap {
    font-family: IRANSansX, Vazirmatn, Tahoma, Arial, sans-serif !important;
    font-size: 14px;
    font-weight: 500;
}
.sam-ofoq-page h1,
.sam-ofoq-page h2,
.sam-ofoq-page h3,
.sam-ofoq-admin-wrap h1,
.sam-ofoq-admin-wrap h2,
.sam-ofoq-tab,
.sam-ofoq-table th,
.sam-ofoq-btn,
.sam-ofoq-mini-btn {
    font-weight: 800 !important;
}
.sam-ofoq-form label,
.sam-ofoq-table td,
.sam-ofoq-muted,
.sam-ofoq-help-text {
    font-weight: 600;
}
.sam-store-branch-picker {
    border: 1px solid #d6dae3;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}
.sam-store-branch-search {
    margin-bottom: 10px;
}
.sam-store-branch-checklist {
    max-height: 240px;
    overflow: auto;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 8px;
    background: #f8fbff;
}
.sam-store-branch-option {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    color: #172033;
    line-height: 1.8;
}
.sam-store-branch-option:hover {
    background: #eaf7ff;
}
.sam-store-branch-option input {
    width: 18px !important;
    min-width: 18px;
    height: 18px;
    accent-color: #22a7e8;
}
.sam-store-branch-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.sam-store-branch-count {
    color: #1d4ed8;
    font-weight: 800;
}
.sam-store-branch-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.sam-ofoq-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eaf7ff;
    color: #075985;
    border: 1px solid #bae6fd;
    font-size: 12px;
    font-weight: 800;
}
.sam-ofoq-chip-more {
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
}
.sam-ofoq-personnel-table {
    min-width: 1120px;
}
.sam-ofoq-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}
.sam-ofoq-page-btn {
    border: 1px solid #d6dae3;
    background: #fff;
    color: #172033;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 800;
}
.sam-ofoq-page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.sam-ofoq-page-info {
    color: #475569;
    font-weight: 800;
}
@media (max-width: 768px) {
    .sam-ofoq-page,
    .sam-ofoq-admin-wrap {
        font-size: 13px;
    }
    .sam-store-branch-checklist {
        max-height: 210px;
    }
    .sam-store-branch-picker-footer {
        align-items: stretch;
    }
    .sam-store-branch-picker-footer .sam-ofoq-btn {
        width: 100%;
    }
}

.sam-ofoq-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.sam-ofoq-section-head h2 {
    margin: 0;
}
@media (max-width: 640px) {
    .sam-ofoq-section-head {
        align-items: stretch;
    }
    .sam-ofoq-section-head .sam-ofoq-inline-form,
    .sam-ofoq-section-head .sam-ofoq-btn {
        width: 100%;
        display: block;
        text-align: center;
    }
}

/* رفع فیلتر شعبه نسخه 1.0.13 */
.sam-store-branch-option[hidden],
.sam-store-branch-empty-filtered[hidden] {
    display: none !important;
}
.sam-ofoq-personnel-table {
    min-width: 1260px;
}
.sam-ofoq-code-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 8px;
    background: #eff6ff;
    color: #075985;
    font-weight: 900;
}

.sam-ofoq-list-search {
    margin: 12px 0 14px;
    display: grid;
    gap: 8px;
    max-width: 420px;
}
.sam-ofoq-list-search label {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}
.sam-ofoq-list-search input[type="search"] {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d8e3ef;
    border-radius: 12px;
    padding: 8px 12px;
    background: #fff;
    font: inherit;
}


/* نسخه 1.0.15 — آکاردئون ورود پرسنل از طریق اکسل */
.sam-ofoq-accordion {
    padding: 0 !important;
    overflow: hidden;
}
.sam-ofoq-accordion-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    font-weight: 900;
    color: #0f172a;
    background: linear-gradient(135deg, #f8fbff, #eef8ff);
    border-bottom: 1px solid transparent;
}
.sam-ofoq-accordion-summary::-webkit-details-marker {
    display: none;
}
.sam-ofoq-accordion-summary::before {
    content: '+';
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 900;
    flex: 0 0 auto;
}
.sam-ofoq-accordion[open] .sam-ofoq-accordion-summary {
    border-bottom-color: #e2e8f0;
}
.sam-ofoq-accordion[open] .sam-ofoq-accordion-summary::before {
    content: '−';
}
.sam-ofoq-accordion-summary span {
    margin-inline-start: 0;
    margin-inline-end: auto;
}
.sam-ofoq-accordion-summary small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}
.sam-ofoq-accordion-body {
    padding: 20px 22px 24px;
}
@media (max-width: 640px) {
    .sam-ofoq-accordion-summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .sam-ofoq-accordion-summary span {
        margin-inline-start: 0;
    }
}


/* نسخه 1.0.16 — بازتر شدن عرض کل پنل سامانه */
.sam-ofoq-panel {
    max-width: none !important;
    width: 100% !important;
    padding-right: clamp(12px, 2.4vw, 34px) !important;
    padding-left: clamp(12px, 2.4vw, 34px) !important;
}
.sam-ofoq-panel > .sam-ofoq-topbar,
.sam-ofoq-panel > .sam-ofoq-tabs,
.sam-ofoq-panel > .sam-ofoq-card,
.sam-ofoq-panel > .sam-ofoq-grid {
    width: 100% !important;
    max-width: min(1680px, calc(100vw - 48px)) !important;
    margin-right: auto !important;
    margin-left: auto !important;
}
@media (min-width: 1800px) {
    .sam-ofoq-panel > .sam-ofoq-topbar,
    .sam-ofoq-panel > .sam-ofoq-tabs,
    .sam-ofoq-panel > .sam-ofoq-card,
    .sam-ofoq-panel > .sam-ofoq-grid {
        max-width: 1760px !important;
    }
}
@media (max-width: 768px) {
    .sam-ofoq-panel {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }
    .sam-ofoq-panel > .sam-ofoq-topbar,
    .sam-ofoq-panel > .sam-ofoq-tabs,
    .sam-ofoq-panel > .sam-ofoq-card,
    .sam-ofoq-panel > .sam-ofoq-grid {
        max-width: 100% !important;
    }
}

/* نسخه 1.0.18 — زبانه‌های داخلی اهداف فروش و فرمت ایمپورت اهداف شعب */
.sam-ofoq-subtabs {
    width: 100%;
    max-width: min(1680px, calc(100vw - 48px));
    margin: 0 auto 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.sam-ofoq-subtab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid #d8e3ef;
    border-radius: 14px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
.sam-ofoq-subtab:hover,
.sam-ofoq-subtab:focus {
    color: #0284c7;
    border-color: #7dd3fc;
}
.sam-ofoq-subtab.is-active {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    border-color: transparent;
}
.sam-ofoq-format-box {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: grid;
    gap: 8px;
}
.sam-ofoq-format-box code {
    white-space: normal;
    line-height: 2;
    direction: rtl;
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    color: #0f172a;
    font-family: inherit;
    font-weight: 700;
}
@media (max-width: 768px) {
    .sam-ofoq-subtabs {
        max-width: 100%;
    }
    .sam-ofoq-subtab {
        flex: 1 1 140px;
    }
}

/* نسخه 1.0.18 — بازتر شدن صفحات افزونه در پیشخوان وردپرس */
.sam-ofoq-admin-wrap .sam-ofoq-card,
.sam-ofoq-admin-wrap .sam-ofoq-topbar,
.sam-ofoq-admin-wrap .sam-ofoq-grid,
.sam-ofoq-admin-wrap .sam-ofoq-subtabs {
    max-width: min(1680px, calc(100vw - 260px)) !important;
}
@media (max-width: 960px) {
    .sam-ofoq-admin-wrap .sam-ofoq-card,
    .sam-ofoq-admin-wrap .sam-ofoq-topbar,
    .sam-ofoq-admin-wrap .sam-ofoq-grid,
    .sam-ofoq-admin-wrap .sam-ofoq-subtabs {
        max-width: 100% !important;
    }
}

/* Payroll details accordion */
.sam-ofoq-details {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    margin: 14px 0;
    background: #fff;
    overflow: hidden;
}
.sam-ofoq-details > summary {
    cursor: pointer;
    font-weight: 700;
    padding: 14px 16px;
    background: #f9fafb;
    color: #111827;
    list-style: none;
}
.sam-ofoq-details > summary::-webkit-details-marker {
    display: none;
}
.sam-ofoq-details > summary:after {
    content: '⌄';
    float: left;
    transition: transform .2s ease;
}
.sam-ofoq-details[open] > summary:after {
    transform: rotate(180deg);
}
.sam-ofoq-details > form,
.sam-ofoq-details > p,
.sam-ofoq-details > .sam-ofoq-form {
    margin: 14px 16px;
}

/* Payroll v1.0.25 */
.sam-ofoq-payroll-tools{
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
    margin:12px 0;
}
.sam-ofoq-table-filter{
    min-width:260px;
    max-width:100%;
}
.sam-ofoq-sortable-table thead th[data-sort-dir="asc"]::after{content:" ▲";font-size:11px;}
.sam-ofoq-sortable-table thead th[data-sort-dir="desc"]::after{content:" ▼";font-size:11px;}
.sam-ofoq-total-row th,
.sam-ofoq-total-row td{
    font-weight:700;
    background:#f6f7f7;
}

/* Payroll v1.0.26 UI polish */
.sam-ofoq-payroll-table-wrap{
    max-width:100%;
    overflow:auto;
    border:1px solid #e6eaf0;
    border-radius:18px;
    background:#fff;
    box-shadow:0 14px 32px rgba(15,23,42,.06);
    outline:none;
}
.sam-ofoq-payroll-table-wrap:focus{
    border-color:#98a2b3;
    box-shadow:0 0 0 3px rgba(152,162,179,.18),0 14px 32px rgba(15,23,42,.06);
}
.sam-ofoq-payroll-table{
    min-width:1850px;
    border-collapse:separate;
    border-spacing:0;
}
.sam-ofoq-payroll-table th,
.sam-ofoq-payroll-table td{
    padding:16px 14px;
    white-space:nowrap;
    vertical-align:middle;
    line-height:1.9;
}
.sam-ofoq-payroll-table thead th{
    position:sticky;
    top:0;
    z-index:2;
    background:#f8fafc;
    border-bottom:1px solid #dde3ea;
    font-weight:800;
}
.sam-ofoq-payroll-table tbody tr:nth-child(even) td{
    background:#fcfcfd;
}
.sam-ofoq-payroll-table tbody tr:hover td{
    background:#f5f9ff;
}
.sam-ofoq-payroll-table input.sam-ofoq-commission-rate{
    width:86px;
    min-height:42px;
    border-radius:14px;
    text-align:center;
}
.sam-ofoq-payroll-table .sam-ofoq-commission-amount,
.sam-ofoq-payroll-table .sam-ofoq-net-pay{
    font-weight:800;
    color:#101828;
}
.sam-ofoq-payroll-tools{
    background:linear-gradient(135deg,#f8fafc,#eef4ff);
    border:1px solid #e4e7ec;
    border-radius:18px;
    padding:14px;
}
.sam-ofoq-total-row th{
    position:sticky;
    bottom:0;
    z-index:1;
    background:#eef2f7 !important;
    border-top:2px solid #d0d5dd;
}

/* نسخه 1.0.30 - انیمیشن سبک صفحه ورود بدون حرکت دادن فرم لاگین */
.sam-ofoq-login-shell {
    isolation: isolate;
}
.sam-ofoq-login-left-animation {
    position: absolute;
    left: 2%;
    top: 50%;
    width: min(360px, 36vw);
    height: min(360px, 36vw);
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
    opacity: .78;
}
.sam-ofoq-login-left-animation span {
    position: absolute;
    inset: 18%;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, .22);
    background: radial-gradient(circle, rgba(56, 189, 248, .10), transparent 62%);
    box-shadow: 0 0 42px rgba(56, 189, 248, .12);
    animation: sam-ofoq-soft-pulse 6s ease-in-out infinite;
}
.sam-ofoq-login-left-animation span:nth-child(2) {
    inset: 30%;
    border-color: rgba(14, 165, 233, .26);
    animation-delay: -2s;
}
.sam-ofoq-login-left-animation span:nth-child(3) {
    inset: 42%;
    border-color: rgba(255, 255, 255, .18);
    background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 66%);
    animation-delay: -4s;
}
.sam-ofoq-login-card,
.sam-ofoq-login-brand {
    position: relative;
    z-index: 2;
}
@keyframes sam-ofoq-soft-pulse {
    0%, 100% {
        transform: scale(.94);
        opacity: .45;
    }
    50% {
        transform: scale(1.08);
        opacity: .95;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sam-ofoq-login-left-animation span {
        animation: none;
    }
}
@media (max-width: 900px) {
    .sam-ofoq-login-left-animation {
        left: 50%;
        top: auto;
        bottom: 12px;
        width: 260px;
        height: 260px;
        transform: translateX(-50%);
        opacity: .35;
    }
}


/* نسخه 1.0.31 - انیمیشن ورود فقط برای بخش معرفی سمت چپ؛ فرم لاگین ثابت می‌ماند */
.sam-ofoq-login-left-animation {
    display: none !important;
}
.sam-ofoq-login-brand {
    animation: sam-ofoq-brand-area-enter .75s ease-out both;
    will-change: opacity, transform;
}
.sam-ofoq-brand-logo-group {
    animation: sam-ofoq-brand-logos-enter .9s cubic-bezier(.2,.8,.2,1) both;
    transform-origin: center;
}
.sam-ofoq-brand-logo-box {
    animation: sam-ofoq-logo-soft-float 5.5s ease-in-out infinite;
}
.sam-ofoq-brand-logo-box-secondary {
    animation-delay: .35s;
}
.sam-ofoq-login-brand h1 {
    animation: sam-ofoq-title-enter .9s ease-out .12s both;
}
.sam-ofoq-login-brand p {
    animation: sam-ofoq-subtitle-enter .9s ease-out .24s both;
}
.sam-ofoq-login-card {
    animation: none !important;
    transform: none;
}
@keyframes sam-ofoq-brand-area-enter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes sam-ofoq-brand-logos-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.94);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
@keyframes sam-ofoq-title-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}
@keyframes sam-ofoq-subtitle-enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes sam-ofoq-logo-soft-float {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 20px 50px rgba(0, 0, 0, .22);
    }
    50% {
        transform: translateY(-6px);
        box-shadow: 0 26px 58px rgba(56, 189, 248, .18);
    }
}
@media (prefers-reduced-motion: reduce) {
    .sam-ofoq-login-brand,
    .sam-ofoq-brand-logo-group,
    .sam-ofoq-brand-logo-box,
    .sam-ofoq-login-brand h1,
    .sam-ofoq-login-brand p {
        animation: none !important;
    }
}

/* نسخه 1.0.33 - لیست قیمت و موجودی کالا */
.sam-ofoq-two-columns{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    align-items:start;
}
.sam-ofoq-inline-form{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    margin:12px 0 16px;
}
.sam-ofoq-inline-form input[type="number"]{width:95px;}
.sam-ofoq-table-scroll{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}
@media (max-width: 900px){
    .sam-ofoq-two-columns{grid-template-columns:1fr;}
    .sam-ofoq-inline-form input[type="number"]{width:100%;}
}

/* v1.0.41 - Daily personnel sales report improvements */
.sam-ofoq-sales-filter-form {
    margin: 14px 0 18px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f8fafc;
}
.sam-ofoq-filter-actions {
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
}
.sam-ofoq-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 16px;
}
.sam-ofoq-metric-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f5f7fb);
    border: 1px solid #e6eaf0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.sam-ofoq-metric-card span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}
.sam-ofoq-metric-card strong {
    display: block;
    font-size: 18px;
    color: #111827;
}
.sam-ofoq-sortable-table th[data-sam-sort] {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.sam-ofoq-sortable-table th[data-sam-sort]::after {
    content: ' ↕';
    color: #94a3b8;
    font-size: 11px;
}
.sam-ofoq-sortable-table th.sam-sort-asc::after { content: ' ↑'; color: #2563eb; }
.sam-ofoq-sortable-table th.sam-sort-desc::after { content: ' ↓'; color: #2563eb; }
@media (max-width: 900px) {
    .sam-ofoq-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .sam-ofoq-metric-grid { grid-template-columns: 1fr; }
}

/* v1.0.42 - Jalali calendar picker */
.sam-ofoq-date-mode-tabs{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:14px;
}
.sam-ofoq-date-mode-option{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;
    border:1px solid #dbe3ef;
    border-radius:14px;
    background:#fff;
    cursor:pointer;
    transition:.18s ease;
}
.sam-ofoq-date-mode-option.is-active{
    border-color:#38bdf8;
    background:#eff8ff;
    box-shadow:0 8px 20px rgba(14,165,233,.12);
}
.sam-ofoq-date-field input[readonly]{
    background:#fff;
    cursor:pointer;
}
.sam-ofoq-date-field.is-disabled{
    opacity:.45;
}
.sam-ofoq-date-field.is-disabled input{
    cursor:not-allowed;
    background:#f3f4f6;
}
.sam-jalali-datepicker{
    position:absolute;
    z-index:999999;
    width:292px;
    padding:12px;
    direction:rtl;
    background:#fff;
    border:1px solid #dce3ee;
    border-radius:18px;
    box-shadow:0 22px 60px rgba(15,23,42,.18);
}
.sam-jdp-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:10px;
}
.sam-jdp-head button,
.sam-jdp-foot button,
.sam-jdp-grid button{
    border:1px solid #e5e7eb;
    background:#fff;
    border-radius:12px;
    cursor:pointer;
}
.sam-jdp-head button{
    width:36px;
    height:36px;
    font-size:20px;
    line-height:1;
}
.sam-jdp-head strong{
    font-size:14px;
    color:#111827;
}
.sam-jdp-grid{
    display:grid;
    grid-template-columns:repeat(7, 1fr);
    gap:6px;
}
.sam-jdp-grid button{
    height:34px;
    font-size:13px;
}
.sam-jdp-grid button:hover,
.sam-jdp-grid button.is-selected{
    background:#0ea5e9;
    border-color:#0ea5e9;
    color:#fff;
}
.sam-jdp-foot{
    display:flex;
    justify-content:space-between;
    gap:8px;
    margin-top:10px;
}
.sam-jdp-foot button{
    flex:1;
    padding:8px 10px;
    color:#334155;
}
@media (max-width:560px){
    .sam-jalali-datepicker{left:16px !important; right:16px !important; width:auto;}
}

/* v1.0.44 - Accordion arrows and instant pagination for line sales report */
.sam-ofoq-accordion-arrow > .sam-ofoq-accordion-summary::before {
    content: '▾' !important;
    font-size: 14px;
    transition: transform .18s ease;
}
.sam-ofoq-accordion-arrow[open] > .sam-ofoq-accordion-summary::before {
    content: '▾' !important;
    transform: rotate(180deg);
}
.sam-ofoq-accordion-arrow > .sam-ofoq-accordion-summary {
    min-height: 58px;
}
.sam-ofoq-page-number.is-active,
.sam-ofoq-page-btn.is-active {
    background: #172033 !important;
    border-color: #172033 !important;
    color: #fff !important;
    opacity: 1 !important;
}
.sam-ofoq-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 4px;
    color: #64748b;
    font-weight: 900;
}

/* گزارش سفارشات */
.sam-order-native-select{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip:rect(0,0,0,0) !important;
    white-space:nowrap !important;
    border:0 !important;
}
.sam-order-branch-combo{
    position:relative;
    width:100%;
}
.sam-order-branch-trigger{
    width:100%;
    min-height:48px;
    border:1px solid rgba(15,23,42,.16);
    border-radius:14px;
    background:#fff;
    color:#172033;
    font:inherit;
    font-weight:800;
    text-align:right;
    padding:10px 14px 10px 42px;
    cursor:pointer;
    position:relative;
    box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.sam-order-branch-trigger:after{
    content:"⌄";
    position:absolute;
    left:15px;
    top:50%;
    transform:translateY(-50%);
    color:#64748b;
    font-size:18px;
}
.sam-order-branch-combo.is-open .sam-order-branch-trigger{
    border-color:#2aaad6;
    box-shadow:0 0 0 3px rgba(42,170,214,.13);
}
.sam-order-branch-trigger.is-empty span{
    color:#64748b;
    font-weight:700;
}
.sam-order-branch-menu{
    position:absolute;
    z-index:1000;
    top:calc(100% + 8px);
    right:0;
    left:0;
    padding:10px;
    border:1px solid rgba(15,23,42,.12);
    border-radius:16px;
    background:#fff;
    box-shadow:0 22px 55px rgba(15,23,42,.18);
}
.sam-order-branch-live-search{
    width:100% !important;
    min-height:42px !important;
    margin:0 0 8px !important;
    border-radius:12px !important;
}
.sam-order-branch-list{
    max-height:276px;
    overflow:auto;
    display:flex;
    flex-direction:column;
    gap:6px;
    padding-left:3px;
}
.sam-order-branch-item{
    width:100%;
    min-height:40px;
    border:1px solid rgba(15,23,42,.08);
    border-radius:12px;
    background:#f8fafc;
    color:#172033;
    text-align:right;
    font:inherit;
    font-weight:700;
    padding:8px 10px;
    cursor:pointer;
}
.sam-order-branch-item:hover,
.sam-order-branch-item.is-selected{
    background:#eef6ff;
    border-color:#2aaad6;
}
.sam-order-branch-empty{
    padding:12px;
    border-radius:12px;
    background:#f8fafc;
    color:#64748b;
    text-align:center;
    font-weight:700;
}
.sam-order-range-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(120px,1fr));
    gap:12px;
    align-items:end;
}
.sam-order-month-single-wrap[hidden],
.sam-order-month-range-wrap[hidden]{
    display:none !important;
}
.sam-ofoq-line-summary-grid{
    margin-top:16px;
}
.sam-order-summary-card{
    align-items:stretch !important;
    text-align:right !important;
}
.sam-order-summary-total{
    border-color:rgba(34,197,94,.25) !important;
}
.sam-order-summary-list{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:12px;
}
.sam-order-summary-list>div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:9px 10px;
    border-radius:12px;
    background:#f8fafc;
    border:1px solid rgba(15,23,42,.06);
}
.sam-order-summary-list span{
    color:#64748b;
    font-size:13px;
    font-weight:800;
}
.sam-order-summary-list b{
    color:#172033;
    font-size:14px;
    font-weight:900;
    white-space:nowrap;
}
.sam-deductions-preview[readonly]{
    background:#f8fafc;
    font-weight:700;
}
.sam-order-deductions-value,
.sam-order-deductions-cell{
    color:#dc2626 !important;
    font-weight:900;
}
.sam-deductions-preview.is-negative{
    color:#dc2626 !important;
    border-color:rgba(220,38,38,.35) !important;
}
@media (max-width: 768px){
    .sam-order-range-grid{
        grid-template-columns:1fr 1fr;
    }
    .sam-order-branch-menu{
        position:fixed;
        right:14px;
        left:14px;
        top:auto;
        bottom:18px;
        max-height:70vh;
    }
    .sam-order-branch-list{
        max-height:300px;
    }
    .sam-order-summary-list>div{
        align-items:flex-start;
        flex-direction:column;
        gap:4px;
    }
}
.sam-ofoq-form-wide{
    grid-column:1 / -1;
}

/* v1.0.64 - دکمه حذف گروهی گزارش فروش */
.sam-ofoq-btn-danger {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}
.sam-ofoq-btn-danger:hover {
    background: #b91c1c;
    color: #ffffff;
    border-color: #b91c1c;
}


/* v1.0.66 - Keep collapsible section title next to the arrow */
.sam-ofoq-accordion-summary {
    justify-content: flex-start;
}
.sam-ofoq-accordion-summary span {
    margin-inline-start: 0 !important;
    margin-inline-end: auto;
}
@media (max-width: 640px) {
    .sam-ofoq-accordion-summary {
        flex-direction: row;
        align-items: center;
    }
}

/* نسخه 1.0.70 - فیلتر و مدیریت گزارش ورود و خروج */
.sam-ofoq-attendance-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 18px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
}
.sam-ofoq-attendance-filter-form label,
.sam-ofoq-attendance-status-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}
.sam-ofoq-attendance-filter-form input,
.sam-ofoq-attendance-filter-form select,
.sam-ofoq-attendance-status-form input,
.sam-ofoq-attendance-status-form select {
    min-height: 38px;
    border-radius: 10px;
}
.sam-ofoq-attendance-missing-box {
    margin: 14px 0;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}
.sam-ofoq-attendance-missing-box h3,
.sam-ofoq-attendance-status-form h3 {
    margin: 0 0 8px;
    font-size: 16px;
}
.sam-ofoq-attendance-missing-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}
.sam-ofoq-attendance-missing-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #fed7aa;
}
.sam-ofoq-attendance-missing-list span {
    color: #64748b;
    font-size: 12px;
}
.sam-ofoq-attendance-missing-list em {
    color: #c2410c;
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
}
.sam-ofoq-attendance-status-form {
    margin: 14px 0 18px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
}
.sam-ofoq-success-note {
    padding: 10px 12px;
    border-radius: 12px;
    background: #ecfdf3;
    color: #027a48;
    font-weight: 700;
}
@media (max-width: 640px) {
    .sam-ofoq-attendance-filter-form label,
    .sam-ofoq-attendance-status-form label,
    .sam-ofoq-attendance-filter-form .sam-ofoq-btn,
    .sam-ofoq-attendance-status-form .sam-ofoq-btn {
        width: 100%;
    }
}

/* Attendance report: collapsible status form, export button and sortable final table */
.sam-ofoq-attendance-status-dropdown {
    margin: 18px 0;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.sam-ofoq-attendance-status-dropdown > summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 800;
    color: #111827;
    background: #f9fafb;
    list-style: none;
}
.sam-ofoq-attendance-status-dropdown > summary::-webkit-details-marker {
    display: none;
}
.sam-ofoq-attendance-status-dropdown > summary::after {
    content: '⌄';
    float: left;
    font-size: 18px;
    line-height: 1;
}
.sam-ofoq-attendance-status-dropdown[open] > summary::after {
    content: '⌃';
}
.sam-ofoq-attendance-status-dropdown .sam-ofoq-attendance-status-form {
    padding: 16px;
}
.sam-ofoq-attendance-export-form {
    margin: 14px 0 12px;
}
.sam-ofoq-sort-btn {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}
.sam-ofoq-sort-btn::after {
    content: ' ⇅';
    font-size: 12px;
    opacity: .65;
}
.sam-ofoq-sort-btn[data-sort-direction="asc"]::after {
    content: ' ↑';
}
.sam-ofoq-sort-btn[data-sort-direction="desc"]::after {
    content: ' ↓';
}

/* v1.0.75 - Commercial terms modal */
.sam-ofoq-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.62);
    padding: 24px;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
}
.sam-ofoq-popup-overlay:target {
    display: flex;
}
.sam-ofoq-popup {
    width: min(760px, 100%);
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e7eaf0;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
    padding: 22px;
    margin: 24px auto;
    position: relative;
    direction: rtl;
}
.sam-ofoq-popup-wide {
    width: min(980px, 100%);
}
.sam-ofoq-popup-close {
    position: absolute;
    top: 12px;
    left: 14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f1f5f9;
    color: #172033;
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
    font-weight: 700;
}
.sam-commercial-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.sam-commercial-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 120px minmax(140px, 180px) auto;
    gap: 10px;
    align-items: center;
}
.sam-commercial-item-row input,
.sam-commercial-item-row select {
    margin: 0;
}
.sam-ofoq-mini-btn-secondary {
    background: #eef2f7 !important;
    color: #172033 !important;
}
@media (max-width: 768px) {
    .sam-ofoq-popup-overlay {
        padding: 10px;
    }
    .sam-ofoq-popup {
        margin: 10px auto;
        padding: 18px 12px;
    }
    .sam-commercial-item-row {
        grid-template-columns: 1fr;
        border: 1px solid #edf0f5;
        border-radius: 14px;
        padding: 10px;
    }
}

.sam-ofoq-roadmap-form {
    margin-top: 16px;
}
.sam-ofoq-roadmap-textarea {
    width: 100%;
    min-height: 220px;
    margin-top: 8px;
    direction: rtl;
    resize: vertical;
}
.sam-ofoq-separator {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
}

/* v1.0.90 - نمایش واضح‌تر نام پرسنل در پنل سازمانی */
.sam-ofoq-panel-user-name {
    display: inline-block;
    font-size: 18px;
    font-weight: 900;
    color: #111827;
    line-height: 1.7;
}

.sam-ofoq-my-attendance-report-card h2 {
    margin-bottom: 6px;
}


/* v1.0.91 - نمایش لاین و شعب سرپرست داخل پاپ‌آپ */
.sam-ofoq-store-modal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.sam-ofoq-store-modal-link:hover,
.sam-ofoq-store-modal-link:focus {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    text-decoration: none;
}
.sam-supervisor-store-popup h2 {
    margin: 0 0 8px;
    padding-left: 44px;
}
.sam-supervisor-store-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.sam-supervisor-store-summary > div {
    border: 1px solid #e7eaf0;
    border-radius: 16px;
    background: #f8fafc;
    padding: 14px;
}
.sam-supervisor-store-summary strong {
    display: block;
    margin-bottom: 7px;
    color: #172033;
    font-size: 13px;
}
.sam-supervisor-store-summary span {
    display: block;
    color: #334155;
    line-height: 1.9;
    font-size: 13px;
}
.sam-supervisor-store-table-wrap {
    max-height: 52vh;
    overflow: auto;
}
@media (max-width: 768px) {
    .sam-ofoq-store-modal-link {
        margin: 8px 0 0;
        width: fit-content;
    }
    .sam-supervisor-store-summary {
        grid-template-columns: 1fr;
    }
}

/* v1.0.92 - خواناتر شدن سمت سرپرست و دکمه نمایش لاین/شعب */
.sam-ofoq-panel > .sam-ofoq-topbar p {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.9;
}
.sam-ofoq-store-modal-link {
    font-size: 16px;
    font-weight: 900;
    padding: 9px 16px;
}
.sam-ofoq-locked-filter {
    background: #f3f4f6 !important;
    color: #111827 !important;
    font-weight: 800;
    cursor: not-allowed;
}
@media (max-width: 768px) {
    .sam-ofoq-panel > .sam-ofoq-topbar p {
        font-size: 14px;
    }
    .sam-ofoq-store-modal-link {
        font-size: 15px;
        padding: 9px 14px;
    }
}


/* v1.0.93 - iPhone zoom prevention for organizational panel forms */
.sam-ofoq-wrap input,
.sam-ofoq-wrap select,
.sam-ofoq-wrap textarea,
.sam-ofoq-panel input,
.sam-ofoq-panel select,
.sam-ofoq-panel textarea,
.sam-ofoq-filter-form input,
.sam-ofoq-filter-form select,
.sam-ofoq-filter-form textarea {
    font-size: 16px !important;
}

.sam-ofoq-attendance-filter-form input[name="attendance_day"],
.sam-ofoq-attendance-status-form input[name="attendance_work_date"] {
    direction: ltr;
    text-align: center;
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}


/* نمایش نسخه افزونه بالای همه پنل‌ها */
.sam-ofoq-panel-version {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
}

/* v1.0.99 - بازطراحی هدر پنل سازمانی در تمام نقش‌ها */
.sam-ofoq-panel > .sam-ofoq-topbar.sam-ofoq-panel-header-v2 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 18px !important;
    padding: clamp(18px, 2.2vw, 28px) !important;
    border: 0 !important;
    border-radius: 28px !important;
    background: linear-gradient(135deg, #0891d3 0%, #38bdf8 100%) !important;
    box-shadow: 0 18px 42px rgba(2, 132, 199, .22) !important;
    overflow: hidden !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-topbar-brand {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 18px !important;
    min-width: 0 !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-topbar-brand img {
    width: 64px !important;
    height: 64px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12) !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-topbar-content {
    min-width: 0 !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-topbar-title-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-topbar-title-row h1 {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(22px, 2.2vw, 36px) !important;
    font-weight: 950 !important;
    line-height: 1.45 !important;
    white-space: normal !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-panel-version {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 7px 16px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .20) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.4 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10) !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-topbar-user-line {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, .92) !important;
    font-size: clamp(15px, 1.5vw, 20px) !important;
    font-weight: 850 !important;
    line-height: 1.8 !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-panel-user-name {
    color: #0f172a !important;
    font-size: clamp(17px, 1.65vw, 24px) !important;
    font-weight: 950 !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-store-modal-link,
.sam-ofoq-panel-header-v2 .sam-ofoq-store-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 8px 18px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, .30) !important;
    background: rgba(255, 255, 255, .16) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: clamp(15px, 1.4vw, 18px) !important;
    font-weight: 950 !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-topbar-logout-form {
    align-self: center !important;
    margin: 0 !important;
}

.sam-ofoq-panel-header-v2 .sam-ofoq-topbar-logout-form .sam-ofoq-btn-light {
    min-width: 104px !important;
    min-height: 52px !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .92) !important;
    color: #111827 !important;
    font-size: 17px !important;
    font-weight: 950 !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .14) !important;
}

@media (max-width: 768px) {
    .sam-ofoq-panel > .sam-ofoq-topbar.sam-ofoq-panel-header-v2 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 18px !important;
        border-radius: 24px !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-topbar-brand {
        grid-template-columns: 56px minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-topbar-brand img {
        width: 56px !important;
        height: 56px !important;
        border-radius: 16px !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-topbar-title-row {
        align-items: flex-start !important;
        margin-bottom: 8px !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-topbar-title-row h1 {
        max-width: 66% !important;
        font-size: 20px !important;
        line-height: 1.55 !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-panel-version {
        padding: 5px 12px !important;
        font-size: 13px !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-topbar-user-line {
        gap: 8px !important;
        font-size: 14px !important;
        line-height: 1.7 !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-panel-user-name {
        font-size: 17px !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-store-modal-link,
    .sam-ofoq-panel-header-v2 .sam-ofoq-store-label {
        width: 100% !important;
        min-height: 44px !important;
        margin-top: 4px !important;
        font-size: 15px !important;
        padding: 9px 14px !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-topbar-logout-form {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-topbar-logout-form .sam-ofoq-btn-light {
        min-width: 92px !important;
        min-height: 48px !important;
        border-radius: 16px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 390px) {
    .sam-ofoq-panel-header-v2 .sam-ofoq-topbar-title-row h1 {
        max-width: 62% !important;
        font-size: 18px !important;
    }

    .sam-ofoq-panel-header-v2 .sam-ofoq-panel-version {
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
}


/* v1.0.100 - نمایش نقش پرسنل در پایین زبانه ورود و خروج */
.sam-ofoq-attendance-role-summary {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.sam-ofoq-attendance-role-summary h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800;
}

.sam-ofoq-attendance-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.sam-ofoq-attendance-role-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f9fafb;
}

.sam-ofoq-attendance-role-item strong {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
}

.sam-ofoq-attendance-role-item span {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 640px) {
    .sam-ofoq-attendance-role-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* نسخه 2.0.8: داشبورد مدیریتی جمع‌وجور برای مدیر فروش در دسکتاپ */
.sam-sales-manager-dashboard {
    --sam-manager-radius: 16px;
}
.sam-sales-manager-dashboard .sam-ofoq-card {
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: var(--sam-manager-radius);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}
.sam-sales-manager-dashboard .sam-ofoq-card h2 {
    font-size: 16px;
    margin-bottom: 8px;
}
.sam-sales-manager-dashboard .sam-ofoq-muted,
.sam-sales-manager-dashboard .description {
    font-size: 12px;
    margin-bottom: 10px;
}
.sam-sales-manager-dashboard .sam-commercial-view-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.sam-sales-manager-dashboard .sam-ofoq-target-pair {
    padding: 8px 0;
}
.sam-sales-manager-dashboard .sam-ofoq-target-pair strong {
    font-size: 17px;
}
.sam-sales-manager-dashboard .sam-ofoq-target-pair span {
    font-size: 12px;
}
.sam-sales-manager-dashboard .sam-ofoq-mobile-dashboard {
    gap: 10px;
    margin-bottom: 12px;
}
.sam-sales-manager-dashboard .sam-ofoq-stat-card strong {
    font-size: 18px;
    margin-bottom: 5px;
}
.sam-sales-manager-dashboard .sam-ofoq-stat-card span,
.sam-sales-manager-dashboard .sam-ofoq-stat-card p {
    font-size: 12px;
}
.sam-sales-manager-dashboard .sam-ofoq-progress-row {
    margin: 10px 0 14px;
}
.sam-sales-manager-dashboard .sam-ofoq-progress {
    height: 10px;
}
.sam-sales-manager-dashboard .sam-ofoq-progress-head strong,
.sam-sales-manager-dashboard .sam-ofoq-progress-head span {
    font-size: 13px;
}
@media (min-width: 1280px) {
    .sam-ofoq-panel {
        max-width: 1680px;
    }
    .sam-sales-manager-dashboard .sam-ofoq-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 1024px) {
    .sam-sales-manager-dashboard .sam-commercial-view-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .sam-sales-manager-dashboard .sam-commercial-view-summary {
        grid-template-columns: 1fr;
    }
}

/* v2.0.9 - Sales manager daily report filter polished UI */
.sam-ofoq-sales-report-card .sam-ofoq-sales-filter-form{
    position:relative;
    padding:18px 18px 16px;
    border:1px solid #dbeafe;
    border-radius:22px;
    background:linear-gradient(135deg,#ffffff 0%,#f8fbff 55%,#eef8ff 100%);
    box-shadow:0 14px 34px rgba(15,23,42,.07);
}
.sam-ofoq-sales-report-card .sam-ofoq-date-mode-tabs{
    width:max-content;
    max-width:100%;
    padding:5px;
    border:1px solid #e2e8f0;
    border-radius:999px;
    background:#fff;
    box-shadow:0 8px 22px rgba(15,23,42,.05);
}
.sam-ofoq-sales-report-card .sam-ofoq-date-mode-option{
    border:0;
    border-radius:999px;
    padding:9px 14px;
    background:transparent;
    color:#475569;
    font-weight:800;
}
.sam-ofoq-sales-report-card .sam-ofoq-date-mode-option.is-active{
    background:linear-gradient(135deg,#0ea5e9,#2563eb);
    color:#fff;
    box-shadow:0 8px 18px rgba(37,99,235,.22);
}
.sam-ofoq-sales-report-card .sam-ofoq-date-mode-option input{
    accent-color:#2563eb;
}
.sam-ofoq-sales-report-card .sam-ofoq-date-field{
    position:relative;
    display:flex;
    flex-direction:column;
    gap:7px;
    padding:10px 12px;
    border:1px solid #e2e8f0;
    border-radius:18px;
    background:#fff;
    color:#64748b;
    font-size:12px;
    font-weight:800;
    box-shadow:0 8px 20px rgba(15,23,42,.04);
}
.sam-ofoq-sales-report-card .sam-ofoq-date-field:before{
    content:'📅';
    position:absolute;
    left:13px;
    bottom:15px;
    font-size:15px;
    opacity:.75;
}
.sam-ofoq-sales-report-card .sam-ofoq-date-field input[readonly]{
    height:42px;
    padding:0 12px 0 38px;
    border:0;
    border-radius:14px;
    background:#f8fafc;
    color:#0f172a;
    font-size:15px;
    font-weight:900;
    text-align:center;
    outline:none;
    box-shadow:inset 0 0 0 1px #e5edf7;
}
.sam-ofoq-sales-report-card .sam-ofoq-date-field input[readonly]:focus{
    box-shadow:inset 0 0 0 2px #38bdf8,0 0 0 4px rgba(56,189,248,.13);
    background:#fff;
}
.sam-ofoq-sales-report-card .sam-ofoq-date-field.is-disabled{
    opacity:.5;
    box-shadow:none;
}
.sam-ofoq-sales-report-card .sam-ofoq-filter-actions{
    align-self:end;
    padding-bottom:2px;
}
@media (max-width: 900px){
    .sam-ofoq-sales-report-card .sam-ofoq-date-mode-tabs{width:100%;}
    .sam-ofoq-sales-report-card .sam-ofoq-date-mode-option{flex:1;justify-content:center;}
}


/* نسخه 2.0.22: داشبورد executive مخصوص مدیر عامل */
.sam-ceo-dashboard {
    --sam-ceo-bg: #f6f8fc;
    --sam-ceo-card: #ffffff;
    --sam-ceo-line: #e6ebf3;
    --sam-ceo-text: #101828;
    --sam-ceo-muted: #667085;
    --sam-ceo-blue: #3b82f6;
    --sam-ceo-purple: #8b5cf6;
    --sam-ceo-green: #10b981;
    --sam-ceo-pink: #ec4899;
    --sam-ceo-orange: #f59e0b;
    padding: 16px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 14% 0%, rgba(59,130,246,.12), transparent 28%),
        radial-gradient(circle at 86% 12%, rgba(139,92,246,.14), transparent 30%),
        var(--sam-ceo-bg);
}
.sam-ceo-dashboard .sam-ofoq-card,
.sam-ceo-dashboard .sam-ceo-panel,
.sam-ceo-dashboard .sam-ceo-kpi-card,
.sam-ceo-dashboard .sam-ceo-selected-day-panel {
    border: 1px solid rgba(230, 235, 243, .95);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 18px 45px rgba(16, 24, 40, .06);
    backdrop-filter: blur(10px);
}
.sam-ceo-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}
.sam-ceo-hero-content {
    position: relative;
    min-height: 150px;
    padding: 26px 28px;
    overflow: hidden;
    border-radius: 26px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15,23,42,.98), rgba(30,41,59,.95) 52%, rgba(59,130,246,.88)),
        radial-gradient(circle at 18% 20%, rgba(255,255,255,.24), transparent 22%);
    box-shadow: 0 22px 50px rgba(15, 23, 42, .18);
}
.sam-ceo-hero-content:before,
.sam-ceo-hero-content:after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}
.sam-ceo-hero-content:before {
    width: 210px;
    height: 210px;
    left: -70px;
    top: -70px;
    background: rgba(139, 92, 246, .38);
    filter: blur(4px);
}
.sam-ceo-hero-content:after {
    width: 160px;
    height: 160px;
    right: 60%;
    bottom: -95px;
    background: rgba(16, 185, 129, .25);
}
.sam-ceo-eyebrow,
.sam-ceo-hero-content h2,
.sam-ceo-hero-content p {
    position: relative;
    z-index: 1;
}
.sam-ceo-eyebrow {
    display: inline-flex;
    padding: 6px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    font-size: 12px;
    font-weight: 900;
    color: rgba(255,255,255,.9);
}
.sam-ceo-hero-content h2 {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.5;
    color: #fff;
}
.sam-ceo-hero-content p {
    max-width: 720px;
    margin: 0;
    font-size: 13px;
    line-height: 2;
    color: rgba(255,255,255,.78);
}
.sam-ceo-date-filter {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-radius: 26px;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--sam-ceo-line);
    box-shadow: 0 18px 45px rgba(16,24,40,.06);
}
.sam-ceo-date-filter label {
    font-size: 13px;
    font-weight: 900;
    color: var(--sam-ceo-text);
}
.sam-ceo-date-filter select {
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    font-weight: 900;
    color: #172033;
}
.sam-ceo-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.sam-ceo-kpi-card {
    position: relative;
    min-height: 150px;
    padding: 17px;
    overflow: hidden;
    border-radius: 24px;
}
.sam-ceo-kpi-card:before {
    content: "";
    position: absolute;
    inset-inline-start: -32px;
    top: -36px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(59,130,246,.12);
}
.sam-ceo-kpi-primary:before {
    background: rgba(236,72,153,.14);
}
.sam-ceo-kpi-head {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}
.sam-ceo-kpi-head span {
    font-size: 13px;
    font-weight: 900;
    color: var(--sam-ceo-muted);
}
.sam-ceo-kpi-head i {
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-style: normal;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.sam-ceo-kpi-card strong {
    position: relative;
    display: block;
    margin-bottom: 8px;
    color: var(--sam-ceo-text);
    font-size: 23px;
    line-height: 1.4;
    letter-spacing: -.2px;
}
.sam-ceo-kpi-card small {
    position: relative;
    display: block;
    min-height: 22px;
    color: var(--sam-ceo-muted);
    font-size: 12px;
    font-weight: 800;
}
.sam-ceo-mini-progress {
    position: relative;
    width: 100%;
    height: 8px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
}
.sam-ceo-mini-progress span {
    display: block;
    width: var(--sam-w, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sam-ceo-blue), var(--sam-ceo-purple), var(--sam-ceo-pink));
}
.sam-ceo-mini-spark {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 36px;
    margin-top: 14px;
}
.sam-ceo-mini-spark span {
    flex: 1 1 0;
    min-width: 4px;
    height: var(--sam-h, 30%);
    border-radius: 999px 999px 5px 5px;
    background: linear-gradient(180deg, var(--sam-ceo-pink), rgba(236,72,153,.22));
}
.sam-ceo-mini-spark-soft span {
    background: linear-gradient(180deg, var(--sam-ceo-blue), rgba(59,130,246,.18));
}
.sam-ceo-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(290px, .75fr);
    gap: 14px;
    margin-bottom: 14px;
}
.sam-ceo-panel {
    border-radius: 26px;
    padding: 18px;
}
.sam-ceo-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.sam-ceo-panel-head h2,
.sam-ceo-panel h2 {
    margin: 0 0 7px;
    font-size: 17px;
    color: var(--sam-ceo-text);
}
.sam-ceo-panel-head p,
.sam-ceo-panel p {
    margin: 0;
    color: var(--sam-ceo-muted);
    font-size: 12px;
    line-height: 1.9;
    font-weight: 700;
}
.sam-ceo-chart-summary {
    flex: 0 0 auto;
    min-width: 180px;
    padding: 12px 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}
.sam-ceo-chart-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 12px;
}
.sam-ceo-chart-meta div,
.sam-ceo-bar-strip-wrap {
    padding: 12px 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}
.sam-ceo-chart-meta small,
.sam-ceo-bar-strip-head small,
.sam-ceo-selected-day-panel small {
    display: block;
    margin-top: 5px;
    color: var(--sam-ceo-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.7;
}
.sam-ceo-chart-summary span,
.sam-ceo-ring-lines span,
.sam-ceo-list-row span,
.sam-ceo-selected-day-panel span {
    display: block;
    color: var(--sam-ceo-muted);
    font-size: 12px;
    font-weight: 900;
}
.sam-ceo-chart-summary strong,
.sam-ceo-ring-lines strong,
.sam-ceo-list-row strong,
.sam-ceo-selected-day-panel strong {
    display: block;
    margin-top: 5px;
    color: var(--sam-ceo-text);
    font-size: 16px;
    font-weight: 1000;
}

.sam-ceo-simple-chart {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 22px;
    padding: 18px 78px 30px 18px;
    background:
        linear-gradient(180deg, rgba(59,130,246,.07), rgba(139,92,246,.045)),
        repeating-linear-gradient(180deg, transparent 0, transparent 72px, rgba(148,163,184,.20) 73px);
    border: 1px solid #edf2f7;
}
.sam-ceo-simple-chart-scale {
    position: absolute;
    top: 18px;
    bottom: 32px;
    right: 18px;
    z-index: 2;
    width: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
}
.sam-ceo-simple-chart-scale span {
    color: var(--sam-ceo-muted);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.5;
}
.sam-ceo-chart-bars {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.sam-ceo-simple-bar {
    position: relative;
    flex: 1 1 0;
    min-width: 7px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
}
.sam-ceo-simple-bar i {
    display: block;
    width: 100%;
    height: var(--sam-h, 2%);
    min-height: 3px;
    border-radius: 10px 10px 4px 4px;
    background: #3b82f6;
    box-shadow: 0 10px 18px rgba(59,130,246,.18);
}
.sam-ceo-simple-bar.is-empty i {
    background: #dbe4f0;
    box-shadow: none;
}
.sam-ceo-simple-bar.is-today i {
    background: linear-gradient(180deg, #8b5cf6, #3b82f6);
    box-shadow: 0 12px 24px rgba(139,92,246,.24);
}
.sam-ceo-simple-bar:after {
    content: attr(data-day);
    position: absolute;
    right: 50%;
    bottom: 0;
    transform: translateX(50%);
    opacity: 0;
    color: var(--sam-ceo-muted);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}
.sam-ceo-simple-bar.is-major:after,
.sam-ceo-simple-bar.is-today:after {
    opacity: 1;
}
.sam-ceo-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    color: var(--sam-ceo-muted);
    font-size: 11px;
    font-weight: 900;
}
.sam-ceo-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.sam-ceo-chart-legend i {
    width: 20px;
    height: 8px;
    border-radius: 999px;
    background: #3b82f6;
}
.sam-ceo-chart-legend-today i {
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
}

.sam-ceo-line-chart {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 22px;
    padding: 16px 18px 18px 78px;
    background: linear-gradient(180deg, rgba(59,130,246,.08), rgba(139,92,246,.06));
    border: 1px solid #edf2f7;
}
.sam-ceo-y-axis-labels {
    position: absolute;
    top: 16px;
    bottom: 18px;
    right: 18px;
    width: 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    z-index: 2;
}
.sam-ceo-y-axis-labels span,
.sam-ceo-axis-labels span,
.sam-ceo-bar-strip-head span,
.sam-ceo-bar-strip-head small {
    color: var(--sam-ceo-muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.7;
}
.sam-ceo-line-chart svg {
    position: absolute;
    inset: 16px 18px 18px 78px;
    width: calc(100% - 96px);
    height: calc(100% - 34px);
    overflow: visible;
}
.sam-ceo-grid-line {
    stroke: rgba(148,163,184,.26);
    stroke-width: .55;
    stroke-dasharray: 3 3;
}
.sam-ceo-area {
    fill: rgba(59,130,246,.16);
}
.sam-ceo-line-chart polyline {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 8px 14px rgba(59,130,246,.25));
}
.sam-ceo-point {
    fill: #fff;
    stroke: #3b82f6;
    stroke-width: 1.2;
}
.sam-ceo-point.is-selected {
    fill: #8b5cf6;
    stroke: #fff;
    stroke-width: 1.4;
}
.sam-ceo-axis-labels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    text-align: center;
}
.sam-ceo-bar-strip-wrap {
    margin-top: 12px;
}
.sam-ceo-bar-strip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.sam-ceo-bar-strip {
    display: flex;
    align-items: end;
    gap: 5px;
    height: 78px;
    margin-top: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}
.sam-ceo-bar-strip span {
    flex: 1 1 0;
    height: var(--sam-h, 8%);
    min-height: 5px;
    border-radius: 999px 999px 4px 4px;
    background: linear-gradient(180deg, #8b5cf6, rgba(139,92,246,.24));
}
.sam-ceo-ring-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sam-ceo-panel-head-compact {
    align-items: center;
    margin-bottom: 8px;
}
.sam-ceo-panel-head-compact span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 1000;
}
.sam-ceo-ring {
    width: 190px;
    height: 190px;
    margin: 10px auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    background: conic-gradient(var(--sam-ceo-blue) var(--sam-ring, 0%), #edf2f7 0);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 18px 35px rgba(59,130,246,.14);
}
.sam-ceo-ring:before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #eef2f7;
}
.sam-ceo-ring strong,
.sam-ceo-ring small {
    position: relative;
    z-index: 1;
    text-align: center;
}
.sam-ceo-ring strong {
    font-size: 26px;
    color: var(--sam-ceo-text);
}
.sam-ceo-ring small {
    margin-top: 34px;
    color: var(--sam-ceo-muted);
    font-weight: 1000;
}
.sam-ceo-ring-lines {
    display: grid;
    gap: 10px;
}
.sam-ceo-ring-lines div,
.sam-ceo-list-row {
    padding: 11px 12px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}
.sam-ceo-secondary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.sam-ceo-stat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sam-ceo-stat-list h2,
.sam-ceo-double-ring-panel h2 {
    margin-bottom: 4px;
}
.sam-ceo-list-row small {
    display: block;
    margin-top: 5px;
    color: var(--sam-ceo-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.7;
}
.sam-ceo-double-rings {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 15px 0;
}
.sam-ceo-ring-small {
    width: 132px;
    height: 132px;
    margin: 0;
    background: conic-gradient(var(--sam-ceo-purple) var(--sam-ring, 0%), #edf2f7 0);
}
.sam-ceo-ring-small:before {
    inset: 14px;
}
.sam-ceo-ring-small strong {
    font-size: 18px;
}
.sam-ceo-ring-small small {
    margin-top: 28px;
    font-size: 11px;
}
.sam-ceo-selected-day-panel {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 15px;
    border-radius: 24px;
    margin-bottom: 14px;
}
.sam-ceo-selected-day-panel div {
    padding: 13px 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    border: 1px solid #edf2f7;
}
.sam-ceo-selected-day-highlight {
    background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(139,92,246,.08)) !important;
}
.sam-ceo-selected-day-highlight strong {
    font-size: 18px;
}
@media (min-width: 1280px) {
    .sam-ceo-dashboard .sam-ofoq-panel {
        max-width: 1720px;
    }
}
@media (max-width: 1200px) {
    .sam-ceo-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .sam-ceo-main-grid,
    .sam-ceo-secondary-grid,
    .sam-ceo-chart-meta,
    .sam-ceo-selected-day-panel {
        grid-template-columns: 1fr;
    }
    .sam-ceo-axis-labels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 820px) {
    .sam-ceo-dashboard {
        padding: 10px;
        border-radius: 20px;
    }
    .sam-ceo-hero {
        grid-template-columns: 1fr;
    }
    .sam-ceo-kpi-grid,
    .sam-ceo-selected-day-panel,
    .sam-ceo-chart-meta,
    .sam-ceo-axis-labels {
        grid-template-columns: 1fr;
    }
    .sam-ceo-hero-content {
        padding: 20px;
        min-height: auto;
    }
    .sam-ceo-hero-content h2 {
        font-size: 21px;
    }
    .sam-ceo-panel-head {
        flex-direction: column;
    }
    .sam-ceo-chart-summary {
        width: 100%;
        min-width: 0;
    }
    .sam-ceo-simple-chart {
        height: 240px;
        padding: 14px 58px 28px 12px;
    }
    .sam-ceo-chart-bars {
        gap: 3px;
    }
    .sam-ceo-simple-bar {
        min-width: 4px;
    }
    .sam-ceo-simple-chart-scale {
        right: 12px;
        width: 40px;
    }
    .sam-ceo-line-chart {
        height: 240px;
        padding: 14px 14px 14px 62px;
    }
    .sam-ceo-line-chart svg {
        inset: 14px 14px 14px 62px;
        width: calc(100% - 76px);
        height: calc(100% - 28px);
    }
    .sam-ceo-y-axis-labels {
        right: 14px;
        width: 42px;
    }
    .sam-ceo-bar-strip-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .sam-ceo-double-rings {
        flex-wrap: wrap;
    }
}

/* v2.0.32 - CEO monthly line sales cards and branch drill-down popup */
.sam-ceo-monthly-summary-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.sam-ceo-line-summary-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.sam-ceo-line-summary-card:hover,
.sam-ceo-line-summary-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.10);
    border-color: rgba(15, 23, 42, 0.18);
    outline: none;
}
.sam-ceo-line-summary-card em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}
.sam-ceo-line-sales-popup .sam-ofoq-popup {
    max-height: calc(100vh - 56px);
    overflow: auto;
}
.sam-ceo-line-sales-popup .sam-ofoq-table-wrap {
    max-height: 62vh;
    overflow: auto;
}
@media (max-width: 768px) {
    .sam-ceo-monthly-summary-cards {
        grid-template-columns: 1fr;
    }
    .sam-ceo-line-sales-popup {
        padding: 12px;
    }
}

/* v2.0.33 - CEO line sales details summary cards and product drill-down popup */
.sam-ceo-line-details-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .sam-ceo-line-details-summary-cards {
        grid-template-columns: 1fr;
    }
}

/* v2.0.34 - CEO-only sales personnel performance report */
.sam-ceo-performance-summary-cards{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}
.sam-ceo-sales-performance-table-card .sam-ofoq-table-search{
    width:100%;
    max-width:360px;
    margin:0 0 12px;
}
@media (max-width: 900px){
    .sam-ceo-performance-summary-cards{grid-template-columns:1fr;}
}

/* v2.0.45 - ورود و خروج مکانی و مدیریت لوکیشن شعب */
.sam-location-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.sam-location-card-heading h2 {
    margin: 0 0 7px;
}

.sam-location-card-heading p {
    margin: 0;
    color: #667085;
}

.sam-location-beta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 2px 9px;
    margin-right: 6px;
    border-radius: 999px;
    background: #fff4e5;
    color: #b54708;
    border: 1px solid #fedf89;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}

.sam-location-master-status,
.sam-location-row-status,
.sam-location-live-dot {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
}

.sam-location-master-status::before,
.sam-location-live-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.sam-location-master-status.is-active,
.sam-location-row-status.is-active,
.sam-location-live-dot.is-active {
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #abefc6;
}

.sam-location-master-status.is-inactive,
.sam-location-row-status.is-inactive,
.sam-location-live-dot {
    background: #f2f4f7;
    color: #667085;
    border: 1px solid #d0d5dd;
}

.sam-location-row-status.is-empty {
    background: #fff6ed;
    color: #c4320a;
    border: 1px solid #ffddb5;
}

.sam-location-settings-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.sam-location-settings-form > div label,
.sam-location-fields-column > div > label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #344054;
}

.sam-location-settings-form input[type='number'],
.sam-location-fields-column input[type='number'],
.sam-location-fields-column input[type='text'] {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
}

.sam-location-switch {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #f9fafb;
    font-weight: 700;
    color: #344054;
}

.sam-location-switch input[type='checkbox'] {
    margin: 0;
}

.sam-location-settings-submit {
    grid-column: span 1;
}

.sam-location-important-note,
.sam-location-privacy-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fffaeb;
    border: 1px solid #fedf89;
    color: #7a2e0e;
    line-height: 1.9;
}

.sam-location-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
    gap: 22px;
    align-items: start;
}

.sam-location-map {
    width: 100%;
    min-height: 520px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #d0d5dd;
    background: #eef2f6;
    direction: ltr;
}

.sam-location-map-column .leaflet-control-layers,
.sam-location-map-column .leaflet-control-zoom {
    direction: ltr;
}

.sam-location-map-message {
    display: inline-block;
    margin-right: 9px;
    color: #027a48;
    font-size: 13px;
}

.sam-location-map-message.is-error {
    color: #b42318;
}

.sam-location-fields-column {
    display: grid;
    gap: 14px;
}

.sam-location-branch-active {
    margin-top: 2px;
}

.sam-location-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.sam-location-filter-form input[type='search'] {
    min-width: 270px;
    min-height: 40px;
    border-radius: 9px;
}

.sam-location-filter-form select {
    min-width: 180px;
    min-height: 40px;
    border-radius: 9px;
}

.sam-location-count {
    padding: 7px 11px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.sam-location-branches-table th,
.sam-location-branches-table td {
    vertical-align: middle;
}

.sam-location-beta-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #d6e4ff;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.sam-location-beta-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #175cd3, #53b1fd);
}

.sam-location-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.sam-location-status-grid > div {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 84px;
    padding: 13px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
}

.sam-location-status-grid span {
    color: #667085;
    font-size: 12px;
}

.sam-location-status-grid strong {
    color: #101828;
    font-size: 15px;
    line-height: 1.8;
}

.sam-location-monitor-message {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 11px 13px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: #f2f4f7;
    color: #344054;
    border: 1px solid #e4e7ec;
    line-height: 1.8;
}

.sam-location-monitor-message.is-success {
    background: #ecfdf3;
    color: #027a48;
    border-color: #abefc6;
}

.sam-location-monitor-message.is-warning {
    background: #fffaeb;
    color: #b54708;
    border-color: #fedf89;
}

.sam-location-monitor-message.is-error {
    background: #fef3f2;
    color: #b42318;
    border-color: #fecdca;
}

.sam-location-monitor-message.is-loading {
    background: #eff8ff;
    color: #175cd3;
    border-color: #b2ddff;
}

.sam-location-monitor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

@media (max-width: 1100px) {
    .sam-location-settings-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sam-location-editor-grid {
        grid-template-columns: 1fr;
    }

    .sam-location-map {
        min-height: 440px;
    }
}

@media (max-width: 720px) {
    .sam-location-card-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .sam-location-settings-form,
    .sam-location-status-grid {
        grid-template-columns: 1fr;
    }

    .sam-location-map {
        min-height: 360px;
        border-radius: 12px;
    }

    .sam-location-filter-form input[type='search'],
    .sam-location-filter-form select,
    .sam-location-filter-form .button {
        width: 100%;
        min-width: 0;
    }

    .sam-location-monitor-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sam-location-monitor-actions .sam-ofoq-btn {
        width: 100%;
        justify-content: center;
    }
}

/* v2.0.47 - نتیجه دقیق ایمپورت گزارش فروش روزانه */
.sam-ofoq-alert-warning {
    background: #fffaeb;
    border: 1px solid #fedf89;
    color: #93370d;
}
.sam-ofoq-sales-import-result {
    border: 1px solid #d8e1ec;
    background: #f8fafc;
}
.sam-ofoq-sales-import-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.sam-ofoq-sales-import-result-head h3 {
    margin: 0 0 4px;
}
.sam-ofoq-import-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
}
.sam-ofoq-import-status.is-success {
    background: #dcfae6;
    color: #067647;
}
.sam-ofoq-import-status.is-partial {
    background: #fef0c7;
    color: #93370d;
}
.sam-ofoq-import-status.is-failed {
    background: #fee4e2;
    color: #b42318;
}
.sam-ofoq-import-summary-grid {
    margin-bottom: 14px;
}
.sam-ofoq-import-failure-table th,
.sam-ofoq-import-failure-table td {
    vertical-align: top;
}
.sam-ofoq-import-failure-table td:last-child {
    min-width: 240px;
    color: #b42318;
}
@media (max-width: 640px) {
    .sam-ofoq-sales-import-result-head {
        flex-direction: column;
    }
}


/* v2.0.48 - انتخاب مستقیم ماه و سال در تاریخ سفارش */
.sam-jdp-head.is-selectable {
    align-items: stretch;
}
.sam-jdp-selects {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 6px;
    flex: 1;
}
.sam-jdp-selects select {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 4px 8px;
    border: 1px solid #dce3ee;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 12px;
}

/* v2.0.49 - حذف گروهی ماه‌های گزارش سفارشات و سورت سمت سرور */
.sam-order-bulk-delete-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 14px 0 18px;
    padding: 16px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff7f7;
}
.sam-order-bulk-delete-copy {
    min-width: 0;
}
.sam-order-bulk-delete-copy strong {
    display: block;
    margin-bottom: 6px;
    color: #991b1b;
    font-size: 15px;
}
.sam-order-bulk-delete-copy p {
    margin: 0;
    color: #7f1d1d;
    line-height: 1.9;
}
.sam-order-bulk-delete-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex: 0 0 auto;
}
.sam-order-bulk-delete-confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #7f1d1d;
    font-size: 13px;
    cursor: pointer;
}
.sam-order-bulk-delete-confirm input {
    width: 17px;
    height: 17px;
    margin: 0;
}
.sam-ofoq-btn-danger {
    border-color: #b91c1c !important;
    background: #b91c1c !important;
    color: #fff !important;
}
.sam-ofoq-btn-danger:hover {
    border-color: #991b1b !important;
    background: #991b1b !important;
}
.sam-order-server-sort a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.sam-order-server-sort a span {
    color: #94a3b8;
    font-size: 12px;
}
.sam-order-server-sort.is-active a {
    color: #1d4ed8;
    font-weight: 800;
}
.sam-order-server-sort.is-active a span {
    color: #1d4ed8;
}
@media (max-width: 782px) {
    .sam-order-bulk-delete-box {
        align-items: stretch;
        flex-direction: column;
    }
    .sam-order-bulk-delete-form {
        align-items: stretch;
    }
}


/* v2.0.50 - ویرایش ردیف گزارش سفارشات برای مدیر وردپرس و اپراتور */
.sam-order-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
.sam-order-row-actions form {
    margin: 0;
}
.sam-ofoq-mini-btn-primary {
    background: #1f6feb;
    border-color: #1f6feb;
    color: #fff;
}
.sam-ofoq-mini-btn-primary:hover,
.sam-ofoq-mini-btn-primary:focus {
    background: #1859bd;
    border-color: #1859bd;
    color: #fff;
}
body.sam-order-modal-open {
    overflow: hidden;
}
.sam-order-edit-modal[hidden] {
    display: none !important;
}
.sam-order-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
}
.sam-order-edit-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, .62);
    cursor: default;
}
.sam-order-edit-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.sam-order-edit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}
.sam-order-edit-header h3 {
    margin: 0 0 5px;
    font-size: 20px;
}
.sam-order-edit-header p {
    margin: 0;
    color: #64748b;
}
.sam-order-edit-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
    color: #334155;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.sam-order-edit-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sam-order-edit-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}
.sam-order-edit-deductions-preview.is-negative {
    color: #b42318;
    font-weight: 700;
}
@media (max-width: 860px) {
    .sam-order-edit-modal {
        padding: 10px;
        align-items: flex-end;
    }
    .sam-order-edit-dialog {
        width: 100%;
        max-height: 92vh;
        padding: 17px;
        border-radius: 18px 18px 0 0;
    }
    .sam-order-edit-form {
        grid-template-columns: 1fr;
    }
    .sam-order-edit-actions {
        position: sticky;
        bottom: -17px;
        margin: 5px -17px -17px;
        padding: 12px 17px;
        background: #fff;
        border-top: 1px solid #e5e7eb;
    }
}

/* v2.0.51 - CEO Etka / Amiran monthly analysis */
.sam-line-analysis-page{display:grid;gap:18px}.sam-line-analysis-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:24px;border-radius:22px;background:linear-gradient(135deg,#111827,#26354d);color:#fff;box-shadow:0 15px 35px rgba(15,23,42,.16)}.sam-line-analysis-hero h2{margin:5px 0 8px;color:#fff;font-size:26px}.sam-line-analysis-hero p{margin:0;color:rgba(255,255,255,.72);line-height:1.9}.sam-line-analysis-eyebrow{font-size:12px;color:#a5b4fc}.sam-line-analysis-badge{min-width:88px;height:88px;border-radius:24px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16);font-size:20px;font-weight:800}.sam-line-analysis-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;background:#fff;border:1px solid #e7ebf2;border-radius:18px;box-shadow:0 8px 25px rgba(15,23,42,.05)}.sam-line-analysis-field{display:grid;gap:7px}.sam-line-analysis-field span{font-size:12px;font-weight:700;color:#475467}.sam-line-analysis-field select{width:100%;min-height:46px;border:1px solid #d7deea;border-radius:12px;background:#f8fafc;padding:0 12px;font-family:inherit}.sam-line-analysis-field-primary select{border-color:#818cf8;background:#eef2ff;font-weight:800}.sam-line-analysis-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.sam-line-analysis-kpi{padding:18px;background:#fff;border:1px solid #e7ebf2;border-radius:17px;box-shadow:0 8px 22px rgba(15,23,42,.04)}.sam-line-analysis-kpi.is-active{border-color:#818cf8;box-shadow:0 10px 28px rgba(99,102,241,.13)}.sam-line-analysis-kpi span{display:block;color:#667085;font-size:12px;margin-bottom:8px}.sam-line-analysis-kpi strong{display:block;color:#101828;font-size:20px}.sam-line-analysis-chart-card{background:#fff;border:1px solid #e7ebf2;border-radius:20px;padding:18px;box-shadow:0 10px 30px rgba(15,23,42,.05)}.sam-line-analysis-chart-card.is-active{border-color:#a5b4fc;box-shadow:0 13px 34px rgba(99,102,241,.12)}.sam-line-analysis-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.sam-line-analysis-chart-head h3{margin:0 0 6px;font-size:17px;color:#101828}.sam-line-analysis-chart-head p{margin:0;color:#667085;font-size:12px}.sam-line-analysis-chart-head>span{padding:7px 11px;background:#f2f4f7;color:#475467;border-radius:9px;font-size:11px;font-weight:700}.sam-line-analysis-chart-scroll{overflow-x:auto;padding:10px 2px 4px}.sam-line-analysis-bars{height:340px;min-width:920px;display:grid;align-items:end;gap:10px;border-bottom:1px solid #dfe5ee;background:repeating-linear-gradient(to top,#f5f7fa 0,#f5f7fa 1px,transparent 1px,transparent 68px);padding:18px 10px 0}.sam-line-analysis-bars-single{grid-template-columns:repeat(12,minmax(58px,1fr))}.sam-line-analysis-month-column{height:100%;display:grid;grid-template-rows:26px 1fr 30px;align-items:end;text-align:center}.sam-line-analysis-value{font-size:10px;color:#667085;direction:ltr;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sam-line-analysis-bar-track{height:100%;display:flex;align-items:flex-end;justify-content:center}.sam-line-analysis-bar-track span{width:34px;min-height:0;border-radius:8px 8px 2px 2px;background:linear-gradient(180deg,#6366f1,#818cf8);transition:.2s}.sam-line-analysis-bar-track span:hover{filter:brightness(1.08);transform:translateY(-2px)}.sam-line-analysis-bar-track span.is-negative,.sam-line-analysis-group-bars span.is-negative{background:#ef4444!important}.sam-line-analysis-month-column small,.sam-line-analysis-month-group>small{font-size:11px;color:#475467;padding-top:8px}.sam-line-analysis-legend{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:4px}.sam-line-analysis-legend span{display:flex;align-items:center;gap:5px;font-size:11px;color:#475467}.sam-line-analysis-legend i{width:10px;height:10px;border-radius:3px;display:block}.sam-line-analysis-bars-grouped{grid-template-columns:repeat(12,minmax(70px,1fr))}.sam-line-analysis-month-group{height:100%;display:grid;grid-template-rows:1fr 30px;align-items:end;text-align:center}.sam-line-analysis-group-bars{height:100%;display:flex;align-items:flex-end;justify-content:center;gap:3px}.sam-line-analysis-group-bars span{position:relative;width:clamp(8px,18%,20px);border-radius:5px 5px 1px 1px;transition:.2s}.sam-line-analysis-group-bars span:hover{filter:brightness(1.08);transform:translateY(-2px)}.sam-line-analysis-group-bars span b{display:none}.year-1{background:#4f46e5}.year-2{background:#0ea5e9}.year-3{background:#10b981}.year-4{background:#f59e0b}.year-5{background:#ec4899}.year-6{background:#8b5cf6}.year-7{background:#14b8a6}.year-8{background:#64748b}@media(max-width:900px){.sam-line-analysis-filters,.sam-line-analysis-kpis{grid-template-columns:1fr}.sam-line-analysis-hero{align-items:flex-start}.sam-line-analysis-badge{min-width:68px;height:68px;border-radius:18px;font-size:16px}}@media(max-width:600px){.sam-line-analysis-hero{padding:18px}.sam-line-analysis-hero h2{font-size:21px}.sam-line-analysis-badge{display:none}.sam-line-analysis-chart-card{padding:14px}.sam-line-analysis-chart-head{display:grid}.sam-line-analysis-bars{height:300px}}

/* =========================================================
   نسخه 2.0.59 | تغییر رمز، چند نوبت ورود و خروج، مرخصی و آف روزانه
========================================================= */
.sam-ofoq-password-box {
    width: min(100%, 440px);
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.sam-ofoq-password-box > summary {
    padding: 7px 11px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    list-style-position: inside;
    user-select: none;
}

.sam-ofoq-password-box[open] > summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sam-ofoq-password-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 10px;
}

.sam-ofoq-password-form label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
}

.sam-ofoq-password-form input {
    width: 100%;
    min-height: 38px;
    border-radius: 8px;
}

.sam-ofoq-password-form input[readonly] {
    font-weight: 800;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.92);
}

.sam-ofoq-password-form .sam-ofoq-btn {
    width: 100%;
    margin-top: 3px;
}

.sam-ofoq-admin-password-access {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    max-width: 920px;
    margin: 8px 0 14px;
    padding: 9px 12px;
    border: 1px solid #dcdcde;
    border-radius: 9px;
    background: #fff;
}

.sam-ofoq-admin-password-access strong {
    color: #1d2327;
}

.sam-ofoq-admin-password-access span {
    color: #646970;
    font-size: 12px;
    flex: 1 1 360px;
}

.sam-ofoq-visible-password {
    display: inline-block;
    direction: ltr;
    min-width: 72px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #f0f6fc;
    color: #0a4b78;
    font-weight: 800;
    text-align: center;
}

.sam-ofoq-attendance-actions .sam-ofoq-leave-form {
    flex: 1 0 100%;
    display: flex;
    justify-content: flex-start;
    margin-top: 2px;
}

.sam-ofoq-btn-leave {
    background: #fff7ed;
    border: 1px solid #fb923c;
    color: #9a3412;
}

.sam-ofoq-btn-leave:hover,
.sam-ofoq-btn-leave:focus {
    background: #ffedd5;
    color: #7c2d12;
}

.sam-ofoq-btn-daily-off {
    background: #eef2ff;
    border: 1px solid #818cf8;
    color: #3730a3;
}

.sam-ofoq-btn-daily-off:hover,
.sam-ofoq-btn-daily-off:focus {
    background: #e0e7ff;
    color: #312e81;
}

.sam-ofoq-today-attendance-list {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.sam-ofoq-today-attendance-list > strong {
    display: block;
    margin-bottom: 8px;
}

.sam-ofoq-today-attendance-list .sam-ofoq-table-wrap {
    margin-top: 0;
}

@media (max-width: 700px) {
    .sam-ofoq-password-box {
        width: 100%;
    }

    .sam-ofoq-attendance-actions .sam-ofoq-leave-form,
    .sam-ofoq-attendance-actions .sam-ofoq-leave-form .sam-ofoq-btn {
        width: 100%;
    }
}


/* v2.0.60 - پنجره علت خروج فروشنده */
body.sam-ofoq-exit-reason-open {
    overflow: hidden;
}

.sam-ofoq-exit-reason-modal[hidden] {
    display: none !important;
}

.sam-ofoq-exit-reason-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(3px);
}

.sam-ofoq-exit-reason-dialog {
    position: relative;
    width: min(460px, 100%);
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    direction: rtl;
}

.sam-ofoq-exit-reason-dialog h3 {
    margin: 0 0 18px;
    padding-left: 38px;
    font-size: 21px;
    color: #172033;
}

.sam-ofoq-exit-reason-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.sam-ofoq-exit-reason-field {
    display: block;
}

.sam-ofoq-exit-reason-field span {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
}

.sam-ofoq-exit-reason-field textarea {
    width: 100%;
    min-height: 118px;
    resize: vertical;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font: inherit;
    line-height: 1.8;
}

.sam-ofoq-exit-reason-field textarea:focus {
    border-color: #64748b;
    outline: 3px solid rgba(100, 116, 139, 0.14);
}

.sam-ofoq-exit-reason-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.sam-ofoq-form-span-full {
    grid-column: 1 / -1;
}

.sam-ofoq-form-span-full textarea {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .sam-ofoq-exit-reason-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .sam-ofoq-exit-reason-dialog {
        width: 100%;
        padding: 22px 16px 16px;
        border-radius: 18px 18px 12px 12px;
    }

    .sam-ofoq-exit-reason-actions {
        flex-direction: column-reverse;
    }

    .sam-ofoq-exit-reason-actions .sam-ofoq-btn {
        width: 100%;
    }
}


/* v2.0.64 - اعلان کوچک نتیجه ثبت دستی ورود و خروج */
.sam-ofoq-attendance-toast-container {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000000;
    width: min(92vw, 430px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.sam-ofoq-attendance-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(-14px) scale(.97);
    transition: opacity .22s ease, transform .22s ease;
    direction: rtl;
}

.sam-ofoq-attendance-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.sam-ofoq-attendance-toast.is-success {
    color: #116530;
    background: #ecfdf3;
    border-color: #86efac;
}

.sam-ofoq-attendance-toast.is-error {
    color: #991b1b;
    background: #fff1f2;
    border-color: #fda4af;
}

.sam-ofoq-attendance-toast-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    line-height: 1;
}

.sam-ofoq-attendance-toast.is-success .sam-ofoq-attendance-toast-icon {
    background: #16a34a;
}

.sam-ofoq-attendance-toast.is-error .sam-ofoq-attendance-toast-icon {
    background: #dc2626;
}

.sam-ofoq-attendance-ajax-form.is-submitting {
    opacity: .72;
}

.sam-ofoq-attendance-ajax-form.is-submitting button {
    cursor: wait;
}

@media (max-width: 600px) {
    .sam-ofoq-attendance-toast-container {
        top: 10px;
        width: calc(100vw - 20px);
    }
    .sam-ofoq-attendance-toast {
        padding: 11px 12px;
        border-radius: 12px;
        font-size: 13px;
    }
}

/* v2.0.65 - وضعیت ارسال سفارشات */
.sam-order-mark-sent-btn.is-sent,
.sam-order-mark-sent-btn.is-sent:disabled {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
    opacity: 1;
    cursor: default;
}

[data-sam-order-send-status] {
    display: inline-block;
    white-space: nowrap;
}
