﻿:root {
    --af-primary: #6f3fc5;
    --af-primary-2: #8b5cf6;
    --af-primary-soft: #f2edff;
    --af-accent: #d44c86;
    --af-accent-soft: #fff0f6;
    --af-success: #159a76;
    --af-warning: #d98b15;
    --af-danger: #d84b5f;
    --af-info: #2d78d3;
    --af-ink: #1f2937;
    --af-muted: #7a8595;
    --af-border: #e7eaf0;
    --af-bg: #f6f7fb;
    --af-card: #ffffff;
    --af-sidebar: #171229;
    --af-sidebar-2: #211836;
    --af-shadow: 0 10px 30px rgba(28, 24, 52, .07);
    --af-shadow-lg: 0 18px 45px rgba(28, 24, 52, .10);
    --af-radius: 18px;
    --af-radius-sm: 12px;
}

html { background: var(--af-bg); }
body.af-app {
    direction: rtl;
    text-align: right;
    background: var(--af-bg);
    color: var(--af-ink);
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}
body.af-app a { transition: .2s ease; }
body.af-app .wrapper { background: var(--af-bg); }

/* Top navigation */
body.af-app .main-header {
    min-height: 70px;
    border: 0 !important;
    border-bottom: 1px solid rgba(31, 41, 55, .06) !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 5px 22px rgba(28, 24, 52, .04);
    padding: 0 22px;
    backdrop-filter: blur(10px);
}
.af-topbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.af-topbar-start, .af-topbar-end { display: flex; align-items: center; gap: 10px; }
.af-menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: var(--af-primary-soft);
    color: var(--af-primary) !important;
    padding: 0 !important;
}
.af-brand-title { display: flex; flex-direction: column; line-height: 1.4; }
.af-brand-title strong { font-size: 14px; color: var(--af-ink); font-weight: 800; }
.af-brand-title small { color: var(--af-muted); font-size: 11px; }
.af-top-link {
    border: 1px solid var(--af-border);
    border-radius: 12px;
    padding: 8px 12px;
    color: #596273 !important;
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.af-top-link:hover { border-color: #d9d1ef; color: var(--af-primary) !important; background: #fbf9ff; }
.af-user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 9px 6px 12px;
    border-radius: 14px;
    background: #f8f7fb;
    border: 1px solid #eeebf5;
    color: var(--af-ink);
    max-width: 220px;
}
.af-user-chip .af-user-dot {
    width: 32px; height: 32px; flex: 0 0 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--af-primary), var(--af-accent));
}
.af-user-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Sidebar */
body.af-app .main-sidebar {
    background: linear-gradient(180deg, var(--af-sidebar) 0%, var(--af-sidebar-2) 100%) !important;
    box-shadow: -12px 0 35px rgba(23, 18, 41, .15) !important;
    border: 0;
}
body.af-app .brand-link {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 17px;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    color: #fff !important;
}
body.af-app .brand-link .brand-image {
    width: 42px;
    height: 42px;
    max-height: 42px;
    object-fit: cover;
    margin: 0;
    border-radius: 13px !important;
    background: #fff;
    box-shadow: none !important;
}
.af-brand-copy { display: flex; flex-direction: column; line-height: 1.5; }
.af-brand-copy strong { font-size: 15px; letter-spacing: -.2px; }
.af-brand-copy small { font-size: 10px; color: rgba(255,255,255,.55); }
body.af-app .sidebar { padding: 0 10px 18px; }
body.af-app .user-panel {
    margin: 12px 4px 14px !important;
    padding: 10px !important;
    align-items: center;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 14px;
    background: rgba(255,255,255,.045);
}
body.af-app .user-panel .image img { width: 34px; height: 34px; object-fit: cover; }
body.af-app .user-panel .info { padding: 0 10px; min-width: 0; }
body.af-app .user-panel .info span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
body.af-app .nav-sidebar .nav-item { margin-bottom: 3px; }
body.af-app .nav-sidebar .nav-link {
    min-height: 43px;
    border-radius: 11px;
    padding: 10px 12px;
    color: rgba(255,255,255,.72) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
body.af-app .nav-sidebar .nav-link:hover {
    background: rgba(255,255,255,.07) !important;
    color: #fff !important;
    transform: translateX(-2px);
}
body.af-app .nav-sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(139,92,246,.95), rgba(212,76,134,.90)) !important;
    box-shadow: 0 8px 20px rgba(111,63,197,.22);
    color: #fff !important;
}
body.af-app .nav-sidebar .nav-icon {
    width: 24px !important;
    margin: 0 !important;
    text-align: center;
    font-size: 15px !important;
    opacity: .92;
}
body.af-app .nav-sidebar p { margin: 0; font-size: 12px; flex: 1; }
body.af-app .nav-sidebar .right { top: 13px; left: 1rem; right: auto; }
body.af-app .nav-treeview { padding: 5px 8px 6px 0; }
body.af-app .nav-treeview .nav-link { min-height: 37px; padding: 8px 10px; background: transparent; }
body.af-app .nav-treeview .nav-link p { font-size: 11px; }
body.af-app .nav-treeview .nav-icon { font-size: 9px !important; opacity: .6; }

/* Shared page surface */
body.af-app .content-wrapper {
    background: var(--af-bg) !important;
    min-height: calc(100vh - 70px) !important;
    padding-bottom: 22px;
}
body.af-app .content-header { padding: 22px 20px 10px; }
body.af-app .content-header h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--af-ink) !important;
    letter-spacing: -.4px;
}
body.af-app .breadcrumb { background: transparent; padding: 0; margin: 5px 0 0; font-size: 11px; }
body.af-app .breadcrumb-item a { color: var(--af-primary); }
body.af-app .content { padding: 0 20px 20px; }

body.af-app .card {
    border: 1px solid rgba(231,234,240,.95);
    border-radius: var(--af-radius);
    box-shadow: var(--af-shadow);
    overflow: hidden;
    background: var(--af-card);
}
body.af-app .card-header {
    background: #fff;
    border-bottom: 1px solid var(--af-border);
    padding: 16px 18px;
}
body.af-app .card-header h1,
body.af-app .card-header h2,
body.af-app .card-header h3,
body.af-app .card-title { font-weight: 800; color: var(--af-ink); margin: 0; }
body.af-app .card-body { padding: 18px; }
body.af-app .card-footer { background: #fcfcfe; border-top: 1px solid var(--af-border); }

body.af-app .form-control,
body.af-app input[type="text"], body.af-app input[type="password"], body.af-app input[type="number"],
body.af-app input[type="date"], body.af-app textarea, body.af-app select {
    min-height: 42px;
    border: 1px solid #dfe3ea;
    border-radius: 11px;
    background: #fff;
    color: var(--af-ink);
    box-shadow: none !important;
    transition: .2s ease;
}
body.af-app textarea.form-control { min-height: 92px; }
body.af-app .form-control:focus,
body.af-app input:focus, body.af-app textarea:focus, body.af-app select:focus {
    border-color: #a78bdf !important;
    box-shadow: 0 0 0 3px rgba(111,63,197,.08) !important;
    outline: 0;
}
body.af-app label, body.af-app .control-label { color: #566071; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
body.af-app .select2-container--default .select2-selection--single,
body.af-app .select2-container--default .select2-selection--multiple {
    min-height: 42px;
    border: 1px solid #dfe3ea;
    border-radius: 11px;
}

body.af-app .btn {
    border-radius: 10px;
    min-height: 38px;
    padding: 8px 15px;
    font-weight: 700;
    font-size: 12px;
    border-width: 0;
    box-shadow: none;
}
body.af-app .btn-primary, body.af-app .btn-info {
    background: linear-gradient(135deg, var(--af-primary), var(--af-primary-2));
    color: #fff;
}
body.af-app .btn-success { background: linear-gradient(135deg, #138b6c, #20ad87); }
body.af-app .btn-danger { background: linear-gradient(135deg, #cb4058, #e36171); }
body.af-app .btn-warning { background: linear-gradient(135deg, #d18513, #e9a331); color: #fff; }
body.af-app .btn-secondary, body.af-app .btn-default { background: #f0f2f6; color: #596273; }
body.af-app .btn:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(34,31,55,.10); }

body.af-app .table-responsive { border-radius: 13px; }
body.af-app .table { color: #424b59; margin-bottom: 0; }
body.af-app .table thead th {
    border-top: 0;
    border-bottom: 1px solid #e9ecf1 !important;
    background: #f8f9fc;
    color: #657083;
    font-size: 11px;
    font-weight: 800;
    padding: 12px 10px;
    white-space: nowrap;
}
body.af-app .table tbody td {
    border-top: 1px solid #eff1f5;
    padding: 12px 10px;
    vertical-align: middle;
    font-size: 11px;
}
body.af-app .table-striped tbody tr:nth-of-type(odd) { background: rgba(247,248,252,.7); }
body.af-app .table-hover tbody tr:hover, body.af-app .table tbody tr:hover { background: #faf8ff; }

body.af-app .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(21,17,40,.22);
    overflow: hidden;
}
body.af-app .modal-header { border-bottom: 1px solid var(--af-border); background: #fbfbfd; }
body.af-app .modal-footer { border-top: 1px solid var(--af-border); }
body.af-app .progress { border-radius: 999px; background: #ebeef3; overflow: hidden; }
body.af-app .progress-bar { border-radius: 999px; }
body.af-app .alert { border: 0; border-radius: 13px; }
body.af-app .main-footer {
    border-top: 1px solid #e6e9ef;
    background: #fff;
    color: #81899a;
    padding: 14px 20px;
    font-size: 11px;
}
body.af-app .main-footer a { color: var(--af-primary); font-weight: 800; }

/* Generic page improvements for old inline layouts */
body.af-app .thead-custom3 { background: #f8f9fc !important; color: #657083 !important; }
body.af-app [style*="overflow-x: auto"], body.af-app [style*="overflow-x:auto"] { border-radius: 14px; }
body.af-app hr { border-color: #edf0f4; }
body.af-app .text-info { color: var(--af-primary) !important; }
body.af-app .bg-info { background: var(--af-info) !important; }
body.af-app .bg-success { background: var(--af-success) !important; }
body.af-app .bg-warning { background: var(--af-warning) !important; }
body.af-app .bg-danger { background: var(--af-danger) !important; }

/* Dashboard */
.af-dashboard { padding-top: 4px; }
.af-dashboard-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 25px 26px;
    margin-bottom: 18px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(125deg, #251842 0%, #51318e 55%, #a23d77 100%);
    box-shadow: 0 18px 42px rgba(62,36,105,.20);
}
.af-dashboard-hero:before,
.af-dashboard-hero:after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
}
.af-dashboard-hero:before { width: 230px; height: 230px; left: -80px; top: -120px; }
.af-dashboard-hero:after { width: 150px; height: 150px; right: 36%; bottom: -100px; }
.af-hero-copy, .af-hero-actions { position: relative; z-index: 2; }
.af-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: rgba(255,255,255,.70); margin-bottom: 8px; }
.af-dashboard-hero h1 { margin: 0 0 7px; font-size: 24px; font-weight: 900; color: #fff !important; }
.af-dashboard-hero p { margin: 0; max-width: 650px; font-size: 12px; line-height: 2; color: rgba(255,255,255,.73); }
.af-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.af-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 11px;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.09);
    font-size: 11px;
    font-weight: 800;
}
.af-hero-btn:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.af-hero-btn.primary { background: #fff; color: #43257a !important; border-color: #fff; }

.af-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.af-kpi-card {
    position: relative;
    min-height: 132px;
    padding: 17px;
    border-radius: 17px;
    background: #fff;
    border: 1px solid var(--af-border);
    box-shadow: var(--af-shadow);
    overflow: hidden;
}
.af-kpi-card:after {
    content: "";
    position: absolute;
    width: 80px; height: 80px;
    left: -28px; bottom: -37px;
    border-radius: 50%;
    background: var(--kpi-soft, #f3effc);
}
.af-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 2; }
.af-kpi-icon { width: 39px; height: 39px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--kpi-soft, #f3effc); color: var(--kpi, var(--af-primary)); font-size: 15px; }
.af-kpi-badge { font-size: 9px; color: #8790a0; background: #f6f7fa; border-radius: 999px; padding: 4px 7px; }
.af-kpi-value { position: relative; z-index: 2; margin-top: 13px; font-size: 24px; font-weight: 900; color: var(--af-ink); letter-spacing: -.5px; }
.af-kpi-label { position: relative; z-index: 2; margin-top: 2px; font-size: 10px; color: var(--af-muted); font-weight: 700; }
.af-kpi-purple { --kpi: #7b51cc; --kpi-soft: #f2edff; }
.af-kpi-pink { --kpi: #cf4b84; --kpi-soft: #fff0f6; }
.af-kpi-green { --kpi: #159a76; --kpi-soft: #eaf8f3; }
.af-kpi-blue { --kpi: #2d78d3; --kpi-soft: #edf5ff; }
.af-kpi-orange { --kpi: #d98b15; --kpi-soft: #fff6e7; }
.af-kpi-red { --kpi: #d84b5f; --kpi-soft: #fff0f2; }

.af-grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); gap: 16px; margin-bottom: 16px; }
.af-panel {
    background: #fff;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    box-shadow: var(--af-shadow);
    overflow: hidden;
}
.af-panel-header { min-height: 62px; padding: 15px 17px; border-bottom: 1px solid var(--af-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.af-panel-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.af-panel-title-icon { width: 35px; height: 35px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: var(--af-primary); background: var(--af-primary-soft); flex: 0 0 35px; }
.af-panel-title h3 { font-size: 13px; font-weight: 900; margin: 0; color: var(--af-ink); }
.af-panel-title small { display: block; color: var(--af-muted); margin-top: 3px; font-size: 9px; }
.af-panel-body { padding: 16px; }
.af-panel-link { font-size: 10px; font-weight: 800; color: var(--af-primary); background: var(--af-primary-soft); padding: 6px 9px; border-radius: 9px; white-space: nowrap; }
.af-panel-link:hover { color: var(--af-accent); }

.af-chart-tabs { display: flex; align-items: center; gap: 5px; padding: 5px; background: #f5f6f9; border-radius: 11px; }
.af-chart-tab { border: 0; background: transparent; color: #747e8e; padding: 7px 10px; border-radius: 8px; font-size: 10px; font-weight: 800; cursor: pointer; }
.af-chart-tab.active { background: #fff; color: var(--af-primary); box-shadow: 0 3px 12px rgba(28,24,52,.07); }
.af-chart-pane { display: none; min-height: 330px; }
.af-chart-pane.active { display: block; }
.af-chart { width: 100%; height: 330px; }

.af-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.af-quick-item {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 12px;
    border: 1px solid #eceef3;
    border-radius: 13px;
    color: #4c5565;
    background: #fcfcfe;
}
.af-quick-item:hover { border-color: #d9cfef; background: #fbf9ff; color: var(--af-primary); transform: translateY(-2px); }
.af-quick-icon { width: 31px; height: 31px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: #f1ecfb; color: var(--af-primary); }
.af-quick-item span { font-size: 10px; font-weight: 800; line-height: 1.6; }

.af-grid-secondary { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 16px; }
.af-table-wrap { overflow: auto; max-height: 430px; }
.af-dashboard-table { width: 100%; min-width: 760px; }
.af-dashboard-table thead th { position: sticky; top: 0; z-index: 2; }
.af-empty-state { padding: 34px 16px; text-align: center; color: #9aa2af; font-size: 11px; }

.af-sms-table { min-width: 540px; }
.af-sms-wrap { max-height: 430px; overflow: auto; }
.af-status-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 11px; border-radius: 12px; background: #f8f9fc; color: #7a8494; font-size: 10px; line-height: 1.8; margin-top: 12px; }
.af-status-note i { color: var(--af-primary); margin-top: 4px; }


#myTableFollow td:nth-child(2) { font-weight: 800; color: var(--af-primary); }
#myTableFollow td:nth-child(5) { font-weight: 700; }
#myTableFollow .tds3 a { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #fff5e8; }
#myTableSMS td:nth-child(2) { direction: ltr; font-weight: 700; white-space: nowrap; }
#myTableSMS td:nth-child(3) { text-align: right; line-height: 1.9; min-width: 220px; white-space: normal; }
#myTableSMS td:nth-child(4) { white-space: nowrap; }

/* Scrollbar */
body.af-app * { scrollbar-width: thin; scrollbar-color: #cbc5da transparent; }
body.af-app *::-webkit-scrollbar { width: 7px; height: 7px; }
body.af-app *::-webkit-scrollbar-thumb { background: #cbc5da; border-radius: 99px; }
body.af-app *::-webkit-scrollbar-track { background: transparent; }

@media (min-width: 992px) {
    body.af-app:not(.sidebar-collapse) .content-wrapper,
    body.af-app:not(.sidebar-collapse) .main-header,
    body.af-app:not(.sidebar-collapse) .main-footer { margin-right: 250px; margin-left: 0; }
    body.af-app .main-sidebar { right: 0; left: auto; }
}
@media (max-width: 1399px) {
    .af-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    body.af-app .main-sidebar { right: -250px; left: auto; }
    body.af-app.sidebar-open .main-sidebar { right: 0; }
    body.af-app .content-wrapper, body.af-app .main-header, body.af-app .main-footer { margin-right: 0 !important; }
    .af-grid-main, .af-grid-secondary { grid-template-columns: 1fr; }
    .af-dashboard-hero { align-items: flex-start; flex-direction: column; }
    .af-hero-actions { justify-content: flex-start; }
}
@media (max-width: 767.98px) {
    body.af-app .main-header { padding: 0 12px; }
    .af-brand-title, .af-top-link span { display: none; }
    .af-user-chip { max-width: 140px; }
    body.af-app .content, body.af-app .content-header { padding-left: 12px; padding-right: 12px; }
    .af-dashboard-hero { padding: 20px; border-radius: 17px; }
    .af-dashboard-hero h1 { font-size: 20px; }
    .af-kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
    .af-kpi-card { min-height: 118px; padding: 14px; }
    .af-kpi-value { font-size: 21px; }
    .af-panel-header { align-items: flex-start; flex-direction: column; }
    .af-chart-tabs { width: 100%; overflow-x: auto; }
    .af-chart-tab { white-space: nowrap; }
}
@media (max-width: 420px) {
    .af-kpi-grid { grid-template-columns: 1fr; }
    .af-quick-grid { grid-template-columns: 1fr 1fr; }
}


/* =========================================================
   Sidebar toggle fix - RTL / AriaFlore
   ========================================================= */
body.af-app .main-sidebar,
body.af-app .content-wrapper,
body.af-app .main-header,
body.af-app .main-footer {
    transition: right .25s ease, margin-right .25s ease !important;
}

@media (min-width: 992px) {
    body.af-app .main-sidebar {
        right: 0 !important;
        left: auto !important;
        margin-left: 0 !important;
        width: 250px;
    }

    body.af-app:not(.sidebar-collapse) .content-wrapper,
    body.af-app:not(.sidebar-collapse) .main-header,
    body.af-app:not(.sidebar-collapse) .main-footer {
        margin-right: 250px !important;
        margin-left: 0 !important;
    }

    /* در RTL، AdminLTE به صورت پیش فرض sidebar را از سمت چپ جمع می کند.
       ما sidebar را از سمت راست خارج می کنیم تا دکمه واقعاً منو را ببندد. */
    body.af-app.sidebar-collapse .main-sidebar {
        right: -250px !important;
        left: auto !important;
        margin-left: 0 !important;
    }

    body.af-app.sidebar-collapse .content-wrapper,
    body.af-app.sidebar-collapse .main-header,
    body.af-app.sidebar-collapse .main-footer {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 991.98px) {
    body.af-app .main-sidebar {
        right: -250px !important;
        left: auto !important;
        margin-left: 0 !important;
    }

    body.af-app.sidebar-open .main-sidebar {
        right: 0 !important;
    }

    body.af-app .content-wrapper,
    body.af-app .main-header,
    body.af-app .main-footer {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}


/* =========================================================
   Comfortable typography - فرم‌ها و صفحات کاری
   2026-10-05
   هدف: خوانایی بیشتر در استفاده طولانی‌مدت بدون به‌هم‌ریختن چیدمان
   ========================================================= */
body.af-app {
    font-size: 15.5px;
    line-height: 1.75;
}

/* عنوان‌ها و توضیحات عمومی */
body.af-app .content-header h1 { font-size: 24px; line-height: 1.6; }
body.af-app .breadcrumb { font-size: 12.5px; }
body.af-app .card-title,
body.af-app .card-header h1,
body.af-app .card-header h2,
body.af-app .card-header h3 { line-height: 1.65; }

/* لیبل‌ها، ورودی‌ها و Select2 */
body.af-app label,
body.af-app .control-label,
body.af-app .form-group > label {
    font-size: 14px !important;
    line-height: 1.65;
}

body.af-app .form-control,
body.af-app input[type="text"],
body.af-app input[type="password"],
body.af-app input[type="number"],
body.af-app input[type="date"],
body.af-app input[type="email"],
body.af-app input[type="tel"],
body.af-app textarea,
body.af-app select {
    min-height: 44px;
    font-size: 14.5px !important;
    line-height: 1.65;
    padding-top: 8px;
    padding-bottom: 8px;
}

body.af-app textarea,
body.af-app textarea.form-control {
    line-height: 1.9;
}

body.af-app .form-control::placeholder,
body.af-app input::placeholder,
body.af-app textarea::placeholder {
    font-size: 13.5px;
}

body.af-app .select2-container,
body.af-app .select2-container .select2-selection__rendered,
body.af-app .select2-container--default .select2-selection--single .select2-selection__rendered,
body.af-app .select2-results__option {
    font-size: 14px !important;
    line-height: 1.7 !important;
}
body.af-app .select2-container--default .select2-selection--single,
body.af-app .select2-container--default .select2-selection--multiple {
    min-height: 44px;
}
body.af-app .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
}

/* دکمه‌ها */
body.af-app .btn {
    min-height: 40px;
    font-size: 13.5px !important;
    line-height: 1.55;
}
body.af-app .btn-sm,
body.af-app .btn-group-sm > .btn {
    min-height: 34px;
    font-size: 12.5px !important;
}

/* جداول استاندارد */
body.af-app .table thead th,
body.af-app table.dataTable thead th {
    font-size: 13px !important;
    line-height: 1.65;
    padding-top: 13px;
    padding-bottom: 13px;
}
body.af-app .table tbody td,
body.af-app table.dataTable tbody td {
    font-size: 13px !important;
    line-height: 1.75;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* جدول‌های قدیمی که کلاس Bootstrap ندارند؛ داشبورد اختصاصی مستثناست */
body.af-app .content-wrapper table:not(.sd-table):not(.af-dashboard-table) th {
    font-size: 13px !important;
    line-height: 1.65;
}
body.af-app .content-wrapper table:not(.sd-table):not(.af-dashboard-table) td {
    font-size: 13px !important;
    line-height: 1.75;
}

/* DataTables، صفحه‌بندی و جستجو */
body.af-app .dataTables_wrapper,
body.af-app .dataTables_wrapper .dataTables_info,
body.af-app .dataTables_wrapper .dataTables_filter,
body.af-app .dataTables_wrapper .dataTables_length,
body.af-app .dataTables_wrapper .dataTables_paginate,
body.af-app .pagination,
body.af-app .page-link {
    font-size: 13px !important;
}
body.af-app .dataTables_wrapper input,
body.af-app .dataTables_wrapper select {
    font-size: 13.5px !important;
    min-height: 38px;
}

/* مودال، تب، هشدار و متن‌های کمکی */
body.af-app .modal-body,
body.af-app .modal-header,
body.af-app .modal-footer,
body.af-app .nav-tabs .nav-link,
body.af-app .nav-pills .nav-link,
body.af-app .alert,
body.af-app .dropdown-menu,
body.af-app .dropdown-item {
    font-size: 13.5px;
    line-height: 1.75;
}
body.af-app .form-text,
body.af-app .text-muted,
body.af-app small:not(.sd-card-title small):not(.sd-product-tooltip small) {
    font-size: 11.5px;
    line-height: 1.7;
}

/* منوی کناری */
body.af-app .user-panel .info span { font-size: 13.5px; }
body.af-app .nav-sidebar .nav-link { min-height: 46px; padding-top: 11px; padding-bottom: 11px; }
body.af-app .nav-sidebar p { font-size: 13.5px; line-height: 1.55; }
body.af-app .nav-treeview .nav-link { min-height: 40px; }
body.af-app .nav-treeview .nav-link p { font-size: 12.5px; }
body.af-app .af-brand-title strong { font-size: 15px; }
body.af-app .af-brand-title small { font-size: 12px; }

/* موبایل: خوانایی حفظ شود و متن دوباره خیلی ریز نشود */
@media (max-width: 767.98px) {
    body.af-app { font-size: 15px; }
    body.af-app label,
    body.af-app .control-label,
    body.af-app .form-group > label { font-size: 13.5px !important; }
    body.af-app .form-control,
    body.af-app input,
    body.af-app textarea,
    body.af-app select { font-size: 14px !important; }
    body.af-app .table thead th,
    body.af-app .table tbody td { font-size: 12.5px !important; }
}
