/* AHMATO LABS v4 - accounts: header avatar menu, login / profile pages. Mobile-first, light (cream/navy) + dark neon. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header account button + menu */
.v4-acct { position: relative; margin-inline-start: auto; flex: none; }
.v4-acct + .bell { margin-inline-start: 0; }
.v4-avbtn { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--raise-sm); color: var(--navy); cursor: pointer; text-decoration: none; }
.v4-avbtn svg { width: 22px; height: 22px; }
.v4-signin { width: auto; display: inline-flex; gap: 6px; padding: 0 12px; font-size: 13px; font-weight: 800; }
@media (max-width: 380px) { .v4-signin span { display: none; } .v4-signin { width: 42px; padding: 0; justify-content: center; } }
.v4-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: none; font: 800 14px var(--latin); color: #fff;
  background: linear-gradient(135deg, #1E1D1B, #12B39A); }
.v4-av.lg { width: 44px; height: 44px; font-size: 18px; }
.v4-av.xl { width: 64px; height: 64px; font-size: 26px; }
.v4-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; width: min(280px, calc(100vw - 32px)); padding: 8px; border-radius: 18px;
  background: var(--surface); box-shadow: 0 18px 40px rgba(30, 29, 27, .22); border: 1px solid rgba(255, 255, 255, .6); }
.v4-menu-who { display: flex; gap: 10px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid rgba(30, 29, 27, .1); margin-bottom: 6px; min-width: 0; }
.v4-menu-who > div { min-width: 0; }
.v4-menu-who b { display: block; color: var(--navy); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-menu-who small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-menu a, .v4-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px; border: 0; border-radius: 12px; background: none; color: var(--navy);
  font: 700 14px inherit; font-family: inherit; text-decoration: none; cursor: pointer; text-align: start; }
.v4-menu a:hover, .v4-menu button:hover, .v4-menu a:focus-visible, .v4-menu button:focus-visible { background: var(--bg); }
.v4-menu svg { width: 19px; height: 19px; color: var(--teal); flex: none; }
.v4-role { display: inline-block; margin: 4px 4px 0 0; padding: 1px 9px; border-radius: 999px; font: 800 11px var(--latin); background: var(--teal-soft); color: var(--navy); }
.v4-role.dev { background: #F2A33A; color: #1d1300; }
.v4-role.off { background: var(--down); color: #fff; }

/* pages */
.v4-page { margin-top: 18px; display: grid; gap: 14px; }
.v4-card { margin: 0; }
.v4-card h1 { display: flex; align-items: center; gap: 8px; font-size: 21px; color: var(--navy); margin: 0 0 6px; }
.v4-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--navy); margin: 0 0 12px; }
.v4-card h1 svg, .v4-card h2 svg { width: 22px; height: 22px; color: var(--teal); flex: none; }
.v4-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.v4-head .hint { margin: 0; }
.v4-ic { width: 52px; height: 52px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #1E1D1B, #12B39A); box-shadow: var(--raise-sm); }
.v4-ic svg { width: 28px; height: 28px; }
.v4-google { display: grid; justify-items: center; gap: 10px; padding: 8px 0 4px; }
.v4-gbtn { min-height: 44px; display: grid; place-items: center; }
.v4-gsoon { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 320px; min-height: 48px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(30, 29, 27, .18); background: var(--surface); color: var(--muted); font: 700 15px inherit; font-family: inherit; cursor: not-allowed; opacity: .85; }
.v4-gsoon svg { width: 20px; height: 20px; filter: grayscale(.35); }
.v4-msg { min-height: 1.2em; text-align: center; margin: 8px 0 0; }
.v4-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.v4-form { display: grid; gap: 10px; margin-top: 10px; }
.v4-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: var(--navy); }
.v4-form input { width: 100%; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--bg); box-shadow: var(--inset); color: var(--ink, var(--navy)); font: 15px var(--latin); }
.v4-form.inline { grid-template-columns: minmax(0, 1fr) auto; }
.v4-pw { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--bg); box-shadow: var(--inset); }
.v4-pw summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 800; color: var(--navy); font-size: 14px; }
.v4-pw summary svg { width: 18px; height: 18px; color: var(--teal); }
.v4-dev { margin-top: 16px; padding: 12px 14px; border-radius: 16px; border: 2px dashed #F2A33A; background: rgba(242, 163, 58, .08); }
.v4-dev-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--muted); }
.v4-dev-h svg { width: 18px; height: 18px; color: #D9822B; }
.v4-dev-h b { font: 900 12px var(--latin); letter-spacing: .08em; color: #1d1300; background: #F2A33A; padding: 2px 8px; border-radius: 6px; }
.v4-signed { display: flex; gap: 12px; align-items: center; min-width: 0; }
.v4-signed > div { min-width: 0; }
.v4-signed b, .v4-signed h1 { display: block; color: var(--navy); overflow-wrap: anywhere; margin: 0; }
.v4-signed small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.v4-signed.big h1 { font-size: 20px; }
.v4-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.v4-set { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(30, 29, 27, .08); }
.v4-set > div { min-width: 0; }
.v4-set b { display: block; color: var(--navy); font-size: 14.5px; }
.v4-set small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.v4-set.col { flex-direction: column; align-items: stretch; gap: 8px; }
.v4-seg { width: 100%; display: flex; }
.v4-seg button { flex: 1; }
.v4-switch { position: relative; flex: none; width: 52px; height: 30px; cursor: pointer; }
.v4-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.v4-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--bg); box-shadow: var(--inset); transition: background .2s; pointer-events: none; }
.v4-switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .2s; }
.v4-switch input:checked + span { background: var(--teal); }
html[dir="ltr"] .v4-switch input:checked + span::after { transform: translateX(22px); }
html[dir="rtl"] .v4-switch input:checked + span::after { transform: translateX(-22px); }
.v4-switch input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.v4-priv { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--r-md, 18px); font-size: 12.5px; line-height: 1.6; color: var(--muted); background: var(--surface); box-shadow: var(--raise-sm); }
.v4-priv svg { width: 18px; height: 18px; color: var(--teal); flex: none; margin-top: 2px; }
.site-footer .v4-priv { margin: 10px auto 0; max-width: 760px; box-shadow: none; background: none; padding: 4px 0; justify-content: center; }

.v3-stat small.hint { display: block; margin: 3px 0 0; font-size: 11px; }

/* dark neon */
html[data-theme="dark"] .v4-avbtn { background: #121517; color: #2EF2C2; box-shadow: 0 0 0 1px rgba(46, 242, 194, .25), 0 0 16px rgba(46, 242, 194, .14); }
html[data-theme="dark"] .v4-av { background: linear-gradient(135deg, #2EF2C2, #C9A86A); color: #090B0C; }
html[data-theme="dark"] .v4-menu { background: #121517; border-color: rgba(230, 211, 163, .18); box-shadow: 0 18px 44px rgba(0, 0, 0, .6), 0 0 0 1px rgba(46, 242, 194, .12); }
html[data-theme="dark"] .v4-menu-who { border-color: rgba(230, 211, 163, .14); }
html[data-theme="dark"] .v4-menu a, html[data-theme="dark"] .v4-menu button { color: #ECEAE5; }
html[data-theme="dark"] .v4-menu a:hover, html[data-theme="dark"] .v4-menu button:hover { background: rgba(46, 242, 194, .08); }
html[data-theme="dark"] .v4-menu svg, html[data-theme="dark"] .v4-card h1 svg, html[data-theme="dark"] .v4-card h2 svg, html[data-theme="dark"] .v4-priv svg { color: #2EF2C2; }
html[data-theme="dark"] .v4-role { background: rgba(46, 242, 194, .12); color: #BFF8E9; }
html[data-theme="dark"] .v4-role.dev { background: #F2A33A; color: #1d1300; }
html[data-theme="dark"] .v4-role.off { background: #FF8A65; color: #1a0610; }
html[data-theme="dark"] .v4-ic { background: linear-gradient(135deg, #0B8F7B, #A8864A); box-shadow: 0 0 22px rgba(46, 242, 194, .3); }
html[data-theme="dark"] .v4-gsoon { background: #0D1011; border-color: rgba(230, 211, 163, .2); color: #8E918F; }
html[data-theme="dark"] .v4-pw { background: rgba(9, 11, 12, .6); box-shadow: inset 0 0 0 1px rgba(230, 211, 163, .1); }
html[data-theme="dark"] .v4-form input { background: #090B0C; color: #ECEAE5; box-shadow: inset 0 0 0 1px rgba(230, 211, 163, .18); }
html[data-theme="dark"] .v4-dev { background: rgba(242, 163, 58, .07); }
html[data-theme="dark"] .v4-set { border-color: rgba(230, 211, 163, .1); }
html[data-theme="dark"] .v4-switch span { background: #090B0C; box-shadow: inset 0 0 0 1px rgba(230, 211, 163, .2); }
html[data-theme="dark"] .v4-switch input:checked + span { background: #2EF2C2; box-shadow: 0 0 14px rgba(46, 242, 194, .4); }
html[data-theme="dark"] .v4-priv { background: rgba(18, 21, 23, .8); box-shadow: inset 0 0 0 1px rgba(230, 211, 163, .1); }
html[data-theme="dark"] .site-footer .v4-priv { background: none; box-shadow: none; }
/* small screens: the menu is placed against the viewport (JS sets top), never wider than the screen */
@media (max-width: 640px) { .v4-menu { position: fixed; inset-inline: 12px; width: auto; max-width: none; } }
body:has(.v4-page) .site-footer .v4-priv { display: none; }
