.renew-account {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f4f7fb;
  border-radius: 10px;
}

.renew-account small,
.renew-account strong {
  display: block;
}

.renew-account small {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}

.renew-account > div:last-child {
  text-align: right;
}

.renew-dialog fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.renew-dialog legend {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.renew-plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.renew-plans label {
  position: relative;
}

.renew-plans input {
  position: absolute;
  opacity: 0;
}

.renew-plans span {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
}

.renew-plans small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}

.renew-plans input:checked + span {
  color: #0e5fc4;
  background: var(--sky);
  border-color: var(--blue);
}

.renew-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: var(--nav);
  color: #fff;
  border-radius: 10px;
}

.renew-result span {
  color: #aeb9c8;
  font-size: 12px;
}

.select-cell {
  width: 54px;
  padding-right: 6px;
  text-align: center;
}

.state.expired {
  color: var(--red);
}

.state.expired::before {
  background: var(--red);
}

.state.stopped {
  color: var(--muted);
}

.state.stopped::before {
  background: var(--muted);
}

.progress-cell.check .progress-track i {
  background: var(--amber);
}

.progress-track {
  background: #dfe6ef;
}

.progress-track i {
  width: 100%;
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  transition: transform 400ms cubic-bezier(.16, 1, .3, 1);
}

.status-badge.check {
  color: var(--amber);
  background: #fff3df;
}

.select-cell input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

#addAccount:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ticket-metric {
  position: relative;
}

.metric-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.ticket-metric:hover {
  box-shadow: 0 12px 30px rgba(30, 48, 78, .1);
}

.voucher-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.voucher-summary article {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  min-height: 230px;
  padding: 34px;
}

.voucher-summary .metric-icon {
  width: 68px;
  height: 68px;
}

.voucher-summary .metric-icon svg {
  width: 34px;
  height: 34px;
}

.voucher-summary small,
.voucher-summary strong,
.voucher-summary p {
  display: block;
  margin: 0;
}

.voucher-summary small,
.voucher-summary p {
  color: var(--muted);
}

.voucher-summary strong {
  margin: 3px 0;
  font-size: 42px;
}

.voucher-summary p {
  font-size: 11px;
}

.voucher-kind,
.voucher-state {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}

.voucher-kind.replace {
  color: var(--blue);
  background: var(--sky);
}

.voucher-kind.stop {
  color: var(--amber);
  background: #fff3df;
}

.voucher-state.available {
  color: var(--green);
  background: #e7f8f0;
}

.voucher-state.used {
  color: var(--muted);
  background: #edf1f5;
}

@media (max-width: 760px) {
  .voucher-summary {
    grid-template-columns: 1fr;
  }
}

.admin-nav[hidden] {
  display: none;
}

.profile-button {
  margin-top: auto;
}

.auth-screen {
  background: #f2f5f9;
}

.auth-panel {
  width: min(520px, 100%);
  padding: 52px 58px 46px;
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(30, 48, 78, .10);
}

.auth-copy {
  text-align: center;
}

.auth-copy h1 {
  margin-bottom: 10px;
  font-size: 38px;
  letter-spacing: -.03em;
}

.auth-copy p {
  font-size: 15px;
}

.auth-form.is-active {
  gap: 20px;
  margin-top: 38px;
}

.auth-form label {
  gap: 9px;
  font-size: 14px;
}

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfe;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.auth-input:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .14);
}

.auth-input > svg {
  position: absolute;
  left: 15px;
  width: 19px;
  color: #8b97a7;
  pointer-events: none;
}

.auth-form .auth-input input {
  width: 100%;
  height: 54px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 46px 0 45px;
}

.auth-input button {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8995a5;
}

.auth-input button:hover {
  background: var(--sky);
  color: var(--blue);
}

.auth-input button svg {
  width: 18px;
}

.auth-form .primary {
  width: 100%;
  min-height: 56px;
  margin-top: 0;
  font-size: 16px;
}

.auth-form .form-error {
  min-height: 0;
  margin-top: -8px;
}

.auth-form .form-error:empty {
  display: none;
}

.auth-switch {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-switch.is-visible {
  display: flex;
}

.auth-switch button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  padding: 5px;
}

.auth-switch button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-options {
  display: flex;
  justify-content: space-between;
  margin-top: -6px;
}

.auth-options button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 0;
}

.auth-options button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reset-email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 10px;
}

.send-code-button {
  min-height: 56px;
  padding: 0 12px;
  color: var(--blue);
  border-color: #b8d5fa;
  background: var(--sky);
  font-size: 13px;
}

.send-code-button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

#resetForm.auth-form.is-active {
  gap: 16px;
  margin-top: 30px;
}

#overview .metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-segment {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-panel {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.summary-panel dl div {
  border-bottom-color: var(--line);
}

.summary-panel dt,
.summary-panel .total span {
  color: var(--muted);
}

.summary-panel > p {
  background: var(--sky);
  color: #356b9f;
}

.support-settings-form {
  margin-top: 18px;
}

.support-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-bottom: 14px;
}

.support-settings-grid label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.support-settings-grid input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 0 14px;
}

.support-settings-grid input:focus {
  border-color: var(--blue);
  background: #fff;
  outline: 3px solid rgba(22, 119, 255, .16);
}

.support-settings-form .primary {
  width: auto;
  min-width: 190px;
}

.support-footer-text-field {
  grid-column: 1 / -1;
}

.form-hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.support-footer {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 22px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.support-footer[hidden],
.admin-mode .support-footer {
  display: none;
}

#supportFooterLinks {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-footer a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #38506d;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(30, 48, 78, .04);
}

.support-footer a:hover {
  border-color: #b8d5fa;
  background: var(--sky);
  color: var(--blue);
}

.support-footer svg {
  width: 18px;
  color: #78aefe;
}

.support-footer small {
  color: var(--muted);
  line-height: 1.4;
  text-align: right;
}

.admin-mode .nav-item:not(.admin-nav),
.admin-mode .mobile-nav,
.admin-mode .top-actions .primary {
  display: none;
}

.admin-mode .admin-nav {
  display: flex;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.admin-badge svg {
  width: 16px;
}

.admin-grid {
  display: grid;
  gap: 18px;
}

.admin-panel {
  padding: 22px;
}

.admin-panel h3 {
  margin: 0 0 16px;
}

.admin-panel .table-wrap {
  box-shadow: none;
  border: 1px solid var(--line);
}

.admin-account-toolbar {
  justify-content: flex-start;
}

.toolbar-select {
  min-width: 210px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 38px 0 13px;
}

.toolbar-select:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(22, 119, 255, .16);
}

.admin-user-table {
  min-width: 900px;
}

.admin-user-table th:first-child {
  padding-left: 56px;
}

.user-number {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 28px;
  padding-left: 36px;
}

.user-detail-row {
  background: #f5f8fc;
}

.user-detail-row td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.user-account-detail {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(160px, 1fr) minmax(90px, .6fr) minmax(170px, 1fr);
  gap: 24px;
  align-items: center;
}

.user-account-detail small,
.user-account-detail strong {
  display: block;
}

.user-account-detail small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
}

.user-account-detail strong {
  font-size: 12px;
}

.ticket-table {
  min-width: 1080px;
}

.ticket-copy {
  max-width: 440px;
}

.ticket-copy small {
  margin-top: 6px;
  line-height: 1.65;
  white-space: pre-wrap;
}

#ticketDialog textarea {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 12px;
  resize: vertical;
  font: inherit;
}

#ticketDialog textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(22, 119, 255, .16);
}

.admin-interface-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.announcement-form,
.announcement-list-panel {
  padding: 24px;
}

.announcement-form h3,
.announcement-list-panel h3 {
  margin: 0 0 20px;
}

.announcement-form > label:not(.checkbox-row) {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.announcement-form input[type="text"],
.announcement-form input:not([type]),
.announcement-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 12px 14px;
  resize: vertical;
}

.announcement-form input:not([type]) {
  min-height: 46px;
}

.announcement-form input:focus,
.announcement-form textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(22, 119, 255, .16);
}

.announcement-form .checkbox-row {
  margin: 4px 0 20px;
}

.announcement-form .primary {
  width: 100%;
}

.announcement-list {
  display: grid;
}

.announcement-list article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid #edf0f4;
}

.announcement-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.announcement-list strong,
.announcement-list small {
  display: block;
}

.announcement-list p {
  max-width: 72ch;
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.announcement-list small,
.empty-copy {
  color: var(--muted);
  font-size: 11px;
}

.announcement-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

#adminAnnouncementList .announcement-actions {
  flex-direction: column;
  align-items: stretch;
}

.announcement-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #eaf3ff;
  color: #0a4f9e;
}

.announcement-banner[hidden] {
  display: none;
}

.announcement-banner > svg {
  width: 20px;
  flex: none;
  margin-top: 2px;
}

.announcement-banner strong,
.announcement-banner p {
  display: block;
  margin: 0;
}

.announcement-banner p {
  margin-top: 4px;
  color: #356b9f;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.history-table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.history-table {
  min-width: 1120px;
}

.history-table th {
  padding-top: 18px;
  padding-bottom: 14px;
  background: #fff;
  white-space: nowrap;
}

.history-table th svg {
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
}

.history-table td {
  padding-top: 16px;
  padding-bottom: 16px;
  vertical-align: middle;
  color: #4e5b6d;
}

.history-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.history-table tbody tr:last-child td {
  border-bottom: 0;
}

.history-table td:first-child strong {
  color: var(--ink);
  white-space: nowrap;
}

.order-number {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 28px;
  padding-left: 36px;
}

.order-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
}

.order-toggle:hover {
  background: var(--sky);
  border-color: #b8d5fa;
}

.order-toggle svg {
  width: 15px;
  height: 15px;
}

.order-detail-row {
  background: #f5f8fc;
}

.order-detail-row td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.order-detail-row td:first-child {
  position: relative;
}

.order-detail-row td:first-child::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #dbe4ef;
}

.order-type {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 7px;
  background: #eef7e9;
  color: #56a735;
  font-size: 12px;
  white-space: nowrap;
}

.order-accounts {
  display: grid;
  gap: 7px;
  color: var(--ink);
}

.history-table .status-badge {
  display: inline-block;
  justify-self: auto;
  white-space: nowrap;
}

.history-table .mini-action {
  white-space: nowrap;
}

.empty-action {
  color: var(--muted);
}

.history-empty {
  height: 120px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 760px) {
  .admin-interface-grid {
    grid-template-columns: 1fr;
  }

  .admin-account-toolbar .search,
  .admin-account-toolbar .toolbar-select {
    width: 100%;
    max-width: none;
  }

  .support-settings-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    padding: 36px 24px 32px;
  }

  .auth-copy h1 {
    font-size: 32px;
  }

  .reset-email-row {
    grid-template-columns: 1fr;
  }

  #supportFooterLinks {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .support-footer {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-top: 18px;
  }

  .support-footer small {
    text-align: left;
  }

  .announcement-form,
  .announcement-list-panel {
    padding: 20px 18px;
  }

  .announcement-list article {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-table-wrap {
    margin-right: -16px;
    border-radius: 12px 0 0 12px;
  }
  .renew-plans {
    grid-template-columns: 1fr;
  }
}
