/* Phones, the FLUID layout (1.44.0): the frame, forms, windows and touch sizes of the old phone layout, with its cards and wrapping bars taken out. Tables stay tables (rows stay rows, columns shrink and the less important ones drop out),
   bars and tabs stay ONE row (they shrink, then scroll sideways inside their own strip). The rules for that are at the end of this file and in fluid.css. Loaded instead of mobile.css (early.js decides; ?fluid=0 brings the old one back). */
/* Phones (up to 760 px): a layout of its own, built from scratch.
   One column, a bottom tab bar, tables turned into cards (every cell carries its column name in data-l), nothing ever scrolls sideways,
   inputs of 16 px (no zoom on focus), touch targets of 44 px. Loaded after app.css, so it wins; desktop never reads it. */

html, body { width: 100%; max-width: 100%; overflow-x: hidden !important; overscroll-behavior-x: none; touch-action: pan-y pinch-zoom; -webkit-text-size-adjust: 100%; }
body { font-size: 14px; line-height: 1.45; }
*, *::before, *::after { min-width: 0; }
img, svg, video, canvas { max-width: 100%; }

/* ---- frame */
.app { display: block !important; width: 100%; max-width: 100%; padding: 12px 12px calc(84px + env(safe-area-inset-bottom)) !important; overflow-x: hidden; }
.main { display: block; width: 100%; max-width: 100%; overflow: visible !important; padding: 0 !important; }
.page { padding: 0 !important; overflow: visible !important; max-width: 100%; }
.bg-scene, .side-net, .side::after, .t-anim, #updated, .statusbar, .head p, .side .brand, .side-foot, body::after { display: none !important; }

/* the header: one large title, the two small buttons at its side */
.head { position: static !important; height: auto !important; min-height: 0; padding: 4px 2px 12px !important; margin: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.head h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.4px; display: flex; align-items: center; gap: 10px; }
.head-r { gap: 8px; } .head-r button, .lang-btn { width: 40px; min-width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 15px; display: grid; place-items: center; }

/* ---- the tab bar at the bottom */
.side { position: fixed !important; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; width: 100%; height: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; border: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, white 8%); box-shadow: none; overflow: visible; display: block; -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); }
#nav { display: flex !important; flex-direction: row; width: 100%; gap: 0; padding: 0; margin: 0; }
#nav a { flex: 1 1 0; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 50px; min-height: 50px; padding: 0 2px; margin: 0; border-radius: 12px; background: none !important; border: 0 !important; box-shadow: none !important; color: var(--mut); text-align: center; }
#nav a::before, #nav a::after { display: none !important; content: none !important; }
#nav a .ic { display: grid !important; place-items: center; width: 26px; height: 26px; margin: 0; } #nav a .ic svg { width: 24px; height: 24px; opacity: 1; }
#nav a span { display: block !important; font-size: 10px; line-height: 1.1; font-weight: 600; letter-spacing: 0; background: none !important; -webkit-text-fill-color: currentColor !important; color: inherit !important; text-shadow: none !important; filter: none !important; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav a.on { color: var(--acc) !important; } #nav a.on span { color: var(--acc) !important; -webkit-text-fill-color: var(--acc) !important; }
#nav a .cnt { position: absolute; top: 2px; right: calc(50% - 22px); font-size: 9px; padding: 0 5px; min-width: 16px; height: 16px; line-height: 16px; }
#dock { bottom: 74px !important; }

/* ---- type, forms, buttons */
h3, .card h3 { font-size: 13px; letter-spacing: .6px; }
input, select, textarea { font-size: 16px !important; height: 44px; border-radius: 12px; }
textarea { height: auto; min-height: 88px; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
button { height: 44px; padding: 0 16px; font-size: 15px; border-radius: 999px; }
button.sm, .toolbar button.sm, .page .toolbar button.sm { height: 36px; padding: 0 14px; font-size: 13px; }
button:active { transform: scale(.97); }
.tile:hover, .gw-row:hover, .ap-row:hover, .lbox tbody tr:hover, .cf-card:hover, tbody tr:hover { transform: none !important; box-shadow: none !important; }

/* ---- cards and rows of cards */
.card, .sbox, .tt-frame, .ibox { width: 100%; max-width: 100%; margin: 0 0 12px !important; padding: 14px !important; border-radius: 18px !important; }
.grid2, .grid2.one, .mgrid, .iboxes, .dash-cols, .rd-cols, .ap-pair, .ap-two, .sgrid, .al-grid, .bk-parts, .sec-cards, .gw-two, .tt-two, .adv-grid, .dash-free, .dash-kpi, .iboxes, .hp-list, .cfe-cols, .ue-top, .ue-form, .ue-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 12px !important; width: 100%; }
.grid2 > .card, .grid2.one > .card { min-height: 0 !important; width: 100% !important; }
.dash-cols > .card { max-height: none !important; height: auto !important; }
.frm, .frm.one, .gw-top, .gw-add, .pr-form, .sb-form, .ai-form, .look-frm, .pw-form, .ap-set-row, .al-two, .al-win, .al-rules, .srv-form, .srv-two { display: grid !important; grid-template-columns: 1fr !important; gap: 10px !important; max-width: 100% !important; }
.frm > *, .pr-form > *, .sb-form > *, .gw-top > *, .gw-add > *, .al-win > *, .al-rules > * { grid-column: 1 / -1 !important; }
.frm-act, .sec-a, .up-btns, .pr-act, .sb-act, .ai-act { display: flex !important; flex-wrap: wrap; gap: 8px; justify-content: flex-start !important; } .frm-act button, .up-btns button, .pr-act button, .ai-act button { flex: 1 1 auto; }
.sec-card, .sec-hero { padding: 12px !important; } .sec-hero { flex-wrap: wrap; gap: 10px; } .sec-seg { width: 100%; } .sec-seg i { flex: 1; }
.tiles { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; margin: 0 0 12px !important; }
.tile { padding: 12px !important; border-radius: 16px !important; } .tile b, .page .tiles .tile b { font-size: 20px !important; }
.eff-grid { grid-template-columns: 1fr 1fr !important; } .theme-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } .eng-row { grid-template-columns: 1fr 1fr !important; } .eng-head { display: none !important; }


.pn-foot, .fstrip.pn-foot { justify-content: center !important; } .pgs { display: flex; gap: 3px; flex-wrap: nowrap; } .pgs .pgn { min-width: 34px !important; width: 34px !important; height: 34px; padding: 0 !important; } .pgs .pgn-gap { width: 30px !important; }

/* ---- windows: a full-height sheet */
.overlay { padding: 0 !important; align-items: stretch !important; }
.modal, .modal.wide, .modal.mid, .modal.ue { width: 100% !important; max-width: 100% !important; max-height: none !important; min-height: 100% !important; height: 100%; border-radius: 0 !important; border: 0 !important; margin: 0 !important; overflow-x: hidden; }
.modal-head { padding: 12px 14px !important; flex-wrap: wrap; gap: 8px !important; position: sticky; top: 0; z-index: 5; background: var(--bg); } .modal-head > b, .modal-head > span:not(.sp) { white-space: normal !important; }
.modal-body { padding: 12px 14px calc(90px + env(safe-area-inset-bottom)) !important; overflow-x: hidden; }
.sbar, .wtools, .tt-bar { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; } .sbar .sep { display: none; } .sbar .sg { display: contents; }      /* (.sgrid - the three boxes of a server window - is one column, see above: it was squeezed to two) */
.si.so { grid-template-columns: auto minmax(0, 1fr) !important; column-gap: 12px; }      /* a row with a switch: the column is as wide as the switch */
#ask .overlay { padding: 16px !important; align-items: center !important; } .ask-box { width: 100% !important; }
.ue-facts { grid-template-columns: 1fr 1fr !important; } .tt-log, .gl-out, pre, .fix { max-height: 240px; white-space: pre-wrap !important; word-break: break-word; overflow-x: hidden !important; }
.toast, #toasts { left: 12px !important; right: 12px !important; bottom: calc(76px + env(safe-area-inset-bottom)) !important; max-width: none !important; }
.login-box { width: calc(100% - 24px) !important; margin: 12px !important; }

/* the hidden things stay hidden (the rules above set display on bars that may carry .hidden) */
html body .hidden, html body [hidden] { display: none !important; }
.dash-top { display: grid !important; grid-template-columns: 1fr; gap: 10px; margin: 0 0 12px; } .dsearch { width: 100% !important; }
.dash-kpis { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; width: 100%; } .dash-kpis > * { width: 100% !important; min-width: 0; }
.sep, i.sep { display: none !important; }
.searchbar, .tb-search, .dsearch { border: 0 !important; padding: 0 !important; background: none !important; width: 100% !important; } .searchbar input, .tb-search input { width: 100% !important; }


/* settings on the phone: one column, rows stay rows */
#page .set-wrap { grid-template-columns: 1fr !important; } #page .set-wrap > .card.sf { padding: 12px !important; border-radius: 18px !important; }
.sg, .sg.one { columns: 1 !important; } .ss { margin: 0 0 10px !important; } .ss-rows { display: block !important; }
.sr { display: flex !important; flex-direction: row !important; align-items: center !important; min-height: 46px; padding: 6px 12px !important; } .sr > .v { flex: 0 1 50% !important; } .sr > .v input:not([type=checkbox]), .sr > .v select { height: 38px !important; font-size: 16px !important; }
.sr.x { display: block !important; } .ss-a { display: flex !important; flex-wrap: wrap; justify-content: flex-end !important; } .ss-a button { flex: 0 1 auto; height: 36px; }
.ss-hero { flex-wrap: wrap; } .ss-hr { width: 100%; justify-content: flex-end; } .ss-hero .sec-seg { width: auto; }
.sf .theme-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } .sf .eff-grid { grid-template-columns: 1fr 1fr !important; }
.sf .ss, .sf .ss-hero, .sf .ss.x { width: 100% !important; }
input[type=checkbox].sw { width: 44px !important; height: 26px !important; min-width: 44px !important; } input[type=checkbox].sw::after { width: 22px !important; height: 22px !important; } input[type=checkbox].sw:checked::after { transform: translateX(18px) !important; } .si { grid-template-columns: 30px 1fr !important; width: 100% !important; } .si-a { grid-column: 1 / -1; flex-wrap: wrap; }
.sl { display: block !important; width: 100% !important; } .si { display: grid !important; grid-template-columns: 30px 1fr !important; gap: 4px 10px; padding: 8px 0 !important; border-top: 1px solid var(--line); } .si > * { padding: 0 !important; }
.si-a button, .si-a a.btn { min-width: 0; flex: 1 1 auto; } .si-f { width: 100% !important; max-width: none !important; } .ss-hero { width: 100% !important; }
.si-c { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; } .si-c .si-f { flex: 1 1 100%; } form.sl { display: block !important; }
.pwf-f .si-f { width: 100% !important; font-size: 16px !important; height: 44px !important; }
input[type=checkbox].sw { width: 46px !important; height: 28px !important; min-width: 46px !important; background-size: 24px 24px !important; } .si-r .si-f { width: 100% !important; } .si-r { flex-wrap: wrap; }
input[type=checkbox].sw { background-size: 20px 20px !important; background-position: 4px 50% !important; } input[type=checkbox].sw:checked { background-position: calc(100% - 4px) 50% !important; }
.pwf-f .pwi, .pwf-f .pwi .si-f { width: 100% !important; } .pwi .eye { height: 32px; width: 36px; }
input[type=checkbox].sw { width: 52px !important; height: 32px !important; min-width: 52px !important; } input[type=checkbox].sw::before { top: 6px; bottom: 6px; } input[type=checkbox].sw::after { width: 30px !important; height: 30px !important; } input[type=checkbox].sw:checked::after { transform: translateX(22px) !important; }
input[type=checkbox].sw { width: 52px !important; height: 32px !important; min-width: 52px !important; } input[type=checkbox].sw::before { top: 0 !important; bottom: 0 !important; } input[type=checkbox].sw::after { top: 2px !important; left: 2px !important; width: 28px !important; height: 28px !important; } input[type=checkbox].sw:checked::after { transform: translateX(20px) !important; }
input[type=checkbox].sw { min-height: 32px !important; }
input[type=checkbox].sw { width: 62px !important; min-width: 62px !important; height: 28px !important; min-height: 28px !important; } input[type=checkbox].sw::after { width: 26px !important; height: 24px !important; } input[type=checkbox].sw:checked::after { transform: translateX(32px) !important; }

/* ======================================================================================================================================================
   The fluid phone layer (what replaces the cards and the wrapping bars of mobile.css; the bars, tabs and tables themselves are in fluid.css and fluid.js) */
/* a row of the settings that holds an input and buttons: the input takes the line, the buttons go under it - nothing is wider than the screen */
.si-r > .si-a { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
.si, .si.chev { grid-template-columns: 30px minmax(0, 1fr) !important; }
/* tables: rows stay rows, the cells shrink and cut their text; the header is one small line */
.tbl th { font-size: 10px; letter-spacing: .3px; padding: 6px 4px; }
.tbl td { font-size: 12.5px; padding: 6px 4px; }
.tbl td.name, .tbl td:first-child { padding-left: 6px; }
.tbl tbody tr { height: 46px; }
.lbox, .lbox.full { margin: 0 0 12px; }
/* touch: the small buttons of bars, tabs and rows get a hand-sized target without growing what is drawn */
.tabs button, .toolbar button, .toolbar a.btn, .sb-r1 button, .sb-r1 a.btn, .dns-r button { min-height: 36px; }
.page button.sm:not(.row-x), .page select.sm, .modal-body button.sm:not(.row-x) { min-height: 34px; }
.act-cats { flex-wrap: nowrap !important; overflow-x: auto !important; scrollbar-width: none; gap: 6px; } .act-cats > button { flex: none; min-height: 32px; }
.row-x, .dns-x { position: relative; }
.row-x::after, .dns-x::after { content: ""; position: absolute; inset: -9px; }
