/*
    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: light;
    --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(5, 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; 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; }
}
.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; }
