/* ATO Portal Access — login tabs, app shell, profile & signature, roles. */

/* Login tabs */
.atosp-login-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin: -6px -4px 22px; background: #f1f4f3; border-radius: 12px; }
.atosp-login-tabs a { flex: 1 1 auto; text-align: center; padding: 9px 12px; border-radius: 9px; font-family: var(--p-head); font-weight: 700; font-size: .84rem; color: var(--p-muted) !important; white-space: nowrap; }
.atosp-login-tabs a:hover { color: var(--p-primary) !important; }
.atosp-login-tabs a.is-active { background: #fff; color: var(--p-primary) !important; box-shadow: 0 1px 3px rgba(1, 38, 27, .12); }
.atosp-login-card { max-width: 460px; }

/* Mailbox sign-in */
.atopx-steps { list-style: none; margin: 4px 0 18px; padding: 6px 16px; border: 1px solid var(--p-line); border-radius: 12px; background: #fafcfb; }
.atopx-steps li { display: flex; gap: 14px; align-items: center; padding: 10px 0; }
.atopx-steps li + li { border-top: 1px dashed var(--p-line); }
.atopx-steps strong { display: block; color: var(--p-ink); font-family: var(--p-head); font-size: .9rem; }
.atopx-steps small { display: block; color: var(--p-muted); font-size: .8rem; }
.atopx-step-ico { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--p-line); background: #fff; position: relative; }
.atopx-mail-login.is-busy .atopx-step-ico { border-color: var(--p-line); border-top-color: var(--p-primary); animation: atopx-spin .8s linear infinite; }
.atopx-mail-login.is-busy .atopx-step-ico.is-done { animation: none; border-color: #2e8b57; background: #2e8b57; }
.atopx-mail-login.is-busy .atopx-step-ico.is-done::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes atopx-spin { to { transform: rotate(360deg); } }
.atopx-secure-note { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; font-size: .8rem; color: var(--p-muted); }
.atopx-secure-note .atosp-i { color: var(--p-gold-d); flex: none; margin-top: 2px; }

/* Standalone app shell */
.atopx-topbar { gap: 16px; }
.atopx-appname { display: flex; align-items: center; gap: 8px; font-family: var(--p-head); color: var(--p-ink); }
.atopx-appname .atosp-i { color: var(--p-primary-2); }
.atopx-switch { display: flex; gap: 4px; margin-left: auto; padding: 4px; background: #f1f4f3; border-radius: 10px; }
.atopx-switch a { padding: 6px 12px; border-radius: 7px; font-family: var(--p-head); font-weight: 700; font-size: .8rem; color: var(--p-muted) !important; }
.atopx-switch a.is-active { background: #fff; color: var(--p-primary) !important; box-shadow: 0 1px 3px rgba(1, 38, 27, .12); }
.atopx-app .atosp-topbar-actions { margin-left: 0; }
@media (max-width: 640px) { .atopx-switch { display: none; } }

/* Profile & signature */
.atopx-profile { max-width: 1060px; margin: 0 auto; background: #fff; border: 1px solid var(--p-line); border-radius: 18px; box-shadow: 0 24px 60px rgba(1, 38, 27, .1); overflow: hidden; }
.atopx-profile-head { display: flex; gap: 18px; align-items: center; padding: 26px 30px 10px; position: relative; }
.atopx-profile-head h2 { font-size: 1.55rem; font-weight: 800; }
.atopx-profile-head p { margin: 4px 0 0; color: var(--p-muted); }
.atopx-avatar { flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--p-gold-d); color: var(--p-side-2); display: grid; place-items: center; font-family: var(--p-head); font-weight: 800; font-size: 1.2rem; }
.atopx-close { position: absolute; right: 22px; top: 22px; color: var(--p-muted) !important; }
.atopx-welcome { margin: 10px 30px 0; }
.atopx-tabs { display: flex; gap: 6px; padding: 10px 30px 0; border-bottom: 1px solid var(--p-line); }
.atopx-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-family: var(--p-head); font-weight: 700; font-size: .95rem; color: var(--p-muted); cursor: pointer; margin-bottom: -1px; }
.atopx-tabs button.is-active { color: var(--p-primary); border-bottom-color: var(--p-gold-d); }
.atopx-panel { padding: 24px 30px; }
.atopx-profile-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 28px; align-items: start; }
.atopx-profile .atosp-field label { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--p-muted); }
.atopx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.atopx-readonly { background: #f1f4f3 !important; color: var(--p-muted) !important; }
.atopx-lock { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--p-line); border-radius: 12px; background: #f6f9f8; font-size: .86rem; color: var(--p-text); }
.atopx-lock .atosp-i { color: var(--p-primary-2); flex: none; }
.atopx-preview { border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; }
.atopx-preview-head { display: flex; justify-content: space-between; padding: 12px 18px; background: #f6f9f8; border-bottom: 1px solid var(--p-line); font-family: var(--p-head); font-weight: 800; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--p-muted); }
.atopx-preview-body { padding: 20px 18px; overflow-x: auto; background: #fff; }
.atopx-pref { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; }
.atopx-pref + .atopx-pref { border-top: 1px solid var(--p-line); }
.atopx-pref strong { display: block; font-family: var(--p-head); color: var(--p-ink); font-size: 1rem; }
.atopx-pref small { display: block; color: var(--p-muted); font-size: .88rem; margin-top: 2px; }
.atopx-select { width: auto !important; min-width: 96px; }
.atopx-switch-toggle { position: relative; width: 52px; height: 30px; flex: none; cursor: pointer; }
.atopx-switch-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.atopx-switch-toggle span { position: absolute; inset: 0; background: #cfd9d5; border-radius: 30px; transition: background .2s; }
.atopx-switch-toggle span::after { content: ""; position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.atopx-switch-toggle input:checked + span { background: var(--p-primary); }
.atopx-switch-toggle input:checked + span::after { transform: translateX(22px); }
.atopx-switch-toggle input:focus-visible + span { outline: 2px solid var(--p-mint); outline-offset: 2px; }
.atopx-profile-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 30px; background: #f8faf9; border-top: 1px solid var(--p-line); flex-wrap: wrap; }
.atopx-foot-actions { display: flex; gap: 10px; }
@media (max-width: 900px) {
	.atopx-profile-grid { grid-template-columns: 1fr; }
	.atopx-profile-head, .atopx-panel, .atopx-tabs, .atopx-profile-foot { padding-left: 18px; padding-right: 18px; }
	.atopx-welcome { margin: 10px 18px 0; }
}
@media (max-width: 520px) { .atopx-two { grid-template-columns: 1fr; gap: 0; } .atopx-two .atosp-field { margin-bottom: 12px; } }

/* Roles */
.atopx-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.atopx-area { border: 1px solid var(--p-line); border-radius: 12px; padding: 12px 14px 6px; margin: 0; }
.atopx-area legend { font-family: var(--p-head); font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--p-primary); padding: 0 6px; }
.atopx-cap { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.atopx-cap input { width: auto; margin-top: 3px; }
.atopx-cap strong { display: block; color: var(--p-ink); font-size: .9rem; }
.atopx-cap small { display: block; color: var(--p-muted); font-size: .8rem; }
.atopx-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.atopx-chips span { background: #eef5f2; color: var(--p-primary); border-radius: 20px; padding: 2px 9px; font-size: .74rem; font-weight: 700; }
.atosp-m-webmail.atosp-v-profile .atosp-pagehead { display: none; }
.atopx-profile .atosp-field label { justify-content: flex-start; gap: 4px; }
