/* PB Mail · Apple minimal · UI 1.0. Solo presentazione, nessuna risorsa esterna. */
:root {
  color-scheme: light;
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --sidebar: #f7f8fa;
  --ink: #20232a;
  --muted: #646b77;
  --faint: #8a909b;
  --line: #e8eaee;
  --blue: #0868df;
  --blue-soft: #e9f1ff;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { line-height: 1.5; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #8cb9f6; outline-offset: 3px; }
input:focus-visible { outline: 3px solid #c2d9fa; outline-offset: 1px; border-color: var(--blue); }
h1, h2, h3, p { margin: 0; }
.hidden, [hidden] { display: none !important; }
.icon { flex-shrink: 0; width: 20px; height: 20px; vertical-align: middle; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 650; letter-spacing: -.75px; width: fit-content; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--blue); color: white; border-radius: 10px; font-size: 14px; letter-spacing: -.6px; font-weight: 700; }
.brand-company { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 7px; padding-left: 18px; border-left: 1px solid #d9dde4; }
.eyebrow { display: block; font-size: 10px; font-weight: 650; color: #707987; letter-spacing: 1.7px; }
.subtle-label { color: var(--muted); font-size: 12px; }
.primary-button { background: var(--blue); color: #fff; border: 1px solid #0861d0; border-radius: 11px; padding: 13px 18px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 12px; transition: background .15s ease, box-shadow .15s ease; }
.primary-button:hover { background: #075bbf; box-shadow: 0 4px 12px #0868df19; }
.primary-button:disabled { opacity: .65; }
/* Login: gli ID sono invariati per il JavaScript Authy esistente. */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 42%, #eaf1fc66, transparent 60%), var(--canvas); }
.login-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 84px; padding: 24px 40px; }
.login-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; place-items: center; padding: 30px 20px 48px; }
.login-card { width: min(432px, 100%); min-width: 0; max-width: 100%; background: var(--surface); border: 1px solid #e9ebf0; border-radius: 24px; padding: 36px 36px 26px; box-shadow: 0 16px 50px #23344d07, 0 2px 6px #23344d03; }
.login-symbol { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #e2ecfb; background: #edf4ff; color: var(--blue); border-radius: 16px; margin-bottom: 24px; }
.login-symbol .icon { width: 28px; height: 28px; }
.login-card h1 { font-size: 32px; font-weight: 650; line-height: 1.2; letter-spacing: -1.25px; margin: 8px 0 12px; }
.login-intro { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 28px; }
#loginForm { display: flex; flex-direction: column; gap: 20px; }
.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group label { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.label-detail { color: var(--faint); font-weight: 400; font-size: 11px; }
.field-group input { width: 100%; height: 48px; border: 1px solid #dadee5; border-radius: 10px; background: #fff; padding: 10px 13px; font-size: 15px; color: var(--ink); transition: border-color .15s ease; }
.field-group input::placeholder { color: #939ba8; opacity: 1; }
#code { letter-spacing: 9px; font-variant-numeric: tabular-nums; font-size: 19px; padding-left: 16px; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.4; }
.error { background: #fff1f0; border: 1px solid #f3d0cc; padding: 10px 12px; border-radius: 9px; color: #a52a24; font-size: 13px; overflow-wrap: anywhere; }
.error:empty { display: none; }
.login-submit { width: 100%; min-height: 47px; margin-top: 2px; }
.login-submit .icon { width: 18px; height: 18px; }
.login-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 10px; color: var(--muted); margin-top: 24px; padding-top: 20px; border-top: 1px solid #eef0f3; white-space: nowrap; }
.login-note .icon { width: 13px; height: 13px; }
.login-footer { display: flex; align-items: center; justify-content: space-between; padding: 18px 40px; font-size: 11px; color: #7b838f; }
/* Mail: cartelle a sinistra, elenco centrale, lettura a destra. */
#app { height: 100vh; height: 100dvh; overflow: hidden; background: #fff; }
.app-header { height: 72px; display: grid; grid-template-columns: 228px minmax(240px, 520px) 1fr; align-items: center; border-bottom: 1px solid var(--line); padding: 0 24px; gap: 22px; background: #fff; }
.app-header .brand { margin-left: 0; }
.global-search { height: 38px; border: 1px solid #e9ecf1; background: #f5f6f8; border-radius: 11px; display: flex; align-items: center; padding: 0 11px; gap: 8px; }
.global-search .icon { color: #818996; width: 18px; height: 18px; }
.global-search input { width: 100%; min-width: 0; padding: 0; color: var(--muted); background: transparent; border: 0; height: 34px; font-size: 13px; opacity: 1; }
.global-search input::placeholder { color: #7a8290; opacity: 1; }
.search-caption { color: #7f8793; border-left: 1px solid #dfe3e9; font-size: 10px; padding-left: 10px; }
.account-controls { display: flex; justify-content: flex-end; align-items: center; gap: 9px; min-width: 0; }
.account-avatar { display: grid; place-items: center; width: 29px; height: 29px; background: #f0f3f8; border-radius: 50%; color: #6d7888; }
.account-avatar .icon { width: 17px; height: 17px; }
#currentUser { font-size: 12px; color: #586171; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-button { border: 1px solid var(--line); padding: 7px 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: 9px; background: #fff; color: #545f6f; font-size: 11px; margin-left: 7px; }
.logout-button:hover { background: #f2f5f8; }
.logout-button .icon { width: 16px; height: 16px; }
.layout { height: calc(100vh - 72px); height: calc(100dvh - 72px); display: grid; grid-template-columns: 228px 340px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 24px 14px 16px; overflow-y: auto; min-height: 0; }
.workspace-label { display: flex; align-items: center; gap: 10px; margin: 0 9px 23px; }
.workspace-avatar { width: 33px; height: 33px; border: 1px solid #e1e5ea; border-radius: 9px; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 650; color: #4a5668; }
.workspace-label strong { display: block; font-size: 13px; font-weight: 600; color: #394250; }
.workspace-label small { display: block; font-size: 10px; color: #7c8593; margin-top: 2px; }
.compose-button { display: flex; align-items: center; justify-content: center; gap: 9px; background: #e6edfa; color: #476a9d; border: 1px solid #dce6f5; padding: 11px 8px; margin: 0 7px 25px; border-radius: 10px; font-weight: 600; font-size: 12px; }
.compose-button .icon { width: 16px; height: 16px; }
.section-label { font-size: 10px; font-weight: 650; letter-spacing: 1.1px; color: #7d8796; margin: 0 12px 10px; }
.folder-list { display: flex; flex-direction: column; gap: 3px; }
.folder { position: relative; width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; background: transparent; font-size: 13px; text-align: left; color: #626b79; white-space: nowrap; min-height: 39px; }
.folder .icon { width: 17px; height: 17px; color: #8a94a3; }
.folder.selected { background: #e3edff; color: #1a60c8; font-weight: 600; }
.folder.selected .icon { color: #2470db; }
.folder-mark { width: 5px; height: 5px; background: #3078da; border-radius: 50%; margin-left: auto; }
.nav-separator { border-bottom: 1px solid #e7eaf0; margin: 8px 12px; }
.mailboxes-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; padding-right: 12px; }
.mailboxes-heading .section-label { margin-bottom: 0; }
.mailboxes-heading .icon { width: 13px; height: 13px; color: #99a2af; }
.mailboxes-empty { display: flex; gap: 9px; color: #7b8593; margin: 12px 12px 0; align-items: flex-start; }
.mailboxes-empty .icon { width: 15px; height: 15px; margin-top: 1px; }
.mailboxes-empty p { font-size: 12px; line-height: 1.5; }
.sidebar-bottom { margin-top: auto; padding: 30px 12px 0; }
.environment-badge { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #6d7685; }
.environment-badge>span { width: 5px; height: 5px; border-radius: 50%; background: #a1aab8; }
.sidebar-bottom p { font-size: 9px; color: #929aa7; margin: 7px 0 0 11px; }
.messages { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: white; border-right: 1px solid var(--line); }
.list-heading { display: flex; align-items: center; justify-content: space-between; padding: 27px 24px 20px; }
.list-heading h1 { font-size: 22px; font-weight: 650; letter-spacing: -.8px; line-height: 1.2; }
.list-heading p { color: #8a929e; font-size: 11px; margin-top: 6px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px; background: transparent; color: #a4acb8; border-radius: 7px; padding: 5px; }
.icon-button .icon { width: 18px; height: 18px; }
.list-filters { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 24px 17px; }
.list-filters button { font-size: 11px; padding: 5px 11px; border-radius: 6px; background: transparent; color: #727c8b; }
.list-filters .filter-selected { background: #eef1f5; color: #444f60; font-weight: 600; }
.list-filters>span { margin-left: auto; font-size: 10px; color: #8b94a1; }
.message-list-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 20px; flex: 1; min-height: 240px; }
.empty-inbox { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; border: 1px solid #edf0f4; color: #9aa5b4; background: #fafbfc; margin-bottom: 17px; }
.empty-inbox .icon { width: 24px; height: 24px; }
.message-list-empty h2 { color: #555f6e; font-size: 15px; font-weight: 550; letter-spacing: -.2px; }
.message-list-empty p { font-size: 13px; line-height: 1.8; color: #8b939f; margin-top: 7px; }
.list-footer { padding: 15px 17px; min-height: 49px; border-top: 1px solid #eef0f3; display: flex; align-items: center; gap: 7px; font-size: 10px; color: #818b99; }
.list-footer .icon { width: 13px; height: 13px; }
.reader { min-height: 0; min-width: 0; background: #fcfcfd; display: flex; flex-direction: column; }
.reader-toolbar { height: 57px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eef0f3; padding: 0 26px; background: #fff; color: #8a939f; font-size: 11px; }
.reader-actions { display: flex; align-items: center; gap: 9px; }
.toolbar-divider { width: 1px; height: 16px; background: #e7eaf0; margin: 0 3px; }
.reader-content { flex: 1; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: 38px 32px; }
.reader-empty { max-width: 470px; width: 100%; text-align: center; margin-top: -14px; }
.letter-art { width: 124px; height: 120px; margin: 0 auto 30px; position: relative; }
.letter-paper { position: absolute; width: 66px; height: 83px; left: 27px; top: 1px; border: 1px solid #dfe8f5; background: #fff; border-radius: 9px; transform: rotate(-8deg); padding: 19px 13px; box-shadow: 0 5px 16px #19488706; }
.letter-paper span { display: block; height: 4px; border-radius: 3px; margin-bottom: 8px; background: #e5ecf7; }
.letter-paper span:last-child { width: 65%; }
.letter-front { position: absolute; display: grid; place-items: center; width: 104px; height: 78px; left: 10px; bottom: 5px; border: 1px solid #d5e3f7; background: #edf4ff; border-radius: 18px; transform: rotate(4deg); color: #5e93da; box-shadow: 0 12px 25px #4386df09; }
.letter-front .icon { width: 46px; height: 46px; stroke-width: 1; }
.letter-dot { position: absolute; top: 24px; right: 1px; border: 4px solid #fcfcfd; height: 17px; width: 17px; border-radius: 50%; background: #80a8e2; }
.reader-empty .eyebrow { font-size: 9px; color: #8b96a5; letter-spacing: 1.8px; }
.reader-empty h2 { font-size: clamp(23px, 2.1vw, 31px); line-height: 1.25; font-weight: 600; letter-spacing: -1.1px; margin: 12px 0 13px; }
.reader-empty>p { font-size: 13px; line-height: 1.8; color: #7b8492; }
.connection-note { display: flex; align-items: flex-start; gap: 11px; max-width: 385px; text-align: left; padding: 17px 18px; background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; margin: 31px auto 0; }
.connection-note>.icon { color: #7b93b2; width: 19px; height: 19px; margin-top: 2px; }
.connection-note strong { display: block; font-size: 12px; font-weight: 550; color: #5e6a7b; }
.connection-note span { display: block; font-size: 11px; line-height: 1.65; color: #8b95a3; margin-top: 4px; }
.reader-footer { padding: 15px 26px; min-height: 49px; display: flex; justify-content: space-between; font-size: 9px; color: #939ca9; }
.reader-footer>span:last-child { display: flex; align-items: center; gap: 5px; }
.reader-footer .icon { width: 12px; height: 12px; }
@media (min-width: 1600px) { .layout { grid-template-columns: 250px 380px minmax(0,1fr); } .app-header { grid-template-columns: 250px minmax(280px,580px) 1fr; } .reader-empty { max-width: 520px; } }
@media (max-width: 1150px) { .app-header { grid-template-columns: 196px minmax(200px,1fr) auto; padding: 0 18px; gap: 14px; } .layout { grid-template-columns: 214px 310px minmax(0,1fr); } #currentUser { display: none; } .reader-toolbar { padding: 0 18px; } .reader-actions { gap: 3px; } .reader-content { padding: 28px 22px; } }
@media (max-width: 920px) { .app-header { grid-template-columns: 185px minmax(170px,1fr) auto; } .layout { grid-template-columns: 203px minmax(0,1fr); } .reader { display: none; } .messages { border-right: 0; } .search-caption { display: none; } }
@media (max-width: 620px) { .app-header { height: 64px; grid-template-columns: 100px 1fr auto; padding: 0 12px; gap: 10px; } .account-avatar { display: none; } .logout-button { margin-left: 0; border: 0; padding: 7px 3px; } .logout-button>span { display: none; } .global-search { padding: 0 8px; } .global-search input { font-size: 11px; } .brand { font-size: 19px; gap: 8px; } .brand-mark { width: 30px; height: 30px; font-size: 12px; } .layout { grid-template-columns: 65px minmax(0,1fr); height: calc(100vh - 64px); height: calc(100dvh - 64px); } .sidebar { padding: 16px 8px; } .workspace-label, .sidebar>.section-label, .folder>span, .mailboxes-heading, .mailboxes-empty, .sidebar-bottom { display: none; } .compose-button { margin: 0 0 16px; font-size: 0; width: 47px; height: 42px; padding: 0; gap: 0; } .compose-button .icon { width: 19px; height: 19px; } .folder { justify-content: center; width: 47px; padding: 11px 0; gap: 0; } .folder .icon { width: 19px; height: 19px; } .nav-separator { margin: 8px 6px; } .list-heading { padding: 22px 18px 18px; } .list-heading h1 { font-size: 20px; } .list-filters { padding: 0 18px 15px; } .list-footer { font-size: 9px; padding: 14px 10px; } .login-topbar { padding: 22px; } .brand-company, .login-topbar .subtle-label { display: none; } .login-card { padding: 30px 25px 24px; } .login-main { padding: 12px 18px 30px; } .login-card h1 { font-size: 30px; } .login-note { font-size: 9px; gap: 4px; white-space: normal; } .login-footer { padding: 18px 22px; font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
.pilot-mailbox{font-size:12px;color:#345b9d;overflow-wrap:anywhere;font-weight:600}
.pilot-list{overflow-y:auto;min-height:0;display:block!important;padding:0!important}
.pilot-message{width:100%;display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:14px 17px;border-bottom:1px solid #e8eaee;background:#fff;gap:5px;color:#303a48;min-width:0}
.pilot-message:hover,.pilot-selected{background:#edf4ff}
.pilot-message strong{font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pilot-message span{font-size:13px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pilot-message small{font-size:11px;color:#7d8796;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pilot-detail{padding:30px;overflow-wrap:anywhere}.pilot-detail h2{font-size:21px;margin-bottom:22px}.pilot-detail p{font-size:13px;color:#667084;margin-bottom:9px}.pilot-note{margin-top:35px;padding:18px;border:1px solid #dce6f5;border-radius:12px;background:#f6f9fe;font-size:13px;color:#55657b}
