/* ============================================================================
   Metano Theme — Modern UI layer (tm-*)
   Loaded AFTER style.rtl*.css and custom.css (see includes/head.tpl)
   Design ref: modern card-based dashboard (thememetro style), RTL-first.
   All assets local. No CDN.
   ============================================================================ */

/* ---------- 0) SVG icon base ---------- */
.tm-icon {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.24em;
    flex-shrink: 0;
}
.tm-icon-lg { width: 2.4rem; height: 2.4rem; }
.tm-icon-xl { width: 3rem; height: 3rem; }

/* ---------- 1) Shared design tokens & base cards ---------- */
:root {
    --tm-bg: #fefaf3;
    --tm-card: #ffffff;
    --tm-border: #e9e2d6;
    --tm-text: #224248;
    --tm-muted: #6b7a76;
    --tm-primary: #325e6a;
    --tm-primary-soft: rgba(50, 94, 106, 0.09);
    --tm-accent: #44a1a4;
    --tm-orange: #ff9a00;
    --tm-success: #4f6e51;
    --tm-success-soft: rgba(132, 162, 130, 0.22);
    --tm-danger: #cc3f4e;
    --tm-danger-soft: rgba(246, 226, 233, 0.9);
    --tm-warning: #ff9a00;
    --tm-warning-soft: rgba(255, 154, 0, 0.15);
    --tm-info-soft: rgba(68, 161, 164, 0.14);
    --tm-radius: 12px;
    --tm-shadow: 0 1px 2px rgba(34, 40, 42, .05), 0 1px 3px rgba(34, 40, 42, .08);
    --tm-shadow-lg: 0 6px 16px -4px rgba(34, 40, 42, .10), 0 2px 6px -2px rgba(34, 40, 42, .06);
}

.tm-card {
    background: var(--tm-card);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    margin-bottom: 1.25rem;
}
.tm-card-head {
    padding: .9rem 1.1rem;
    border-bottom: 1px solid var(--tm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-weight: 600;
    font-size: .95rem;
    color: var(--tm-text);
}
.tm-card-head .tm-icon { color: var(--tm-primary); }
.tm-card-body { padding: 1.1rem; }

/* label/value rows (billing overview etc.) */
.tm-list { list-style: none; margin: 0; padding: 0; }
.tm-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem .25rem;
    border-bottom: 1px dashed var(--tm-border);
    font-size: .9rem;
}
.tm-list li:last-child { border-bottom: 0; }
.tm-list .tm-label { color: var(--tm-muted); display: flex; align-items: center; gap: .45rem; }
.tm-list .tm-value { font-weight: 600; color: var(--tm-text); text-align: left; }

/* status badges — palette-verified contrast */
.tm-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.4;
}
.tm-badge::before {
    content: "";
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: currentColor;
}
.tm-badge-active, .tm-badge-paid, .tm-badge-completed { background: var(--tm-success-soft); color: #3a523c; }
.tm-badge-success { background: var(--tm-success-soft); color: #3a523c; }
.tm-badge-pending, .tm-badge-payment, .tm-badge-info { background: var(--tm-info-soft); color: #22626b; }
.tm-badge-suspended, .tm-badge-fraud { background: var(--tm-danger-soft); color: #8c2e3b; }
.tm-badge-unpaid, .tm-badge-overdue { background: var(--tm-danger-soft); color: #8c2e3b; }
.tm-badge-cancelled, .tm-badge-terminated, .tm-badge-draft, .tm-badge-refunded, .tm-badge-collections, .tm-badge-muted { background: #efe9de; color: #6b6455; }

/* buttons — modernize existing bootstrap buttons site-wide */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease;
}
.btn:not(.btn-sm):not(.btn-lg) { padding: .5rem 1.1rem; }
.btn-primary, .bg-color-blue, .btn-info { box-shadow: 0 1px 2px rgba(35, 67, 163, .25); }
.btn:hover { transform: translateY(-1px); }
.btn:focus { box-shadow: 0 0 0 3px rgba(59, 111, 224, .25) !important; }

/* ---------- 2) Header toolbar SVG icon buttons ---------- */
.header .navbar .toolbar .nav-link,
.header .navbar .toolbar .btn {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--tm-primary);
    background: var(--tm-primary-soft);
    transition: background-color .15s ease, transform .15s ease;
}
.header .navbar .toolbar .nav-link:hover,
.header .navbar .toolbar .btn:hover { background: rgba(35, 67, 163, .16); transform: translateY(-1px); }
.header .navbar .toolbar .tm-icon { width: 1.15rem; height: 1.15rem; }
.header .navbar .toolbar .client-top-access-item-count {
    position: absolute;
    top: -2px;
    left: -2px;
    background: var(--tm-danger);
    color: #fff;
    border-radius: 999px;
    font-size: .62rem;
    min-width: 1rem;
    height: 1rem;
    line-height: 1rem;
    text-align: center;
    padding: 0 .2rem;
}
.header .navbar .toolbar .nav-item { position: relative; }
.header .navbar .toolbar #notifications { position: relative; }
.header .navbar .toolbar #notifications .tm-icon { width: 1.15rem; height: 1.15rem; }

/* header search */
.header .navbar .input-group.search .btn { border-radius: 8px 0 0 8px; }
.header .navbar .form-inline .form-control { border-radius: 8px; }

/* ---------- 3) Dashboard (clientareahome) stats ---------- */
.widget-box { margin-bottom: 1.5rem; }
.widget-box .container > .row { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.widget-box-item {
    background: var(--tm-card);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 1rem 1.1rem !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: .9rem;
    transition: box-shadow .15s ease, transform .15s ease;
}
.widget-box-item:hover { box-shadow: var(--tm-shadow-lg); transform: translateY(-2px); }
.widget-box-item.pr_40 { padding-right: 1.1rem !important; }
.widget-box-item .bg-icon {
    width: 3rem !important;
    height: 3rem !important;
    line-height: 3rem !important;
    float: none !important;
    border-radius: 12px;
    background: var(--tm-primary-soft) !important;
    margin: 0 !important;
}
.widget-box-item .bg-icon .fa, .widget-box-item .bg-icon .fas {
    color: var(--tm-primary);
    font-size: 1.25rem;
    line-height: 3rem;
}
.widget-box-item-content { text-align: right; }
.widget-box-item-content h5 { margin: 0 0 .15rem; font-size: .9rem; font-weight: 600; color: var(--tm-text); }
.widget-box-item-content > div { font-size: .8rem; color: var(--tm-muted); }
.widget-box-item-content > div span:first-child { font-weight: 700; color: var(--tm-primary); font-size: .95rem; }
.widget-box-item-content-divider { display: inline-block; width: 1px; height: .8em; background: var(--tm-border); margin: 0 .45rem; vertical-align: -0.1em; }

/* home cards polish */
.client-home-cards .card {
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
}
.client-home-cards .card-title { font-size: 1.02rem; font-weight: 700; color: var(--tm-text); }
.client-home-cards .card-title .fa, .client-home-cards .card-title .fas, .client-home-cards .card-title .far { color: var(--tm-primary); }
.table-list thead th {
    background: var(--tm-primary-soft);
    color: var(--tm-primary);
    font-weight: 600;
    border: 0;
}
.table-list td, .table-list th { vertical-align: middle !important; }

/* ---------- 4) Client sidebar cards (productdetails برسی/عملیات) ---------- */
.card-sidebar {
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    overflow: hidden;
}
.card-sidebar > .card-header {
    background: var(--tm-card);
    border-bottom: 1px solid var(--tm-border);
    padding: .8rem 1rem;
}
.card-sidebar .card-title { font-size: .9rem; font-weight: 700; color: var(--tm-text); }
.card-sidebar .card-title .fa, .card-sidebar .card-title .fas, .card-sidebar .card-title .far { color: var(--tm-primary); }
.card-sidebar .list-group-item {
    border: 0;
    border-bottom: 1px dashed var(--tm-border);
    padding: .65rem 1rem;
    font-size: .87rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--tm-text);
    background: transparent;
    transition: background-color .12s ease, color .12s ease;
}
.card-sidebar .list-group-item:last-child { border-bottom: 0; }
.card-sidebar .list-group-item .fa, .card-sidebar .list-group-item .fas, .card-sidebar .list-group-item .far,
.card-sidebar .list-group-item .tm-icon { color: var(--tm-primary); width: 1.1em; text-align: center; }
.card-sidebar .list-group-item:hover { background: var(--tm-primary-soft); }
.card-sidebar .list-group-item.active,
.card-sidebar .list-group-item.active:hover {
    background: var(--tm-primary-soft);
    color: var(--tm-primary);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--tm-primary);
}
.card-sidebar .list-group-item.active .fa, .card-sidebar .list-group-item.active .fas, .card-sidebar .list-group-item.active .far { color: var(--tm-primary); }
.card-sidebar .card-body { font-size: .87rem; }
/* hide empty headers of module panels (no :has() — Firefox-safe) */
.card-sidebar > .card-header:empty { display: none; }

/* ---------- 5) Service details (clientareaproductdetails) ---------- */
.tm-page-head { margin-bottom: 1.25rem; }
.tm-page-title { font-size: 1.3rem; font-weight: 800; color: #224248; margin: 0 0 .3rem; }
.tm-breadcrumb { margin: 0; font-size: .84rem; }
.tm-breadcrumb .breadcrumb-item a { color: #325e6a; text-decoration: none; }
.tm-breadcrumb .breadcrumb-item.active { color: var(--tm-muted); }

.tm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.tm-grid .tm-card { margin-bottom: 0; }

/* compact product identity strip (when module renders the overview) */
.tm-product-strip {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    flex-wrap: wrap;
}
.tm-product-strip .tm-product-icon { width: 3.4rem; height: 3.4rem; margin: 0; border-radius: 14px; flex-shrink: 0; }
.tm-product-strip .tm-product-icon .tm-icon { width: 1.6rem; height: 1.6rem; }
.tm-product-strip h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 .15rem; color: #224248; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tm-strip-meta { color: var(--tm-muted); font-size: .85rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.tm-strip-actions { margin-inline-start: auto; display: flex; gap: .5rem; }

/* restyle module-provided overview panels (cPanel etc.) */
.tm-module-output .panel.card,
.tm-module-output .card {
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.tm-module-output .panel-heading.card-header,
.tm-module-output .card-header {
    background: #fdf9f2;
    border-bottom: 1px solid var(--tm-border);
    padding: .8rem 1rem;
}
.tm-module-output .panel-title.card-title { color: #224248; font-size: .95rem; font-weight: 700; }
.tm-module-output .panel-title .fa, .tm-module-output .panel-title .fas,
.tm-module-output .panel-title .far { color: #44a1a4; }
.tm-module-output .panel-body.card-body { font-size: .87rem; color: var(--tm-text); }
.tm-module-output .cpanel-feature-row .col-md-3,
.tm-module-output .cpanel-feature-row .col-sm-4,
.tm-module-output .cpanel-feature-row .col-xs-6 { padding: .45rem; }
.tm-module-output .cpanel-feature-row a {
    display: block;
    text-align: center;
    padding: .7rem .4rem;
    border-radius: 10px;
    border: 1px solid transparent;
    color: #33454a;
    font-size: .8rem;
    transition: background-color .12s ease, border-color .12s ease;
}
.tm-module-output .cpanel-feature-row a:hover {
    background: rgba(68, 161, 164, 0.09);
    border-color: rgba(68, 161, 164, 0.3);
    text-decoration: none;
}
.tm-module-output img { max-width: 100%; }

.tm-product-hero { text-align: center; padding: 1.4rem 1.1rem; position: relative; }
.tm-product-hero .tm-badge { position: absolute; top: .9rem; right: .9rem; }
.tm-product-icon {
    width: 4.6rem;
    height: 4.6rem;
    margin: .2rem auto .8rem;
    border-radius: 20px;
    background: var(--tm-primary-soft);
    color: var(--tm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tm-product-icon .tm-icon { width: 2.2rem; height: 2.2rem; }
.tm-product-hero h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .2rem; color: var(--tm-text); }
.tm-product-hero h4 { font-size: .82rem; font-weight: 500; color: var(--tm-muted); margin: 0 0 .9rem; }
.tm-product-hero .tm-domain {
    display: inline-block;
    margin-top: .2rem;
    font-size: .82rem;
    color: var(--tm-accent);
    background: var(--tm-info-soft);
    border-radius: 999px;
    padding: .25rem .8rem;
    direction: ltr;
}
.tm-product-hero .tm-hero-actions { margin-top: 1rem; display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.tm-product-hero .tm-hero-actions .btn { padding: .4rem 1rem; font-size: .83rem; }

.tm-billing-overview .tm-card-head { color: var(--tm-text); }
.tm-billing-overview .tm-value { direction: ltr; }

/* alerts */
.tm-alert-pay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-radius: var(--tm-radius);
    padding: .8rem 1.1rem;
    margin-bottom: 1.25rem;
    background: var(--tm-danger-soft);
    border: 1px solid rgba(204, 63, 78, .3);
    color: #8c2e3b;
    font-size: .9rem;
}
.tm-alert-pay.tm-warning-soft { background: var(--tm-warning-soft); border-color: rgba(255, 154, 0, .4); color: #7a5000; }
.tm-alert-pay .btn { white-space: nowrap; }

/* tabs bar modern */
.responsive-tabs-sm {
    border-bottom: 1px solid var(--tm-border);
    gap: .25rem;
}
.responsive-tabs-sm .nav-link {
    border: 0;
    border-radius: 8px 8px 0 0;
    color: var(--tm-muted);
    font-size: .88rem;
    font-weight: 600;
    padding: .6rem 1rem;
}
.responsive-tabs-sm .nav-link:hover { color: var(--tm-primary); background: var(--tm-primary-soft); }
.responsive-tabs-sm .nav-link.active { color: var(--tm-primary); background: transparent; box-shadow: inset 0 -2px 0 var(--tm-primary); }
.product-details-tab-container { border: 1px solid var(--tm-border); border-top: 0; border-radius: 0 0 var(--tm-radius) var(--tm-radius); background: #fff; }

/* info rows inside tabs (label/value) */
.product-details-tab-container .row { padding: .35rem 0; }
.product-details-tab-container strong { color: var(--tm-text); font-size: .88rem; }

/* usage dials fix */
.dial-usage { color: var(--tm-primary) !important; }

/* ---------- 6) Invoice (viewinvoice) ---------- */
.tm-invoice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.tm-invoice-sheet {
    background: var(--tm-card);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 1.6rem 1.6rem 1.2rem;
}
.tm-invoice-sheet .tm-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px dashed var(--tm-border);
    padding-bottom: 1rem;
    margin-bottom: 1.1rem;
}
.tm-invoice-sheet h2.tm-invoice-title { font-size: 1.25rem; font-weight: 700; color: var(--tm-text); margin: 0; display: flex; align-items: center; gap: .6rem; }
.tm-sheet-dates { text-align: left; font-size: .85rem; color: var(--tm-muted); line-height: 1.7; }
.tm-sheet-dates strong { color: var(--tm-text); }

.tm-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.4rem; }
.tm-party { background: #fafbfe; border: 1px solid var(--tm-border); border-radius: 10px; padding: .9rem 1.1rem; }
.tm-party h4 { font-size: .88rem; font-weight: 700; color: var(--tm-primary); margin: 0 0 .5rem; display: flex; align-items: center; gap: .4rem; }
.tm-party p { margin: 0 0 .15rem; font-size: .86rem; color: var(--tm-text); line-height: 1.9; }

.tm-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tm-table thead th {
    background: rgba(68, 161, 164, 0.13);
    color: #224248;
    font-weight: 700;
    padding: .65rem .9rem;
    border: 0;
    text-align: right;
}
.tm-table thead th:last-child { text-align: left; }
.tm-table tbody td { padding: .65rem .9rem; border-bottom: 1px dashed var(--tm-border); color: var(--tm-text); }
.tm-table tbody tr:last-child td { border-bottom: 0; }
.tm-table .num { text-align: left; direction: ltr; white-space: nowrap; }
.tm-table tr.tm-subtotal td { font-weight: 600; }
.tm-table tr.tm-total td {
    background: #325e6a;
    color: #fff;
    font-weight: 700;
    border-bottom: 0;
}
.tm-table tr.tm-total td:first-child { border-radius: 0 8px 8px 0; }
.tm-table tr.tm-total td:last-child { border-radius: 8px 0 0 8px; }
.tm-table tr.tm-grand td { background: rgba(68, 161, 164, 0.15); font-weight: 700; color: #224248; }

.tm-invoice-side { position: sticky; top: 1rem; }
.tm-total-card {
    background: var(--tm-card);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow-lg);
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.1rem;
}
.tm-total-card .tm-total-label { font-size: .8rem; color: var(--tm-muted); margin-bottom: .2rem; }
.tm-total-card .tm-total-amount { font-size: 1.5rem; font-weight: 800; color: #224248; margin-bottom: .7rem; }
.tm-total-card .form-payment-method { margin: .3rem 0 .6rem; font-size: .82rem; color: var(--tm-muted); }
.tm-total-card .paymentbutton { margin-top: .4rem; }
.tm-total-card .btn { width: 100%; }

.tm-actions-card { background: var(--tm-card); border: 1px solid var(--tm-border); border-radius: var(--tm-radius); box-shadow: var(--tm-shadow); padding: .4rem; }
.tm-actions-card a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .8rem;
    border-radius: 8px;
    color: var(--tm-text);
    font-size: .87rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .12s ease;
}
.tm-actions-card a:hover { background: var(--tm-info-soft); color: #224248; }
.tm-actions-card a .tm-icon { color: #44a1a4; }

.tm-invoice-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 2rem;
    background: #fafbfe;
    border: 1px solid var(--tm-border);
    border-radius: 10px;
    padding: .7rem 1.1rem;
    margin-bottom: 1.3rem;
    font-size: .85rem;
    color: var(--tm-muted);
}
.tm-invoice-meta-strip strong { color: var(--tm-text); }

.tm-section-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--tm-text);
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 1.3rem 0 .7rem;
}
.tm-section-title .tm-icon { color: var(--tm-primary); }

/* ---------- 7) Accordion (groupList) icon sizing only ---------- */
#nav .dropdown-menu .panel-body .table td { padding: .3rem .5rem; }
#nav .dropdown-menu .list-group-item-action .tm-icon { color: var(--tm-primary); }

/* ---------- 8) Responsive / mobile ---------- */
@media (max-width: 991.98px) {
    .tm-invoice-layout { grid-template-columns: 1fr; }
    .tm-invoice-side { position: static; order: -1; }
}
@media (max-width: 1199.98px) {
    .navbar-brand {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
        max-width: 52vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .navbar-brand .logo-img { max-height: 42px; width: auto; }
    .header .navbar .toolbar .nav-link,
    .header .navbar .toolbar .btn { width: 2.2rem; height: 2.2rem; }
}
@media (max-width: 767.98px) {
    .navbar-brand { font-size: 1.05rem !important; max-width: 48vw; }
    .header .navbar > .container { padding-left: .5rem; padding-right: .5rem; }
    .header .navbar .navlog, .header .navbar .navmin { font-size: .8rem; }
    .header .navbar .navlog .clientsnum, .header .navbar .navmin .clientsnum { font-size: .72rem; }
    .tm-grid { grid-template-columns: 1fr; }
    .widget-box .container > .row { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .widget-box-item { padding: .8rem .7rem !important; }
    .widget-box-item .bg-icon { width: 2.4rem !important; height: 2.4rem !important; line-height: 2.4rem !important; }
    .widget-box-item .bg-icon .fa, .widget-box-item .bg-icon .fas { font-size: 1rem; line-height: 2.4rem; }
    .widget-box-item .bg-icon .tm-icon { width: 1.4rem; height: 1.4rem; }
    .widget-box-item-content h5 { font-size: .8rem; }
    .widget-box-item-content > div { font-size: .72rem; }
    .tm-parties { grid-template-columns: 1fr; }
    .tm-invoice-sheet { padding: 1.1rem .9rem; }
    .tm-invoice-title { font-size: 1.05rem !important; }
    .tm-list li { flex-direction: column; align-items: flex-start; gap: .15rem; padding: .55rem .1rem; }
    .tm-list .tm-value { text-align: right; }
    .header .navbar .form-inline .input-group.search { display: none !important; }
    .tm-card-head { flex-wrap: wrap; }
    .footer-block { text-align: center; }
    .footer-block-col-2nd { margin-top: .8rem; }
    body { font-size: .9rem; }
}

/* ---------- 9) Store mega menu / groupList accordion ---------- */
ul.dropdown-menu.store-mega {
    min-width: 330px;
    max-width: 94vw;
    padding: .45rem;
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow-lg);
    background-color: #fff;
}
.store-mega .store-mega-inner { list-style: none; margin: 0; padding: 0; display: block; width: 100%; }
.store-accordion { width: 100%; }
.store-mega .acc-item {
    margin: .2rem .1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    transition: background-color .2s ease, border-color .2s ease;
}
.store-mega .acc-item:hover { background: var(--tm-primary-soft); border-color: var(--tm-border); }
.store-mega .acc-header {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    background: none;
    border: 0;
    text-align: right;
    padding: .6rem .75rem;
    font-size: .93rem;
    font-weight: 600;
    color: var(--tm-text);
    cursor: pointer;
    border-radius: 10px;
    transition: color .2s ease;
}
.store-mega .acc-header:hover,
.store-mega .acc-header:focus { color: var(--tm-primary); outline: none; }
.store-mega .acc-header .tm-icon { color: var(--tm-primary); transition: color .2s ease, transform .2s ease; }
.store-mega .acc-header:hover .tm-icon { color: var(--tm-accent); }
.store-mega .acc-chev {
    margin-inline-start: auto;
    color: var(--tm-muted);
    transition: transform .28s ease;
}
.store-mega .acc-header[aria-expanded="true"] .acc-chev { transform: rotate(180deg); color: var(--tm-accent); }
.store-mega .acc-body { padding: .2rem .45rem .45rem; }
.store-mega .acc-link {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .7rem;
    margin: .15rem 0;
    font-size: .9rem;
    color: var(--tm-muted);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.store-mega .acc-link .tm-icon { color: var(--tm-accent); width: 1.05rem; height: 1.05rem; }
.store-mega .acc-link:hover {
    background: #fff;
    color: var(--tm-primary);
    transform: translateX(-3px);
    box-shadow: var(--tm-shadow);
}
.store-plain-links { padding: .3rem .25rem .35rem; }
.store-plain-links .acc-link { color: var(--tm-text); }
.store-plain-links .acc-link:hover { background: #fff; }

/* dropdown open animation for store mega + user menu (RTL: rise & fade) */
#nav .dropdown-menu.store-mega,
.header .navbar .toolbar .user-dropdown {
    animation: tm-dd-in .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes tm-dd-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* account dropdown header (کد مشتری) */
.dropdown-menu .dropdown-header.account-user-code {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--tm-primary);
    padding: .55rem .9rem .35rem;
}
.dropdown-menu .dropdown-header.account-user-code .tm-icon { color: var(--tm-accent); }

/* ---------- 10) Richer hover states ---------- */
/* toolbar icon buttons */
.header .navbar .toolbar .nav-link,
.header .navbar .toolbar .btn {
    transition: background-color .25s ease, color .25s ease, transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}
.header .navbar .toolbar .nav-link:hover,
.header .navbar .toolbar .btn:hover,
.header .navbar .toolbar #userIconBtn:hover {
    background: linear-gradient(135deg, var(--tm-primary-soft), var(--tm-info-soft));
    color: var(--tm-primary);
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 6px 14px -3px rgba(50, 94, 106, .35), 0 0 0 3px rgba(68, 161, 164, .12);
}
.header .navbar .toolbar .nav-link:active,
.header .navbar .toolbar .btn:active,
.header .navbar .toolbar #userIconBtn:active { transform: translateY(0) scale(.95); }
/* active/open state for the user dropdown toggle */
.header .navbar .toolbar .user-menu-wrap.show > .nav-link {
    background: linear-gradient(135deg, var(--tm-primary-soft), var(--tm-info-soft));
    color: var(--tm-primary);
    box-shadow: 0 0 0 3px rgba(68, 161, 164, .14);
}
/* notification flag: gentle pulse of the badge dot */
.header .navbar .toolbar #notifications .client-top-access-item-count {
    transition: transform .2s ease;
}
.header .navbar .toolbar #notifications:hover .client-top-access-item-count { transform: scale(1.12); }

/* main nav links: soft pill + sliding gradient underline */
.main-navbar-wrapper #nav > li > a {
    position: relative;
    transition: color .22s ease, background-color .22s ease, border-radius .22s ease;
    border-radius: 8px;
}
.main-navbar-wrapper #nav > li > a::after {
    content: '';
    position: absolute;
    right: 12px;
    left: 12px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(270deg, var(--tm-accent), var(--tm-primary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.main-navbar-wrapper #nav > li > a:hover,
.main-navbar-wrapper #nav > li > a:focus {
    color: var(--tm-primary);
    background-color: var(--tm-primary-soft);
}
.main-navbar-wrapper #nav > li > a:hover::after,
.main-navbar-wrapper #nav > li > a:focus::after,
.main-navbar-wrapper #nav > li.open > a::after,
.main-navbar-wrapper #nav > li.show > a::after { transform: scaleX(1); }
.main-navbar-wrapper #nav > li.show > a { color: var(--tm-primary); background-color: var(--tm-primary-soft); }

/* header CTA button glow */
.header .btn.bg-color-blue {
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.header .btn.bg-color-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -4px rgba(35, 67, 163, .5);
    filter: brightness(1.08) saturate(1.05);
}
.header .btn.bg-color-blue:active { transform: translateY(0); }

/* dropdown items (all header dropdowns) — RTL slide + icon tint */
#header .dropdown-menu .dropdown-item { border-radius: 8px; transition: background-color .2s ease, color .2s ease, transform .2s ease; }
#header .dropdown-menu .dropdown-item:hover { background: var(--tm-primary-soft); }
#header .dropdown-menu .dropdown-item a.dropdown-item {
    transition: color .18s ease, background-color .18s ease;
    border-radius: 6px;
}
#header .dropdown-menu .dropdown-item a.dropdown-item:hover { color: var(--tm-primary); }
#header .dropdown-menu { transition: opacity .18s ease, transform .18s ease; }

/* generic buttons */
.btn { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease, filter .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -3px rgba(34, 66, 72, .3); filter: brightness(1.03); }
.btn:active { transform: translateY(0); }

/* cards / widgets */
.tm-card, .card { transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.widget-box-item:hover {
    box-shadow: 0 12px 26px -8px rgba(50, 94, 106, .32);
    transform: translateY(-3px);
    border-color: var(--tm-accent);
}
.tm-card:hover { box-shadow: var(--tm-shadow-lg); transform: translateY(-1px); }

/* tables & list rows */
.table tbody tr { transition: background-color .18s ease; }
.table tbody tr:hover { background-color: var(--tm-primary-soft); }
.list-group-item-action { transition: background-color .18s ease, color .18s ease, padding-right .18s ease; }
.list-group-item-action:hover { color: var(--tm-primary); }

/* sidebar / footer links */
.footer .nav-link, .footer a { transition: color .2s ease, opacity .2s ease; }
.footer a:hover { color: var(--tm-accent); }

/* ---------- 10b) User dropdown (server-rendered, user icon) ---------- */
.header .navbar .toolbar .user-menu-wrap { position: relative; }
/* icon button: hide bootstrap caret glyph */
.header .navbar .toolbar .user-menu-wrap > .dropdown-toggle::after,
.header .navbar .toolbar .user-menu-wrap > .dropdown-toggle::before { display: none !important; }
.header .navbar .toolbar .user-dropdown {
    position: absolute !important;
    top: calc(100% + 7px) !important;
    left: 0;
    right: auto;
    margin: 0 !important;
    z-index: 1050;
    min-width: 250px;
    max-width: 92vw;
    max-height: 78vh;
    overflow-y: auto;
    padding: .45rem;
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: 0 14px 38px -10px rgba(23, 47, 52, .22), 0 3px 10px -4px rgba(23, 47, 52, .1);
    background-color: #fff;
}
.user-dd-head {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .7rem .75rem;
    background: linear-gradient(135deg, var(--tm-primary-soft), var(--tm-info-soft));
    border-radius: 10px;
    margin-bottom: .3rem;
}
.user-dd-avatar {
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--tm-primary), var(--tm-accent));
    box-shadow: 0 4px 10px -3px rgba(50, 94, 106, .5);
}
.user-dd-avatar .tm-icon { width: 1.25rem; height: 1.25rem; }
.user-dd-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.user-dd-greet {
    font-weight: 700;
    font-size: .92rem;
    color: var(--tm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-dd-code {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    color: var(--tm-muted);
}
.user-dd-code .tm-icon { width: .95rem; height: .95rem; color: var(--tm-accent); }
.user-dropdown .user-dd-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .52rem .7rem;
    margin: .1rem 0;
    font-size: .9rem;
    font-weight: 500;
    color: var(--tm-text);
    border-radius: 8px;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.user-dropdown .user-dd-item .tm-icon {
    color: var(--tm-primary);
    opacity: .75;
    transition: opacity .18s ease, color .18s ease, transform .18s ease;
}
.user-dropdown .user-dd-item:hover {
    background: var(--tm-primary-soft);
    color: var(--tm-primary);
    transform: translateX(-4px);
}
.user-dropdown .user-dd-item:hover .tm-icon { opacity: 1; color: var(--tm-accent); }
.user-dropdown .user-dd-logout { color: var(--tm-danger); }
.user-dropdown .user-dd-logout .tm-icon { color: var(--tm-danger); opacity: .8; }
.user-dropdown .user-dd-logout:hover { background: var(--tm-danger-soft); color: var(--tm-danger); }
.user-dropdown .user-dd-logout:hover .tm-icon { opacity: 1; }
.user-dropdown .dropdown-divider { margin: .35rem .4rem; }

/* hide legacy navlog if ever rendered (menu now lives in the user icon dropdown) */
.header .navbar .navlog { display: none !important; }

/* store mega menu: richer accordion interactions */
.store-mega .acc-item { transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease; }
.store-mega .acc-item:hover {
    background: var(--tm-primary-soft);
    border-color: rgba(68, 161, 164, .35);
    box-shadow: inset 0 0 0 1px rgba(68, 161, 164, .08);
}
.store-mega .acc-header { transition: color .2s ease, background-color .2s ease; }
.store-mega .acc-header .tm-icon { transition: color .2s ease, transform .25s ease; }
.store-mega .acc-header:hover .tm-icon { color: var(--tm-accent); transform: scale(1.12); }
.store-mega .acc-header[aria-expanded="true"] { color: var(--tm-primary); background: rgba(68, 161, 164, .08); }
.store-mega .acc-link {
    transition: background-color .18s ease, color .18s ease, transform .18s cubic-bezier(.34,1.3,.64,1), box-shadow .18s ease;
}
.store-mega .acc-link:hover {
    background: #fff;
    color: var(--tm-primary);
    transform: translateX(-4px);
    box-shadow: var(--tm-shadow), inset 2px 0 0 var(--tm-accent);
}
.store-mega .acc-link:hover .tm-icon { transform: translateX(-2px); }
.store-mega .acc-link .tm-icon { transition: transform .18s ease; }

/* ---------- 12) Pre-login hero panel (login / register / homepage) ---------- */
/* fit the split-login section into the first viewport (below the ~213px header) */
@media (min-width: 768px) {
    .container-login100 {
        min-height: calc(100vh - 214px) !important;
    }
    .login100-form {
        min-height: 1px !important;
        padding-top: 44px !important;
        padding-bottom: 48px !important;
    }
    .wrap-login100 { align-items: stretch; }
}
.login100-more {
    background-image: url('../nav/img/login_hero.jpg') !important;
    background-position: center center;
    overflow: hidden;
}
.login100-more::before { background: rgba(15, 35, 40, .12); }
.login-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(205deg, rgba(15, 35, 40, 0) 30%, rgba(15, 35, 40, .45) 66%, rgba(15, 35, 40, .82) 100%);
    pointer-events: none;
}
.login-hero-content {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    padding: 1.6rem 1.9rem 1.8rem;
    color: #fff;
    z-index: 2;
}
.login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    padding: .38rem .95rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 4px 16px -6px rgba(0, 0, 0, .4);
}
.login-hero-badge .tm-icon { width: 1rem; height: 1rem; color: #7fd4d6; }
.login-hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 1rem 0 1.05rem;
    line-height: 1.45;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}
.login-hero-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .62rem;
}
.login-hero-list li {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .92rem;
    color: rgba(255, 255, 255, .94);
}
.lh-ic {
    width: 2.05rem;
    height: 2.05rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(68, 161, 164, .3);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform .22s ease, background-color .22s ease;
}
.lh-ic .tm-icon { width: 1.05rem; height: 1.05rem; color: #fff; }
.login-hero-list li:hover .lh-ic { transform: scale(1.1); background: rgba(68, 161, 164, .45); }
/* entrance */
.login-hero-badge, .login-hero-title, .login-hero-list { animation: tm-hero-in .55s ease backwards; }
.login-hero-title { animation-delay: .08s; }
.login-hero-list { animation-delay: .16s; }
@keyframes tm-hero-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1199.98px) {
    .login-hero-title { font-size: 1.25rem; }
    .login-hero-list li { font-size: .85rem; }
}

/* login form polish */
.login100-form .form-control:focus {
    border-color: var(--tm-accent);
    box-shadow: 0 0 0 .2rem rgba(68, 161, 164, .16);
}
.login100-form .input-group-merge:focus-within .input-group-text {
    border-color: var(--tm-accent);
    color: var(--tm-primary);
}
.login100-form .btn-primary:hover,
.login100-form .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -5px rgba(50, 94, 106, .45);
}
.login100-form .btn-reveal-pw { transition: color .2s ease, background-color .2s ease; }
.login100-form .btn-reveal-pw:hover { color: var(--tm-primary); background: var(--tm-info-soft); }

/* ---------- 13) Print (invoice) ---------- */
@media print {
    .tm-invoice-side, .header, .footer-block, #fullpage-overlay, .modal, .btn, .tm-actions-card { display: none !important; }
    .tm-invoice-layout { grid-template-columns: 1fr; }
    body { background: #fff !important; }
    .tm-invoice-sheet { border: 0; box-shadow: none; }
}
