/*
    NEXRADIUS theme
    Loaded after nexradius_legacy.css and overrides the legacy image based look.
    Markup is unchanged for most pages, so legacy class names are restyled here.

    Light: white and navy. Dark ("night mode"): data-theme="dark" on <html>,
    or system dark preference when the user has not chosen a theme.
*/

:root {
    color-scheme: only light; /* "only": phone browsers with forced dark mode (Chrome, Samsung, Xiaomi...) must not darken the light theme */
    --ink: #18233a;
    --muted: #5a6680;
    --canvas: #eef2f7;
    --panel: #ffffff;
    --panel-alt: #f6f8fb;
    --panel-zebra: #fafbfd;
    --line: #d7deea;
    --line-soft: #e8edf4;
    --input-line: #c2cbda;
    --brand: #1f3a68;
    --brand-dark: #142749;
    --brand-tint: #e8eef9;
    --brand-link: #24508f;
    --link-line: #b9c9e4;
    --topbar: #1a2c52;
    --topbar-ink: #ffffff;
    --accent: #5b8def;
    --brand-mark-accent: #9ec1ff;
    --amber: #d9962c;
    --amber-tint: #fdf6ea;
    --group-ink: #6b4a12;
    --group-line: #efdcb8;
    --ok: #1d7f48;
    --ok-tint: #e6f4ec;
    --ok-line: #bfe3cd;
    --warn: #a3620a;
    --warn-tint: #fdf1dc;
    --danger: #b42323;
    --danger-tint: #fbe9e9;
    --danger-line: #eab4b4;
    --disabled-ink: #9aa3b2;
    --radius: 6px;
    --font: "Segoe UI", "Vazirmatn", Tahoma, "DejaVu Sans", Arial, sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e3e8f1;
    --muted: #9aa6bd;
    --canvas: #0f1522;
    --panel: #172033;
    --panel-alt: #1b2539;
    --panel-zebra: #192338;
    --line: #2b3854;
    --line-soft: #222d45;
    --input-line: #3a4a6b;
    --brand: #3d68bf;
    --brand-dark: #5580d6;
    --brand-tint: #1d2b4a;
    --brand-link: #8fb2f2;
    --link-line: #35507f;
    --topbar: #0b1222;
    --topbar-ink: #e3e8f1;
    --accent: #4c78d0;
    --brand-mark-accent: #8fb2f2;
    --amber: #d9a24a;
    --amber-tint: #262116;
    --group-ink: #e2c483;
    --group-line: #3d3320;
    --ok: #5cc48f;
    --ok-tint: #13291f;
    --ok-line: #24513a;
    --warn: #e2ab55;
    --warn-tint: #2c2413;
    --danger: #f08080;
    --danger-tint: #2e1719;
    --danger-line: #5a2a2e;
    --disabled-ink: #67738a;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e3e8f1;
    --muted: #9aa6bd;
    --canvas: #0f1522;
    --panel: #172033;
    --panel-alt: #1b2539;
    --panel-zebra: #192338;
    --line: #2b3854;
    --line-soft: #222d45;
    --input-line: #3a4a6b;
    --brand: #3d68bf;
    --brand-dark: #5580d6;
    --brand-tint: #1d2b4a;
    --brand-link: #8fb2f2;
    --link-line: #35507f;
    --topbar: #0b1222;
    --topbar-ink: #e3e8f1;
    --accent: #4c78d0;
    --brand-mark-accent: #8fb2f2;
    --amber: #d9a24a;
    --amber-tint: #262116;
    --group-ink: #e2c483;
    --group-line: #3d3320;
    --ok: #5cc48f;
    --ok-tint: #13291f;
    --ok-line: #24513a;
    --warn: #e2ab55;
    --warn-tint: #2c2413;
    --danger: #f08080;
    --danger-tint: #2e1719;
    --danger-line: #5a2a2e;
    --disabled-ink: #67738a;
    }
}


html { background: var(--canvas); }
body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.45;
}
* { font-family: var(--font) !important; }
pre, code, tt, .ibs_mono { font-family: Consolas, "DejaVu Sans Mono", monospace !important; }
/* legacy classes use 8pt everywhere; same specificity as td.X and loaded later, so this wins
   and the specific rules below (also later) still win over it */
td[class], font { font-size: 12.5px; }
a.link_in_body, a.page_menu, a.page_num, a.Header_Top_Links, a.RightSide_Links, span.message { font-size: inherit; }
td { font-size: 13px; }
a { color: var(--brand-link); }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

/* ---------- decorative legacy images: hidden, replaced by CSS ---------- */
img[src*="/images/form/"],
img[src*="/images/row/"],
img[src*="/images/comment/"],
img[src*="/images/tab/"],
img[src*="/images/sidebar/"],
img[src*="/images/header/"],
img[src*="_on_red"],
img[src*="_on_white"],
img[src*="_on_orange"],
img[src*="end_of_list_title"],
img[src*="end_of_line_bottom_of_table"],
img[src*="before_page_title"],
img[src*="after_page_title"],
img[src*="line_between_"] { display: none !important; }

/* ---------- top bar ---------- */
.ibs_topbar {
    display: flex;
    align-items: center;
    gap: 22px;
    background: var(--topbar);
    color: var(--topbar-ink);
    padding: 0 20px;
    height: 52px;
    border-bottom: 3px solid var(--accent);
}
.ibs_brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.ibs_brand_logo { display: block; height: 32px; width: auto; }
.ibs_brand:hover { color: #fff; }
.ibs_brand_mark { font-size: 19px; font-weight: 800; letter-spacing: 0.5px; }
.ibs_brand_mark i { font-style: normal; font-weight: 300; color: var(--brand-mark-accent); letter-spacing: 1px; }
.ibs_brand_ver { font-size: 11px; color: rgba(255,255,255,.7); }
.ibs_nav { display: flex; height: 100%; }
.ibs_nav_item {
    display: flex; align-items: center;
    padding: 0 14px;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    white-space: nowrap;
}
.ibs_nav_item:hover { color: #fff; background: rgba(0,0,0,.12); }
.ibs_nav_active, .ibs_nav_active:hover { color: #fff; background: rgba(0,0,0,.22); border-bottom-color: #fff; }
.ibs_quicksearch { margin-inline-start: auto; }
.ibs_quicksearch input {
    width: 220px;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.14);
    color: #fff;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12.5px;
}
.ibs_quicksearch input::placeholder { color: rgba(255,255,255,.75); }
.ibs_quicksearch input:focus { background: var(--panel); color: var(--ink); outline: none; border-color: #fff; }
.ibs_account { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.ibs_account_name { font-weight: 600; }
.ibs_account_logout { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.45); border-radius: 4px; padding: 4px 10px; }
.ibs_account_logout:hover { color: var(--brand); background: var(--panel); }

.ibs_subnav {
    display: flex; flex-wrap: wrap; gap: 2px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 0 14px;
    min-height: 6px;
}
.ibs_subnav:empty { display: none; }
.ibs_subnav_item {
    padding: 9px 10px 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 12.5px;
    border-bottom: 2px solid transparent;
}
.ibs_subnav_item:hover { color: var(--ink); }
.ibs_subnav_active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.ibs_pagehead {
    display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    padding: 18px 24px 6px;
}
.ibs_pagetitle { margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.2px; }
.ibs_pageinfo { color: var(--muted); font-size: 12px; }
.ibs_datetype, a.ibs_datetype:link, a.ibs_datetype:visited { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--muted); }
.ibs_today { margin-inline-start: 12px; }

/* ---------- page layout ---------- */
table.Main_Page { width: 100%; margin: 0; }
table.Main_Page > tbody > tr > td { padding: 10px 16px 24px; vertical-align: top; }
td.ibs_side_cell { padding: 10px 16px 24px 0 !important; }

/* ---------- side panel ---------- */
.ibs_side { width: 220px; text-align: start; }
.ibs_side_toggle { display: block; text-align: right; font-size: 11.5px; color: var(--muted); text-decoration: none; margin: 0 2px 6px; }
.ibs_side_show {
    display: block; margin-top: 4px; width: 24px; height: 60px; line-height: 58px; text-align: center;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--muted); text-decoration: none; font-size: 18px;
}
.ibs_side_block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 10px 12px; }
.ibs_side_title { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ibs_side_links { list-style: none; margin: 0; padding: 0; }
.ibs_side_links li { border-top: 1px solid var(--line-soft); }
.ibs_side_links li:first-child { border-top: 0; }
.ibs_side_links a, .ibs_side_links a.RightSide_Links, .ibs_side_links a:link, .ibs_side_links a:visited { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 400; }
.ibs_side_links b { font-weight: 600; }
.ibs_side_links a:hover { color: var(--brand); }
.ibs_side_help .ibs_side_title { color: var(--brand); }
/* hide help box when page has no help text */
.ibs_side_help:has(p.about_page:empty) { display: none; }
p.about_page { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 400; }

.ibs_footer { text-align: center; color: var(--muted); font-size: 11.5px; padding: 16px 0 22px; }
.ibs_footer a { color: var(--muted); }

/* ---------- form / view tables ---------- */
table.Form_Main {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto 16px;
    min-width: 340px;
    text-align: start;
}
table.Form_Title { width: 100%; border-collapse: collapse; }
td.Form_Title_Begin, td.Form_Title_End, td.List_Title_Begin, td.List_Title_End { width: 0; padding: 0; background: none; }
td.Form_Title_red, td.Form_Title_orange, td.Form_Title_green, td.Form_Title_blue,
td.Form_Title_aqua, td.Form_Title_brown, td.Form_Title_violet, td.List_Title {
    background: var(--panel);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 700;
    height: auto;
    padding: 10px 14px 9px 12px;
    border-left: 3px solid var(--brand);
    white-space: nowrap;
}
td.Form_Title_orange { border-left-color: var(--amber); }
td.Form_Title_green { border-left-color: var(--ok); }
td.Form_Title_blue, td.Form_Title_aqua { border-left-color: var(--brand); }
td.Form_Title_Top_Line, td.List_Title_Top_Line {
    background: var(--panel);
    color: var(--warn);
    font-size: 11.5px;
    font-weight: 600;
    padding: 10px 14px 9px;
    border: 0;
}
td.Form_Title_End_Line, td.List_Title_End_Line { background: none; height: 0; padding: 0; border: 0; }
table.Form_Main > tbody > tr:first-child > td { border-bottom: 1px solid var(--line); }
td.Form_Content_Row_Space { height: 0; line-height: 0; font-size: 0; padding: 0; background: none; }
td.Form_Content_Col_Space { width: 12px; background: none; }
td.Form_Content_Row_Begin, td.Form_Content_Row_End { width: 0; padding: 0; background: none; }

td.Form_Content_Row_Left_light, td.Form_Content_Row_Left_dark,
td.Form_Content_Row_Left_2Col_light, td.Form_Content_Row_Left_2Col_dark,
td.Form_Content_Row_Left_2col_light, td.Form_Content_Row_Left_2col_dark {
    background: var(--panel);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    padding: 8px 12px 8px 14px;
    border-bottom: 1px solid var(--line-soft);
    height: auto;
    white-space: nowrap;
}
td.Form_Content_Row_Right_light, td.Form_Content_Row_Right_dark,
td.Form_Content_Row_Right_2Col_light, td.Form_Content_Row_Right_2Col_dark,
td.Form_Content_Row_Right_2col_light, td.Form_Content_Row_Right_2col_dark {
    background: var(--panel);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px 7px 8px;
    border-bottom: 1px solid var(--line-soft);
    height: auto;
}
td.Form_Content_Row_Left_dark, td.Form_Content_Row_Right_dark,
td.Form_Content_Row_Left_2Col_dark, td.Form_Content_Row_Right_2Col_dark,
td.Form_Content_Row_Left_2col_dark, td.Form_Content_Row_Right_2col_dark { background: var(--panel-alt); }

/* comment/textarea style cells (user info tables) */
td.Form_Content_Row_Left_textarea, td.Form_Content_Row_Right_textarea,
td.Form_Content_Row_Left_textarea_userinfo, td.Form_Content_Row_Right_textarea_userinfo,
td.Form_Content_Row_Right_textarea_groupinfo,
td.Form_Content_Row_Left_Textarea_2col, td.Form_Content_Row_Right_Textarea_2col,
td.Form_Content_Row_Left_Textarea, td.Form_Content_Row_Right_Textarea,
td.Form_Content_Row_Left_textarea_2col, td.Form_Content_Row_Right_textarea_2col {
    padding: 0; background: none; border-bottom: 1px solid var(--line-soft);
}
td.Form_Content_Row_Textarea_corner { width: 0; padding: 0; height: 0; }
td[class^="Form_Content_Row_Top_textarea_line"], td[class^="Form_Content_Row_Bottom_textarea_line"],
td[class^="Form_Content_Row_Left_textarea_line"], td[class^="Form_Content_Row_Right_textarea_line"] {
    background: none !important; border: 0 !important; height: 0; padding: 0; font-size: 0; line-height: 0; width: 0;
}
td[class^="Form_Content_Row_Left_textarea_td"], td[class^="Form_Content_Row_Left_Textarea_Td"] {
    background: var(--panel) !important;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    padding: 8px 12px 8px 14px;
    height: auto;
}
td[class^="Form_Content_Row_Right_textarea_td"] {
    background: var(--panel) !important;
    color: var(--ink);
    font-weight: 600;
    padding: 7px 10px;
    height: auto;
}
/* user info tables: label | user value | group value */
td.Form_Content_Row_Left_userinfo_light, td.Form_Content_Row_Left_userinfo_dark {
    background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 500;
    padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line-soft); height: auto;
}
td.Form_Content_Row_Right_userinfo_light, td.Form_Content_Row_Right_userinfo_dark {
    background: var(--panel); color: var(--ink); font-size: 13px; font-weight: 600;
    padding: 7px 10px; border-bottom: 1px solid var(--line-soft); height: auto;
}
td.Form_Content_Row_groupinfo_light, td.Form_Content_Row_groupinfo_dark {
    background: var(--amber-tint); color: var(--group-ink); font-size: 12.5px; font-weight: 500; text-align: center;
    padding: 7px 10px; border-bottom: 1px solid var(--group-line); border-left: 1px solid var(--group-line); height: auto;
}
/* group (inherited) column of user info tables */
td.Form_Content_Row_Right_textarea_groupinfo { background: var(--amber-tint); border-left: 1px solid var(--group-line); }
td.Form_Content_Row_Right_textarea_groupinfo td[class^="Form_Content_Row_Right_textarea_td"] {
    background: var(--amber-tint) !important; color: var(--group-ink); font-weight: 500; text-align: center;
}

/* form footer with buttons */
table.Form_Foot { width: 100%; border-collapse: collapse; }
td.Form_Foot_Begin_Line_red, td.Form_Foot_Below_Line_red,
td.Form_Foot_Begin_Line_orange, td.Form_Foot_Below_Line_orange,
td.Form_Foot_End { background: none; border: 0; height: 0; width: auto; }
td.Form_Foot_Buttons { width: 1%; padding: 10px 12px 10px 0; background: none; white-space: nowrap; }
tr.List_Foot_Line_red td, tr.List_Foot_Line_orange td { height: 0; background: none; padding: 0; }
tr.List_Foot_Line_red, tr.List_Foot_Line_orange { background: none; }
input[type=image] { vertical-align: middle; }

/* inline hint text under edit forms */
.ibs_hint {
    max-width: 520px;
    margin: -6px auto 14px;
    padding: 9px 12px;
    background: var(--amber-tint);
    border: 1px solid var(--group-line);
    border-radius: var(--radius);
    color: var(--group-ink);
    font-size: 12px;
    text-align: start;
    line-height: 1.5;
}

/* ---------- list tables ---------- */
table.List_Main {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto 16px;
}
table.List_Title { width: 100%; border-collapse: collapse; }
tr.List_Head td, tr.list_Head td {
    background: var(--panel-alt);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    height: auto;
    white-space: nowrap;
}
tr.List_Head a, tr.list_Head a { color: var(--muted); }
tr.List_Row_lightColor td, tr.list_Row_LightColor td, tr.List_Row_LightColor td,
tr.List_Row_darkColor td, tr.List_Row_DarkColor td, tr.list_Row_DarkColor td {
    background: var(--panel);
    padding: 7px 10px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 12.5px;
    height: auto;
}
tr.List_Row_darkColor td, tr.List_Row_DarkColor td, tr.list_Row_DarkColor td { background: var(--panel-zebra); }
td.List_Col { color: var(--ink); }
td.List_Col_Group { color: var(--group-ink); background: var(--amber-tint) !important; }

/* ---------- tabs ---------- */
table.ibs_tabs { border-collapse: collapse; margin: 0 auto 16px; text-align: start; }
table.ibs_tabs_bar { border-collapse: separate; border-spacing: 0; }
td.Tab_Title_begin, td.Tab_Title_end { width: 0; padding: 0; }
td.Tab_Title {
    background: transparent !important;
    background-image: none !important;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 12px 7px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    height: auto !important;
}
td.Tab_Title:hover { color: var(--ink); }
td.Tab_Title_Selected { color: var(--brand); border-bottom-color: var(--brand); }
td.Tab_Title_Top_Line { background: none; height: 0; }
td.Tab_Title_End_Line_red, td.Tab_Title_End_Line_orange, td.Tab_Title_Top_Line { background: none !important; padding: 0; line-height: 0; font-size: 0; }
table.ibs_tabs_bar { border-bottom: 1px solid var(--line); }
td.ibs_tabs_content { background: transparent; padding-top: 14px; }

/* ---------- inputs ---------- */
input.text, input.small_text, input.medium_text, input.large_text, input.Num, textarea.text, textarea, select {
    border: 1px solid var(--input-line);
    border-radius: 4px;
    background: var(--panel);
    color: var(--ink);
    font-size: 12.5px;
    padding: 4px 7px;
    height: auto;
    box-sizing: border-box;
}
select { padding: 3px 4px; }
input.text { width: 190px; }
input.small_text { width: 70px; }
input.medium_text { width: 130px; }
input.large_text { width: 260px; }
input.text:focus, input.small_text:focus, input.medium_text:focus, input.large_text:focus,
textarea.text:focus, textarea:focus, select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
    outline: none;
    background: var(--panel);
}
input[disabled], select[disabled], textarea[disabled] { background: var(--panel-alt); color: var(--disabled-ink); border-color: var(--line); }
input.checkbox, input[type=checkbox] { accent-color: var(--brand); width: 15px; height: 15px; vertical-align: -3px; margin: 0 6px 0 0; }

/* ---------- messages ---------- */
td.error_messages, span.message { font-size: 12.5px; }
td.error_messages { color: var(--danger); background: var(--danger-tint); border: 1px solid var(--danger-line); border-radius: var(--radius); padding: 8px 12px; }

/* ---------- links in body ---------- */
a:link.link_in_body, a:visited.link_in_body { color: var(--brand-link); text-decoration: none; border-bottom: 1px solid var(--link-line); }
a:hover.link_in_body { color: var(--brand-dark); border-bottom-color: var(--brand-dark); }
a:link.page_menu, a:visited.page_menu { color: var(--ink); }
a:link.page_num, a:visited.page_num { color: var(--brand); padding: 2px 6px; border-radius: 3px; text-decoration: none; }
a:hover.page_num { background: var(--brand-tint); }

/* ---------- status badges ---------- */
.ibs_badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; margin-inline-start: 6px; white-space: nowrap; }
.ibs_badge_ok { background: var(--ok-tint); color: var(--ok); }
.ibs_badge_warn { background: var(--warn-tint); color: var(--warn); }
.ibs_badge_danger { background: var(--danger-tint); color: var(--danger); }

/* ---------- admin home menu boxes ---------- */
td.Menu_Content_Row_light { background: var(--panel); border-bottom: 1px solid var(--line-soft); padding: 6px 12px; }

/* ---------- user panel dashboard ---------- */
body.ibs_user .ibs_account { margin-inline-start: auto; }
.ibs_dash { max-width: 640px; margin: 4px auto 18px; text-align: start; }
.ibs_notice {
    background: var(--amber-tint); border: 1px solid var(--group-line); border-radius: var(--radius);
    color: var(--group-ink); padding: 10px 14px; margin-bottom: 12px; font-size: 13px; line-height: 1.55;
}
.ibs_plan {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 4px solid var(--ok);
    border-radius: var(--radius);
}
.ibs_plan_warn { border-top-color: var(--amber); }
.ibs_plan_expired { border-top-color: var(--danger); }
.ibs_plan_none { border-top-color: var(--line); }
.ibs_plan_main { padding: 20px 22px 22px; }
.ibs_plan_big {
    font-size: 44px; font-weight: 700; line-height: 1.05; letter-spacing: -1px;
    color: var(--ink); font-variant-numeric: tabular-nums;
}
.ibs_plan_big small { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); margin: 0 14px 0 5px; }
.ibs_plan_big_text { font-size: 28px; letter-spacing: -0.4px; }
.ibs_plan_warn .ibs_plan_big { color: var(--warn); }
.ibs_plan_expired .ibs_plan_big { color: var(--danger); }
.ibs_plan_sub { margin-top: 8px; color: var(--muted); font-size: 13px; }
.ibs_meter { margin-top: 16px; height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.ibs_meter span { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.ibs_plan_warn .ibs_meter span { background: var(--amber); }
.ibs_facts { margin: 0; padding: 14px 20px; border-inline-start: 1px solid var(--line-soft); background: var(--panel-alt); }
.ibs_facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.ibs_facts div:last-child { border-bottom: 0; }
.ibs_facts dt { color: var(--muted); font-size: 12.5px; }
.ibs_facts dd { margin: 0; font-weight: 600; font-size: 13.5px; text-align: end; font-variant-numeric: tabular-nums; }
.ibs_facts dd small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.ibs_facts .ibs_badge { margin: 0; }
body.ibs_rtl .ibs_plan_big, body.ibs_rtl .ibs_plan_big_text { letter-spacing: 0; }
@media (max-width: 640px) {
    .ibs_plan { grid-template-columns: 1fr; }
    .ibs_facts { border-inline-start: 0; border-top: 1px solid var(--line-soft); }
    .ibs_plan_big { font-size: 36px; }
}

/* ---------- login pages ---------- */
body.ibs_stripped .ibs_topbar { justify-content: center; }
body.ibs_stripped table.Main_Page > tbody > tr > td { padding-top: 60px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
    .ibs_topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
    .ibs_nav { width: 100%; order: 3; overflow-x: auto; height: 38px; }
    .ibs_quicksearch { margin-inline-start: 0; flex: 1; }
    .ibs_quicksearch input { width: 100%; }
    #menu_full, #menu_hidden { display: none !important; }
    table.Main_Page > tbody > tr > td { padding: 10px 8px 20px; }
    table.Form_Main, table.List_Main, table.ibs_tabs { width: 100% !important; min-width: 0; }
    table.Form_Main td, table.List_Main td { white-space: normal !important; }
    td.Form_Content_Row_Left_2col_light, td.Form_Content_Row_Left_2col_dark,
    td.Form_Content_Row_Left_2Col_light, td.Form_Content_Row_Left_2Col_dark { padding-left: 8px; padding-right: 6px; }
    .ibs_pagehead { padding: 14px 12px 4px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- right to left (persian user panel) ---------- */
body.ibs_rtl td, body.ibs_rtl .ibs_dash { direction: rtl; }
body.ibs_rtl td.Form_Title_red, body.ibs_rtl td.List_Title { border-left: 0; border-right: 3px solid var(--brand); }
body.ibs_rtl input.text, body.ibs_rtl input.small_text { direction: ltr; text-align: right; }
body.ibs_rtl td[class*="_Right_"] { unicode-bidi: plaintext; text-align: right; }

/* ---------- buttons ---------- */
.ibs_button, a.ibs_button, button.ibs_button {
    display: inline-block;
    background: var(--brand);
    color: #fff !important;
    border: 1px solid var(--brand);
    border-radius: 5px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.3;
}
.ibs_button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.ibs_button_secondary, button.ibs_button_secondary { background: var(--panel); color: var(--ink) !important; border-color: var(--input-line); }
.ibs_button_secondary:hover { background: var(--panel-alt); border-color: var(--muted); }

/* ---------- messages ---------- */
td.header_messages { color: var(--ok); background: var(--ok-tint); border: 1px solid var(--ok-line); border-radius: var(--radius); padding: 8px 12px; font-size: 12.5px; }
img[src*="before_successful_msg"], img[src*="before_error_message"] { display: none; }

/* ---------- user info action bar ---------- */
.ibs_actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    max-width: 760px; margin: 0 auto 14px; text-align: start;
}
.ibs_rate_form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 5px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.ibs_rate_form .ibs_badge { margin: 0; }
.ibs_rate_form label { color: var(--muted); font-size: 12px; }
.ibs_rate_form input.small_text { width: 90px; }

/* ---------- renew ---------- */
.ibs_renew_summary {
    max-width: 520px; margin: 0 auto 14px; text-align: start;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 4px 14px;
}
.ibs_renew_summary div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.ibs_renew_summary div:last-child { border-bottom: 0; }
.ibs_renew_summary span { color: var(--muted); }
.ibs_field_note { color: var(--muted); font-size: 11.5px; font-weight: 400; margin-inline-start: 6px; }
td[class^="Form_Content_Row_Right"] label { font-weight: 500; color: var(--ink); }
.ibs_done {
    max-width: 520px; margin: 0 auto 16px; text-align: start;
    background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--ok);
    border-radius: var(--radius); padding: 14px 18px 18px;
}
.ibs_done h2 { margin: 0 0 8px; font-size: 17px; }
.ibs_done p { margin: 6px 0; }
.ibs_done .ibs_button { margin-top: 8px; }

/* ---------- dashboard ---------- */
.ibs_dashboard { max-width: 1100px; margin: 0 auto; text-align: start; }
.ibs_stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ibs_stat {
    display: block; text-decoration: none; color: var(--ink);
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 16px 14px;
}
a.ibs_stat:hover { border-color: var(--muted); color: var(--ink); }
.ibs_stat b { display: block; font-size: 32px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.ibs_stat span { display: block; font-size: 13px; font-weight: 600; margin-top: 4px; }
.ibs_stat small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.ibs_stat_warn { border-top: 3px solid var(--amber); }
.ibs_stat_warn b { color: var(--warn); }
.ibs_stat_alert { border-top: 3px solid var(--brand); }
.ibs_panels { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 12px; }
.ibs_panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 14px; min-width: 0; }
.ibs_panel_wide { grid-column: 1 / -1; }
.ibs_panel h2 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.ibs_table { width: 100%; border-collapse: collapse; }
.ibs_table th { text-align: start; color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.ibs_table td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.ibs_table tr:last-child td { border-bottom: 0; }
.ibs_table a { text-decoration: none; font-weight: 600; }
.ibs_cell_action { text-align: end; }
.ibs_empty { color: var(--muted); margin: 6px 0 2px; }
.ibs_more { color: var(--muted); font-size: 11.5px; margin: 8px 0 0; }
.ibs_quicklinks {
    max-width: 1100px; margin: 18px auto 0; text-align: start;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.ibs_quicklinks h3 { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.ibs_quicklinks a { display: block; padding: 2px 0; text-decoration: none; color: var(--ink); font-size: 12.5px; }
.ibs_quicklinks a:hover { color: var(--brand); }
@media (max-width: 900px) {
    .ibs_stats, .ibs_quicklinks { grid-template-columns: 1fr 1fr; }
    .ibs_panels { grid-template-columns: 1fr; }
}
/* customizable dashboard (inc/dashboard.php) */
.ibs_panels .ibs_quicklinks { grid-column: 1 / -1; margin: 6px 0 0; max-width: none; }
.ibs_panels:has(.ibs_quicklinks) { margin-bottom: 0; }
.nr_dash_bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; }
.nr_dash_bar .nr_health_strip { margin: 0; }
.nr_dash_saved { margin-inline-start: auto; }
.nr_dash_saved + .nr_dash_custom_btn { margin-inline-start: 0; }
.nr_dash_custom_btn { margin-inline-start: auto; }
.nr_dash_custom_btn { font-size: 12px; padding: 5px 12px; }
.nr_dash_saved { color: var(--ok, #1a7f37); font-size: 12.5px; font-weight: 600; }
.nr_dash_custom { margin-bottom: 14px; border-color: var(--brand); }
.nr_dash_cols { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: 12px; margin-top: 10px; align-items: start; }
.nr_dash_col { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 10px; margin: 0; min-width: 0; }
.nr_dash_col legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.nr_dash_list { list-style: none; margin: 0; padding: 0; }
.nr_dash_item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-bottom: 1px solid var(--line-soft); }
.nr_dash_item:last-child { border-bottom: 0; }
.nr_dash_item label { flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; min-width: 0; }
.nr_dash_item input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: none; }
.nr_dash_move { display: flex; gap: 4px; flex: none; }
.nr_dash_move button {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    background: var(--panel); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); cursor: pointer;
}
.nr_dash_move button:hover { border-color: var(--muted); }
.nr_dash_move svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nr_dash_item:first-child > .nr_dash_move .nr_dash_up, .nr_dash_item:last-child > .nr_dash_move .nr_dash_down,
.nr_ml_group:first-child > .nr_ml_row .nr_dash_up, .nr_ml_group:last-child > .nr_ml_row .nr_dash_down { visibility: hidden; }
.nr_dash_actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nr_dash_reset { margin-inline-start: auto; }
@media (max-width: 900px) {
    .nr_dash_cols { grid-template-columns: 1fr; }
}
.ibs_side_block:has(.ibs_side_links):not(:has(li)) { display: none; }
.ibs_done_failed { border-top-color: var(--danger); }
.ibs_rate_form input:invalid:not(:placeholder-shown) { border-color: var(--danger); }
.ibs_kill_form { margin: 0; }
.ibs_button_danger, button.ibs_button_danger { background: var(--panel); color: var(--danger) !important; border-color: var(--danger-line); }
.ibs_button_danger:hover { background: var(--danger); color: #fff !important; border-color: var(--danger); }

/* ---------- night mode toggle ---------- */
.ibs_theme_toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 30px; padding: 0; cursor: pointer;
    background: transparent; color: var(--topbar-ink);
    border: 1px solid rgba(255,255,255,.35); border-radius: 4px;
}
.ibs_theme_toggle:hover { background: rgba(255,255,255,.12); }
.ibs_theme_toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ibs_theme_toggle .ibs_moon { fill: currentColor; stroke: none; }
.ibs_theme_toggle .ibs_sun { display: none; }
:root[data-theme="dark"] .ibs_theme_toggle .ibs_moon { display: none; }
:root[data-theme="dark"] .ibs_theme_toggle .ibs_sun { display: inline; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ibs_theme_toggle .ibs_moon { display: none; }
    :root:not([data-theme="light"]) .ibs_theme_toggle .ibs_sun { display: inline; }
}
body.ibs_stripped .ibs_topbar .ibs_theme_toggle { position: static; }
body.ibs_stripped .ibs_topbar { position: relative; }

/* ---------- night mode: legacy markup that sets its own colors ---------- */
:root[data-theme="dark"] [bgcolor] { background-color: transparent; }
:root[data-theme="dark"] font[color] { color: inherit; }
:root[data-theme="dark"] table.Main_Page a:not([class]):link,
:root[data-theme="dark"] table.Main_Page a:not([class]):visited { color: var(--brand-link); }
:root[data-theme="dark"] img[src*="/images/list/list_body_"] { filter: invert(.85) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) [bgcolor] { background-color: transparent; }
    :root:not([data-theme="light"]) font[color] { color: inherit; }
    :root:not([data-theme="light"]) table.Main_Page a:not([class]):link,
    :root:not([data-theme="light"]) table.Main_Page a:not([class]):visited { color: var(--brand-link); }
    :root:not([data-theme="light"]) img[src*="/images/list/list_body_"] { filter: invert(.85) hue-rotate(180deg); }
}

/* ---------- legacy multi column forms (search pages) ---------- */
td.Form_Content_multi_left { color: var(--brand-link); font-size: 12.5px; font-weight: 600; padding: 6px 8px; }
td.Form_Content_multi_right { color: var(--ink); font-size: 12.5px; padding: 6px 8px; }
table.List_Top_Line, table.List_Top_line { background: transparent; }
table.List_Top_Line td, table.List_Top_line td { background: transparent; color: var(--ink); font-size: 12.5px; }
.ibs_quicklinks a:link, .ibs_quicklinks a:visited, .ibs_side_links a:link, .ibs_side_links a:visited { color: var(--ink) !important; }
.ibs_quicklinks a:hover, .ibs_side_links a:hover { color: var(--brand-link) !important; }
:root[data-theme="dark"] [style*="color: black"], :root[data-theme="dark"] [style*="color:black"] { color: inherit !important; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) [style*="color: black"], :root:not([data-theme="light"]) [style*="color:black"] { color: inherit !important; }
}
td.List_Title_Icon { background: var(--panel-alt) !important; border-bottom: 1px solid var(--line); }
td.List_col_Body_Icon { background: var(--panel) !important; }
tr.list_Row_LightColor, tr.List_Row_LightColor, tr.list_Row_DarkColor, tr.List_Row_DarkColor, tr.List_Head, tr.list_Head { background: transparent; }

/* ---------- backup page / generic forms ---------- */
.ibs_notice_ok { background: var(--ok-tint); border-color: var(--ok-line); color: var(--ok); }
.ibs_inline_form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 6px 0; }
.ibs_link_form { display: inline; margin: 0; }
.ibs_link_button { background: none; border: 0; padding: 0; color: var(--danger); font-weight: 600; cursor: pointer; font-size: 12.5px; }
.ibs_backup code { background: var(--panel-alt); padding: 1px 5px; border-radius: 3px; }
.ibs_form fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0 0; padding: 8px 14px 12px; }
.ibs_form legend { padding: 0 6px; font-weight: 700; }
.ibs_form_grid { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.ibs_form_grid > label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.ibs_form_grid input, .ibs_form_grid select { color: var(--ink); }
.ibs_form_actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
button[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- wallets ---------- */
.ibs_num { text-align: end !important; font-variant-numeric: tabular-nums; }
.ibs_negative { color: var(--danger); font-weight: 600; }
.ibs_positive { color: var(--ok); }
.ibs_wallet_badge, a.ibs_wallet_badge:link, a.ibs_wallet_badge:visited {
    color: var(--topbar-ink) !important; text-decoration: none; font-variant-numeric: tabular-nums;
    border: 1px solid rgba(255,255,255,.3); border-radius: 12px; padding: 3px 10px; font-size: 12px; white-space: nowrap;
}
.ibs_wallet_negative { border-color: #f08080 !important; color: #ffb4b4 !important; }
.ibs_dashboard .ibs_stats:has(.ibs_stat:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }

/* ---------- expiring users ---------- */
.ibs_expiring_form h2 { margin: 0; }
.ibs_expiring_form .ibs_days_input { width: 56px; text-align: center; }
.ibs_badge:not([class*="ibs_badge_"]) { background: var(--brand-tint); color: var(--brand-link); }
.ibs_quick_days { display: inline-flex; gap: 4px; }
.ibs_quick_days a { padding: 3px 9px; border: 1px solid var(--line); border-radius: 12px; color: var(--brand-link); text-decoration: none; font-size: 12px; }
.ibs_quick_days a:hover { background: var(--brand-tint); }
.ibs_quick_days a.ibs_active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ibs_push_right { margin-inline-start: auto; }
.ibs_muted { color: var(--muted); }


/* ---------- phones ---------- */
.ibs_menu_toggle {
    display: none; align-items: center; justify-content: center;
    width: 40px; height: 36px; padding: 0; cursor: pointer;
    background: transparent; color: var(--topbar-ink);
    border: 1px solid rgba(255,255,255,.35); border-radius: 4px;
}
.ibs_menu_toggle svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ibs_menu_toggle .ibs_close { display: none; }
body.nr_menu_open .ibs_menu_toggle .ibs_burger { display: none; }
body.nr_menu_open .ibs_menu_toggle .ibs_close { display: inline; }
.nr_scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; }
.nr_scroll > table { margin-bottom: 4px !important; }
.ibs_panels > *, .ibs_dashboard > *, .ibs_panel { min-width: 0; }
@media (max-width: 1100px) {
    table.Main_Page { table-layout: fixed; }
}

@media (max-width: 760px) {
    body { font-size: 14px; }
    .ibs_topbar { height: auto; flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
    .ibs_brand { flex: 1; }
    .ibs_theme_toggle { width: 40px; height: 36px; }
    .ibs_menu_toggle { display: inline-flex; }
    .ibs_topbar .ibs_nav, .ibs_topbar .ibs_quicksearch, .ibs_topbar .ibs_account { display: none; }
    body.nr_menu_open .ibs_topbar .ibs_quicksearch { display: block; order: 10; width: 100%; flex: none; margin: 4px 0 0; }
    body.nr_menu_open .ibs_topbar .ibs_quicksearch input { width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 16px; }
    body.nr_menu_open .ibs_topbar .ibs_nav {
        display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
        order: 11; width: 100%; height: auto; overflow: visible; margin: 2px 0;
    }
    body.nr_menu_open .ibs_topbar .ibs_nav_item {
        padding: 12px 12px; border-radius: 6px; border-bottom: 0; margin: 0;
        background: rgba(255,255,255,.07); font-size: 15px;
    }
    body.nr_menu_open .ibs_topbar .ibs_nav_active { background: rgba(255,255,255,.2); }
    body.nr_menu_open .ibs_topbar .ibs_account {
        display: flex; order: 12; width: 100%; justify-content: space-between;
        border-top: 1px solid rgba(255,255,255,.18); padding: 10px 2px 4px; font-size: 14px;
    }
    body.nr_menu_open .ibs_account_logout { padding: 8px 16px; }

    .ibs_subnav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 6px; }
    .ibs_subnav::-webkit-scrollbar { display: none; }
    .ibs_subnav_item { white-space: nowrap; padding: 12px 10px 10px; font-size: 13.5px; }

    .ibs_pagehead { padding: 12px 12px 2px; }
    .ibs_pagetitle { font-size: 19px; }
    .ibs_today { display: none; }

    table.Main_Page { table-layout: fixed; }
    table.Main_Page > tbody > tr > td { padding: 8px 8px 20px; }
    td.ibs_side_cell, #menu_full, #menu_hidden { display: none !important; }

    input[type=text], input[type=password], input[type=number], input[type=email], input:not([type]), select, textarea { font-size: 16px !important; max-width: 100%; }
    input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
    .ibs_button, button.ibs_button, input[type=submit], input[type=button] { min-height: 40px; padding-left: 16px; padding-right: 16px; }
    a.ibs_button { display: inline-flex; align-items: center; min-height: 40px; box-sizing: border-box; padding: 0 16px; }
    .ibs_cell_action a { display: inline-block; padding: 8px 4px; }
    .ibs_hide_sm { display: none !important; }

    .ibs_dashboard { padding: 0; }
    .ibs_stats, .ibs_dashboard .ibs_stats:has(.ibs_stat:nth-child(3):last-child) { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
    .ibs_stat { min-width: 0; padding: 12px; }
    .ibs_stat b { font-size: 22px; white-space: nowrap; }
    .ibs_panel { padding: 12px; }
    .ibs_table td, .ibs_table th { padding: 8px 6px; }
    .ibs_inline_form { gap: 8px; }
    .ibs_expiring_form h2 { width: 100%; }
    .ibs_push_right { margin-inline-start: 0; }
    .ibs_quicklinks { grid-template-columns: 1fr 1fr; }
    .ibs_quicklinks a { padding: 6px 0; font-size: 14px; }
    .ibs_footer { padding-bottom: 28px; }
}

/* ---------- tablets / small laptops ---------- */
@media (min-width: 761px) and (max-width: 1180px) {
    .ibs_topbar { gap: 12px; padding: 0 12px; }
    .ibs_nav_item { padding: 0 9px; }
    .ibs_quicksearch input { width: 140px; }
}

/* ---------- Persian ---------- */
@font-face {
    font-family: "Vazirmatn";
    src: url("/css/fonts/Vazirmatn-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
:root[lang="fa"] { --font: "Vazirmatn", Tahoma, "DejaVu Sans", Arial, sans-serif; }
.ibs_lang_toggle {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 30px; padding: 0 6px; box-sizing: border-box;
    color: var(--topbar-ink); text-decoration: none; font-size: 13px; font-weight: 700;
    border: 1px solid rgba(255,255,255,.35); border-radius: 4px;
}
.ibs_lang_toggle:hover { background: rgba(255,255,255,.12); color: #fff; }
body.ibs_stripped .ibs_topbar { justify-content: flex-start; }
body.ibs_stripped .ibs_brand { flex: 1; }
@media (max-width: 760px) { .ibs_lang_toggle { min-width: 40px; height: 36px; } }

/* right to left: legacy styles use physical left/right */
[dir="rtl"] td.Form_Title_red, [dir="rtl"] td.Form_Title_orange, [dir="rtl"] td.Form_Title_green, [dir="rtl"] td.Form_Title_blue,
[dir="rtl"] td.Form_Title_aqua, [dir="rtl"] td.Form_Title_brown, [dir="rtl"] td.Form_Title_violet, [dir="rtl"] td.List_Title {
    border-left: 0; border-right: 3px solid var(--brand); padding: 10px 12px 9px 14px;
}
[dir="rtl"] td.Form_Title_orange { border-right-color: var(--amber); }
[dir="rtl"] td.Form_Title_green { border-right-color: var(--ok); }
[dir="rtl"] .ibs_side_toggle { text-align: left; }
[dir="rtl"] td.ibs_side_cell { padding: 10px 0 24px 16px !important; }
[dir="rtl"] td.Form_Content_Row_Left_light, [dir="rtl"] td.Form_Content_Row_Left_dark,
[dir="rtl"] td.Form_Content_Row_Left_2Col_light, [dir="rtl"] td.Form_Content_Row_Left_2Col_dark,
[dir="rtl"] td.Form_Content_Row_Left_2col_light, [dir="rtl"] td.Form_Content_Row_Left_2col_dark { padding: 8px 14px 8px 12px; text-align: right; }
[dir="rtl"] td.Form_Content_Row_Right_light, [dir="rtl"] td.Form_Content_Row_Right_dark,
[dir="rtl"] td.Form_Content_Row_Right_2Col_light, [dir="rtl"] td.Form_Content_Row_Right_2Col_dark,
[dir="rtl"] td.Form_Content_Row_Right_2col_light, [dir="rtl"] td.Form_Content_Row_Right_2col_dark { padding: 7px 8px 7px 14px; text-align: right; }
[dir="rtl"] .ibs_num { text-align: left; }
[dir="rtl"] .ibs_negative, [dir="rtl"] .ibs_positive, [dir="rtl"] .ibs_stat b { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .ibs_cell_action { text-align: left; }
/* numbers, IPs, usernames and dates keep left-to-right order inside Persian text */
[dir="rtl"] input[type=text], [dir="rtl"] input[type=password] { direction: ltr; text-align: right; }
[dir="rtl"] .ibs_quicksearch input { direction: rtl; }
.ibs_topbar a.ibs_lang_toggle, .ibs_topbar a.ibs_lang_toggle:link, .ibs_topbar a.ibs_lang_toggle:visited {
    color: #fff; background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.5);
}
.ibs_topbar a.ibs_lang_toggle:hover { color: #fff; background: rgba(255,255,255,.22); }

/* ---------- WireGuard ---------- */
.ibs_notice_err { background: var(--danger-tint); border-color: var(--danger-line); color: var(--danger); }
.ibs_wg_msg { max-width: 1100px; margin: 0 auto 12px; text-align: start; }
.ibs_wg {
    max-width: 760px; margin: 0 auto 14px; text-align: start;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 14px;
    border-top: 3px solid var(--brand);
}
.ibs_wg h2 { margin: 0; font-size: 14px; font-weight: 700; }
.ibs_wg_head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ibs_wg_head .ibs_badge { margin: 0; }
.ibs_wg_head form { margin: 0; }
.ibs_wg_body { display: flex; gap: 18px; align-items: flex-start; }
.ibs_wg_qr {
    flex: none; width: 220px; padding: 10px; box-sizing: border-box;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); line-height: 0;
}
.ibs_wg_qr svg { width: 100%; height: auto; display: block; }
.ibs_wg_info { flex: 1; min-width: 0; }
.ibs_wg_info .ibs_facts { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 4px 14px; margin: 10px 0; }
.ibs_wg_buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ibs_wg_buttons form { margin: 0; }
.ibs_wg_conf {
    margin: 10px 0 0; padding: 10px 12px; overflow-x: auto; white-space: pre; direction: ltr; text-align: left;
    background: var(--panel-alt); border: 1px solid var(--line-soft); border-radius: var(--radius); font-size: 12px;
}
.ibs_wg_steps { margin: 0 0 10px; padding-inline-start: 20px; line-height: 1.8; }
.ibs_wg_create .ibs_inline_form { margin: 0; }
.ibs_wg_user { max-width: 640px; }
.ibs_wg_card {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    margin-top: 12px; padding: 12px 16px; text-decoration: none;
    background: var(--panel); border: 1px solid var(--line); border-inline-start: 4px solid var(--brand); border-radius: var(--radius);
    color: var(--ink);
}
.ibs_wg_card b { color: var(--brand-link); white-space: nowrap; }
.ibs_wg_err { color: var(--danger); }
.ibs_wg_help pre { direction: ltr; text-align: left; overflow-x: auto; background: var(--panel-alt); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; }
.ibs_wg_help { margin-top: 12px; }
.ibs_wg_form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.ibs_wg_form label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 12.5px; color: var(--muted); text-align: start; }
.ibs_wg_form input[type=text], .ibs_wg_form input[type=number], .ibs_wg_form input[type=password], .ibs_wg_form select { width: 100%; box-sizing: border-box; }
.ibs_form_checks, .ibs_form_buttons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ibs_form_checks label { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); }
form.ibs_inline { display: inline; margin: 0; }
.ibs_linkbutton { background: none; border: 0; padding: 0 4px; color: var(--brand-link); cursor: pointer; font: inherit; font-weight: 600; }
.ibs_linkbutton:hover { text-decoration: underline; }
.ibs_danger_link { color: var(--danger); }
@media (max-width: 760px) {
    .ibs_wg_body { flex-direction: column; align-items: stretch; }
    .ibs_wg_qr { width: 100%; max-width: 300px; margin: 0 auto; }
    .ibs_wg_form { grid-template-columns: 1fr; }
}
a.ibs_button.ibs_button_secondary, a.ibs_button.ibs_button_secondary:link, a.ibs_button.ibs_button_secondary:visited {
    background: var(--panel); color: var(--ink) !important; border: 1px solid var(--input-line);
}
a.ibs_button.ibs_button_secondary:hover { background: var(--panel-alt); color: var(--ink) !important; }

/* ------------------------------------------------------------------ charts (js/nr_chart.js) */
.nr_chart {
    --nrc-1: #2a78d6; --nrc-2: #eb6834; --nrc-3: #1baf7a; --nrc-4: #eda100;
    --nrc-5: #e87ba4; --nrc-6: #008300; --nrc-7: #6250d6; --nrc-other: #9aa3b2;
    position: relative; box-sizing: border-box; width: 100%; max-width: 980px; margin: 14px auto;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    padding: 16px 18px 12px; color: var(--ink); font-family: var(--font); text-align: start;
}
:root[data-theme="dark"] .nr_chart {
    --nrc-1: #3987e5; --nrc-2: #d95926; --nrc-3: #199e70; --nrc-4: #c98500;
    --nrc-5: #d55181; --nrc-6: #008300; --nrc-7: #9085e9; --nrc-other: #67738a;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nr_chart {
        --nrc-1: #3987e5; --nrc-2: #d95926; --nrc-3: #199e70; --nrc-4: #c98500;
        --nrc-5: #d55181; --nrc-6: #008300; --nrc-7: #9085e9; --nrc-other: #67738a;
    }
}
.nr_chart:not(.nrc_ready) { min-height: 120px; }
.nr_chart:not(.nrc_ready)::after {
    content: ""; position: absolute; inset: 16px 18px; border-radius: 8px;
    background: linear-gradient(90deg, var(--panel-alt), var(--line-soft), var(--panel-alt));
    background-size: 200% 100%; animation: nrc_wait 1.2s linear infinite;
}
@keyframes nrc_wait { to { background-position: -200% 0; } }
.nr_chart img { max-width: 100%; height: auto; }
.nrc_c1 { --c: var(--nrc-1); } .nrc_c2 { --c: var(--nrc-2); } .nrc_c3 { --c: var(--nrc-3); }
.nrc_c4 { --c: var(--nrc-4); } .nrc_c5 { --c: var(--nrc-5); } .nrc_c6 { --c: var(--nrc-6); }
.nrc_c7 { --c: var(--nrc-7); } .nrc_other { --c: var(--nrc-other); }
.nrc_head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 24px; margin-bottom: 10px; }
.nrc_title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.nrc_scale { margin-inline-start: 8px; padding: 1px 8px; border-radius: 10px; background: var(--panel-alt);
    border: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; font-weight: 500; vertical-align: 1px; }
.nrc_keys { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.nrc_key { display: flex; align-items: flex-end; gap: 14px; }
.nrc_key_name { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); align-self: center; }
.nrc_stat { display: inline-flex; flex-direction: column; line-height: 1.15; }
.nrc_stat b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.nrc_stat_main b { font-size: 18px; }
.nrc_stat small { font-size: 11px; color: var(--muted); }
.nrc_sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.nrc_plot { position: relative; width: 100%; }
.nrc_plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.nrc_grid { stroke: var(--line-soft); stroke-width: 1; }
.nrc_base { stroke: var(--line); stroke-width: 1; }
.nrc_tick { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.nrc_line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nr_chart stop { stop-color: var(--c); }
.nrc_cross { stroke: var(--muted); stroke-width: 1; opacity: .55; pointer-events: none; }
.nrc_dot { fill: var(--c); stroke: var(--panel); stroke-width: 2; pointer-events: none; }
.nrc_empty { fill: var(--muted); font-size: 13px; font-family: var(--font); }
.nrc_tip { display: none; position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
    background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 6px 20px rgba(15, 25, 45, .16); padding: 8px 10px; font-size: 12px; }
.nrc_tip_time { color: var(--muted); margin-bottom: 4px; direction: ltr; text-align: left; }
.nrc_tip_row { display: flex; align-items: center; gap: 6px; line-height: 1.7; }
.nrc_tip_row b { margin-inline-start: auto; padding-inline-start: 12px; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.nrc_pie { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; padding: 6px 0 4px; }
.nrc_pie svg { flex: none; }
.nrc_slice { fill: var(--c); stroke: var(--panel); stroke-width: 2; transition: opacity .15s; cursor: default; }
.nrc_center { fill: var(--ink); font-size: 22px; font-weight: 600; font-family: var(--font); }
.nrc_center_sub { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.nrc_legend { flex: 0 1 420px; display: flex; flex-direction: column; gap: 2px; min-width: 220px; }
.nrc_lrow { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; font-size: 13px; transition: opacity .15s; }
.nrc_lrow:hover { background: var(--panel-alt); }
.nrc_lname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nrc_lrow b { font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.nrc_lrow small { width: 52px; text-align: end; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.nrc_dim { opacity: .3; }
.nrc_empty_box { width: 100%; padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; }
.nrc_table { margin-top: 8px; font-size: 12px; }
.nrc_table summary { cursor: pointer; color: var(--brand-link); display: inline-block; }
.nrc_table_wrap { max-height: 260px; overflow: auto; margin-top: 6px; border: 1px solid var(--line-soft); border-radius: 8px; }
.nrc_table table { width: 100%; border-collapse: collapse; }
.nrc_table th, .nrc_table td { padding: 4px 10px; text-align: start; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.nrc_table th { position: sticky; top: 0; background: var(--panel-alt); color: var(--muted); font-weight: 600; }
.nrc_png { position: absolute; bottom: 12px; inset-inline-end: 18px; font-size: 11px; color: var(--muted); }
@media (max-width: 600px) {
    .nr_chart { padding: 12px 12px 10px; border-radius: 10px; }
    .nrc_stat_main b { font-size: 16px; }
    .nrc_pie { justify-content: center; }
}

.ibs_field_note { margin-top: 4px; font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ---------- online payment (user panel) ---------- */
.ibs_pay_title { font-size: 15px; font-weight: 700; margin: 18px 0 8px; }
.ibs_pay_plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ibs_pay_card {
    display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 16px;
    background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius);
}
.ibs_pay_current { border-top-color: var(--ok); }
.ibs_pay_name { font-weight: 700; font-size: 14px; }
.ibs_pay_name .ibs_badge { margin-inline-start: 4px; }
.ibs_pay_price { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.ibs_pay_price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.ibs_pay_desc { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.ibs_pay_card .ibs_button { margin-top: auto; }
.ibs_pay_credit { display: flex; flex-direction: column; gap: 8px; }
.ibs_pay_credit label { font-size: 12.5px; color: var(--muted); }
.ibs_pay_row { display: flex; gap: 8px; }
.ibs_pay_row input { flex: 1; min-width: 0; font-size: 15px; }
.ibs_pay_quick { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ibs_payresult_page { background: var(--canvas); }
.ibs_payresult {
    max-width: 440px; margin: 48px auto; padding: 24px; text-align: center;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.ibs_payresult h1 { font-size: 20px; margin: 16px 0; }
.ibs_payresult .ibs_facts { text-align: start; border: 0; border-radius: var(--radius); margin: 12px 0; }
.ibs_payresult_ok { color: var(--ok); }
.ibs_payresult_bad { color: var(--danger); }
@media (max-width: 480px) { .ibs_payresult { margin: 16px; } }
.ibs_pay_stats { grid-template-columns: repeat(5, 1fr); }
.ibs_stat_bad { border-color: var(--danger-line); color: var(--danger); }
@media (max-width: 720px) { .ibs_pay_stats { grid-template-columns: 1fr 1fr; } }
/* USDT payment */
.ibs_text_danger { color: var(--danger); }
.ibs_txid_form { display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; }
.ibs_txid_form input { width: 110px; font-size: 11px; padding: 2px 4px; }
.ibs_pay_buttons { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.ibs_pay_card .ibs_pay_buttons .ibs_button { margin-top: 0; }
.ibs_button.ibs_button_usdt { background: #26a17b; border-color: #26a17b; color: #fff; }
.ibs_button.ibs_button_usdt:hover { background: #1e8566; border-color: #1e8566; }
.ibs_button.ibs_button_trx { background: #c4102b; border-color: #c4102b; color: #fff; }
.ibs_button.ibs_button_trx:hover { background: #a10d23; border-color: #a10d23; }
.ibs_pay_usdt { font-variant-numeric: tabular-nums; }
.ibs_crypto { max-width: 760px; }
.ibs_crypto .ibs_panel { margin-bottom: 12px; }
.ibs_crypto_head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ibs_crypto_head h2 { margin: 0; }
.ibs_crypto_for { color: var(--muted); margin: 6px 0 14px; }
.ibs_crypto_grid { display: grid; grid-template-columns: 1fr 184px; gap: 18px; align-items: start; }
.ibs_crypto_fields { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ibs_crypto_fields label { font-size: 12px; color: var(--muted); margin-top: 8px; }
.ibs_crypto_copy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; direction: ltr; justify-content: flex-end; }
body:not(.ibs_rtl) .ibs_crypto_copy { justify-content: flex-start; }
.ibs_crypto_amount { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: .5px; }
.ibs_crypto_address { font-size: 14px; padding: 6px 8px; background: var(--panel-alt); border: 1px solid var(--line-soft); border-radius: 6px;
    word-break: break-all; user-select: all; }
.ibs_crypto_net { font-size: 12.5px; line-height: 1.7; }
.ibs_crypto_net b { color: #26a17b; }
.ibs_crypto_qr { background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; }
.ibs_crypto_qr svg { display: block; width: 100%; height: auto; }
.ibs_crypto_wait { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7;
    background: var(--brand-tint); border-radius: var(--radius); }
.ibs_crypto_timer { margin-inline-start: auto; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ibs_crypto_hash { word-break: break-all; font-size: 12px; }
.ibs_crypto_done .ibs_facts { margin: 12px 0; }
.ibs_spinner { flex: none; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%;
    animation: ibs_spin 0.9s linear infinite; }
@keyframes ibs_spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
    .ibs_crypto_grid { grid-template-columns: 1fr; }
    .ibs_crypto_qr { max-width: 200px; margin: 0 auto; }
    .ibs_crypto_amount { font-size: 26px; }
}

/* ---------- access denied / login required ---------- */
.ibs_denied { display: flex; flex-direction: column; gap: 4px; justify-content: center; align-items: center; min-height: calc(100vh - 160px); padding: 24px 16px; box-sizing: border-box; }
.ibs_denied_card {
    width: 100%; max-width: 400px; box-sizing: border-box; padding: 32px 28px 26px; text-align: center;
    background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.ibs_denied_icon {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-tint); color: var(--brand-link);
}
.ibs_denied_icon svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ibs_denied_icon circle { fill: currentColor; stroke: none; }
.ibs_denied_card h1 { margin: 0 0 10px; font-size: 20px; font-weight: 700; color: var(--ink); }
.ibs_denied_card p { margin: 0 0 22px; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
a.ibs_denied_button { display: block; padding: 10px 16px; font-size: 14px; text-decoration: none; }
.ibs_denied_card small { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; }

/* ---------- logo (light / dark versions follow the theme) ---------- */
.nr_logo_dark { display: none !important; }
:root[data-theme="dark"] .nr_logo_light { display: none !important; }
:root[data-theme="dark"] .nr_logo_dark { display: inline-block !important; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nr_logo_light { display: none !important; }
    :root:not([data-theme="light"]) .nr_logo_dark { display: inline-block !important; }
}
.ibs_big_logo { text-align: center; margin: 26px auto 6px; }
.ibs_big_logo img { width: 250px; max-width: 64vw; height: auto; }
.ibs_denied .ibs_big_logo { margin-top: 0; }
body.ibs_stripped .ibs_big_logo + table.Main_Page > tbody > tr > td { padding-top: 18px; }
.ibs_payresult .ibs_big_logo { margin: 0 auto 4px; }
.ibs_payresult .ibs_big_logo img { width: 190px; }
.ibs_footer_mark { height: 18px; width: auto; vertical-align: -4px; margin-inline-end: 4px; }
@media (max-width: 600px) {
    .ibs_brand_logo { height: 28px; }
    .ibs_big_logo { margin-top: 16px; }
    .ibs_big_logo img { width: 200px; }
}

/* sortable report headers: the legacy style made them white (for its old red header bar) */
a.Header_Top_Links:link, a.Header_Top_Links:visited { color: inherit; text-decoration: none; }
a.Header_Top_Links:hover { color: var(--brand-link); text-decoration: underline; }
/* message frame of online users (kick / clear results): no white box in dark mode */
iframe#msg { color-scheme: light; background: transparent; }
svg.nr_sort { vertical-align: -1px; margin-inline-end: 3px; fill: none; stroke: var(--brand-link); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* old gif arrows: title arrows hidden, menu and page arrows are svg chevrons in the theme color */
img[src*="/images/arrow/arrow_"][src*="_on_"] { display: none; }
svg.nr_chev { vertical-align: 0; margin-inline-end: 5px; fill: none; stroke: var(--brand-link); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.nr_page_arrow { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.ibs_rtl svg.nr_chev, body.ibs_rtl svg.nr_page_arrow, [dir="rtl"] svg.nr_chev, [dir="rtl"] svg.nr_page_arrow { transform: scaleX(-1); }
font.page_num { color: var(--ink); font-weight: 700; padding: 2px 7px; border-radius: 3px; background: var(--brand-tint); }

/* ---------- note box (ex. sub account in Plan tab) ---------- */
.nr_note { background: var(--brand-tint); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin: 0 0 10px; font-size: 12.5px; line-height: 1.7; }

/* ---------- date type dropdown (page head) ---------- */
.ibs_datetype_wrap { position: relative; display: inline-block; }
.ibs_datetype_menu { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 50; min-width: 130px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.ibs_datetype_menu a, .ibs_datetype_menu a:link, .ibs_datetype_menu a:visited { display: block; padding: 6px 10px; border-radius: 5px; color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.ibs_datetype_menu a:hover { background: var(--brand-tint); }
.ibs_datetype_menu a.ibs_datetype_on { font-weight: 700; }
.ibs_datetype_menu a.ibs_datetype_on::after { content: "✓"; float: inline-end; margin-inline-start: 10px; color: var(--ok); }

/* ---------- auto refresh: remaining seconds + pause / resume ---------- */
.ibs_refresh_timer { color: var(--muted); font-size: 12px; margin-inline: 6px 8px; white-space: nowrap; }
.ibs_refresh_timer #timer { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
button.ibs_playpause { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; vertical-align: middle; }
button.ibs_playpause:hover { background: var(--brand-tint); }
button.ibs_playpause svg { fill: currentColor; flex: none; }
button.ibs_playpause .ibs_pp_play, button.ibs_playpause .ibs_pp_label_play { display: none; }
button.ibs_playpause.ibs_paused { border-color: var(--ok-line); background: var(--ok-tint); color: var(--ok); }
button.ibs_playpause.ibs_paused .ibs_pp_play, button.ibs_playpause.ibs_paused .ibs_pp_label_play { display: inline; }
button.ibs_playpause.ibs_paused .ibs_pp_pause, button.ibs_playpause.ibs_paused .ibs_pp_label_pause { display: none; }

/* ---------- user search page ---------- */
.nr_sx { max-width: 1180px; margin: 0 auto; padding: 4px 16px 24px; text-align: start; box-sizing: border-box; }
.nr_sx_card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 16px; box-sizing: border-box; }
.nr_sx_top { display: flex; gap: 10px; align-items: stretch; }
.nr_sx_q { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid var(--input-line); border-radius: 8px; padding: 0 12px; background: var(--panel); min-height: 42px; }
.nr_sx_q:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.nr_sx_q svg { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.nr_sx_q input { flex: 1; border: 0 !important; outline: 0; background: transparent !important; font-size: 14px; color: var(--ink); box-shadow: none !important; padding: 8px 0; min-width: 0; }
.nr_sx_go { min-width: 110px; font-size: 14px; }
.nr_sx_filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.nr_sx_f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; }
.nr_sx_f select, .nr_sx_f input[type=text] { width: 100%; box-sizing: border-box; min-height: 34px; font-size: 13px; }
.nr_sx_pair { display: flex; gap: 6px; }
.nr_sx_pair select { width: 64px !important; flex: none; }
.nr_sx_more { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.nr_sx_more summary { cursor: pointer; color: var(--brand); font-size: 13px; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 4px; user-select: none; }
.nr_sx_more summary::-webkit-details-marker { display: none; }
.nr_sx_more summary .nr_chev { transition: transform .15s; }
.nr_sx_more[open] summary .nr_chev { transform: rotate(90deg); }
body.ibs_rtl .nr_sx_more summary .nr_chev { transform: scaleX(-1); }
body.ibs_rtl .nr_sx_more[open] summary .nr_chev { transform: rotate(90deg); }
.nr_sx_opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }
.nr_sx_opts label { display: inline-flex; align-items: center; gap: 6px; }
.nr_sx_opts select { min-height: 30px; }
.nr_sx_check input { margin: 0; }
.nr_sx_reset, a.nr_sx_reset:link, a.nr_sx_reset:visited { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; text-decoration: underline; }
.nr_sx_head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.nr_sx_head h2 { margin: 0; font-size: 15px; color: var(--ink); }
.nr_sx_count { color: var(--muted); font-size: 12.5px; }
.nr_sx_empty { padding: 28px; text-align: center; color: var(--muted); }
.nr_sx_tablewrap { overflow-x: auto; margin: 0 -16px; }
.nr_sx_table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nr_sx_table th { text-align: start; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: none; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-alt); }
.nr_sx_table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); color: var(--ink); white-space: nowrap; vertical-align: middle; }
.nr_sx_table th:first-child, .nr_sx_table td:first-child { padding-inline-start: 16px; }
.nr_sx_table tbody tr { cursor: pointer; }
.nr_sx_table tbody tr:hover td { background: var(--brand-tint); }
.nr_sx_table tbody tr:has(input.nr_sx_pick:checked) td { background: var(--brand-tint); }
.nr_sx_cb { width: 28px; }
.nr_sx_id { color: var(--muted); font-variant-numeric: tabular-nums; }
.nr_sx_user a, .nr_sx_user a:link, .nr_sx_user a:visited { color: var(--ink); font-weight: 700; text-decoration: none; }
.nr_sx_user a:hover { color: var(--brand); text-decoration: underline; }
.nr_sx_sub { display: inline-block; margin-inline-start: 6px; font-size: 11px; color: var(--muted); }
.nr_sx_tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.nr_sx_tag_wg { color: var(--brand); border-color: var(--brand-tint); background: var(--brand-tint); }
.nr_sx_status .ibs_badge { margin-inline-start: 0; }
.nr_sx_dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-inline-start: 6px; box-shadow: 0 0 0 3px var(--ok-tint); vertical-align: middle; }
.nr_sx_exp small { display: block; color: var(--muted); font-size: 11px; }
.nr_sx_muted { color: var(--muted); }
.nr_sx_traffic .nr_sx_bar { display: block; width: 90px; height: 4px; border-radius: 2px; background: var(--line-soft); margin-top: 4px; overflow: hidden; }
.nr_sx_traffic .nr_sx_bar i { display: block; height: 100%; background: var(--brand); }
.nr_sx_bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.nr_sx_bulk .ibs_button { min-height: 32px; font-size: 12.5px; }
.nr_sx_bulk:not(.nr_sx_bulk_on) .ibs_button { opacity: .55; }
.nr_sx_selcount { font-size: 12.5px; color: var(--muted); margin-inline-end: 6px; }
.nr_sx_selcount b { color: var(--ink); }
.nr_sx_note { color: var(--warn); font-size: 12.5px; font-weight: 600; }
.nr_sx_attrs { margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel-alt); }
.nr_sx_attrs_title { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.nr_sx_chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nr_sx_chip { position: relative; cursor: pointer; }
.nr_sx_chip input { position: absolute; opacity: 0; pointer-events: none; }
.nr_sx_chip span { display: inline-block; padding: 5px 11px; border: 1px solid var(--input-line); border-radius: 16px; font-size: 12px; color: var(--ink); background: var(--panel); }
.nr_sx_chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.nr_sx_chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 700px) {
    .nr_sx { padding: 0 0 16px; }
    .nr_sx_card { border-radius: 0; border-left: 0; border-right: 0; }
    .nr_sx_top { flex-direction: column; }
    .nr_sx_filters { grid-template-columns: 1fr 1fr; }
    .nr_sx_hide_sm { display: none; }
}

/* ---------- OpenVPN file (RAS page, user page, user panel) ---------- */
.nr_ovpn { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 16px auto; max-width: 760px; text-align: start; box-sizing: border-box; }
.nr_ovpn_head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nr_ovpn_head h2 { margin: 0; font-size: 15px; color: var(--ink); }
.nr_ovpn_help { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin: 4px 0 12px; }
.nr_ovpn_buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nr_ovpn_buttons form { margin: 0; }
.nr_ovpn_buttons svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.nr_ovpn_form { display: grid; gap: 12px; }
.nr_ovpn_form .nr_sx_check { font-size: 13px; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.nr_ovpn_text textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5; min-height: 160px; }
.nr_ovpn_form .ibs_button { justify-self: start; }
.nr_ovpn_user { max-width: none; }
.nr_ovpn_card { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.nr_ovpn_card a { text-decoration: none; }
.nr_ovpn_form[hidden], .nr_ovpn_buttons[hidden] { display: none; }
.nr_ovpn_row .ibs_inline_form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.nr_ovpn_row .ibs_button svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.nr_ovpn_note { color: var(--muted); font-size: 12px; }

/* ---------- backup server ---------- */
.nr_repl .ibs_panel { margin-bottom: 16px; }
.nr_repl_form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; align-items: end; }
.nr_repl_form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.nr_repl_form input, .nr_repl_form select { width: 100%; box-sizing: border-box; min-height: 34px; }
.nr_repl_rm { margin-top: 14px; }
.nr_repl_steps ol { margin: 0; padding-inline-start: 22px; line-height: 1.8; }
.nr_repl_steps li { margin-bottom: 12px; }
.nr_repl_steps code, .nr_repl_notes code { display: inline-block; direction: ltr; padding: 4px 8px; border-radius: 6px; background: var(--panel-alt); border: 1px solid var(--line-soft); font-size: 12px; word-break: break-all; }
.nr_repl_cmd { display: flex; gap: 8px; align-items: flex-start; }
.nr_repl_cmd code { flex: 1; max-height: 90px; overflow: auto; }
.nr_repl_notes { padding-inline-start: 20px; line-height: 1.9; }

/* ---------- settings home ---------- */
.nr_set { max-width: 1180px; }
.nr_set_group { margin: 4px 0 22px; }
.nr_set_head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.nr_set_head small { color: var(--muted); font-size: 12px; font-weight: 500; }
.nr_set_grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.nr_set_card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; transition: border-color .15s; }
.nr_set_card:hover { border-color: var(--brand); }
.nr_set_top { display: flex; align-items: center; gap: 9px; }
.nr_set_top svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nr_set_title { flex: 1; font-weight: 700; font-size: 14px; color: var(--ink) !important; text-decoration: none; }
.nr_set_title:hover { color: var(--brand) !important; }
.nr_set_num { min-width: 22px; padding: 1px 8px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.nr_set_card p { flex: 1; margin: 8px 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.nr_set_card p b { color: var(--ink); font-weight: 600; }
.nr_set_card p b.nr_set_warn, .nr_set_warn { color: var(--warn); }
.nr_set_chip { display: inline-block; padding: 0 7px; margin-inline-end: 3px; border: 1px solid var(--line); border-radius: 9px; font-size: 11.5px; color: var(--muted); }
.nr_set_chip.nr_set_off { text-decoration: line-through; opacity: .75; }
.nr_set_chip.nr_set_on { text-decoration: none; color: var(--ok); border-color: var(--ok-line); background: var(--ok-tint); }
.nr_set_chip.nr_set_bad { text-decoration: none; color: var(--danger); border-color: var(--danger-line); background: var(--danger-tint); }
.nr_set_links { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.nr_set_links a { font-size: 12.5px; font-weight: 600; text-decoration: none; }
.nr_set_links a:hover { text-decoration: underline; }

/* ---------- WireGuard: move accounts ---------- */
.nr_wg_move { max-width: 760px; }
.nr_wg_move_form { display: grid; gap: 12px; margin: 12px 0; }
.nr_wg_move_form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.nr_wg_move_form select { max-width: 360px; }
.nr_wg_move_form label.nr_wg_move_check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.nr_wg_move_notes { padding-inline-start: 18px; line-height: 1.7; }
.nr_wg_move_notes code { font-size: 11.5px; }
.nr_wg_move_cmd { display: block; width: fit-content; margin: 4px 0; padding: 3px 8px; border-radius: 4px; background: var(--panel-alt); }

/* =====================================================================================
   side menu of the admin panel (smarty/plugins/function.nrSideMenu.php)
   wide screens: fixed at the start side (right in Persian), "small menu" = icons only
   phones/tablets: drawer opened by the menu button of the top bar
   ===================================================================================== */
:root {
    --side-w: 252px;
    --side-mini-w: 64px;
    --side-bg: #111a2d;
    --side-ink: #c9d2e3;
    --side-muted: #7f8ba3;
    --side-hover: rgba(255,255,255,.06);
    --side-active-bg: rgba(91,141,239,.16);
    --side-active-ink: #ffffff;
    --side-accent: #5b8def;
    --side-line: rgba(255,255,255,.07);
}
:root[data-theme="dark"] { --side-bg: #0b1120; --side-line: rgba(255,255,255,.06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --side-bg: #0b1120; --side-line: rgba(255,255,255,.06); } }

.nr_side {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60;
    width: var(--side-w); box-sizing: border-box;
    display: flex; flex-direction: column;
    background: var(--side-bg); color: var(--side-ink);
    border-inline-end: 1px solid var(--side-line);
    font-size: 13.5px;
}
body.ibs_admin { padding-inline-start: var(--side-w); }
body.ibs_admin .ibs_topbar .ibs_brand { display: none; }
body.ibs_admin .ibs_topbar { gap: 12px; }
.nr_side_head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 55px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--side-line); flex: none; }
.nr_side_brand { display: flex; align-items: center; min-width: 0; }
.nr_side_logo { height: 28px; width: auto; display: block; }
.nr_side_mark { display: none; height: 22px; width: auto; }
.nr_side_pin {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
    background: transparent; color: var(--side-muted);
}
.nr_side_pin:hover { background: var(--side-hover); color: var(--side-active-ink); }
.nr_side_pin svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .nr_side_pin svg { transform: scaleX(-1); }
.nr_side_search { display: none; padding: 10px 12px 4px; }
.nr_side_search input {
    width: 100%; box-sizing: border-box; padding: 9px 12px; font-size: 16px;
    border: 1px solid var(--side-line); border-radius: 8px; background: rgba(255,255,255,.06); color: #fff;
}
.nr_side_search input::placeholder { color: var(--side-muted); }

.nr_side_nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nr_side_link {
    display: flex; align-items: center; gap: 11px; width: 100%; box-sizing: border-box;
    padding: 9px 11px; margin: 1px 0; border: 0; border-radius: 8px; cursor: pointer;
    background: transparent; color: var(--side-ink) !important; text-decoration: none !important;
    font: inherit; font-weight: 600; text-align: start; line-height: 1.3;
}
.nr_side_link:hover { background: var(--side-hover); color: var(--side-active-ink) !important; }
.nr_side_link:focus-visible, .nr_side_item:focus-visible { outline: 2px solid var(--side-accent); outline-offset: -2px; }
.nr_side_icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nr_side_label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr_side_chev { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .6; transition: transform .15s; }
.nr_side_open > .nr_side_grp .nr_side_chev { transform: rotate(180deg); }
.nr_side_link.nr_side_active, .nr_side_current > .nr_side_grp { color: var(--side-active-ink) !important; }
.nr_side_link.nr_side_active { background: var(--side-active-bg); box-shadow: inset 3px 0 0 var(--side-accent); }
[dir="rtl"] .nr_side_link.nr_side_active { box-shadow: inset -3px 0 0 var(--side-accent); }
.nr_side_current > .nr_side_grp .nr_side_icon { color: var(--side-accent); opacity: 1; }

.nr_side_items { display: grid; grid-template-rows: 0fr; opacity: 0; }
.nr_side_items_in { min-height: 0; overflow: hidden; }
.nr_side_open > .nr_side_items { grid-template-rows: 1fr; opacity: 1; }
.nr_side_open > .nr_side_items > .nr_side_items_in { padding: 2px 0 6px; }
.nr_side_item {
    display: flex; align-items: center; gap: 8px; position: relative;
    padding: 7px 11px; padding-inline-start: 41px; margin: 1px 0; border-radius: 8px;
    color: var(--side-muted) !important; text-decoration: none !important; font-size: 13px; font-weight: 500;
}
.nr_side_item::before { content: ""; position: absolute; inset-inline-start: 20px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: currentColor; opacity: .45; }
.nr_side_item:hover { background: var(--side-hover); color: var(--side-active-ink) !important; }
.nr_side_item.nr_side_active { background: var(--side-active-bg); color: var(--side-active-ink) !important; font-weight: 600; }
.nr_side_item.nr_side_active::before { background: var(--side-accent); opacity: 1; }

.nr_side_badge {
    flex: none; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--side-accent); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.nr_side_badge_warn { background: #e5484d; }
.nr_side_open > .nr_side_grp .nr_side_badge { display: none; } /* shown on its item when the group is open */
.nr_side_foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 16px 12px; border-top: 1px solid var(--side-line); color: var(--side-muted); font-size: 11.5px; }
.nr_side_who, .nr_side_logout { display: none; }
.nr_side_ver { white-space: nowrap; }

/* small menu: icons only */
body.ibs_admin.nr_side_mini { padding-inline-start: var(--side-mini-w); }
body.nr_side_mini .nr_side { width: var(--side-mini-w); }
body.nr_side_mini .nr_side_head { padding: 0; flex-direction: column; justify-content: center; gap: 2px; }
body.nr_side_mini .nr_side_logo, body.nr_side_mini .nr_side_label, body.nr_side_mini .nr_side_chev,
body.nr_side_mini .nr_side_items, body.nr_side_mini .nr_side_foot { display: none; }
body.nr_side_mini .nr_side_mark { display: block; }
body.nr_side_mini .nr_side_pin { width: 24px; height: 18px; }
body.nr_side_mini .nr_side_pin svg { transform: scaleX(-1); }
[dir="rtl"] body.nr_side_mini .nr_side_pin svg, body.nr_side_mini[dir="rtl"] .nr_side_pin svg { transform: none; }
body.nr_side_mini .nr_side_nav { padding: 10px 8px; }
body.nr_side_mini .nr_side_link { justify-content: center; padding: 10px 0; position: relative; }
body.nr_side_mini .nr_side_badge { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
body.nr_side_mini .nr_side_open > .nr_side_grp .nr_side_badge { display: inline-flex; }
body.nr_side_mini .nr_side_link:hover::after {
    content: attr(data-label); position: absolute; inset-inline-start: calc(100% + 8px); top: 50%; transform: translateY(-50%);
    background: #1d2840; color: #fff; padding: 5px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.3); pointer-events: none; z-index: 70;
}

/* top bar next to the menu */
.ibs_quicksearch { position: relative; }
.ibs_quicksearch svg { position: absolute; inset-inline-start: 9px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; fill: none; stroke: rgba(255,255,255,.75); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.ibs_quicksearch input { padding-inline-start: 30px; width: 260px; }
.ibs_quicksearch input:focus + svg, .ibs_quicksearch:focus-within svg { stroke: var(--muted); }
.nr_side_backdrop { display: none; }

@media (max-width: 900px) {
    body.ibs_admin, body.ibs_admin.nr_side_mini { padding-inline-start: 0; }
    .nr_side, body.nr_side_mini .nr_side { width: min(300px, 86vw); transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
    [dir="rtl"] .nr_side, body[dir="rtl"] .nr_side { transform: translateX(100%); }
    body.nr_menu_open .nr_side { transform: none !important; box-shadow: 0 0 40px rgba(0,0,0,.4); }
    body.nr_menu_open .nr_side_backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(5,10,20,.5); }
    body.nr_menu_open { overflow: hidden; }
    /* the drawer is always the full menu */
    body.nr_side_mini .nr_side_logo, body.nr_side_mini .nr_side_label, body.nr_side_mini .nr_side_chev, body.nr_side_mini .nr_side_foot { display: revert; }
    body.nr_side_mini .nr_side_mark { display: none; }
    body.nr_side_mini .nr_side_open > .nr_side_items { display: grid; }
    body.nr_side_mini .nr_side_head { flex-direction: row; justify-content: space-between; padding: 0 12px 0 16px; }
    body.nr_side_mini .nr_side_link { justify-content: flex-start; padding: 9px 11px; }
    body.nr_side_mini .nr_side_nav { padding: 10px 10px 16px; }
    body.nr_side_mini .nr_side_badge { position: static; }
    body.nr_side_mini .nr_side_link:hover::after { display: none; }
    .nr_side_pin { display: none; }
    .nr_side_search { display: block; }
    .nr_side_link { padding: 11px 12px; }
    .nr_side_item { padding-top: 9px; padding-bottom: 9px; }
    .nr_side_who, .nr_side_logout { display: inline; }
    .nr_side_who { font-weight: 700; color: var(--side-ink); }
    .nr_side_logout { color: #fff !important; text-decoration: none; border: 1px solid var(--side-line); border-radius: 6px; padding: 5px 12px; }
    .nr_side_ver { width: 100%; }
    body.ibs_admin .ibs_topbar .ibs_brand { display: flex; }
    body.ibs_admin .ibs_menu_toggle { display: inline-flex; }
    body.ibs_admin .ibs_topbar .ibs_quicksearch, body.ibs_admin .ibs_topbar .ibs_account,
    body.nr_menu_open.ibs_admin .ibs_topbar .ibs_quicksearch, body.nr_menu_open.ibs_admin .ibs_topbar .ibs_account { display: none; }
    body.ibs_admin .ibs_topbar { flex-wrap: nowrap; height: 52px; padding: 0 10px; }
    body.ibs_admin .ibs_topbar .ibs_lang_toggle { margin-inline-start: auto; }
}
@media (prefers-reduced-motion: reduce) { .nr_side { transition: none !important; } .nr_side_chev { transition: none; } }
/* the side menu takes width: the page table must not grow wider than the rest, wide report tables scroll in their box */
body.ibs_admin table.Main_Page { table-layout: fixed; }
body.ibs_admin table.Main_Page > tbody > tr > td:first-child { width: auto; }
body.ibs_admin td#menu_full { width: 236px; }
body.ibs_admin td#menu_hidden { width: 28px; }

/* ---------- import MikroTik User Manager ---------- */
.nr_um .ibs_panel { margin-bottom: 14px; }
.nr_um_groups { margin: 10px 0; }
.nr_um_form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; align-items: end; margin-top: 14px; }
.nr_um_form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.nr_um_actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nr_um_errors { margin: 10px 0; font-size: 12.5px; }
.nr_um_errors summary { cursor: pointer; color: var(--warn); font-weight: 600; }
.nr_um_errors ul { max-height: 260px; overflow: auto; margin: 6px 0; padding-inline-start: 18px; }
.nr_um_bar { height: 8px; border-radius: 4px; background: var(--panel-alt); overflow: hidden; margin: 10px 0; }
.nr_um_bar span { display: block; height: 100%; background: var(--brand); transition: width .4s; }
.nr_import_kinds { padding-inline-start: 18px; line-height: 1.8; }
.nr_import_kinds code { font-size: 11.5px; }
.nr_um_facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 16px; border-inline-start: 0; border-radius: 6px; margin: 8px 0 12px; }
.nr_um_facts div { border-bottom: 0; }

/* ---------- factory reset ---------- */
.nr_reset { border-color: var(--danger-line); }
.nr_reset h2 { color: var(--danger); }
.nr_reset ul { padding-inline-start: 18px; line-height: 1.7; }
.nr_reset_form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 260px)); gap: 12px 16px; align-items: end; margin-top: 10px; }
.nr_reset_form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---------- admin access levels ---------- */
.nr_role_panel { max-width: 900px; margin: 14px auto; text-align: start; }
.nr_roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.nr_role { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--panel); }
.nr_role:hover { border-color: var(--muted); }
.nr_role input { position: absolute; inset-inline-end: 10px; top: 12px; margin: 0; }
.nr_role_on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; background: var(--brand-tint); }
.nr_role_title { font-weight: 700; font-size: 13.5px; padding-inline-end: 20px; }
.nr_role_desc { font-size: 12px; color: var(--muted); line-height: 1.6; }
.nr_role_groups { display: flex; flex-wrap: wrap; max-height: 230px; overflow: auto; gap: 6px 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; margin-bottom: 12px; }
.nr_role_groups[hidden] { display: none; }
.nr_role_groups_title { width: 100%; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.nr_role_group { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.nr_role_actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nr_role_show { margin: 10px auto; }
.nr_role_badge { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.nr_role_badge_god { color: var(--danger); border-color: var(--danger-line); background: var(--danger-tint); }
.nr_role_badge_reseller { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.nr_role_badge_finance { color: var(--ok); border-color: var(--ok-line); background: var(--ok-tint); }
.nr_role_badge_support { color: var(--warn); border-color: var(--amber); background: var(--warn-tint); }


/* ---------- side menu: look and motion (groups open and close slowly, like Zabbix) ---------- */
.nr_side {
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(91,141,239,.13), transparent 60%),
        linear-gradient(180deg, color-mix(in srgb, var(--side-bg) 92%, #fff 8%) 0%, var(--side-bg) 38%, var(--side-bg) 100%);
}
.nr_side_head { background: linear-gradient(180deg, rgba(255,255,255,.035), transparent); }
.nr_side_nav { padding-top: 12px; }
/* icon in a soft rounded tile */
.nr_side_link .nr_side_icon { box-sizing: content-box; padding: 6px; margin: -6px 0; border-radius: 8px; transition: background-color .2s, color .2s, transform .2s; }
.nr_side_link:hover .nr_side_icon { background: rgba(255,255,255,.07); transform: scale(1.06); }
.nr_side_link.nr_side_active .nr_side_icon, .nr_side_current > .nr_side_grp .nr_side_icon {
    background: linear-gradient(135deg, rgba(91,141,239,.35), rgba(91,141,239,.12)); color: #fff; opacity: 1;
    box-shadow: 0 4px 12px rgba(40,90,200,.25);
}
.nr_side_link, .nr_side_item { transition: background-color .18s ease, color .18s ease, padding .18s ease; }
.nr_side_link.nr_side_active { background: linear-gradient(90deg, rgba(91,141,239,.22), rgba(91,141,239,.06)); }
[dir="rtl"] .nr_side_link.nr_side_active { background: linear-gradient(270deg, rgba(91,141,239,.22), rgba(91,141,239,.06)); }
.nr_side_group + .nr_side_group, .nr_side_link + .nr_side_group { margin-top: 1px; }
.nr_side_open > .nr_side_grp { background: rgba(255,255,255,.035); }
/* sub items hang on a thin line under the icon of their group */
.nr_side_items_in { position: relative; }
.nr_side_items_in::before {
    content: ""; position: absolute; top: 4px; bottom: 10px; inset-inline-start: 22px; width: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
}
.nr_side_item { margin-inline-start: 4px; }
.nr_side_item::before { inset-inline-start: 16px; transition: transform .2s, opacity .2s, background-color .2s; }
.nr_side_item:hover { padding-inline-start: 45px; }
.nr_side_item:hover::before { opacity: .9; transform: scale(1.3); }
.nr_side_item.nr_side_active::before { box-shadow: 0 0 0 3px rgba(91,141,239,.25); }
/* items slide in when their group opens */
.nr_side_open .nr_side_item { animation: nrSideItemIn .28s ease both; }
.nr_side_open .nr_side_item:nth-child(2) { animation-delay: .02s; }
.nr_side_open .nr_side_item:nth-child(3) { animation-delay: .04s; }
.nr_side_open .nr_side_item:nth-child(4) { animation-delay: .06s; }
.nr_side_open .nr_side_item:nth-child(5) { animation-delay: .08s; }
.nr_side_open .nr_side_item:nth-child(n+6) { animation-delay: .1s; }
@keyframes nrSideItemIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .nr_side_open .nr_side_item { animation-name: nrSideItemInRtl; }
@keyframes nrSideItemInRtl { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
/* motion only after the page is drawn, so groups that are open already don't animate on every page */
body.nr_side_ready .nr_side_items { transition: grid-template-rows .32s cubic-bezier(.4,0,.2,1), opacity .25s ease; }
body:not(.nr_side_ready) .nr_side_item { animation: none !important; }
body.nr_side_ready .nr_side_chev { transition: transform .32s cubic-bezier(.4,0,.2,1); }
body.nr_side_ready.ibs_admin { transition: padding-inline-start .3s cubic-bezier(.4,0,.2,1); }
body.nr_side_ready .nr_side { transition: width .3s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1); }
body.nr_side_ready .nr_side_label { transition: opacity .2s ease; }
body.nr_side_mini .nr_side_label { opacity: 0; }
.nr_side_nav::-webkit-scrollbar { width: 6px; }
.nr_side_nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.nr_side_badge { box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.nr_side_badge_warn { animation: nrBadgePulse 2.4s ease-in-out infinite; }
@keyframes nrBadgePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229,72,77,.45); } 50% { box-shadow: 0 0 0 5px rgba(229,72,77,0); } }
@media (prefers-reduced-motion: reduce) {
    .nr_side_items, .nr_side, body.ibs_admin, .nr_side_chev, .nr_side_label { transition: none !important; }
    .nr_side_item, .nr_side_badge_warn { animation: none !important; }
}

/* ---------- notifications ---------- */
.nr_nf .ibs_panel { margin-bottom: 14px; }
.nr_nf_form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; align-items: end; }
.nr_nf_form h3 { margin: 10px 0 0; font-size: 13.5px; }
.nr_nf_form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.nr_nf_form label.nr_nf_check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.nr_nf_wide { grid-column: 1 / -1; }
.nr_nf_help { padding-inline-start: 18px; margin: 0; line-height: 1.7; }
.nr_nf_buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.nr_nf_text { white-space: pre-line; font-size: 12.5px; }
.nr_nf_active { margin: 0 0 12px; padding-inline-start: 18px; }

/* ---------- extra traffic packages ---------- */
.nr_inline_inputs { display: flex; gap: 6px; }
.nr_inline_inputs input { flex: 1; min-width: 0; }
.ibs_pay_gb { font-size: 22px; font-weight: 800; color: var(--brand); margin: 4px 0; }
.ibs_pay_traffic { margin: 4px 0 12px; font-size: 13px; }
.ibs_pay_traffic_bar { height: 8px; border-radius: 4px; background: var(--panel-alt); overflow: hidden; margin-bottom: 6px; max-width: 520px; }
.ibs_pay_traffic_bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--amber), var(--danger)); background-size: 520px 100%; }

/* ---------- RAS health ---------- */
.nr_nf_kinds { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.nr_hl_top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.nr_hl_sum { font-size: 15px; color: var(--muted); }
.nr_hl_sum b { font-size: 26px; color: var(--ink); }
.nr_hl_meta { font-size: 12.5px; color: var(--muted); }
.nr_hl_grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-bottom: 18px; }
.nr_hl_card { margin: 0; border-top: 3px solid var(--ok); display: flex; flex-direction: column; gap: 10px; }
.nr_hl_card.nr_hl_down { border-top-color: var(--danger); }
.nr_hl_card.nr_hl_unreachable, .nr_hl_card.nr_hl_dropped { border-top-color: var(--warn); }
.nr_hl_card.nr_hl_disabled { border-top-color: var(--line); opacity: .8; }
.nr_hl_card header { display: flex; align-items: center; gap: 10px; }
.nr_hl_name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 700; }
.nr_hl_name a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr_hl_name small { font-weight: 400; color: var(--muted); font-size: 12px; }
.nr_hl_dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 0 var(--ok); animation: nrHlPulse 2.2s infinite; }
.nr_hl_down .nr_hl_dot { background: var(--danger); animation: none; }
.nr_hl_unreachable .nr_hl_dot, .nr_hl_dropped .nr_hl_dot { background: var(--warn); animation: none; }
.nr_hl_disabled .nr_hl_dot { background: var(--line); animation: none; }
@keyframes nrHlPulse { 0% { box-shadow: 0 0 0 0 rgba(29,127,72,.45); } 70% { box-shadow: 0 0 0 7px rgba(29,127,72,0); } 100% { box-shadow: 0 0 0 0 rgba(29,127,72,0); } }
.nr_hl_facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.nr_hl_facts div { display: flex; flex-direction: column; gap: 2px; }
.nr_hl_facts dt { font-size: 11.5px; color: var(--muted); }
.nr_hl_facts dd { margin: 0; font-size: 13px; font-weight: 600; }
.nr_hl_big { font-size: 22px !important; font-weight: 800 !important; }
.nr_hl_chart svg { width: 100%; height: 40px; display: block; }
.nr_hl_chart polyline { fill: none; stroke: var(--brand); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.nr_hl_chart span { font-size: 11px; color: var(--muted); }
.nr_hl_note { margin: 0; font-size: 12px; color: var(--danger); word-break: break-word; }
.nr_hl_h2 { font-size: 15px; margin: 6px 0 10px; }
@media (prefers-reduced-motion: reduce) { .nr_hl_dot { animation: none; } }

/* ---------- admin activity ---------- */
.nr_al_filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 14px; align-items: end; margin-bottom: 14px; }
.nr_al_filter label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.nr_al_table td { vertical-align: top; }
.nr_al_table code { font-size: 11.5px; color: var(--muted); }
.nr_al_time { white-space: nowrap; }
.nr_al_target { font-size: 12px; word-break: break-all; max-width: 260px; }
.nr_al_fail td { background: var(--danger-tint); }
.nr_al_err { font-size: 11.5px; color: var(--danger); margin-top: 3px; max-width: 260px; }
.nr_al_details summary { cursor: pointer; font-size: 12px; color: var(--brand); }
.nr_al_details pre { white-space: pre-wrap; word-break: break-all; font-size: 11.5px; max-width: 460px; max-height: 260px; overflow: auto; background: var(--panel-alt); padding: 8px; border-radius: 6px; margin: 6px 0 0; }
.nr_al_pages { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }

/* ---------- wallet statements, online top up ---------- */
.nr_topup { margin-top: 12px; }
.nr_topup_quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nr_inv_make { margin-top: 10px; }
.nr_inv { max-width: 900px; }
.nr_inv_paper { padding: 22px 26px; text-align: start; }
.nr_inv_head > div, .nr_inv_sum div { text-align: start; }
.nr_inv_head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; }
.nr_inv_head h2 { margin: 0 0 4px; font-size: 18px; }
.nr_inv_head p { margin: 0; color: var(--muted); }
.nr_inv_head dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; font-size: 13px; }
.nr_inv_head dl div { display: contents; }
.nr_inv_head dt { color: var(--muted); }
.nr_inv_head dd { margin: 0; font-weight: 600; }
.nr_inv_sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.nr_inv_sum div { border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.nr_inv_sum span { font-size: 12px; color: var(--muted); }
.nr_inv_sum b { font-size: 18px; }
.nr_inv_sum .nr_inv_total { border-color: var(--brand); }
.nr_inv_counts { color: var(--muted); font-size: 13px; }
.nr_inv_actions { display: flex; gap: 8px; margin-top: 12px; }
@media print {
    .nr_side, .ibs_header, .nr_top, header.ibs_top, .ibs_footer, .nr_inv_actions, .RightSide, #RightSide, .ibs_page_title_bar, nav { display: none !important; }
    body, .ibs_admin { background: #fff !important; }
    .nr_inv_paper { box-shadow: none !important; border: 0 !important; }
    body.ibs_admin { padding: 0 !important; margin: 0 !important; }
}

/* ---------- server status ---------- */
.nr_ss .ibs_panel { margin: 0 0 14px; }
.nr_ss_grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.nr_ss_grid .ibs_panel { margin: 0; }
.nr_ss_alerts { border-inline-start: 4px solid var(--ok); }
.nr_ss_alerts.nr_ss_bad { border-inline-start-color: var(--danger); }
.nr_ss_alerts ul { margin: 0; padding-inline-start: 18px; line-height: 1.8; }
.nr_ss_disk { margin-bottom: 12px; }
.nr_ss_row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.nr_ss_row small { color: var(--muted); }
.nr_ss_bar { height: 8px; border-radius: 4px; background: var(--panel-alt); overflow: hidden; margin-bottom: 3px; }
.nr_ss_bar span { display: block; height: 100%; background: var(--ok); border-radius: 4px; transition: width .6s ease; }
.nr_ss_bar span.nr_ss_amber { background: var(--warn); }
.nr_ss_bar span.nr_ss_red { background: var(--danger); }
.nr_ss_disk > small { color: var(--muted); font-size: 12px; }
.nr_ss_msg { font-size: 12px; color: var(--danger); word-break: break-word; }
.nr_health_strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nr_health_strip a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-size: 12.5px; }
.nr_health_strip a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.nr_health_strip a.nr_hs_bad { border-color: var(--danger-line); background: var(--danger-tint); }
.nr_health_strip a.nr_hs_bad::before { background: var(--danger); }
.nr_health_strip a.nr_hs_warn::before { background: var(--warn); }

/* ---------- hotspot pages ---------- */
.nr_hs_grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .nr_hs_grid { grid-template-columns: 1fr; } }
.nr_hs_grid .ibs_panel { margin: 0; }
.nr_hs_preview iframe { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: 12px; background: #eef2f8; }
.nr_hs_steps { line-height: 1.9; padding-inline-start: 20px; }
.nr_hs_steps pre { white-space: pre-wrap; word-break: break-all; background: var(--panel-alt); padding: 10px; border-radius: 8px; font-size: 12px; text-align: left; }
.nr_nf_form input[type=color] { height: 40px; padding: 2px; }

/* ---------- traffic usage ---------- */
.nr_us_filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.nr_us_seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.nr_us_seg a { padding: 7px 12px; font-size: 13px; color: var(--ink); text-decoration: none; border-inline-end: 1px solid var(--line-soft); }
.nr_us_seg a:last-child { border-inline-end: 0; }
.nr_us_seg a.nr_on { background: var(--brand); color: #fff; }
.nr_us .ibs_panel { margin-bottom: 14px; }
.nr_us_hours, .nr_us_days { display: flex; align-items: flex-end; gap: 3px; height: 170px; direction: ltr; padding-top: 6px; }
.nr_us_days { height: 120px; gap: 2px; }
.nr_us_col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.nr_us_bar { display: block; width: 100%; min-height: 2px; background: var(--brand); opacity: .75; border-radius: 4px 4px 0 0; transition: opacity .2s; }
.nr_us_col:hover .nr_us_bar { opacity: 1; }
.nr_us_peak .nr_us_bar { background: var(--warn); opacity: 1; }
.nr_us_col small { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.nr_us_axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.nr_us_grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .nr_us_grid { grid-template-columns: 1fr; } }
.nr_us_grid .ibs_panel { margin: 0; overflow-x: auto; }
.nr_us_share { display: inline-block; width: 70px; height: 7px; background: var(--panel-alt); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.nr_us_share span { display: block; height: 100%; background: var(--brand); }
.nr_fin .nr_us_filter { align-items: center; }
.nr_fin_months, .nr_fin_fc { height: 150px; }

/* ---------- excel export ---------- */
.nr_ex_grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.nr_ex_grid .ibs_panel { margin: 0; }
.nr_ex_links { line-height: 2.1; padding-inline-start: 18px; margin: 0 0 8px; }
.nr_ex_btn { margin-inline-start: 8px; }
.ibs_notice.ibs_notice_warn { background: var(--warn-tint); border-color: var(--warn); color: var(--ink); }
.ibs_notice_warn div { margin-top: 4px; }
.ibs_notice_warn small { display: block; margin-top: 6px; color: var(--muted); }

/* ---------- Documentation link (side menu) ---------- */
.nr_side_docs { flex: none; padding: 6px 10px; border-top: 1px solid var(--side-line); }
body.nr_side_mini .nr_side_docs { padding: 6px 8px; }
@media (max-width: 900px) { body.nr_side_mini .nr_side_docs { padding: 6px 10px; } }

/* ---------- user manual (admin/help/manual.php) ---------- */
.nr_man { max-width: 1180px; margin: 0 auto; text-align: start; color: var(--ink); }
.nr_man_bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; }
.nr_man_title { flex: 1 1 260px; margin: 0; font-size: 20px; line-height: 1.4; color: var(--ink); }
.nr_man_langs { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.nr_man_langs a { padding: 5px 11px; border-radius: 6px; color: var(--muted) !important; text-decoration: none !important; font-size: 13px; line-height: 1.4; }
.nr_man_langs a:hover { background: var(--panel-alt); color: var(--ink) !important; }
.nr_man_langs a.nr_man_on { background: var(--brand); color: #fff !important; font-weight: 600; }
.nr_man_print { padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.nr_man_print:hover { background: var(--panel-alt); }
.nr_man_wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.nr_man_toc { position: sticky; top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 10px 10px; }
.nr_man_toc h2 { margin: 0 6px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.nr_man_toc ol { list-style: none; margin: 0; padding: 0; }
.nr_man_toc a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--ink) !important; text-decoration: none !important; font-size: 13px; line-height: 1.45; }
.nr_man_toc a:hover, .nr_man_toc a.nr_man_here { background: var(--brand-tint); color: var(--brand-link) !important; }
.nr_man_body { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 28px 26px; font-size: 14.5px; line-height: 1.85; min-width: 0; }
.nr_man_body h2 { margin: 26px 0 8px; padding-top: 14px; font-size: 19px; color: var(--ink); border-top: 1px solid var(--line-soft); scroll-margin-top: 12px; }
.nr_man_body h2:first-child { border-top: 0; padding-top: 8px; margin-top: 10px; }
.nr_man_body h3 { margin: 20px 0 6px; font-size: 15.5px; color: var(--brand-link); scroll-margin-top: 12px; }
.nr_man_body p, .nr_man_body ul, .nr_man_body ol { margin: 0 0 10px; }
.nr_man_body ul, .nr_man_body ol { padding-inline-start: 22px; }
.nr_man_body li { margin: 3px 0; }
.nr_man_body code { font-family: Consolas, "DejaVu Sans Mono", monospace; font-size: 12.5px; background: var(--panel-alt); border: 1px solid var(--line-soft); border-radius: 4px; padding: 1px 5px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.nr_man_body pre { direction: ltr; text-align: left; background: #111a2c; color: #dfe7f5; border-radius: 8px; padding: 12px 14px; overflow-x: auto; line-height: 1.6; margin: 0 0 12px; }
.nr_man_body pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; font-size: 12.5px; }
.nr_man_tbl { overflow-x: auto; margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 8px; }
.nr_man_tbl table { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.6; }
.nr_man_tbl th { background: var(--panel-alt); color: var(--ink); font-weight: 600; text-align: start; }
.nr_man_tbl th, .nr_man_tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: start; }
.nr_man_tbl tr:last-child td { border-bottom: 0; }
.nr_man_tbl td code { white-space: nowrap; }
.nr_man_body > p:last-child { margin-top: 22px; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
    .nr_man_wrap { grid-template-columns: 1fr; }
    .nr_man_toc { position: static; }
    .nr_man_toc ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px; }
    .nr_man_body { padding: 4px 16px 20px; font-size: 14px; }
    .nr_man_body code { white-space: normal; word-break: break-word; }
    .nr_man_tbl td code { white-space: normal; word-break: break-all; }
    .nr_man_tbl table { font-size: 13px; }
}
@media print {
    .nr_man_bar .nr_man_langs, .nr_man_print, .nr_man_toc, .ibs_pagehead { display: none !important; }
    .nr_man_wrap { display: block; }
    .nr_man_body { border: 0; padding: 0; }
    .nr_man_body pre { background: #f3f5f8; color: #000; }
}

/* ---------- support tickets (user/tickets.php, admin/user/tickets.php) ---------- */
.nr_tk { max-width: 860px; margin: 0 auto; text-align: start; }
.nr_tk_admin { max-width: 1100px; }
.nr_tk_back { margin: 0 0 10px; }
.nr_tk_head h2 { margin: 0 0 4px; font-size: 19px; color: var(--ink); overflow-wrap: anywhere; }
.nr_tk_meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.nr_tk_status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.nr_tk_open { background: var(--warn-tint); color: var(--warn); }
.nr_tk_answered { background: var(--ok-tint); color: var(--ok); }
.nr_tk_closed { background: var(--panel-alt); color: var(--muted); border: 1px solid var(--line); }
.nr_tk_thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.nr_tk_msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.nr_tk_msg.nr_tk_me { align-self: flex-end; background: var(--brand-tint); border-color: var(--link-line); }
.nr_tk_msg.nr_tk_staff, .nr_tk_msg.nr_tk_user { align-self: flex-start; }
.nr_tk_who { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.nr_tk_who small { font-weight: 400; color: var(--muted); margin-inline-start: 6px; }
.nr_tk_body { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; color: var(--ink); }
.nr_tk_reply, .nr_tk_new form { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; }
.nr_tk_reply label, .nr_tk_new label { font-size: 13px; color: var(--muted); }
.nr_tk_reply textarea, .nr_tk_new textarea, .nr_tk_new input[type=text], .nr_tk_new select { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; }
.nr_tk_buttons { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.nr_tk_check { font-size: 13px; color: var(--ink) !important; display: inline-flex; gap: 6px; align-items: center; }
.nr_tk_new { margin: 0 0 14px; }
.nr_tk_new summary { display: inline-block; cursor: pointer; list-style: none; margin-bottom: 10px; }
.nr_tk_new summary::-webkit-details-marker { display: none; }
.nr_tk_list { display: flex; flex-direction: column; gap: 8px; }
.nr_tk_item { display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-decoration: none !important; color: var(--ink) !important; }
.nr_tk_item:hover { border-color: var(--link-line); background: var(--brand-tint); }
.nr_tk_item.nr_tk_new_answer { border-inline-start: 4px solid var(--ok); }
.nr_tk_subject { font-weight: 600; overflow-wrap: anywhere; }
.nr_tk_filter { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 12px; }
.nr_tk_filter input[type=text] { flex: 1 1 220px; max-width: 360px; }
.nr_tk_tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.nr_tk_tabs a { padding: 5px 11px; border-radius: 6px; color: var(--muted) !important; text-decoration: none !important; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.nr_tk_tabs a.nr_tk_on { background: var(--brand); color: #fff !important; font-weight: 600; }
.nr_tk_table { width: 100%; }
.nr_tk_table td a { overflow-wrap: anywhere; }
.nr_tk_row_open td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
[dir="rtl"] .nr_tk_row_open td:first-child { box-shadow: inset -3px 0 0 var(--warn); }
.nr_tk_statusform { margin: 0; }
@media (max-width: 700px) {
    .nr_tk_msg { max-width: 100%; }
    .nr_tk_table th:nth-child(5), .nr_tk_table td:nth-child(5) { display: none; }
}

/* ---------- online users: count, search, pages ---------- */
.nr_onl_bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 4px 0 12px; text-align: start; }
.nr_onl_bar input[type=text] { width: 190px; }
.nr_onl_total { color: var(--ink); }
.nr_onl_pages { color: var(--muted); font-size: 13px; }
.nr_onl_pages a, .nr_onl_pages b { display: inline-block; min-width: 22px; text-align: center; }

.nr_hl_cause { margin: 8px 0 0; padding: 8px 10px 8px 26px; background: var(--warn-tint); border-radius: 8px; font-size: 13px; line-height: 1.7; color: var(--ink); }
[dir=rtl] .nr_hl_cause, .nr_hl_cause[dir=rtl] { padding: 8px 26px 8px 10px; }
.nr_hl_cause li:first-child { font-weight: 600; }

/* renewals report */
.nr_ren_filter .nr_ren_date { grid-column: span 2; }
.nr_ren_dt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nr_ren_dt input[type=text] { width: 140px; flex: 1 1 110px; min-width: 0; }
.nr_ren_dt input[type=image] { width: 18px; height: 18px; }
.nr_ren_dt select { flex: 0 1 auto; }
.nr_ren_scroll { overflow-x: auto; }
.nr_ren .ibs_stats { margin-bottom: 12px; }
.nr_ren_owners { margin-bottom: 12px; }
@media (max-width: 640px) { .nr_ren_filter .nr_ren_date { grid-column: auto; } }

/* panel layout of each admin: customize page / menu (inc/ui_layout.php, js/nr_ui_layout.js) */
.nr_ui_btn {
    display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 12px; padding: 4px 10px;
    background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 12px; cursor: pointer;
}
.nr_ui_btn[hidden] { display: none; }
.nr_ui_btn:hover { border-color: var(--muted); }
.nr_ui_btn svg, .nr_ui_panel svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nr_ui_panel {
    position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 1000; width: min(400px, 100vw);
    background: var(--panel); color: var(--ink); border-inline-start: 1px solid var(--line); box-shadow: 0 0 30px rgba(0,0,0,.25);
    display: flex; flex-direction: column; text-align: start;
}
.nr_ui_panel[hidden] { display: none; }
.nr_ui_head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.nr_ui_head h2 { margin: 0; font-size: 15px; }
.nr_ui_close { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); cursor: pointer; }
.nr_ui_note { margin: 0 16px 8px; color: var(--muted); font-size: 12px; }
.nr_ui_forrow, .nr_ml_for label { display: flex; align-items: center; gap: 8px; margin: 0 16px 8px; font-size: 13px; font-weight: 600; }
.nr_ml_for label { margin: 8px 0; }
.nr_ui_forrow select, .nr_ml_for select { flex: 1; min-width: 0; max-width: 280px; }
.nr_ui_lockrow { display: flex; align-items: center; gap: 8px; margin: 0 16px 8px; font-size: 13px; }
.nr_ui_lockrow[hidden] { display: none; }
.nr_ml_lock { margin: 12px 0 0; }
.nr_ui_body { flex: 1; overflow-y: auto; padding: 0 16px 12px; }
.nr_ui_group { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px 8px; margin: 0 0 10px; min-width: 0; }
.nr_ui_group legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr_ui_list { list-style: none; margin: 0; padding: 0; }
.nr_ui_item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-bottom: 1px solid var(--line-soft); }
.nr_ui_item:last-child { border-bottom: 0; }
.nr_ui_item label { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; min-width: 0; }
.nr_ui_item label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr_ui_item input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: none; }
.nr_ui_move { display: flex; gap: 4px; flex: none; }
.nr_ui_move button {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    background: var(--panel); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); cursor: pointer;
}
.nr_ui_item:first-child .nr_ui_up, .nr_ui_item:last-child .nr_ui_down { visibility: hidden; }
.nr_ui_foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.nr_ui_status { font-size: 12.5px; color: var(--ok); font-weight: 600; }
.nr_ui_status.nr_ui_bad { color: var(--danger); }
.nr_ui_menulink { margin-inline-start: auto; font-size: 12.5px; }
.nr_ui_locked { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; background: var(--amber-tint, #fff4e0); color: var(--ink); font-size: 12.5px; }
.nr_ui_lockedbtn { font-size: 12px; color: var(--muted); padding: 5px 0; }
.nr_ui_editrules .nr_ui_note { margin: 2px 0 6px; }
.nr_ui_subhead { font-size: 12px; font-weight: 700; margin: 8px 0 2px; color: var(--ink); }
.nr_ui_editrules .nr_ui_bad { color: var(--danger); font-size: 12.5px; }
.nr_ui_inherit { margin-top: 8px; }
.nr_ml_group { display: block; }
.nr_ml_row { display: flex; align-items: center; gap: 8px; }
.nr_ml_row label { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.nr_ml_items { margin: 4px 0 4px; padding-inline-start: 26px; }
.nr_ml_items .nr_dash_item { padding: 3px 4px; }
.nr_side_custom { opacity: .8; }
@media (max-width: 640px) { .nr_ui_btn span { display: none; } }

/* Telegram bot of a reseller (admin/misc/telegram_bot.php) */
.nr_tb_stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 10px 0 0; }
.nr_tb_state { font-size: 20px !important; }
.nr_tb_err { display: block; color: var(--danger); font-size: 11.5px; margin-top: 3px; word-break: break-word; }
.nr_tb_code { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.nr_tb_code code { font-size: 16px; font-weight: 700; letter-spacing: 1px; background: var(--panel); padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line); }
.nr_tb_in { width: 100%; min-width: 90px; box-sizing: border-box; }
.nr_tb_price { max-width: 150px; }
.nr_tb_plans td { vertical-align: middle; }
.nr_tb_decide { display: inline-flex; gap: 6px; }
.nr_tb_decide .ibs_button { padding: 4px 10px; font-size: 12px; }
.nr_tb_filter { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.nr_tb .nr_dash_move { white-space: nowrap; }
.nr_tb_plans tr:nth-child(2) .nr_dash_up, .nr_tb_plans tr:last-child .nr_dash_down { visibility: hidden; }
@media (max-width: 700px) { .nr_tb .ibs_table { display: block; overflow-x: auto; } }

/* System > Update (admin/misc/update.php) */
.nr_up_stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 8px 0 10px; }
.nr_up_stats b { font-size: 22px !important; }
.nr_up_new { border: 1px solid var(--amber); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; }
.nr_up_new h3 { margin: 0 0 6px; font-size: 14px; }
.nr_up_notes { white-space: normal; margin: 6px 0; }
.nr_up_go { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 8px; }
.nr_up_err { border-color: var(--danger); color: var(--danger); }
.nr_up_log { max-height: 320px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
             padding: 8px 10px; font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; margin: 8px 0 0; }
.nr_up_log:empty { display: none; }
.nr_up_state b { margin-inline-end: 8px; }
.nr_up_help code { font-size: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.nr_up_help li { margin: 4px 0; }

/* search in the side menu (js/nr_menu_search.js) */
.nr_menu_find { position: relative; padding: 10px 12px 2px; }
.nr_menu_find svg { position: absolute; inset-inline-start: 23px; top: 50%; margin-top: -4px; width: 15px; height: 15px; fill: none; stroke: var(--side-muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.nr_side .nr_menu_find input {
    width: 100%; box-sizing: border-box; height: 36px; margin: 0; font: inherit; font-size: 13px;
    padding: 0 !important; padding-inline-start: 34px !important; padding-inline-end: 30px !important;
    border: 1px solid var(--side-line); border-radius: 9px; background: rgba(255,255,255,.06); color: #fff; outline: none; box-shadow: none;
}
.nr_menu_find input::placeholder { color: var(--side-muted); }
.nr_side .nr_menu_find input:focus { border-color: var(--side-accent); background: rgba(255,255,255,.09); }
.nr_menu_find input::-webkit-search-cancel-button { filter: invert(1); opacity: .6; }
.nr_menu_kbd { position: absolute; inset-inline-end: 21px; top: 50%; margin-top: -6px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 5px;
    border: 1px solid var(--side-line); color: var(--side-muted); font: 600 11px/18px ui-monospace, monospace; pointer-events: none; }
.nr_menu_find input:focus ~ .nr_menu_kbd, .nr_menu_find input:not(:placeholder-shown) ~ .nr_menu_kbd { display: none; }
body.nr_side_mini .nr_menu_find { display: none; }
.nr_menu_out { display: none !important; }
body.nr_menu_filtering .nr_side_items { transition: none !important; }
body.nr_menu_filtering .nr_side_item { animation: none !important; }
.nr_side_item.nr_menu_sel, .nr_side_link.nr_menu_sel { background: var(--side-hover); color: var(--side-active-ink) !important; box-shadow: inset 0 0 0 1px var(--side-accent); }
.nr_menu_none { margin: 14px 12px; color: var(--side-muted); font-size: 13px; text-align: center; }
@media (hover: none), (max-width: 900px) { .nr_menu_kbd { display: none; } .nr_side .nr_menu_find input { font-size: 16px; padding-inline-end: 12px !important; } }
@media (max-width: 900px) { body.nr_side_mini .nr_menu_find { display: block; } }
