/* Restored optional account interface styles. */
/* Optional email accounts and saved calculations */
.account-trigger { display: inline-flex; align-items: center; gap: 7px; max-width: 190px; min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 700; }
.account-trigger:hover { border-color: var(--teal); color: var(--teal); background: var(--soft); }
.account-trigger .icon { width: 19px; height: 19px; }
.account-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.save-button, .restore-button { min-height: 36px; padding: 6px 12px; border: 1px solid var(--teal); border-radius: 8px; background: var(--teal); color: #fff; font-size: .8rem; font-weight: 750; }
.save-button:hover, .restore-button:hover { background: var(--teal-dark); }
.save-button:disabled { cursor: wait; opacity: .6; }
html[data-theme="dark"] .save-button, html[data-theme="dark"] .restore-button { color: #10141d; }
.save-feedback { min-height: 1.4em; margin: 10px 0 0; color: var(--teal); font-size: .84rem; font-weight: 650; }
.account-dialog { width: min(680px, calc(100% - 28px)); max-height: min(86vh, 800px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 90px rgba(0, 0, 0, .24); }
.account-dialog::backdrop { background: rgba(10, 14, 22, .64); backdrop-filter: blur(4px); }
.account-dialog-shell { position: relative; padding: 36px; }
.account-close { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--muted); font-size: 1.6rem; line-height: 1; }
.account-close:hover { color: var(--ink); background: var(--soft); }
.account-brand { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border-radius: 13px; background: var(--navy); color: #fff; font-size: 1.4rem; font-weight: 850; }
html[data-theme="dark"] .account-brand { background: var(--mint); color: var(--navy); }
.account-dialog h2 { margin-bottom: 10px; font-size: clamp(1.55rem, 5vw, 2.1rem); }
.account-intro { margin-bottom: 22px; color: var(--muted); font-size: .92rem; }
.account-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 24px; padding: 5px; border-radius: 11px; background: var(--soft); }
.account-mode button { min-height: 40px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; }
.account-mode button.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 2px 9px rgba(0, 0, 0, .06); }
.account-field { margin-bottom: 17px; }
.account-field label { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 750; }
.account-field input { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--canvas); color: var(--ink); text-align: start; }
.account-field input:focus { border-color: var(--teal); outline: 3px solid color-mix(in srgb, var(--teal) 25%, transparent); }
.account-field small { display: block; margin-top: 6px; color: var(--muted); }
.account-form-error { padding: 10px 12px; border-radius: 8px; background: var(--error-bg); color: var(--error); font-size: .86rem; }
.account-submit { width: 100%; margin-top: 4px; }
.account-history-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; padding-inline-end: 35px; }
.account-history-head .eyebrow { margin-bottom: 7px; }
.account-history-head .button { min-height: 38px; padding: 7px 12px; font-size: .8rem; }
.account-user { margin: -4px 0 15px; color: var(--teal); font-size: .85rem; font-weight: 700; overflow-wrap: anywhere; text-align: start; }
.account-status { min-height: 1.4em; color: var(--muted); font-size: .84rem; }
.history-list { display: grid; gap: 13px; margin-block: 8px 20px; }
.history-item { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.history-item-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.history-item h3 { margin-bottom: 4px; font-size: .98rem; }
.history-item time { color: var(--muted); font-size: .73rem; }
.history-item-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.history-item-actions button { min-height: 33px; padding: 5px 10px; border-radius: 7px; font-size: .75rem; font-weight: 700; }
.delete-button { border: 1px solid var(--line); background: transparent; color: var(--error); }
.delete-button:hover { background: var(--error-bg); }
.history-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 15px 0 0; padding-top: 13px; border-top: 1px solid var(--line); }
.history-results > div { min-width: 0; }
.history-results dt { color: var(--muted); font-size: .72rem; }
.history-results dd { margin: 2px 0 0; font-size: .84rem; font-weight: 700; overflow-wrap: anywhere; }
.history-empty { padding: 28px 18px; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; }
.history-empty h3 { margin-bottom: 8px; }
.history-empty p { margin: 0; color: var(--muted); font-size: .86rem; }
.account-logout { width: 100%; }
@media (max-width: 980px) {
  .account-trigger { max-width: 42px; padding: 8px; }
  .account-trigger span { display: none; }
}
@media (max-width: 680px) {
  .account-dialog-shell { padding: 28px 20px 22px; }
  .account-dialog { max-height: 90vh; border-radius: 15px; }
  .account-history-head { padding-inline-end: 28px; }
  .history-item-head { flex-direction: column; }
  .history-results { grid-template-columns: 1fr; }
  .results-head { align-items: flex-start; }
}
@media print {
  .account-trigger, .save-button, .account-dialog { display: none !important; }
}
