/* Cockpit: shared colours, compact dark navigation, cards and yellow underlines. */
:root {
  --ink: #1c1b1e;
  --muted: #77746f;
  --paper: #f5f4ef;
  --white: #fff;
  --yellow: #fcce2f;
  --pale: #fff4cc;
  --line: #e3e0d7;
  --green: #35634e;
  --red: #9c3a2e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color: inherit; text-decoration: none; }
button,input,select,textarea { font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
button,.button { cursor: pointer; border: 1px solid transparent; border-radius: 7px; padding: 10px 16px; color: var(--ink); font-weight: 650; display: inline-block; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:hover:not(:disabled),.button:hover { filter: brightness(.96); }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline: 3px solid #a86c00; outline-offset: 4px; }
.primary { background: var(--yellow); border-color: var(--yellow); }
.secondary { background: var(--white); border-color: var(--line); }
.quiet { background: transparent; padding: 7px 10px; font-weight: 500; }
.danger { background: #f8e5df; color: var(--red); border-color: #d8b4a9; }
.topbar { position: relative; z-index: 10; min-height: 64px; display: flex; align-items: center; gap: 22px; padding: 12px 28px; background: #1c1b1e; color: #fff; }
.brand { display: flex; align-items: center; flex: none; width: 78px; height: 32px; }
.brand img { display: block; width: 78px; height: 32px; object-fit: contain; }
.suite-back { color: #bbb; font-size: 12px; white-space: nowrap; }
.suite-name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.topbar nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-link { background: none; color: #fff; font-size: 13px; font-weight: 500; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 7px 0; white-space: nowrap; }
.nav-link.active { border-bottom-color: var(--yellow); }
.topbar a:hover,.topbar button:hover { color: var(--yellow); }
.topbar :focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.account-menu { position: relative; padding: 0; margin-left: 6px; flex: none; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; border: 1px solid #ffffff26; border-radius: 28px; padding: 6px 12px 6px 6px; background: #ffffff08; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover { border-color: #ffd04480; }
.account-avatar { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 10px; }
.account-chevron { color: #aaa; }
.connected-account { color: #eee; font-size: 11px; font-weight: 400; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-popover { position: absolute; right: 0; top: calc(100% + 12px); min-width: 230px; padding: 18px; background: #252427; border: 1px solid #ffffff20; border-radius: 16px; box-shadow: 0 16px 45px #0004; display: grid; gap: 12px; }
.account-popover small { color: #aaa; font-size: 11px; }
.account-popover>span { font-size: 13px; color: #fff; overflow-wrap: anywhere; }
.account-popover button { width: 100%; display: flex; justify-content: space-between; color: #eee; border-top: 1px solid #ffffff20; border-radius: 0; font-size: 12px; padding: 12px 0 0; }
main { margin: 0; padding: 20px 40px 60px; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; font-weight: 750; color: var(--muted); margin: 0 0 6px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0 22px; }
.page-heading h1 { font-size: 35px; letter-spacing: -1.6px; line-height: 1.2; margin: 5px 0; }
.page-heading h1 span,.login h1 span { color: #bd8b00; }
.subline { font-size: 14px; color: var(--muted); margin: 0; }
h2 { font-size: 18px; letter-spacing: -.5px; margin: 0; }
h3 { font-size: 14px; margin: 10px 0; }
p { margin: 8px 0 15px; }
.notice { color: #756126; border-bottom: 1px solid var(--line); padding: 0 0 11px; font-size: 11px; }
dialog .notice { background: var(--pale); border: 1px solid #eadca5; border-radius: 6px; padding: 10px 12px; }
.error { background: #fff0ec; color: var(--red); border: 1px solid #e5c0b5; border-radius: 7px; padding: 12px; white-space: pre-wrap; margin: 14px 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 17px; margin: 0 0 28px; }
.stats article { padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; }
.stats span { font-size: 12px; color: var(--muted); }
.stats strong { font-size: 36px; line-height: 1.35; letter-spacing: -1px; font-weight: 650; margin: 5px 0; }
.stats small { font-size: 11px; color: var(--muted); }
.stats article:first-child { background: #222025; color: #f7f4e9; border-color: #454047; box-shadow: inset 0 3px 0 var(--yellow); }
.stats article:first-child span,.stats article:first-child small { color: #c9c3ce; }
.stats article:first-child strong { color: var(--yellow); }
.stats .rule { background: var(--pale); border-color: #eadca5; }
.stats .rule span,.stats .rule small { color: #756126; }
.stats em { font-style: normal; font-size: 18px; letter-spacing: -.4px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 13px; }
.filters { display: flex; gap: 22px; margin-bottom: 22px; flex-wrap: wrap; }
.filters button { font-size: 12px; background: none; border: 0; border-radius: 0; font-weight: 500; padding: 5px 0; }
.filters .selected { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 7px; font-weight: 700; }
.filters button:hover { color: #926600; }
.records { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.empty { padding: 56px 25px; text-align: center; }
.empty .symbol { font-size: 28px; color: #a39878; }
.empty h3 { font-size: 16px; margin-top: 12px; }
.empty p { color: var(--muted); font-size: 13px; }
.record { display: grid; grid-template-columns: 1.2fr 1.6fr 1.3fr 1fr auto; gap: 18px; padding: 22px; align-items: center; border-bottom: 1px solid var(--line); }
.record:last-child { border-bottom: 0; }
.record>div { min-width: 0; }
.record strong { font-size: 13px; overflow-wrap: anywhere; }
.record small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.badge { display: inline-block; font-size: 11px; border-radius: 20px; background: #eeece5; padding: 5px 10px; font-weight: 650; white-space: nowrap; justify-self: start; }
.badge.confirmed { background: #e3efdf; color: #355b34; }
.badge.partial_error { background: #f9e6dc; color: #983e23; }
.badge.processing { background: #fbefbc; }
.badge.cancelled { color: #8f5046; }
.footnote,.hint,.muted { font-size: 12px; color: var(--muted); }
.footnote { margin-top: 16px; }
.back { margin: 0 0 16px; padding-left: 0; font-size: 12px; }
.form-layout { display: grid; grid-template-columns: minmax(0,2fr) minmax(250px,1fr); gap: 24px; max-width: 1320px; }
.form-layout form { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 26px 30px; }
.form-title { display: flex; gap: 15px; align-items: center; margin-bottom: 15px; }
.form-title p { margin: 3px 0; color: var(--muted); font-size: 12px; }
.step-number { background: var(--pale); padding: 8px 12px; border-radius: 5px; color: #806b34; font-size: 13px; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 24px 0 0; padding: 20px 0 0; min-width: 0; }
legend { font-size: 14px; font-weight: 700; padding-right: 12px; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 600; margin-bottom: 15px; }
input,select,textarea { width: 100%; border: 1px solid #d9d6ca; background: #fff; border-radius: 6px; color: var(--ink); padding: 10px; min-width: 0; resize: vertical; }
input[aria-invalid=true] { border-color: var(--red); background: #fff4f0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.duration { font-size: 12px; background: var(--pale); padding: 10px 12px; border-radius: 5px; margin: 0 0 18px; }
.duration.invalid { background: #fff0ec; color: var(--red); }
.side-card { background: var(--white); border: 1px solid var(--line); padding: 22px; border-radius: 10px; margin-bottom: 18px; }
.pale { background: var(--pale); border-color: #eadca5; }
.side-card p { font-size: 13px; }
.recipient { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.recipient:before { content: '✓'; margin-right: 10px; color: #8c813c; }
.small { margin: 20px 0 10px; }
.small h3 { margin: 0; }
.client-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; align-items: start; }
.client-row button { margin-top: 21px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; flex-wrap: wrap; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1320px; }
.text-link { text-decoration: underline; text-underline-offset: 4px; }
.settings-grid h2 { margin-bottom: 18px; }
dialog { max-width: 850px; width: calc(100% - 32px); max-height: 92vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 30px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 100px #17161b33; }
dialog::backdrop { background: #17161bb0; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.close { font-size: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 15px 0; }
.chip { font-size: 11px; background: #eeece5; border-radius: 4px; padding: 5px 8px; overflow-wrap: anywhere; }
.chip.fixed { background: var(--pale); }
pre { font: 13px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-preview { border: 1px solid var(--line); border-radius: 8px; padding: 22px; background: white; }
.check { display: flex; flex-direction: row; align-items: center; gap: 10px; margin-top: 22px; font-weight: 500; }
.check input { width: 18px; height: 18px; flex-shrink: 0; accent-color: #a86c00; }
.operation { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.operation p { margin: 5px 0; }
.operation button { font-size: 11px; padding: 4px 8px; }
#mfa { max-width: 460px; }
#cancel-dialog { max-width: 600px; }
.login { max-width: 680px; margin: 10vh auto; padding: 40px; }
.login h1 { font-size: 35px; letter-spacing: -1.6px; line-height: 1.2; }
.login .primary { margin: 24px 0; padding: 15px 24px; border-radius: 30px; box-shadow: 0 5px 18px #0001; font-weight: 600; }
.skip { position: fixed; top: -100px; left: 16px; background: var(--yellow); padding: 10px; }
.skip:focus { top: 10px; z-index: 20; }
[hidden] { display: none!important; }
details { padding: 12px 0; }
summary { cursor: pointer; font-size: 13px; font-weight: 600; }
#detail-content dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px; font-size: 13px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.audit-line { font-size: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
@media(min-width:1550px) {
  main { padding: 24px 58px 60px; }
}
@media(max-width:1000px) {
  main { padding: 20px 24px 50px; }
  .topbar { padding: 12px 24px; gap: 16px; }
  .topbar nav { gap: 16px; }
  .connected-account { max-width: 140px; }
}
@media(max-width:850px) {
  .topbar { flex-wrap: wrap; gap: 14px; padding: 12px 16px; }
  .topbar nav { order: 4; width: 100%; margin-left: 0; gap: 24px; }
  .account-menu { margin-left: auto; }
  .nav-link { font-size: 12px; }
  .form-layout { grid-template-columns: 1fr; }
  .form-layout aside { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .record { grid-template-columns: 1fr 1.4fr 1fr; }
  .record .channels { grid-column: 1/3; }
  .settings-grid { grid-template-columns: 1fr; }
  .stats article { padding: 20px; }
}
@media(max-width:560px) {
  main { padding: 18px 16px 40px; }
  .topbar { gap: 12px; }
  .suite-name { font-size: 15px; }
  .suite-back { font-size: 11px; }
  .connected-account { display: none; }
  .account-menu summary { gap: 6px; padding-right: 9px; }
  .page-heading { align-items: start; gap: 16px; padding: 24px 0 20px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading>.primary { font-size: 12px; padding: 10px 12px; max-width: 150px; }
  .eyebrow { font-size: 8px; }
  .subline { font-size: 12px; }
  .stats { gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 24px; }
  .stats .rule { grid-column: 1/-1; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .stats .rule small { grid-column: 1/-1; }
  .stats strong { font-size: 30px; }
  .stats .rule strong { font-size: 24px; }
  .stats em { font-size: 13px; }
  .stats article { padding: 16px; }
  .filters { gap: 16px; }
  .record { grid-template-columns: 1fr 1fr; gap: 12px; padding: 17px; }
  .record .channels { grid-column: auto; }
  .record button { justify-self: end; }
  .form-layout form { padding: 20px 16px; }
  .form-layout aside { grid-template-columns: 1fr; }
  .field-grid { gap: 0 12px; }
  input,select,textarea { font-size: 16px; }
  .client-row { grid-template-columns: 1fr 40px; }
  .client-row label:nth-child(2) { grid-row: 2; grid-column: 1; }
  .client-row button { grid-column: 2; grid-row: 1/3; }
  .form-actions { justify-content: stretch; }
  .form-actions button { flex: 1; font-size: 12px; }
  dialog { padding: 22px 18px; }
  .dialog-heading h2 { font-size: 19px; }
  #detail-content dl { grid-template-columns: 1fr; }
  dd { margin-bottom: 10px; }
  .login { margin: 35px 0; padding: 25px; }
  .login h1 { font-size: 29px; }
}
