/* Atlayo Organisation */
:root {
    --accent: #7b93ff;
    --accent-ink: #0c1233;
    --danger: #e5484d;
    --good: #30a46c;
    --side-w: 292px;
    --rail-w: 60px;
    --radius: 16px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --text: #f3f3f4; --muted: #9b9ba3;
    --panel: #1f1f21; --panel-2: #2a2a2d; --panel-3: #36363a;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .17);
    --hover: rgba(255, 255, 255, .07); --active: rgba(255, 255, 255, .14);
    --field: #17171a; --pop: #2b2b2f;
    --side-text: #f3f3f4; --side-muted: rgba(255, 255, 255, .62);
    --glass: rgba(255, 255, 255, .13); --sel: rgba(123, 147, 255, .13);
    --shadow: 0 14px 44px rgba(0, 0, 0, .55);
    --wall: radial-gradient(120% 72% at 50% -14%, #3552d8 0%, rgba(40, 58, 150, .7) 26%, rgba(20, 24, 48, 0) 62%), linear-gradient(180deg, #111a3a 0%, #12162a 40%, #101014 100%);
}
:root[data-theme="light"] {
    color-scheme: light;
    --text: #1f2023; --muted: #6c7078;
    --panel: #ffffff; --panel-2: #f3f4f6; --panel-3: #e8eaee;
    --line: rgba(0, 0, 0, .08); --line-2: rgba(0, 0, 0, .17);
    --hover: rgba(0, 0, 0, .05); --active: rgba(0, 0, 0, .09);
    --field: #ffffff; --pop: #ffffff;
    --side-text: #1f2023; --side-muted: #6c7078;
    --glass: rgba(255, 255, 255, .78); --sel: rgba(123, 147, 255, .3);
    --shadow: 0 14px 40px rgba(20, 20, 30, .18);
    --wall: radial-gradient(110% 60% at 50% -14%, #d6e0ff 0%, rgba(228, 235, 255, .6) 30%, rgba(240, 241, 244, 0) 62%), linear-gradient(180deg, #e8edfb 0%, #f1f2f5 40%, #eceef2 100%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0; font: 14px/1.4 var(--font); color: var(--text);
    background: var(--wall) fixed, #101014;
    -webkit-font-smoothing: antialiased; overflow: hidden;
    scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden, [hidden] { display: none !important; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.only-mobile { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-s { width: 16px; height: 16px; }
.ic-xs { width: 14px; height: 14px; }
.ic-app { width: 38px; height: 38px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-right: 6px; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner-s { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { position: fixed; inset: 0; display: grid; place-items: center; z-index: 500; }
.boot-error { text-align: center; max-width: 360px; display: grid; gap: 12px; }

/* ------------------------------------------------------------ buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, opacity .15s; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:not(:disabled):hover { filter: brightness(.96); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:not(:disabled):hover { background: var(--hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-link { background: none; color: var(--muted); height: auto; padding: 6px 4px; font-weight: 500; text-decoration: underline; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn.danger, .danger { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: inherit; text-decoration: none; }
.icon-btn:hover { background: var(--hover); }
.icon-btn.is-open { background: var(--active); }

.input { width: 100%; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123, 147, 255, .22); }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; }
select.input { appearance: auto; }
.field { display: grid; gap: 6px; margin-bottom: 12px; min-width: 0; }
.field > span { font-size: 12.5px; color: var(--muted); }
.field-row { display: flex; gap: 8px; }
.check { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.form-warn { color: #e8a317; font-size: 12.5px; margin: 4px 0 10px; }

/* checkbox (list rows + toolbar) */
.chk { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; cursor: pointer; flex: none; }
.chk input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.chk span { width: 18px; height: 18px; border-radius: 5px; border: 1.8px solid var(--line-2); transition: .12s; background: transparent; }
.chk:hover span { border-color: var(--muted); }
.chk input:checked + span, .chk input:indeterminate + span { background: var(--accent); border-color: var(--accent); }
.chk input:checked + span::after { content: ""; display: block; width: 4px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: translate(4.5px, 0.5px) rotate(45deg); }
.chk input:indeterminate + span::after { content: ""; display: block; width: 8px; height: 2px; background: var(--accent-ink); margin: 7px 3px; }

/* ------------------------------------------------------------ avatars */
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 600; font-size: 13px; flex: none; text-transform: uppercase; }
.avatar-m { width: 30px; height: 30px; }
.avatar-l { width: 42px; height: 42px; font-size: 17px; }
.avatar-s { width: 26px; height: 26px; font-size: 12px; }
.avatar-xs { width: 18px; height: 18px; font-size: 10px; }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--glass); background: var(--panel-3); color: var(--text); font-weight: 700; display: grid; place-items: center; overflow: hidden; padding: 0; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------ app layout */
.app { display: grid; grid-template-columns: var(--rail-w) var(--side-w) minmax(0, 1fr); height: 100vh; height: 100dvh; position: relative; }
/* left rail with the Atlayo services (same as the other services) */
.rail { display: flex; flex-direction: column; align-items: center; padding: 14px 0 12px; min-height: 0; color: var(--side-text); }
.rail-logo { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; }
.rail-logo img { width: 26px; height: 28px; }
.rail-services { display: flex; flex-direction: column; gap: 4px; align-items: center; overflow-y: auto; min-height: 0; scrollbar-width: none; }
.rail-services::-webkit-scrollbar { display: none; }
.rail-item { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--side-muted); text-decoration: none; transition: background .15s, color .15s; flex: none; }
.rail-item svg { width: 28px; height: 28px; }
.rail-item:hover { background: var(--hover); color: var(--side-text); }
.rail-item.active { background: var(--glass); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.rail-item .tip { position: absolute; left: 48px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: #2a2c31; color: #fff; font-size: 12px; padding: 4px 9px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 80; }
.rail-item:hover .tip { opacity: 1; }
.rail-bottom { margin-top: auto; padding-top: 8px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail-avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; padding: 0; overflow: hidden; display: grid; place-items: center; background: #dfe6ff; font-size: 13px; font-weight: 600; color: #1d2a6b; }
.rail-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rail-avatar.is-open { outline: 2px solid var(--accent); }

.side { display: flex; flex-direction: column; padding: 20px 14px 14px 16px; overflow-y: auto; color: var(--side-text); min-height: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 14px; }
.side-title { font-size: 25px; font-weight: 700; letter-spacing: -.3px; }
.side-compose { display: flex; gap: 8px; margin-bottom: 10px; }
.compose-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 23px; border: 0; background: #fff; color: #1d1a1c; font-weight: 700; font-size: 15px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
:root[data-theme="light"] .compose-btn { background: var(--accent); }
.compose-btn:hover { filter: brightness(.96); }
.sq-btn { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--glass); color: var(--side-text); display: grid; place-items: center; backdrop-filter: blur(8px); }
.sq-btn:hover { background: var(--active); }
.spinning .ic { animation: spin .8s linear infinite; }

.acct-switch { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; color: var(--side-muted); padding: 6px 10px; border-radius: 10px; font-size: 12.5px; margin-bottom: 8px; text-align: left; }
.acct-switch:hover, .acct-switch.is-open { background: var(--hover); color: var(--side-text); }
.acct-switch-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.acct-switch-mail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-switch.has-error .acct-switch-mail { color: var(--danger); }

.nav { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.nav-item, .nav-group-title { position: relative; display: flex; align-items: center; gap: 12px; height: 37px; padding: 0 12px; border-radius: 11px; color: var(--side-text); text-decoration: none; border: 0; background: transparent; width: 100%; text-align: left; font-size: 14.5px; }
.nav-item:hover, .nav-group-title:hover { background: var(--hover); }
.nav-item.active { background: var(--active); font-weight: 600; }
.nav-ic { display: inline-grid; place-items: center; color: var(--side-muted); }
.nav-item.active .nav-ic { color: var(--side-text); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 12.5px; color: var(--side-muted); white-space: nowrap; display: flex; align-items: center; }
.nav-count.has-unread { color: var(--side-text); }
.nav-count .dot { margin-right: 5px; }
.nav-count .sl { opacity: .5; margin: 0 3px; }
.nav-kebab { display: none; width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: var(--side-muted); place-items: center; padding: 0; }
.nav-kebab:hover { background: var(--active); color: var(--side-text); }
.nav-item:hover .nav-kebab { display: grid; }
.nav-item:has(.nav-kebab):hover .nav-count { display: none; }
.nav-group { position: relative; margin-top: 2px; }
.nav-group-title .nav-chev { margin-left: auto; transition: transform .15s; margin-right: 34px; }
.nav-group-title.collapsed .nav-chev { transform: rotate(-90deg); }
.nav-plus { position: absolute; right: 6px; top: 5px; width: 27px; height: 27px; border-radius: 8px; border: 0; background: transparent; color: var(--side-muted); display: grid; place-items: center; }
.nav-plus:hover { background: var(--active); color: var(--side-text); }
.nav-sub.d1 { padding-left: 30px; } .nav-sub.d2 { padding-left: 48px; } .nav-sub.d3 { padding-left: 66px; } .nav-sub.d4 { padding-left: 84px; }
.nav-sub { font-size: 14px; }
.nav-empty { padding: 4px 14px 6px 46px; font-size: 12.5px; color: var(--side-muted); }
.nav-labels { margin-top: 2px; }

.side-pills { display: flex; gap: 8px; margin: 10px 0 12px; }
.pill { height: 44px; min-width: 50px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--glass); color: var(--side-text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; backdrop-filter: blur(8px); }
.pill:hover { background: var(--active); }
.pill.active { outline: 2px solid var(--accent); }
.pill.empty .dot { background: var(--side-muted); }

.side-backdrop { display: none; }
.side-foot { margin-top: auto; padding: 18px 10px 4px; font-size: 12.5px; color: var(--side-muted); display: grid; gap: 8px; }
.side-foot a { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.side-foot a:hover, .linklike:hover { color: var(--side-text); }
.side-foot-line { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.linklike { border: 0; background: none; padding: 0; color: inherit; font-size: inherit; text-decoration: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; margin: 12px 14px 14px 0; background: var(--panel); border-radius: var(--radius); overflow: hidden; position: relative; box-shadow: 0 1px 0 var(--line) inset; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; flex: none; }
.search { flex: 1; max-width: 900px; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; border-radius: 21px; background: var(--panel-2); color: var(--text); border: 1px solid transparent; }
.search:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 3px rgba(123, 147, 255, .16); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { border: 0; background: transparent; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; padding: 0; }
.search-clear:hover { background: var(--hover); }
.topbar .icon-btn { color: var(--text); width: 38px; height: 38px; }
.topbar .grow { flex: 1; }
.topbar .rail-avatar { margin-left: auto; }

.panel { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.toolbar { display: flex; align-items: center; gap: 2px; padding: 8px 12px; min-height: 52px; overflow-x: auto; flex: none; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }
.tb { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 11px; border-radius: 10px; border: 0; background: transparent; color: var(--text); white-space: nowrap; font-size: 13.5px; flex: none; }
.tb:hover:not(:disabled), .tb.is-open { background: var(--hover); }
.tb:disabled { opacity: .38; cursor: default; }
.tb .ic { width: 19px; height: 19px; color: var(--text); opacity: .85; }
.tb .tb-caret { width: 12px; height: 12px; margin-left: -2px; opacity: .6; }
.tb-chk { margin: 0 10px 0 6px; }
.tb-more, .tb-back { padding: 0 9px; }
.tb-back { margin-right: 4px; }

.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.pane-read { overflow-y: auto; padding: 4px 12px 12px; display: block; }
.subs-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 0; padding: 10px 16px; border-radius: 0; background: transparent; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); flex: none; }
.subs-bar.plain { padding: 8px 14px; }
.subs-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); flex: none; }
.subs-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.s-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.s-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 4px; border-radius: 13px; background: var(--hover); font-size: 13px; max-width: 200px; }
.s-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-more { color: var(--muted); font-size: 13px; }
.btn-sort { background: var(--panel-3); color: var(--text); height: 36px; }
.btn-sort:hover { background: var(--active); }

/* ------------------------------------------------------------ popovers, menus, modal, toast */
.popover { position: fixed; z-index: 300; background: var(--pop); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; overflow: auto; }
.menu { min-width: 230px; }
.menu-scroll { max-height: 380px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; text-align: left; font-size: 14px; color: inherit; }
.menu-item:hover:not(:disabled) { background: var(--hover); }
.menu-item:disabled { opacity: .45; }
.menu-item.danger { color: var(--danger); }
.menu-item .ic { width: 18px; height: 18px; opacity: .8; }
.menu-ic-gap { width: 18px; flex: none; }
.menu-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 0 4px; }
.menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-hint { color: var(--muted); font-size: 12.5px; margin-left: 12px; }
.menu-check { color: var(--accent); opacity: 1 !important; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-title { padding: 8px 12px; color: var(--muted); font-size: 12.5px; }
.user-menu .um-head { display: grid; padding: 10px 12px 12px; }
.swatches { display: grid; grid-template-columns: repeat(8, 26px); gap: 6px; padding: 10px; min-width: 0; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); padding: 0; }
.emoji-grid { display: grid; grid-template-columns: repeat(10, 34px); padding: 8px; min-width: 0; }
.emoji { width: 34px; height: 34px; border: 0; background: transparent; font-size: 20px; border-radius: 8px; padding: 0; }
.emoji:hover { background: var(--hover); }

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 100; padding: 16px; overflow-y: auto; }
.modal { background: var(--panel); color: var(--text); width: min(500px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.modal-wide { width: min(660px, 100%); }
.modal-small { width: min(420px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px 24px; flex: none; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 12px 24px 8px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; flex: none; }
.modal-foot:empty { display: none; }
.modal-text { line-height: 1.5; color: var(--muted); margin-bottom: 14px; }
.modal-loading { display: grid; place-items: center; padding: 40px; }
.lightbox .modal-body { display: grid; place-items: center; background: var(--panel-2); margin: 0 16px; border-radius: 12px; padding: 8px; }
.lightbox img { max-width: 100%; max-height: 66vh; border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 400; display: flex; align-items: center; gap: 16px; max-width: min(560px, calc(100vw - 24px)); padding: 12px 18px; border-radius: 14px; background: #2d2d31; color: #fff; box-shadow: var(--shadow); font-size: 14px; }
:root[data-theme="light"] .toast { background: #26262a; }
.toast.is-error { background: #7a1f24; }
.toast-act { border: 0; background: transparent; color: var(--accent); font-weight: 700; padding: 2px 4px; }
body.compose-open .toast { bottom: 90px; }

/* ------------------------------------------------------------ login (same look as the other Atlayo services) */
.login {
    --text: #1f2023; --muted: #5d6168; --panel: #ffffff; --panel-2: #f4f5f7; --panel-3: #e8eaee;
    --line: #e7e9ed; --line-2: #dcdfe4; --hover: #f0f1f4; --field: #ffffff; --shadow: 0 12px 40px rgba(20, 24, 31, .16);
    --ink-3: #9a9ea6; --link: #1a6dd8; --accent-hover: #6a83f5;
    color: var(--text); color-scheme: light;
    position: fixed; inset: 0; z-index: 450; overflow-y: auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px;
    background: radial-gradient(900px 500px at 80% -10%, #dbe4ff 0%, transparent 60%), #eceef1;
}
.login .btn { height: 36px; border-radius: 10px; font-weight: 500; }
.login .btn-primary:not(:disabled):hover { background: var(--accent-hover); filter: none; }
.login .btn-link { color: var(--muted); padding: 8px; text-decoration: none; }
.login .btn-link:hover { color: var(--text); text-decoration: underline; }
.login .input:focus { border-color: #c9ccd2; box-shadow: 0 0 0 3px rgba(123, 147, 255, .45); }
.login .spinner { border-color: rgba(0, 0, 0, .08); border-top-color: var(--muted); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 20px; padding: 32px 28px 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, .06); text-align: center; }
.login-brand h1 { margin: 12px 0 4px; font-size: 22px; font-weight: 650; }
.login-brand p { margin: 0 0 22px; }
.login-logo { width: 44px; height: 48px; }
.login-checking { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; }
.login-profile { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.login-avatar { width: 68px; height: 68px; border-radius: 50%; background: var(--accent); color: #1b1b1b; font-size: 26px; font-weight: 700; display: grid; place-items: center; margin-bottom: 6px; }
.login-profile-name { font-size: 17px; font-weight: 600; }
.login-profile-phone { margin-bottom: 16px; }
.login-tabs { display: flex; background: var(--panel-2); border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.login-tab { flex: 1; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-weight: 500; }
.login-tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.login-panel { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.login-panel p { margin: 0; }
.login-panel[data-panel="phone"] { width: 100%; align-items: stretch; }
.phone-field { position: relative; display: flex; width: 100%; align-items: stretch; text-align: left; }
.phone-dial { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.phone-dial::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .55; }
.phone-flag { font-size: 18px; line-height: 1; }
.phone-code { font-variant-numeric: tabular-nums; }
.phone-field > .input { border-radius: 0 10px 10px 0; border-color: var(--line); text-align: left; }
.phone-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 30; overflow: hidden; }
.phone-search { flex: 0 0 auto; width: calc(100% - 16px); margin: 8px; height: 40px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 14px; background: #fff; color: var(--text); outline: none; }
.phone-search::-webkit-search-decoration, .phone-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.phone-menu-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding-bottom: 6px; }
.phone-option { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 12px; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.phone-option .name { flex: 1; }
.phone-option .dial { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.phone-option:hover, .phone-option.active { background: var(--hover); }
.phone-wait { padding: 12px 14px; border-radius: 12px; background: #e8edff; border: 1px solid #b9c7ff; color: #1b1b1b; font-size: 14.5px; font-weight: 650; line-height: 1.35; }
.login-as { align-self: stretch; width: 100%; height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: #1b1b1b; font-size: 14px; font-weight: 500; cursor: pointer; }
.login-as:hover { background: var(--accent-hover); }
.qr-box { position: relative; width: 232px; height: 232px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.qr-box > #login-qr img, .qr-box > #login-qr canvas, .qr-box > #login-qr svg { width: 100% !important; height: auto !important; display: block; }
.qr-expired-hint { line-height: 1.45; }
.qr-box.is-expired { background: #f3f4f6; }
.qr-box.is-expired > #login-qr canvas, .qr-box.is-expired > #login-qr img, .qr-box.is-expired > #login-qr svg { filter: grayscale(1); opacity: .34; }
.qr-expired-overlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; padding: 18px; border: 0; border-radius: inherit; background: rgba(255, 255, 255, .92); color: inherit; cursor: pointer; }
.qr-expired-overlay[hidden] { display: none !important; }
.qr-expired-overlay:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.qr-expired-card { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qr-expired-title { color: rgba(0, 0, 0, .88); font-size: 14px; line-height: 1.45; text-align: center; }
.qr-expired-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; color: #1677ff; font-size: 14px; line-height: 1.45; }
.qr-expired-icon { display: inline-grid; place-items: center; width: 14px; height: 14px; }
.qr-expired-icon svg { width: 14px; height: 14px; display: block; transition: transform .3s ease; }
.qr-expired-overlay:hover .qr-expired-action { color: #4096ff; }
.qr-expired-overlay:hover .qr-expired-icon svg { transform: rotate(-180deg); }
.login-status { min-height: 0; margin: 14px 0 0; text-align: center; }
.login-status:empty { margin: 0; }
.login-error { margin: 10px 0 0; color: var(--danger); font-size: 13px; text-align: center; }
.login-foot { margin-top: 22px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.login-back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(20, 24, 31, .04); }
.login-back svg { width: 16px; height: 16px; color: var(--muted); fill: currentColor; }
.login-back:hover { background: #eceef1; }

/* ------------------------------------------------------------ motion (same easing/feel as the other Atlayo services) */
:root { --ease: cubic-bezier(.2, .8, .2, 1); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes row-out { to { opacity: 0; transform: translateX(-28px); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.97); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes compose-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rail-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* hover / press feedback */
.row, .nav-item, .nav-group-title, .acct-switch, .tb, .icon-btn, .pill, .sq-btn, .menu-item, .nav-kebab, .nav-plus,
.search, .star, .s-chip, .label-chip, .btn, .compose-btn, .rail-item, .rail-avatar, .phone-dial, .phone-option, .login-tab, .login-back, .login-as, .ra {
    transition: background-color .14s ease, color .14s ease, border-color .14s ease, box-shadow .14s ease, opacity .14s ease, transform .1s ease, filter .14s ease;
}
.btn:not(:disabled):active, .compose-btn:active, .sq-btn:active, .pill:active, .tb:not(:disabled):active, .icon-btn:active, .login-as:active, .star:active { transform: scale(.95); }
.rail-item:active, .rail-avatar:active { transform: scale(.92); }
.chk span { transition: background-color .12s ease, border-color .12s ease; }
.chk input:checked + span::after { animation: zoom-in .16s var(--ease); }
.star.on .ic { animation: zoom-in .2s var(--ease); }
.nav-group-title .nav-chev { transition: transform .18s var(--ease); }
.read-card .star-btn { transition: background-color .14s ease, transform .1s ease; }

/* things appearing */
.popover:not(.hidden), .phone-menu:not(.hidden) { animation: pop-in .14s var(--ease); transform-origin: top left; }
.modal-back { animation: fade-in .18s ease; }
.modal { animation: zoom-in .22s var(--ease); }
.toast:not(.hidden) { animation: toast-in .24s var(--ease); }
.compose { animation: compose-in .26s var(--ease); }
.pane-read:not(.hidden) { animation: rise-in .24s var(--ease); }
.list > .row-in { animation: row-in .26s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 18ms); }
.list > .row-out { animation: row-out .18s ease forwards; pointer-events: none; }
.subs-bar:not(.hidden), .banner { animation: fade-in .22s ease; }
.list-state:not(.hidden) .list-state-inner { animation: rise-in .26s var(--ease); }
.boot { transition: opacity .2s ease; }
.login:not(.hidden) .login-card { animation: rise-in .4s var(--ease); }
.login:not(.hidden) .login-foot { animation: fade-in .5s ease .12s backwards; }
.login-profile:not([hidden]), #login-methods:not([hidden]) { animation: fade-in .28s ease; }
.login-panel:not(.hidden) { animation: fade-in .22s ease; }
.qr-expired-overlay:not([hidden]) { animation: fade-in .2s ease; }
.app:not(.hidden) { animation: fade-in .32s ease; }
.rail-item { animation: rail-in .34s var(--ease) backwards; }
.rail-item:nth-child(1) { animation-delay: .02s; } .rail-item:nth-child(2) { animation-delay: .05s; } .rail-item:nth-child(3) { animation-delay: .08s; }
.rail-item:nth-child(4) { animation-delay: .11s; } .rail-item:nth-child(5) { animation-delay: .14s; } .rail-item:nth-child(6) { animation-delay: .17s; }
.rail-item:nth-child(7) { animation-delay: .2s; } .rail-item:nth-child(8) { animation-delay: .23s; } .rail-item:nth-child(9) { animation-delay: .26s; }

/* smooth light/dark switch (class is set only while switching) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
    transition: background-color .28s ease, color .28s ease, border-color .28s ease, fill .28s ease, box-shadow .28s ease !important;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ organisation pages */
.main { margin-top: 12px; }
.topbar { min-height: 56px; }
.top-title { font-size: 17px; font-weight: 650; letter-spacing: -.2px; display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.top-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { flex: 1; min-height: 0; overflow-y: auto; padding: 0 28px 40px; }
.page-inner { max-width: 1120px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 12px 0 18px; }
.page-head h2 { font-size: 26px; letter-spacing: -.4px; }
.page-head .sub { color: var(--muted); margin-top: 3px; max-width: 640px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section { margin: 26px 0 0; }
.section > h3 { font-size: 15px; font-weight: 650; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.section > h3 .sp { flex: 1; }

.card { background: var(--panel-2); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.card + .card { margin-top: 12px; }
.card-title { font-size: 14px; font-weight: 650; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card-title .sp { flex: 1; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cols2 > .card + .card { margin-top: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.kpi { background: var(--panel-2); border-radius: 16px; padding: 16px 18px; display: grid; gap: 4px; min-width: 0; text-align: left; border: 0; color: inherit; }
button.kpi { cursor: pointer; }
button.kpi:hover { background: var(--panel-3); }
.kpi .lbl { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 27px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; }
.kpi .hint { color: var(--muted); font-size: 12.5px; }
.kpi.is-bad .val { color: var(--danger); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--hover); color: var(--text); white-space: nowrap; }
.badge.good { background: rgba(48, 164, 108, .16); color: #1f8a57; }
:root[data-theme="dark"] .badge.good { color: #5bd39a; }
.badge.warn { background: rgba(232, 163, 23, .18); color: #b57800; }
:root[data-theme="dark"] .badge.warn { color: #f3bd4a; }
.badge.bad { background: rgba(229, 72, 77, .15); color: #cf2f35; }
:root[data-theme="dark"] .badge.bad { color: #ff7b80; }
.badge.info { background: rgba(123, 147, 255, .2); color: #3b57d6; }
:root[data-theme="dark"] .badge.info { color: #a6b6ff; }
.badge.paid { background: var(--accent); color: var(--accent-ink); }
.gchip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 12px; background: var(--hover); font-size: 12.5px; max-width: 150px; }
.gchip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.alerts { display: grid; gap: 8px; margin: 0 0 16px; }
.alert { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: var(--panel-2); font-size: 14px; border-left: 4px solid var(--accent); }
.alert > span { flex: 1; min-width: 220px; line-height: 1.4; }
.alert.warn { border-color: #e8a317; background: rgba(232, 163, 23, .12); }
.alert.bad { border-color: var(--danger); background: rgba(229, 72, 77, .1); }
.alert.good { border-color: var(--good); background: rgba(48, 164, 108, .1); }

.seg { display: inline-flex; background: var(--panel-2); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
:root[data-theme="dark"] .seg button.on { background: var(--panel-3); }
.seg .cnt { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.seg.sm button { height: 28px; padding: 0 11px; font-size: 12.5px; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 12px; background: var(--panel-3); transition: background .18s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s var(--ease); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:disabled { cursor: default; }
.switch input:disabled + i { opacity: .5; }

.meter { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .4s var(--ease); }
.meter.hot > i { background: var(--danger); }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty h3 { color: var(--text); font-size: 17px; }
.empty .ic-big { width: 44px; height: 44px; opacity: .55; }

/* employees */
.toolrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.toolrow .grow { flex: 1; }
.search-in { position: relative; min-width: 220px; flex: 0 1 320px; }
.search-in .input { padding-left: 38px; height: 38px; border-radius: 19px; background: var(--panel-2); border-color: transparent; }
.search-in .ic { position: absolute; left: 12px; top: 9px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.sel-in { height: 38px; border-radius: 19px; background: var(--panel-2); border-color: transparent; width: auto; padding: 0 14px; }
.bulkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 12px; border-radius: 14px; background: var(--sel); animation: rise-in .2s var(--ease); }
.bulkbar .grow { flex: 1; font-weight: 600; }

.list-t { display: grid; }
.trow { display: grid; grid-template-columns: 28px minmax(190px, 1.5fr) 92px 140px 110px minmax(150px, 1.1fr) 40px; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); min-height: 58px; }
.trow.head { min-height: 36px; padding: 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.trow:not(.head):hover { background: var(--hover); }
.trow.is-sel { background: var(--sel); }
.trow .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trow .who .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .who .ph { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.trow .who > div { min-width: 0; }
.trow .svs { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.trow .svs .meter { width: 100%; max-width: 150px; margin-top: 4px; }
.trow .svs > div { display: grid; gap: 2px; width: 100%; }
.trow-in { animation: row-in .24s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 14ms); }
.me-tag { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 6px; }

.card-list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 14px; background: var(--panel-2); border-radius: 14px; padding: 12px 16px; min-width: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--muted); font-size: 12.5px; }

/* picker (add employees) */
.pick-tabs { margin-bottom: 12px; }
.pick-list { max-height: 330px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover:not(.is-off) { background: var(--hover); }
.pick-row.is-off { opacity: .55; cursor: default; }
.pick-row .grow { flex: 1; min-width: 0; }
.pick-row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .s { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pick-foot-note { color: var(--muted); font-size: 12.5px; margin-top: 10px; line-height: 1.5; }
.result-list { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.result-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); }
.result-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* services & policies */
.svc-list { display: grid; gap: 10px; }
.svc { display: grid; grid-template-columns: 44px minmax(160px, 1fr) auto minmax(190px, 240px); gap: 14px; align-items: center; background: var(--panel-2); border-radius: 16px; padding: 14px 18px; }
.svc.is-blocked { opacity: .78; }
.svc-ic { width: 44px; height: 44px; display: grid; place-items: center; }
.svc-ic svg { width: 40px; height: 40px; }
.svc .nm { font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.svc .ds { color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.svc .src { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.svc .plan .input { height: 38px; }
.svc .plan .price { font-size: 12px; color: var(--muted); margin-top: 4px; }
.scope-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.scope-bar .seg button { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tri { display: inline-flex; background: var(--panel-3); border-radius: 10px; padding: 2px; }
.tri button { height: 28px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tri button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
:root[data-theme="dark"] .tri button.on { background: var(--panel-2); }
.tri button.on.allow { color: #1f8a57; }
.tri button.on.block { color: var(--danger); }
.cost-line { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.cost-line b { color: var(--text); font-size: 15px; }

/* billing */
.balance { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.balance .amount { font-size: 38px; font-weight: 750; letter-spacing: -1px; line-height: 1.1; }
.balance .amount.neg { color: var(--danger); }
.topup-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.topup-row .input { width: 130px; height: 38px; }
.btn-amt { height: 38px; padding: 0 16px; border-radius: 19px; border: 1px solid var(--line-2); background: transparent; font-weight: 600; }
.btn-amt:hover { background: var(--hover); }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 96px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-row .meter { height: 8px; }
.bar-row .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .nm small { color: var(--muted); }
.ledger-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px 120px; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ledger-row .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ledger-row .amt.pos { color: #1f8a57; }
:root[data-theme="dark"] .ledger-row .amt.pos { color: #5bd39a; }
.ledger-row .bal { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.ledger-row .dt { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.hint-box { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.tag-test { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #fff0c2; color: #6b5200; font-weight: 700; }

/* activity */
.act { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.act:last-child { border-bottom: 0; }
.act .ai { width: 32px; height: 32px; border-radius: 50%; background: var(--hover); display: grid; place-items: center; color: var(--muted); }
.act .ai .ic { width: 17px; height: 17px; }
.act .tx { min-width: 0; line-height: 1.35; }
.act .tx b { font-weight: 650; }
.act time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* my organisation (employee view) */
.my-hero { display: flex; gap: 18px; align-items: center; padding: 22px 24px; background: var(--panel-2); border-radius: 20px; flex-wrap: wrap; }
.my-hero .org-av { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }
.org-av { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px; flex: none; text-transform: uppercase; }
.my-hero h2 { font-size: 22px; }
.invite-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 20px; border-radius: 16px; background: var(--sel); margin-bottom: 12px; animation: rise-in .25s var(--ease); }
.invite-card .grow { flex: 1; min-width: 220px; }
.invite-card .t { font-weight: 650; font-size: 15.5px; }
.invite-card .s { color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.consent { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 8px; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.preset { text-align: left; background: var(--panel-2); border: 2px solid transparent; border-radius: 14px; padding: 12px 14px; color: inherit; display: grid; gap: 3px; }
.preset.on { border-color: var(--accent); background: var(--sel); }
.preset b { font-size: 14.5px; }
.preset span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.danger-zone { border: 1px solid rgba(229, 72, 77, .4); border-radius: 16px; padding: 16px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.danger-zone .grow { flex: 1; min-width: 220px; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.org-switch { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: var(--glass); color: var(--side-text); padding: 8px 10px; border-radius: 14px; text-align: left; margin-bottom: 12px; backdrop-filter: blur(8px); }
.org-switch:hover, .org-switch.is-open { background: var(--active); }
.org-switch .meta { flex: 1; min-width: 0; display: grid; }
.org-switch .meta b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-switch .meta small { color: var(--side-muted); font-size: 12px; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.side-note { margin: 4px 10px 8px; font-size: 12.5px; color: var(--side-muted); line-height: 1.45; }
.skeleton { height: 90px; border-radius: 16px; background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.page-in { animation: rise-in .26s var(--ease); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
    .cols2 { grid-template-columns: minmax(0, 1fr); }
    .trow { grid-template-columns: 28px minmax(170px, 1.4fr) 84px 120px 100px 40px; }
    .trow > .c-svc { display: none; }
    .svc { grid-template-columns: 44px minmax(140px, 1fr) auto; }
    .svc .plan { grid-column: 2 / -1; }
}
@media (max-width: 1000px) {
    .trow { grid-template-columns: 28px minmax(140px, 1fr) 84px 100px 40px; }
    .trow > .c-group { display: none; }
}
@media (max-width: 820px) {
    .only-mobile { display: inline-grid !important; }
    .app { grid-template-columns: minmax(0, 1fr); }
    .rail { display: none; }
    .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(310px, 86vw); z-index: 70; transform: translateX(-102%); transition: transform .22s ease; background: var(--wall) fixed, #101014; box-shadow: var(--shadow); }
    :root[data-theme="light"] .side { background: #eef0f6; }
    body.side-open .side { transform: none; }
    .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 65; opacity: 0; pointer-events: none; transition: opacity .2s; }
    body.side-open .side-backdrop { opacity: 1; pointer-events: auto; }
    .main { margin: 8px; border-radius: 14px; }
    .topbar { padding: 8px 10px 4px; gap: 6px; }
    .page { padding: 0 14px 32px; }
    .page-head h2 { font-size: 22px; }
    .trow { grid-template-columns: 26px minmax(0, 1fr) auto 36px; gap: 8px; }
    .trow > .c-role, .trow > .c-group { display: none; }
    .trow.head { display: none; }
    .svc { grid-template-columns: 40px minmax(0, 1fr); }
    .svc > :nth-child(3), .svc .plan { grid-column: 1 / -1; }
    .form-grid { grid-template-columns: 1fr; }
    .balance { grid-template-columns: minmax(0, 1fr); }
    .bar-row { grid-template-columns: minmax(90px, 130px) minmax(0, 1fr) 80px; }
    .ledger-row { grid-template-columns: 80px minmax(0, 1fr) 90px; }
    .ledger-row .bal { display: none; }
    .preset-grid { grid-template-columns: 1fr; }
    .kv { grid-template-columns: 110px minmax(0, 1fr); }
    .toast { bottom: 16px; }
    .modal-body { padding: 10px 18px 6px; } .modal-foot { padding: 12px 18px 16px; } .modal-head { padding-left: 18px; }
    .login-card { padding: 26px 20px 22px; }
}

.plain-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--panel-3); color: var(--text); flex: none; }
.plain-ic svg { width: 20px; height: 20px; }
