[hidden] { display: none !important; }
.portal-auth { width: min(100% - 2rem, 35rem); }
.portal-heading { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }
.portal-heading h1, .portal-auth h1 { font-size:clamp(2.8rem, 7vw, 5rem); }
.portal-grid { display:grid; grid-template-columns: 1fr 1.2fr; gap:1rem; align-items:start; }
.portal-grid h2 { font-size:clamp(1.7rem,3vw,2.1rem); }
.portal-text-action { border:0; background:transparent; color:#d7a3ff; padding:.6rem; text-decoration:underline; text-underline-offset:.2em; }
.portal-row { border-top:1px solid var(--edge); padding:.8rem 0; }
.portal-row p { margin:.3rem 0; overflow-wrap:anywhere; white-space:pre-wrap; }
.portal-row small { color:var(--muted); }
#ticket-form { padding-bottom:1rem; }
#auth-message:empty, #orders-status:empty, #tickets-status:empty { display:none; }
#auth-message { color:var(--muted); }
.package-controls { display:flex; align-items:center; gap:1rem; }
@media (max-width: 740px) { .portal-grid { grid-template-columns:1fr; } }
@media (max-width: 460px) { .package-controls { gap:.5rem; } .package-controls .text-link { font-size:.85rem; } }

.submitted-requests-title { margin: 1rem 0 .75rem; }
#tickets { display: grid; gap: .85rem; }
.request-card { padding: 1rem; border: 1px solid #674388; border-inline-start: 3px solid #9e58d7; border-radius: 10px; background: #21132f; min-width: 0; }
.request-reference { margin: 0 0 .3rem; color: #d9b9f5; font-size: .8rem; font-weight: 650; }
.request-card h4 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.request-preview { margin: .45rem 0 .85rem; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.request-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.ticket-thread { border: 1px solid #785097; border-radius: 14px; padding: 0; color: var(--ink); background: #170d23; width: min(43rem, calc(100% - 2rem)); max-width: none; max-height: min(790px, 90dvh); }
.ticket-thread[open] { display: grid; grid-template-rows: auto minmax(7rem, 1fr) auto; }
.ticket-thread::backdrop { background: #080410c9; }
.thread-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: 1rem 1.25rem; background: #21132f; border-bottom: 1px solid var(--edge); }
.thread-header h2 { margin: 0; font-size: clamp(1.2rem, 3vw, 1.65rem); overflow-wrap: anywhere; }
.thread-history { min-height: min(16rem, 30dvh); overflow-y: auto; padding: .75rem 1.25rem 1rem; }
.thread-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.thread-toolbar > :last-child { margin-inline-start: auto; }
.thread-status { display: inline-block; color: #f1deff; background: #402850; border-radius: 20px; padding: .18rem .55rem; font-size: .78rem; }
.thread-messages { margin: .75rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .95rem; }
.thread-message { align-self: flex-start; display: grid; justify-items: start; max-width: min(83%, 31rem); }
.thread-message-outgoing { align-self: flex-end; justify-items: end; }
.thread-caption { color: #d2bddc; font-size: .75rem; margin: 0 .2rem .26rem; }
.thread-bubble { background: #312242; border-radius: 14px 14px 14px 4px; padding: .7rem .85rem; overflow-wrap: anywhere; }
.thread-message-outgoing .thread-bubble { background: #71349b; border-radius: 14px 14px 4px 14px; }
.thread-bubble p { white-space: pre-wrap; margin: 0; }
.thread-bubble p + p, .thread-bubble p + .thread-status { margin-top: .4rem; }
.thread-page-url { font-size: .85rem; }
.thread-reply { border-top: 1px solid var(--edge); padding: .65rem 1.25rem 1rem; background: #21132f; }
.thread-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem; }
.thread-composer textarea { min-height: 2.75rem; max-height: 18dvh; }
.thread-resolution { margin-bottom: .75rem; }
.thread-resolution p { margin: 0 0 .35rem; }
.thread-resolution button { margin: .15rem .35rem .15rem 0; }
.thread-reply .form-note { margin: .4rem 0 0; }
.thread-reply .form-note:empty { display: none; }
@media (max-width: 520px) {
  .ticket-thread { width: calc(100% - 1rem); max-height: 94dvh; }
  .thread-header, .thread-history, .thread-reply { padding-inline: .85rem; }
  .thread-message { max-width: 92%; }
}

@media (min-width: 741px) { .portal-grid.is-software-quote { grid-template-columns: 1.2fr 1fr; } }
