:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07111f;
  color: #f5f8ff;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 5%, rgba(34, 211, 238, .15), transparent 34rem),
    radial-gradient(circle at 90% 30%, rgba(129, 140, 248, .13), transparent 30rem),
    #07111f;
}

button, input { font: inherit; }

.page-shell {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.brand-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 4px 18px;
}

.brand-panel div:last-child { display: grid; gap: 2px; }
.brand-panel strong { font-size: 1.04rem; }
.brand-panel span { color: #91a3bc; font-size: .82rem; }

.brand-logo {
  display: block;
  width: 92px;
  height: auto;
}

.card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 24px;
  background: rgba(10, 24, 42, .93);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .36);
}

.activation-workspace {
  display: grid;
  gap: 20px;
}

.workspace-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.workspace-action#show-receipts { grid-column: 1 / -1; min-height: 76px; }
.workspace-action { display: grid; gap: 7px; min-height: 96px; padding: 18px; border: 1px solid #35485f; border-radius: 16px; background: #0d1e33; color: #f5f8ff; text-align: left; cursor: pointer; }
.workspace-action strong { font-size: 1.05rem; }
.workspace-action span { color: #a7bbd2; font-size: .83rem; line-height: 1.4; }
.workspace-action.is-selected { border-color: #22d3ee; background: #0c3446; box-shadow: inset 0 0 0 1px #22d3ee; }
button:focus-visible { outline: 3px solid #67e8f9; outline-offset: 3px; }
.secondary-button { min-height: 44px; padding: 10px 17px; border: 1px solid #54708d; border-radius: 11px; background: #122b42; color: #e0f8ff; font-weight: 750; cursor: pointer; }
.state-panel .pairing-help { margin-top: 18px; font-size: .86rem; }
.state-panel .secondary-button { margin-top: 20px; }
.device-license-status { grid-column: 1 / -1; margin-top: 9px; }
.device-summary .device-license-status { font-family: inherit; letter-spacing: 0; }
.device-summary .device-license-status.is-expired { color: #fda4af; }
.license-warning { margin-bottom: 22px; padding: 17px; border: 1px solid #875141; border-radius: 13px; background: #321f27; color: #ffd4bd; }
.license-warning p { margin: 8px 0 15px; font-size: .9rem; line-height: 1.5; }
.form-grid:disabled { opacity: .55; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.notice-card {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 520px;
}

.notice-accent {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(6, 182, 212, .92), rgba(37, 99, 235, .78)),
    #0e7490;
  color: rgba(255, 255, 255, .97);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -.08em;
  text-shadow: 0 12px 34px rgba(2, 6, 23, .35);
}

.notice-accent::before,
.notice-accent::after {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.notice-accent::before { transform: translate(-75px, -190px); }
.notice-accent::after { transform: translate(95px, 205px); }

.notice-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
}

.notice-content h1 { margin-bottom: 12px; }
.notice-lead { margin: 0; color: #b9c8da; font-size: 1.03rem; line-height: 1.62; }

.service-boundaries {
  display: grid;
  gap: 11px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.service-boundaries li {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 10px;
  align-items: start;
  color: #e3edf9;
  line-height: 1.45;
}

.service-boundaries li span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(34, 211, 238, .12);
  color: #67e8f9;
  font-size: .78rem;
}

.notice-confirmation {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: start;
  padding: 15px 16px;
  border: 1px solid rgba(103, 232, 249, .24);
  border-radius: 14px;
  background: rgba(8, 145, 178, .08);
  color: #cedbec;
  font-size: .9rem;
  line-height: 1.48;
  cursor: pointer;
}

.notice-confirmation input {
  width: 20px;
  min-height: 20px;
  margin: 1px 0 0;
  accent-color: #06b6d4;
}

.notice-button { margin-top: 17px; }
.notice-footnote { margin: 10px 0 0; color: #71869f; font-size: .75rem; text-align: center; }

.card-header {
  padding: 30px 30px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  background: linear-gradient(145deg, rgba(34, 211, 238, .07), rgba(99, 102, 241, .06));
}

.eyebrow {
  margin: 0 0 8px;
  color: #67e8f9;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
}

h1 { margin: 0; font-size: clamp(1.75rem, 6vw, 2.5rem); letter-spacing: -.035em; }
.card-header > p:last-child { max-width: 610px; margin: 10px 0 0; color: #aebdd0; line-height: 1.55; }

#connection-form { padding: 26px 30px 30px; }

.device-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 15px 17px;
  margin-bottom: 24px;
  border: 1px solid rgba(45, 212, 191, .25);
  border-radius: 15px;
  background: rgba(20, 184, 166, .08);
}

.device-summary span, .device-summary small { color: #9db0c8; }
.device-summary strong { color: #99f6e4; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; }
.device-summary small { grid-column: 1 / -1; }

fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { margin-bottom: 11px; color: #dce7f7; font-weight: 750; }

.mode-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.mode-picker legend { grid-column: 1 / -1; }
.mode-option { position: relative; cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; }
.mode-option span {
  display: grid;
  min-height: 112px;
  align-content: center;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 16px;
  background: rgba(15, 32, 52, .75);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.mode-option small { color: #90a2b9; line-height: 1.38; }
.mode-option input:checked + span { border-color: #22d3ee; background: rgba(8, 145, 178, .13); }
.mode-option input:focus-visible + span { outline: 3px solid rgba(34, 211, 238, .25); outline-offset: 2px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field > span:first-child { color: #dbe6f4; font-size: .9rem; font-weight: 700; }
.field small { color: #8397af; font-size: .76rem; line-height: 1.4; }

input {
  width: 100%;
  min-height: 49px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 12px;
  padding: 0 13px;
  outline: 0;
  background: #071523;
  color: #f8fbff;
}
input::placeholder { color: #60758e; }
input:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34, 211, 238, .11); }

.password-control { position: relative; }
.password-control input { padding-right: 82px; }
.password-control button {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 33px;
  border: 0;
  border-radius: 8px;
  padding: 0 9px;
  background: rgba(148, 163, 184, .12);
  color: #c8d5e6;
  cursor: pointer;
}

.inline-error {
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(251, 113, 133, .32);
  border-radius: 12px;
  background: rgba(190, 24, 93, .1);
  color: #fecdd3;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 21px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #0891b2, #4f46e5);
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 13px 28px rgba(8, 145, 178, .18);
}
.primary-button:disabled { cursor: not-allowed; opacity: .62; }
.primary-button[aria-busy="true"] { cursor: wait; }
.privacy-note { margin: 14px 0 0; color: #7f93aa; font-size: .77rem; line-height: 1.45; text-align: center; }

.license-card { padding: 30px; }

.license-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.license-header h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); letter-spacing: -.025em; }
.license-header p:last-child { max-width: 590px; margin: 9px 0 0; color: #9fb0c4; line-height: 1.55; }

.license-price-summary {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  flex: 0 0 auto;
  gap: 10px 22px;
  min-width: 320px;
  padding: 20px 22px;
  border: 1px solid rgba(45, 212, 191, .4);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(20, 184, 166, .18), rgba(8, 145, 178, .1));
}

.license-price-label {
  display: block;
  margin-bottom: 7px;
  color: #b7d5dc;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.license-price-value,
.license-price-term > strong {
  display: block;
  color: #f0fdfa;
  font-size: clamp(1.9rem, 3.8vw, 2.5rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.license-price-value.is-loading,
.license-price-value.is-unavailable { font-size: 1.1rem; white-space: normal; }
.license-price-term { padding-left: 20px; border-left: 1px solid rgba(148, 163, 184, .25); }
.license-price-term > strong > span { font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.license-header .license-price-summary .license-payment-warning {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: #fde68a;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.4;
}

.license-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr);
  gap: 24px;
  padding-top: 24px;
}

.license-form {
  display: grid;
  align-content: start;
  gap: 17px;
}

.section-label {
  margin: 0;
  color: #67e8f9;
  font-size: .69rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.form-status {
  margin: 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, .07);
  color: #8296ae;
  font-size: .73rem;
  line-height: 1.45;
}

.pix-panel {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  align-content: start;
  padding: 20px;
  border: 1px solid rgba(45, 212, 191, .22);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(20, 184, 166, .1), rgba(15, 32, 52, .5));
}

.pix-symbol {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(45, 212, 191, .14);
  color: #99f6e4;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.pix-panel h3 { margin: 4px 0 0; font-size: 1.12rem; }
.pix-placeholder, .pix-result, .payment-button, .payment-note { grid-column: 1 / -1; }

.pix-placeholder {
  display: grid;
  place-items: center;
  min-height: 138px;
  padding: 20px;
  border: 1px dashed rgba(153, 246, 228, .25);
  border-radius: 14px;
  background: rgba(7, 21, 35, .55);
  text-align: center;
}

.pix-placeholder strong { color: #cfe8e7; font-size: .9rem; }
.pix-placeholder small { max-width: 220px; margin-top: 6px; color: #7f98aa; line-height: 1.4; }

.pix-result {
  display: grid;
  gap: 12px;
  justify-items: stretch;
  padding: 15px;
  border: 1px solid rgba(94, 234, 212, .25);
  border-radius: 14px;
  background: rgba(3, 16, 28, .72);
}

.pix-result img {
  width: min(250px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  padding: 8px;
  border-radius: 13px;
  background: #fff;
  object-fit: contain;
}

.pix-result label { display: grid; gap: 7px; }
.pix-result label span { color: #9fb0c4; font-size: .74rem; font-weight: 750; }
.pix-result textarea {
  width: 100%;
  resize: none;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .19);
  border-radius: 10px;
  background: #071525;
  color: #cde7e6;
  font: 600 .68rem/1.4 ui-monospace, Consolas, monospace;
}

.copy-pix-button {
  min-height: 42px;
  border: 1px solid rgba(45, 212, 191, .3);
  border-radius: 10px;
  background: rgba(20, 184, 166, .14);
  color: #99f6e4;
  font-weight: 800;
  cursor: pointer;
}

.payment-button {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, .17);
  border-radius: 12px;
  background: rgba(148, 163, 184, .09);
  color: #8ea1b7;
  font-weight: 800;
  cursor: pointer;
}
.payment-button:not(:disabled) {
  border-color: rgba(45, 212, 191, .45);
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  color: #03171b;
  box-shadow: 0 12px 25px rgba(20, 184, 166, .18);
}
.payment-button:disabled { cursor: not-allowed; opacity: .65; }

.payment-note { margin: -3px 0 0; color: #778ba2; font-size: .72rem; text-align: center; }
.payment-note.is-success { color: #5eead4; font-weight: 800; }

.state-panel { display: grid; justify-items: center; padding: 56px 30px; text-align: center; }
.state-panel h2 { margin: 15px 0 7px; }
.state-panel p { max-width: 500px; margin: 0; color: #9fb0c4; line-height: 1.55; }
.spinner { width: 36px; height: 36px; border: 3px solid rgba(148, 163, 184, .2); border-top-color: #22d3ee; border-radius: 50%; animation: spin .8s linear infinite; }
.state-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; font-size: 1.7rem; font-weight: 900; }
.state-error .state-icon { background: rgba(244, 63, 94, .13); color: #fda4af; }
.state-success .state-icon { background: rgba(20, 184, 166, .13); color: #5eead4; }
.success-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(420px, 100%); gap: 10px; margin: 24px 0 0; }
.success-details div { padding: 13px; border: 1px solid rgba(148, 163, 184, .15); border-radius: 12px; background: rgba(15, 32, 52, .64); }
.success-details dt { color: #8194ab; font-size: .75rem; }
.success-details dd { margin: 4px 0 0; font-weight: 750; }

footer { padding: 17px 12px 0; color: #71869f; font-size: .76rem; line-height: 1.45; text-align: center; }
.device-auth-form, .saved-lists-panel { padding: 26px 30px; }
.device-auth-form h2, .lists-heading h2 { margin: 0; }
.device-auth-form > p, .lists-help, .lists-empty { color: #a7bbd2; line-height: 1.55; }
.device-auth-form .primary-button { margin-top: 20px; }
.lists-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lists-heading > strong { color: #67e8f9; white-space: nowrap; }
.saved-lists { display: grid; gap: 12px; }
.saved-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border: 1px solid #35485f; border-radius: 14px; background: #0c1c30; }
.saved-list.is-active { border-color: #2dd4bf; background: #0b3038; }
.saved-list > div:first-child { flex: 1; min-width: 130px; overflow-wrap: anywhere; }
.saved-list strong { display: block; font-size: 1.05rem; }
.saved-list span { display: block; margin-top: 5px; color: #a7bbd2; font-size: .83rem; }
.saved-list.is-active span { color: #5eead4; }
.saved-list-actions, .list-manager-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.list-manager-actions { margin-top: 20px; }
.text-button { min-height: 44px; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; color: #a5dfef; font-weight: 700; cursor: pointer; }
.danger-button { color: #fda4af; }
.list-message { padding: 15px; margin: 16px 0; border: 1px solid #247b73; border-radius: 12px; background: #0c3537; color: #99f6e4; line-height: 1.55; }
button:disabled { opacity: .55; cursor: not-allowed; }
.receipts-body { padding: 0 30px 30px; }
.receipts-toolbar, .receipts-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.receipts-toolbar { margin-bottom: 22px; }
.receipts-toolbar .field { min-width: 110px; }
.receipts-toolbar select { min-height: 44px; padding: 9px 12px; color: #e0f8ff; background: #122b42; border: 1px solid #54708d; border-radius: 10px; font: inherit; }
.receipt-items { display: grid; gap: 16px; }
.receipt-card, .payment-receipt { padding: 20px; border: 1px solid #35485f; border-radius: 14px; background: #0c1c30; }
.payment-receipt { margin-top: 24px; }
.payment-receipt h3 { margin-top: 0; }
.receipt-protocol { display: grid; gap: 8px; margin-bottom: 12px; color: #a7bbd2; font-size: .85rem; }
.receipt-protocol input { min-width: 0; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #35485f; border-radius: 8px; background: #071525; color: #e0f8ff; font: .85rem/1.5 ui-monospace, Consolas, monospace; }
.receipt-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 20px 0 0; }
.receipt-details dt { color: #a7bbd2; font-size: .8rem; }
.receipt-details dd { margin: 5px 0 0; overflow-wrap: anywhere; font-weight: 650; }
.receipt-help { color: #91a3bc; font-size: .8rem; line-height: 1.6; }
.receipts-pagination { margin-top: 22px; }
#refresh-receipts:disabled[aria-busy="true"] { cursor: wait; }
#connection-form { border-top: 1px solid #263b51; }
[hidden] { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
  .page-shell { width: min(100% - 18px, 920px); padding-top: 14px; }
  .card { border-radius: 19px; }
  .card-header, #connection-form { padding-left: 19px; padding-right: 19px; }
  .device-auth-form, .saved-lists-panel { padding: 23px 19px; }
  .receipts-body { padding: 0 19px 23px; }
  .receipt-details { grid-template-columns: 1fr; }
  .mode-picker, .form-grid { grid-template-columns: 1fr; }
  .mode-picker legend, .field-full { grid-column: 1; }
  .mode-option span { min-height: 90px; }
  .notice-card { display: block; min-height: 0; }
  .notice-accent { min-height: 116px; font-size: 2.2rem; }
  .notice-accent::before { transform: translate(-160px, -20px); }
  .notice-accent::after { transform: translate(160px, 30px); }
  .notice-content { padding: 27px 20px 24px; }
  .service-boundaries { margin: 20px 0; }
  .license-card { padding: 23px 19px; }
  .license-header { display: grid; gap: 15px; }
  .license-price-summary { width: 100%; min-width: 0; padding: 18px; gap: 10px 16px; grid-template-columns: minmax(0, 1fr) auto; }
  .license-price-value,
  .license-price-term > strong { font-size: clamp(1.5rem, 7vw, 2rem); }
  .license-price-term { padding-left: 16px; }
  .license-layout { grid-template-columns: 1fr; }
  .workspace-actions { grid-template-columns: 1fr; gap: 9px; }
  .workspace-action { min-height: 78px; padding: 15px 18px; }
}
