/* Device cards and inbox share the established navy/cyan glass materials. */
.atlas-device-prompts {
    position: fixed; inset-inline-end: 22px; bottom: 96px; width: min(390px, calc(100vw - 32px));
    z-index: 1035; pointer-events: none;
}
.atlas-device-prompts [hidden] { display: none !important; }
.atlas-device-card {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 12px;
    padding: 16px; border-radius: 22px; border: 1px solid var(--afn-line-strong);
    background: rgba(7, 18, 35, .97); color: var(--afn-text);
    box-shadow: 0 16px 48px rgba(0, 4, 16, .4); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); pointer-events: auto;
    max-height: calc(100dvh - 130px); overflow-y: auto; overscroll-behavior: contain;
    animation: atlas-device-enter 200ms ease-out;
}
.atlas-device-icon { width: 44px; height: 44px; border-radius: 13px; object-fit: contain; display: grid; place-items: center; background: rgba(32, 216, 255, .08); color: var(--afn-cyan); font-size: 1.25rem; }
.atlas-device-copy { min-width: 0; align-self: center; }
.atlas-device-copy h2 { margin: 0 0 6px; font-family: var(--afn-heading); font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
.atlas-device-copy p { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--afn-text-soft); overflow-wrap: anywhere; }
.atlas-device-close { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--afn-text-soft); align-self: start; }
.atlas-device-close:hover { background: rgba(32, 216, 255, .08); color: var(--afn-cyan); }
.atlas-device-actions { grid-column: 1 / -1; display: flex; }
.atlas-device-actions .btn { width: 100%; min-height: 44px; font-size: .9rem; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important; white-space: normal; }
.atlas-device-status { grid-column: 1 / -1; font-size: .85rem; line-height: 1.45; color: var(--afn-text-soft); margin: 0; }
.atlas-device-card[aria-busy="true"] .atlas-device-actions .btn { opacity: .65; cursor: progress; }
@keyframes atlas-device-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

body .atlas-inbox { z-index: 1040; }
body .atlas-inbox-panel {
    display: flex; flex-direction: column; max-height: min(620px, calc(100dvh - 120px));
    background: rgba(7, 18, 35, .98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    transform: translateY(6px); border-color: var(--afn-line-strong); text-align: start;
}
body .atlas-inbox.is-open .atlas-inbox-panel { transform: translateY(0); }
body .atlas-inbox-list { min-height: 0; flex: 1; max-height: none; }
body .atlas-inbox-head { flex-wrap: wrap; flex-shrink: 0; gap: 8px; padding: 14px; }
body .atlas-inbox-head > div:first-child { flex: 1; }
body .atlas-inbox-head h2 { font-size: 1.45rem; font-weight: 700; text-transform: none; line-height: 1.2; }
body .atlas-inbox-head span { font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: none; }
body .atlas-inbox-head button { min-height: 44px; font-size: .8rem; font-weight: 600; text-transform: none; }
body .atlas-inbox-head .atlas-inbox-close { flex: 0 0 44px; padding: 0; width: 44px; }
body .atlas-inbox-item > button { text-align: start; }
body .atlas-inbox-item > button:hover, body .atlas-inbox-trigger:hover, body .atlas-inbox.is-open .atlas-inbox-trigger { transform: none; }
body .atlas-inbox-item-copy strong { overflow-wrap: anywhere; font-weight: 650; }
body .atlas-inbox-item-copy > span, body .atlas-inbox-item-copy small, body .atlas-inbox-empty p { color: var(--afn-text-soft); }
body .atlas-inbox-foot { flex-shrink: 0; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
body .atlas-inbox-unread-dot { box-shadow: none; }
body .atlas-inbox-ring { display: none; }
[lang="ar"] .atlas-device-prompts, [lang="ar"] .atlas-inbox { direction: rtl; }
[lang="ar"] .atlas-device-card, [lang="ar"] .atlas-inbox-panel { font-family: "Noto Sans Arabic", var(--afn-body), sans-serif; }
[lang="ar"] .atlas-device-copy h2, [lang="ar"] .atlas-inbox-head h2 { font-family: inherit; }
@media (min-width: 992px) {
    body .atlas-inbox { right: auto; inset-inline-end: 22px; }
    body .atlas-inbox-panel { right: auto; inset-inline-end: 0; }
}
@media (max-width: 991.98px) {
    .atlas-device-prompts { inset-inline: var(--atlas-mobile-gutter); width: auto; bottom: var(--atlas-mobile-dock-space); }
    .atlas-device-card { max-height: calc(100dvh - var(--atlas-mobile-header-space) - var(--atlas-mobile-dock-space) - 12px); border-radius: 18px; border-color: var(--afn-line); background: #091426; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 8px 28px rgba(0,4,16,.28); }
    .atlas-device-copy h2 { font-weight: 600; }
    .atlas-device-copy p { font-size: .875rem; line-height: 1.6; }
    .atlas-keyboard-open .atlas-device-prompts { visibility: hidden; pointer-events: none; }
    body .atlas-inbox-panel { top: var(--atlas-mobile-header-space) !important; bottom: auto !important; left: var(--atlas-mobile-gutter); right: var(--atlas-mobile-gutter); max-height: calc(100dvh - var(--atlas-mobile-header-space) - var(--atlas-mobile-dock-space)); width: auto; border-radius: 18px; border-color: var(--afn-line); }
    body .atlas-inbox-list { max-height: none; }
}
@media (max-width: 575.98px) {
    body .atlas-inbox-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; grid-template-areas: "title close" "actions actions"; align-items: start; }
    body .atlas-inbox-head > div:first-child { grid-area: title; }
    body .atlas-inbox-head h2 { overflow-wrap: anywhere; }
    body .atlas-inbox-head form { grid-area: actions; }
    body .atlas-inbox-head form button { width: 100%; white-space: normal; }
    body .atlas-inbox-head .atlas-inbox-close { grid-area: close; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .atlas-device-card, body .atlas-inbox-panel { background: #091426; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
    .atlas-device-card, body .atlas-inbox-panel { border-color: var(--afn-text-soft); }
}
@media (prefers-reduced-motion: reduce) {
    .atlas-device-card { animation: none; }
    body .atlas-inbox-panel { transition: none; }
}
@supports not (backdrop-filter: blur(1px)) { .atlas-device-card, body .atlas-inbox-panel { background: var(--afn-bg-soft); } }
