.php-plugin-review-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 24px 0;
  padding: 12px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 13px;
}

.php-plugin-review-bridge-link {
  flex: 0 0 auto;
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.php-plugin-review-bridge-link:hover {
  text-decoration: underline;
}

.qbc-management-navigation-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: #1d4ed8;
  background: #eff6ff;
  text-decoration: none;
}

.qbc-management-navigation-link:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}

.qbc-management-navigation-title {
  font-size: 13px;
  font-weight: 600;
}

.qbc-management-navigation-detail {
  color: #64748b;
  font-size: 11px;
}

.qbc-php-quota-panel {
  margin: 20px 32px 32px;
  padding: 20px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 6%);
}

.qbc-php-quota-panel.qbc-quota-embedded {
  margin: 24px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.qbc-time-auth-embedded {
  margin: 24px 24px 0;
}

.qbc-time-auth-embedded > .qbc-quota-status {
  margin-bottom: 10px;
}

.qbc-time-auth-embedded > .qbc-quota-status:empty {
  display: none;
}

.qbc-time-auth-embedded .qbc-time-auth {
  margin-top: 0;
}

.qbc-time-auth-jump {
  flex: 0 0 auto;
}

.qbc-quota-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.qbc-quota-title {
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.qbc-quota-description {
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.qbc-quota-status {
  min-height: 20px;
  margin-bottom: 14px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 12px;
}

.qbc-quota-status.success {
  color: #166534;
  background: #dcfce7;
}

.qbc-quota-status.error {
  color: #991b1b;
  background: #fee2e2;
}

.qbc-quota-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.qbc-quota-label {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.qbc-quota-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  color: #0f172a;
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.qbc-quota-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgb(219 234 254 / 80%);
}

.qbc-quota-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.qbc-quota-block-title {
  margin-bottom: 12px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.qbc-quota-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.qbc-quota-card-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.qbc-quota-form .qbc-quota-field {
  margin-bottom: 0;
}

.qbc-quota-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.qbc-quota-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  color: #334155;
  background: #e2e8f0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.qbc-quota-button.primary {
  color: #ffffff;
  background: #2563eb;
}

.qbc-quota-button.danger {
  color: #ffffff;
  background: #dc2626;
}

.qbc-quota-button:hover {
  filter: brightness(.97);
}

.qbc-quota-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.qbc-quota-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 12px;
}

.qbc-quota-table th,
.qbc-quota-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  text-align: left;
  vertical-align: top;
}

.qbc-quota-table th {
  color: #64748b;
  font-weight: 600;
  background: #ffffff;
}

.qbc-quota-generated {
  margin-top: 12px;
  padding: 10px;
  border-radius: 9px;
  color: #166534;
  background: #dcfce7;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

.qbc-quota-card-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.qbc-quota-card-code code {
  flex: 1 1 260px;
}

@media (max-width: 640px) {
  .php-plugin-review-bridge {
    align-items: flex-start;
    flex-direction: column;
    margin-right: 16px;
    margin-left: 16px;
  }

  .qbc-php-quota-panel {
    margin: 16px;
    padding: 14px;
  }

  .qbc-quota-heading {
    flex-direction: column;
  }

  .qbc-quota-description {
    text-align: left;
  }

  .qbc-quota-form {
    grid-template-columns: 1fr;
  }

  .qbc-quota-card-form {
    grid-template-columns: 1fr;
  }
}

.qbc-quota-copy {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.qbc-quota-code-hint {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11px;
}

.qbc-quota-archive {
  margin-top: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.qbc-quota-archive-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  color: #475569;
  background: #f1f5f9;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.qbc-quota-archive-toggle::after {
  content: "展开";
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
}

.qbc-quota-archive.open .qbc-quota-archive-toggle::after {
  content: "收起";
}

.qbc-quota-archive-toggle:hover {
  background: #e2e8f0;
}

.qbc-quota-archive-body {
  padding: 0 14px 12px;
}

.qbc-quota-archive-body[hidden] {
  display: none;
}

.qbc-quota-archive-empty {
  padding: 12px 0;
  color: #94a3b8;
  font-size: 12px;
}

.qbc-quota-archive .qbc-quota-table {
  margin-top: 0;
}

.qbc-quota-archive .qbc-quota-table td code {
  color: #94a3b8;
}

.qbc-time-auth {
  background: #ffffff;
}

.qbc-time-auth-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.qbc-time-auth-desc {
  max-width: 720px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.qbc-time-auth-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.qbc-time-auth-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 10px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

.qbc-time-auth-stat strong {
  color: #0f172a;
  font-size: 15px;
}

.qbc-time-auth-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.qbc-time-auth-toolbar .qbc-quota-input {
  max-width: 320px;
}

.qbc-time-auth-count {
  color: #64748b;
  font-size: 12px;
}

.qbc-time-auth-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.qbc-time-auth-bulk {
  margin-left: 0;
}

.qbc-time-auth-table-wrap {
  overflow-x: auto;
}

.qbc-time-auth-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.qbc-time-auth-badge.active {
  color: #166534;
  background: #dcfce7;
}

.qbc-time-auth-badge.expiring {
  color: #92400e;
  background: #fef3c7;
}

.qbc-time-auth-badge.expired {
  color: #991b1b;
  background: #fee2e2;
}

.qbc-time-auth-owner,
.qbc-time-auth-remaining {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
}

.qbc-time-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qbc-time-auth-actions .qbc-quota-button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}

.qbc-time-auth-panel {
  border-color: #bfdbfe;
}

.qbc-time-auth-error {
  color: #991b1b;
  background: #fef2f2;
}

.qbc-time-auth-reminder {
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.qbc-time-auth-reminder > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
}

.qbc-time-auth-reminder > summary::-webkit-details-marker {
  display: none;
}

.qbc-time-auth-reminder[open] > summary {
  border-bottom: 1px solid #e2e8f0;
}

.qbc-time-auth-reminder-hint {
  color: #94a3b8;
  font-size: 12px;
}

.qbc-time-auth-reminder-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.qbc-time-auth-reminder-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.qbc-time-auth-reminder-inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.qbc-time-auth-reminder-inline .qbc-quota-input {
  width: 132px;
}

.qbc-time-auth-reminder-row [data-qbc-reminder="log-filter"] {
  width: 150px;
  margin-left: auto;
}

.qbc-time-auth-reminder-days {
  gap: 8px;
}

.qbc-time-auth-reminder-row [data-qbc-reminder="expired-days"] {
  width: 88px;
}

@media (max-width: 640px) {
  .qbc-time-auth-reminder-row [data-qbc-reminder="log-filter"] {
    margin-left: 0;
    width: 100%;
  }
}

.qbc-time-auth-reminder-note {
  color: #64748b;
  font-size: 12px;
}

.qbc-time-auth-reminded {
  margin-top: 4px;
  color: #166534;
  font-size: 11px;
}

.qbc-quota-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.qbc-quota-check input {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
}
@media (max-width: 900px) {
  .qbc-time-auth-table-wrap {
    overflow: visible;
  }

  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table,
  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table tbody,
  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table tr,
  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table td {
    display: block;
    width: 100%;
  }

  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table thead {
    display: none;
  }

  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
  }

  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table tr:last-child {
    margin-bottom: 0;
  }

  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table td {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 8px;
    padding: 6px 0;
    border: 0;
  }

  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-weight: 600;
  }

  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table td[colspan] {
    display: block;
    text-align: center;
  }

  :is(.qbc-time-auth, .qbc-quota-cards) .qbc-quota-table td[colspan]::before {
    content: none;
  }

  .qbc-time-auth-action-cell .qbc-time-auth-actions {
    width: 100%;
  }

  .qbc-php-quota-panel .qbc-quota-block:not(.qbc-quota-cards) > .qbc-quota-table {
    display: block;
    overflow-x: auto;
  }

  .qbc-php-quota-panel .qbc-quota-block:not(.qbc-quota-cards) > .qbc-quota-table th,
  .qbc-php-quota-panel .qbc-quota-block:not(.qbc-quota-cards) > .qbc-quota-table td {
    padding: 7px 6px;
  }
}

@media (max-width: 640px) {
  .qbc-php-quota-panel {
    margin: 12px;
    padding: 14px;
  }

  .qbc-time-auth-embedded {
    margin: 12px 12px 0;
  }

  .qbc-time-auth-toolbar .qbc-quota-input {
    max-width: none;
  }

  .qbc-time-auth-bulk-actions {
    width: 100%;
    margin-left: 0;
  }

  .qbc-time-auth-bulk {
    flex: 1 1 auto;
  }

  .qbc-time-auth-heading {
    margin-bottom: 8px;
  }

  .qbc-time-auth-desc,
  .qbc-time-auth-reminder > summary .qbc-time-auth-reminder-hint {
    display: none;
  }

  .qbc-time-auth-summary {
    gap: 6px;
    margin-bottom: 8px;
  }

  .qbc-time-auth-stat {
    padding: 5px 9px;
  }

  .qbc-time-auth-reminder > summary {
    gap: 4px;
    padding: 9px 12px;
  }
}
