.license-devices {
  padding: 16px;
}

.license-devices__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.license-devices__count {
  color: var(--text-secondary, #666);
}

.license-devices__refresh {
  padding: 6px 12px;
  background: var(--bg-tertiary, #f5f5f5);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.license-devices__list {
  max-height: 300px;
  overflow-y: auto;
}

.license-devices__empty {
  text-align: center;
  color: var(--text-tertiary, #999);
  padding: 20px;
}

.license-device-card {
  padding: 12px;
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bg-primary, #fff);
}

.license-device-card--current {
  background: var(--color-success-bg, #f0fdf4);
}

.license-device-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.license-device-card__info {
  min-width: 0;
}

.license-device-card__name {
  color: var(--text-primary, #1E2329);
}

.license-device-card__current {
  background: var(--color-success, #0ECB81);
  color: var(--text-inverse, #fff);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 8px;
}

.license-device-card__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-secondary, #666);
}

.license-device-card__meta--small {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-tertiary, #999);
}

.license-device-card__unbind {
  padding: 6px 12px;
  background: var(--color-danger-bg, #FEE2E2);
  color: var(--color-danger, #F6465D);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.license-refund-hidden {
  display: none;
}

.license-quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.license-quick-actions__primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--binance-yellow);
  color: var(--text-primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

.license-quick-actions__secondary {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.license-quick-actions__primary:hover,
.license-quick-actions__secondary:hover {
  transform: translateY(-1px);
}

.license-refund-toggle-btn {
  color: var(--text-primary);
}

.license-refund-toggle-btn:hover {
  border-color: var(--binance-yellow);
}

.license-refund-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 8px;
}

.license-refund-rules {
  margin-bottom: 14px;
  border: 1px solid rgba(240, 185, 11, 0.35);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.license-refund-rules__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  color: var(--text-primary, #1E2329);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  user-select: none;
}

.license-refund-rules[open] .license-refund-rules__summary {
  border-bottom: 1px solid rgba(240, 185, 11, 0.2);
}

.license-refund-rules__summary::-webkit-details-marker {
  display: none;
}

.license-refund-rules__summary::after {
  content: '▾';
  font-size: 14px;
  line-height: 1;
  color: var(--text-secondary, #666);
  transition: transform 0.2s ease;
}

.license-refund-rules[open] .license-refund-rules__summary::after {
  transform: rotate(180deg);
}

.license-refund-rules__summary:hover {
  background: rgba(240, 185, 11, 0.06);
}

.license-refund-rules__content {
  padding: 12px 16px 16px;
  background: #fff;
}

.license-refund-rules__panel {
  padding: 16px;
  border: 1px solid rgba(240, 185, 11, 0.24);
  border-radius: 10px;
  background: #fff;
}

.license-refund-rules__title {
  margin: 0 0 8px;
  color: var(--binance-yellow, #F0B90B);
  font-size: 13px;
  font-weight: 700;
}

.license-refund-rules__item {
  margin: 0 0 10px;
  color: var(--text-primary, #1E2329);
  font-size: 13px;
  line-height: 1.75;
}

.license-refund-rules__item:last-child {
  margin-bottom: 0;
}

.license-refund-apply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.license-refund-rule-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.license-refund-days-remaining {
  font-size: 12px;
  color: var(--color-danger, #F6465D);
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.license-refund-days-remaining--expired {
  color: var(--text-tertiary);
}

.license-refund-apply-btn {
  width: 100%;
  font-size: 13px;
}

.license-refund-status {
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
}

.license-refund-status__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 12px;
}

.license-refund-status__label {
  color: var(--text-tertiary);
}

.license-refund-status__value {
  color: var(--text-primary);
}

.license-refund-status__value--mono {
  font-family: monospace;
  word-break: break-all;
}

.license-refund-status__value--accent {
  color: var(--binance-yellow);
  font-weight: 600;
}

.license-refund-status__note {
  margin-top: 8px;
  word-break: break-all;
}

.license-refund-status__note--muted {
  color: var(--text-secondary);
}

.license-refund-status__note--danger {
  color: var(--color-danger, #F6465D);
}

.license-refund-empty {
  background: var(--bg-secondary, #fafafa);
  padding: 14px;
  border-radius: 8px;
  border: 1px dashed var(--border-color, #ddd);
}

.license-refund-empty__title {
  margin: 0 0 6px;
  color: var(--text-primary, #1E2329);
  font-size: 14px;
  font-weight: 600;
}

.license-refund-empty__desc {
  margin: 0;
  color: var(--text-secondary, #666);
  font-size: 13px;
  line-height: 1.7;
}

.license-refund-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.license-refund-form__note {
  border: 1px solid rgba(240, 185, 11, 0.28);
  background: rgba(240, 185, 11, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
}

.license-refund-form__note-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.license-refund-form__note-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.license-refund-form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.license-refund-form__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.license-refund-form__input,
.license-refund-form__textarea {
  width: 100%;
  border: 1px solid var(--border-color, #d9d9d9);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary, #fff);
}

.license-refund-form__input:focus,
.license-refund-form__textarea:focus {
  border-color: var(--binance-yellow);
  box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.16);
  outline: none;
}

.license-refund-form__textarea {
  min-height: 120px;
  resize: vertical;
}

.license-refund-form__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

.license-refund-form__validation {
  display: flex;
  align-items: center;
  min-height: 18px;
  font-size: 12px;
  line-height: 1.5;
}

.license-refund-form__validation--valid {
  color: var(--color-success, #0ecb81);
}

.license-refund-form__validation--invalid {
  color: var(--color-danger, #f6465d);
}

.license-refund-form__input--valid {
  border-color: rgba(14, 203, 129, 0.72);
  box-shadow: 0 0 0 3px rgba(14, 203, 129, 0.12);
}

.license-refund-form__input--invalid {
  border-color: rgba(246, 70, 93, 0.72);
  box-shadow: 0 0 0 3px rgba(246, 70, 93, 0.12);
}

.license-refund-form__error {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #b42318;
  background: rgba(246, 70, 93, 0.08);
  border: 1px solid rgba(246, 70, 93, 0.18);
}

.license-refund-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.license-refund-form__submit.btn-danger {
  background: var(--color-danger, #f6465d);
  color: #fff;
  border-color: var(--color-danger, #f6465d);
  box-shadow: 0 10px 24px rgba(246, 70, 93, 0.22);
}

.license-refund-form__submit.btn-danger:hover:not(:disabled) {
  background: var(--color-danger-hover, #dc3545);
  color: #fff;
  border-color: var(--color-danger-hover, #dc3545);
  box-shadow: 0 12px 28px rgba(220, 53, 69, 0.28);
}

.license-order-history {
  padding: 16px;
}

.license-order-history__hint {
  margin: 0 0 12px;
  color: var(--text-tertiary, #999);
  font-size: 12px;
}

.license-order-history__tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.license-order-history__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: 999px;
  background: var(--bg-secondary, #fafafa);
  color: var(--text-secondary, #666);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.license-order-history__tab:hover {
  border-color: var(--binance-yellow);
  color: var(--text-primary, #1E2329);
}

.license-order-history__tab.is-active {
  background: rgba(240, 185, 11, 0.12);
  border-color: rgba(240, 185, 11, 0.42);
  color: var(--text-primary, #1E2329);
  box-shadow: 0 4px 12px rgba(240, 185, 11, 0.12);
}

.license-order-history__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(132, 142, 156, 0.12);
  color: inherit;
  font-size: 12px;
}

.license-order-history__tab.is-active .license-order-history__tab-count {
  background: rgba(240, 185, 11, 0.2);
}

.license-order-history__panel {
  display: none;
}

.license-order-history__panel.is-active {
  display: block;
}

.license-order-history__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.license-order-history__item {
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: 10px;
  padding: 14px;
}

.license-order-history__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.license-order-history__title {
  margin: 0;
  color: var(--text-primary, #1E2329);
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

.license-order-history__meta {
  margin: 6px 0 0;
  color: var(--text-secondary, #666);
  font-size: 12px;
  line-height: 1.7;
}

.license-order-history__meta strong {
  color: var(--text-primary, #1E2329);
  font-weight: 600;
}

.license-order-history__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.license-order-history__badge--success {
  background: rgba(14, 203, 129, 0.16);
  color: #0E9F6E;
}

.license-order-history__badge--warning {
  background: rgba(240, 185, 11, 0.18);
  color: #B78103;
}

.license-order-history__badge--danger {
  background: rgba(246, 70, 93, 0.14);
  color: #D13F57;
}

.license-order-history__badge--info {
  background: rgba(75, 107, 251, 0.14);
  color: #3150D8;
}

.license-order-history__badge--muted {
  background: rgba(132, 142, 156, 0.14);
  color: #5E6673;
}

.license-order-history__empty {
  text-align: center;
  color: var(--text-tertiary, #999);
  padding: 28px 12px;
  background: var(--bg-secondary, #fafafa);
  border: 1px dashed var(--border-color, #ddd);
  border-radius: 10px;
}

.license-info {
  padding: 20px;
}

.license-info__hero {
  background: linear-gradient(135deg, var(--text-primary, #1E2329) 0%, #2B3139 100%);
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  margin-bottom: 20px;
}

.license-info__hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.license-info__label {
  margin: 0;
  color: #848E9C;
  font-size: 12px;
}

.license-info__status-wrap {
  margin: 4px 0 0;
  font-size: 20px;
}

.license-info__status {
  font-weight: 600;
}

.license-info__status--active {
  color: var(--color-success, #0ECB81);
}

.license-info__status--inactive {
  color: var(--color-danger, #F6465D);
}

.license-info__meta {
  text-align: right;
}

.license-info__type {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 500;
}

.license-info__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.license-info__card {
  background: var(--bg-tertiary, #f5f5f5);
  padding: 16px;
  border-radius: 8px;
}

.license-info__card-title {
  margin: 0;
  color: var(--text-secondary, #666);
  font-size: 12px;
}

.license-info__card-value {
  margin: 4px 0 0;
  font-weight: 500;
}

.license-info__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.license-info__btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.license-info__btn--ghost {
  background: var(--bg-tertiary, #f5f5f5);
  color: var(--text-primary, #1E2329);
}

.license-info__btn--primary {
  background: var(--primary-color);
  color: #fff;
}

@media (max-width: 480px) {
  .license-quick-actions {
    flex-direction: column;
  }

  .license-refund-rules__summary,
  .license-refund-rules__content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .license-refund-rules__panel {
    padding: 14px;
  }

  .license-order-history__tabs {
    flex-direction: column;
  }

  .license-info__hero-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .license-info__meta {
    text-align: left;
  }

  .license-info__grid {
    grid-template-columns: 1fr;
  }

  .license-info__actions {
    flex-direction: column;
  }

  .license-order-history__row {
    flex-direction: column;
  }
}
