:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --card: #ffffff;
  --text: #231b13;
  --muted: #766b5d;
  --gold: #b97815;
  --line: #ded4c3;
}

.ring-package-toolbar-main,
.ring-package-toolbar-meta,
.ring-package-toolbar form,
.ring-package-months,
.ring-package-summary-list,
.ring-package-summary,
.ring-package-card header,
.ring-package-card header > div,
.ring-package-card footer,
.ring-package-info {
  display: flex;
  align-items: center;
}

.card.ring-package-toolbar {
  display: block;
  margin-bottom: 8px;
  padding: 10px 14px;
}

.ring-package-toolbar-main {
  justify-content: space-between;
  gap: 12px;
}

.ring-package-heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.ring-package-toolbar .ring-package-heading h2 {
  margin: 0;
  font-size: 20px;
  white-space: nowrap;
}

.ring-package-heading .hint {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}

.ring-package-toolbar form,
.ring-package-months {
  gap: 8px;
}

.ring-package-toolbar form {
  flex: 0 0 auto;
}

.ring-package-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}

.ring-package-toolbar input,
.ring-package-toolbar select {
  width: auto;
  min-height: 32px;
  padding: 4px 8px;
}

.ring-package-toolbar-meta {
  min-width: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee4d5;
  gap: 10px;
}

.ring-package-months {
  flex: 0 1 auto;
  max-width: 42%;
  min-width: 0;
  overflow-x: auto;
}

.ring-package-months strong,
.ring-package-months a {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ring-package-months a {
  padding: 5px 8px;
  color: var(--text);
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
}

.ring-package-months a.active {
  color: #fff;
  background: var(--gold);
  border-color: var(--gold);
}

.ring-package-form .full {
  grid-column: 1 / -1;
}

.ring-package-existing {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.ring-package-summary-list {
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
}

.ring-package-summary {
  flex: 0 0 auto;
  gap: 7px;
  padding: 5px 8px;
  background: #f7fbf7;
  border: 1px solid #d8e9dc;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.ring-package-summary > strong {
  font-size: 13px;
}

.ring-package-summary b {
  color: #147443;
  font-size: 13px;
  white-space: nowrap;
}

.ring-package-summary-empty {
  color: var(--muted);
  font-size: 12px;
}

.ring-package-list {
  display: grid;
  gap: 8px;
}

.ring-package-empty {
  margin: 0;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.ring-package-card {
  margin: 0;
  padding: 15px 17px;
}

.ring-package-card header {
  justify-content: space-between;
  gap: 12px;
}

.ring-package-card header > div {
  min-width: 0;
  gap: 9px;
}

.ring-package-card h3 {
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ring-package-card header > strong {
  color: #17643d;
  font-size: 13px;
  white-space: nowrap;
}

.ring-package-status.pending {
  color: #7b4b05;
  background: #fff0c9;
}

.ring-package-status.valid {
  color: #17643d;
  background: #dcf5e7;
}

.ring-package-status.invalid {
  color: #8b1e18;
  background: #ffe0dd;
}

.ring-package-info {
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.ring-package-note,
.ring-package-review-note {
  margin: 10px 0 0;
  padding: 9px 11px;
  background: #fffaf1;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
}

.ring-package-review-note {
  background: #f1f7f9;
}

.ring-package-images {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.ring-package-images button {
  width: 82px;
  height: 62px;
  padding: 0;
  overflow: hidden;
  background: #edf1f3;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: zoom-in;
}

.ring-package-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ring-package-card footer {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.ring-package-review-form {
  display: grid;
  grid-template-columns: 135px minmax(220px, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: min(100%, 720px);
}

.ring-package-review-form select,
.ring-package-review-form input {
  min-height: 34px;
  padding: 5px 8px;
}

.ring-package-dialog {
  width: min(94vw, 1500px);
  height: min(90vh, 940px);
  padding: 42px 16px 16px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}

.ring-package-dialog::backdrop {
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(4px);
}

.ring-package-dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ring-package-dialog button {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 21px;
  line-height: 1;
}

.card.ring-package-create {
  margin-bottom: 8px;
  padding: 0;
  overflow: hidden;
}

.ring-package-create summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
  color: #49300d;
  background: #fffaf1;
  font-size: 14px;
  font-weight: 800;
}

.ring-package-create summary::-webkit-details-marker {
  display: none;
}

.ring-package-create summary::before {
  content: "+";
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
}

.ring-package-create[open] summary {
  border-bottom: 1px solid var(--line);
}

.ring-package-create[open] summary::before {
  content: "−";
}

.ring-package-create summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.grid.ring-package-form {
  grid-template-columns: minmax(120px, 1.15fr) minmax(105px, 1fr) minmax(75px, 0.6fr) minmax(75px, 0.6fr) minmax(95px, 0.8fr) minmax(108px, 0.85fr) minmax(135px, 1fr) minmax(175px, 1.25fr) auto;
  align-items: end;
  gap: 8px;
  padding: 11px 14px 13px;
}

.ring-package-form label {
  gap: 4px;
  font-size: 12px;
}

.ring-package-form input,
.ring-package-form select {
  min-height: 34px;
  padding: 6px 8px;
}

.ring-package-proof-field input[type="file"] {
  min-width: 0;
  padding: 4px;
  font-size: 11px;
}

.ring-package-proof-field small {
  line-height: 1.2;
}

.ring-package-form .form-actions {
  grid-column: auto;
  align-self: end;
  gap: 8px;
  white-space: nowrap;
}

.ring-package-form .form-actions button {
  min-height: 34px;
  padding: 6px 11px;
}

.ring-package-form .form-actions a {
  font-size: 12px;
}

.card.ring-package-table-card {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.ring-package-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ring-package-table {
  width: 100%;
  min-width: 1380px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.ring-package-table th,
.ring-package-table td {
  padding: 4px 5px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: center;
  line-height: 1.25;
}

.ring-package-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #49300d;
  background: #f5dfb8;
  font-size: 13px;
  white-space: nowrap;
}

.ring-package-table tbody tr:nth-child(even) td {
  background: #fffaf2;
}

.ring-package-table tbody tr:hover td {
  background: #fff4dc;
}

.ring-package-table th:nth-child(1),
.ring-package-table td:nth-child(1) {
  width: 50px;
}

.ring-package-table th:nth-child(2),
.ring-package-table td:nth-child(2) {
  width: 58px;
}

.ring-package-table th:nth-child(3),
.ring-package-table td:nth-child(3) {
  width: 110px;
}

.ring-package-table th:nth-child(4),
.ring-package-table td:nth-child(4) {
  width: 95px;
}

.ring-package-table th:nth-child(5),
.ring-package-table td:nth-child(5) {
  width: 90px;
}

.ring-package-table th:nth-child(6),
.ring-package-table td:nth-child(6) {
  width: 82px;
}

.ring-package-table th:nth-child(7),
.ring-package-table td:nth-child(7) {
  width: 90px;
}

.ring-package-table th:nth-child(8),
.ring-package-table td:nth-child(8) {
  width: 94px;
}

.ring-package-table th:nth-child(9),
.ring-package-table td:nth-child(9) {
  width: 62px;
}

.ring-package-table th:nth-child(10),
.ring-package-table td:nth-child(10) {
  width: 100px;
}

.ring-package-table th:nth-child(11),
.ring-package-table td:nth-child(11) {
  width: 92px;
}

.ring-package-table th:nth-child(12),
.ring-package-table td:nth-child(12) {
  width: 62px;
}

.ring-package-table th:nth-child(13),
.ring-package-table td:nth-child(13) {
  width: 250px;
}

.ring-package-date,
.ring-package-time,
.ring-package-price,
.ring-package-commission {
  font-weight: 800;
  white-space: nowrap;
}

.ring-package-version,
.ring-package-player,
.ring-package-zone,
.ring-package-tier {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ring-package-table td > small,
.ring-package-review-text {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.ring-package-note-cell {
  color: var(--muted);
  font-size: 12px;
  text-align: left !important;
  overflow-wrap: anywhere;
}

.ring-package-table .ring-package-images {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
  margin: 0;
  overflow-x: auto;
}

.ring-package-table .ring-package-images button {
  flex: 0 0 46px;
  width: 46px;
  height: 38px;
}

.ring-package-price,
.ring-package-commission {
  color: #147443;
}

.ring-package-proof {
  width: 40px;
  height: 28px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.ring-package-proof img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ring-package-action-cell {
  width: 250px;
}

.ring-package-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.ring-package-actions .ring-package-review-form {
  flex: 1 1 auto;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 3px;
  min-width: 0;
  width: auto;
}

.ring-package-table .ring-package-review-form select,
.ring-package-table .ring-package-review-form input,
.ring-package-table .ring-package-review-form button {
  min-width: 0;
  min-height: 26px;
  height: 26px;
  padding: 2px 4px;
  font-size: 11px;
}

.ring-package-actions .mini-btn {
  min-width: 42px;
  min-height: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 11px;
}

.ring-package-delete-form {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 1100px) {
  .grid.ring-package-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ring-package-toolbar-main,
  .ring-package-toolbar-meta,
  .ring-package-card header,
  .ring-package-card footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ring-package-heading {
    flex-wrap: wrap;
  }

  .ring-package-heading .hint {
    white-space: normal;
  }

  .ring-package-toolbar form {
    flex-wrap: wrap;
  }

  .ring-package-months {
    max-width: 100%;
  }

  .ring-package-review-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .grid.ring-package-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ring-package-form .form-actions {
    grid-column: 1 / -1;
  }

  .ring-package-table .ring-package-review-form {
    grid-template-columns: 78px minmax(0, 1fr) auto;
  }
}

@media (max-width: 520px) {
  .grid.ring-package-form {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

a {
  color: var(--gold);
  text-decoration: none;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #17110c, #2a1a0e);
  color: #fff4da;
  box-shadow: 0 16px 36px rgba(52, 39, 24, 0.18);
}

.admin-header h1 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.2;
}

.admin-header p {
  margin: 0;
  color: #c9b899;
}

.admin-header nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-header nav a {
  display: grid;
  gap: 4px;
  min-width: 112px;
  min-height: 48px;
  align-content: center;
  padding: 8px 14px;
  color: #e7d2a8;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: center;
}

.admin-header nav a strong {
  color: #fff4da;
  font-size: 15px;
}

.admin-header nav a span {
  color: #a99676;
  font-size: 12px;
}

.admin-header nav a.active,
.admin-header nav a:hover {
  background: rgba(255, 244, 218, 0.08);
  border-color: rgba(185, 120, 21, 0.45);
}

.admin-main {
  width: min(1360px, calc(100% - 48px));
  margin: 24px auto 60px;
}

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

.module-tabs a {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  color: var(--text);
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(52, 39, 24, 0.08);
}

.module-tabs a.active {
  color: #fff6df;
  background: linear-gradient(135deg, #25170e, #6b4015);
  border-color: #b97815;
}

.module-tabs strong {
  font-size: 20px;
}

.module-tabs span {
  color: var(--muted);
  font-size: 13px;
}

.module-tabs a.active span {
  color: #e7d2a8;
}

.card,
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(52, 39, 24, 0.1);
}

.card {
  padding: 24px;
  margin-bottom: 18px;
}

.card h2 {
  margin: 0 0 18px;
}

.module-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
  gap: 24px;
  align-items: center;
  min-height: 260px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-empty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-empty-grid span {
  display: grid;
  place-items: center;
  min-height: 70px;
  color: #7a4a15;
  font-weight: 800;
  background: #fff7e8;
  border: 1px solid #ead8b6;
  border-radius: 8px;
}

.tool-portal {
  display: grid;
  gap: 18px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 20px;
  color: var(--text);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(52, 39, 24, 0.08);
}

.tool-card:hover {
  border-color: rgba(185, 120, 21, 0.55);
  transform: translateY(-1px);
}

.tool-card strong {
  color: #56340f;
  font-size: 18px;
}

.tool-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.tool-panel {
  min-height: 260px;
}

.tool-section {
  display: grid;
  gap: 16px;
}

.tool-section h2 {
  margin: 18px 0 0;
  padding-left: 14px;
  border-left: 5px solid #7d4c13;
  font-size: 22px;
}

.tool-featured-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.tool-featured-card {
  display: grid;
  grid-template-rows: auto auto auto;
  overflow: hidden;
  color: var(--text);
  background: #fff;
  border: 1px solid #e6dfd4;
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(52, 39, 24, 0.08);
}

.tool-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #2a1a0e;
}

.tool-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-cover span {
  color: #f4d79a;
  font-size: 34px;
  font-weight: 900;
}

.tool-featured-title {
  padding: 8px 10px;
  overflow: hidden;
  color: #4f2f0d;
  background: #fff6df;
  border-top: 1px solid #ead8b6;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-featured-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  color: #4d6b7d;
  background: #e8f6ff;
  border-top: 1px solid #cbe8f7;
  font-size: 12px;
  text-align: center;
}

.tool-featured-rating em {
  color: #20c768;
  font-size: 14px;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 1px;
  text-align: center;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.9),
    0 0 8px rgba(32, 199, 104, 0.9),
    0 0 16px rgba(46, 226, 153, 0.62);
  white-space: nowrap;
  animation: starTwinkle 1.8s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.28);
  }
}

.tool-recent-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.tool-recent-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(24px, auto) auto;
  justify-items: center;
  gap: 5px;
  min-height: 96px;
  padding: 9px 8px 8px;
  overflow: hidden;
  color: var(--text);
  text-align: center;
  background: #f4e5c8;
  border: 1px solid #dec59b;
  border-radius: 7px;
  box-shadow: 0 6px 16px rgba(52, 39, 24, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tool-recent-card:hover {
  background: #eed8ac;
  border-color: #c99f55;
  box-shadow: 0 8px 18px rgba(52, 39, 24, 0.13);
  transform: translateY(-2px);
}

.tool-recent-card:hover strong {
  color: #9f6212;
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  overflow: hidden;
  color: #7d4c13;
  background: #e7d1aa;
  border-radius: 8px;
}

.tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-icon b {
  font-size: 18px;
}

.tool-recent-card strong {
  font-size: 12px;
  line-height: 1.25;
  align-self: center;
}

.tool-recent-card em {
  width: 100%;
  margin-top: auto;
  padding: 4px 6px;
  color: #6b4215;
  background: #fff0c8;
  border: 1px solid #d8bd8c;
  border-radius: 4px;
  font-style: normal;
  font-size: 11px;
  line-height: 1.2;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.tool-recent-card:hover em {
  color: #fff4da;
  background: #9f6212;
  border-color: #9f6212;
}

.new-ribbon {
  position: absolute;
  left: -30px;
  top: 8px;
  width: 78px;
  transform: rotate(-45deg);
  color: #fff;
  background: #8bb56d;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
}

.tool-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed #d9cbb7;
  border-radius: 8px;
}

.ring-shell {
  padding-bottom: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 24px;
  padding: 0 9px;
  color: #7a5b2f;
  background: #efe1c9;
  border: 1px solid #dec79d;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.ok {
  color: #176d3b;
  background: #ddf4e5;
  border-color: #a7dfbd;
}

.status-pill.warn {
  color: #9b5d00;
  background: #fff0c7;
  border-color: #e5c06a;
}

.status-pill.muted {
  color: #5f5344;
  background: #eee7db;
  border-color: #d9ccb8;
}

.ring-credit-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #dcc9aa;
  border-radius: 6px;
  color: #6c5940;
  background: #fffaf1;
  white-space: nowrap;
}

.ring-credit-line strong {
  color: #8f5a18;
}

.owner-credit {
  margin-left: 18px;
  color: #805b28;
  font-weight: 600;
}

.ring-task-table {
  min-width: 1180px;
}

.ring-task-table th,
.ring-task-table td {
  vertical-align: middle;
}

.ring-task-table .inline-action {
  margin: 2px;
}

.ring-detail-table {
  table-layout: fixed;
}

.ring-detail-table .wide-cell {
  white-space: normal;
  text-align: left;
  line-height: 1.6;
}

.ring-detail-table .bug-reason-cell {
  max-width: 320px;
  min-width: 220px;
  white-space: normal;
  text-align: left;
  line-height: 1.55;
  word-break: break-word;
}

.bug-reason-scroll {
  max-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
}

.bug-card-list {
  display: grid;
  gap: 14px;
}

.bug-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fffaf1;
  border: 1px solid #e4d2b7;
  border-radius: 8px;
}

.bug-card-head,
.bug-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.bug-card-head strong {
  color: #4d310d;
  font-size: 17px;
}

.bug-card-head p,
.bug-card-foot span {
  margin: 4px 0 0;
  color: #806f59;
  font-size: 12px;
}

.bug-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.bug-reason-full {
  padding: 12px;
  color: #352514;
  background: #fff4dd;
  border: 1px solid #ead4ad;
  border-radius: 7px;
  line-height: 1.75;
  white-space: normal;
  word-break: break-word;
}

.bug-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.bug-media-item {
  display: block;
  overflow: hidden;
  min-height: 120px;
  background: #f3eadb;
  border: 1px solid #dfc9a7;
  border-radius: 8px;
}

.bug-media-item img,
.bug-media-item video {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #1b150e;
}

.bug-mini-media {
  display: inline-block;
  overflow: hidden;
  width: 86px;
  height: 64px;
  margin: 2px;
  background: #1b150e;
  border: 1px solid #dfc9a7;
  border-radius: 6px;
  vertical-align: middle;
}

.bug-mini-media img,
.bug-mini-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.grid .full {
  grid-column: 1 / -1;
}

.ring-month-form {
  gap: 8px;
}

.ring-month-form input,
.ring-month-form select {
  min-height: 34px;
  width: auto;
  min-width: 140px;
}

.ring-create-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 8px;
  background: #fbf4e8;
  border: 1px solid #e1d0b6;
  border-radius: 8px;
}

.ring-create-form input {
  width: 150px;
  min-height: 32px;
}

.ring-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.ring-days-grid label {
  gap: 6px;
  padding: 10px;
  background: #fbf4e8;
  border: 1px solid #e1d0b6;
  border-radius: 8px;
}

.ring-days-grid span {
  color: #7a5b2f;
  font-size: 12px;
  font-weight: 800;
}

.ring-days-grid input {
  min-height: 34px;
  padding: 0 8px;
}

.ring-compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.ring-compare-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fbf4e8;
  border: 1px solid #e1d0b6;
  border-radius: 8px;
}

.ring-compare-grid strong {
  color: #7a4607;
  font-size: 20px;
}

.ring-compare-grid span {
  color: #7d6b52;
  font-size: 12px;
  font-weight: 800;
}

.ring-month-tabs,
.ring-pending-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  background: #f7ead6;
  border: 1px solid #dec59b;
  border-radius: 8px;
}

.ring-month-tabs span {
  color: #6b4215;
  font-weight: 800;
}

.ring-month-tabs a {
  padding: 6px 10px;
  color: #70440f;
  background: #fff8eb;
  border: 1px solid #e0c99f;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.ring-month-tabs a.active {
  color: #fff8e9;
  background: #7b4b11;
  border-color: #7b4b11;
}

.ring-pending-box {
  background: #fff0c7;
  border-color: #e5c06a;
}

.ring-sheet-wrap {
  overflow-x: auto;
  border: 1px solid #d9cbb7;
  border-radius: 8px;
}

.ring-sheet-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
  background: #fff;
  font-size: 10px;
}

.ring-sheet-table th,
.ring-sheet-table td {
  padding: 3px 2px;
  border: 1px solid #d9d9d9;
  text-align: center;
  white-space: nowrap;
}

.ring-sheet-table th {
  color: #111;
  background: #f8f8f8;
  font-weight: 800;
}

.ring-sheet-table input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  height: 100%;
  min-height: 24px;
  margin: 0;
  padding: 0 1px;
  text-align: center;
  background: #fffaf1;
  border-color: #d6d6d6;
  border-radius: 0;
}

.ring-sheet-table input::-webkit-outer-spin-button,
.ring-sheet-table input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.ring-input-cell {
  padding: 0 !important;
}

.ring-col-day { width: 42px; }
.ring-col-input { width: 64px; }
.ring-col-result { width: 78px; }
.ring-col-compare { width: 72px; }
.ring-col-rate { width: 58px; }
.ring-col-level { width: 44px; }

.ring-bold {
  background: #f1f1f1;
  font-weight: 900;
}

.ring-profit-plus {
  color: #f00;
  font-weight: 900;
}

.ring-profit-minus,
.ring-diff-down {
  color: #b00020;
}

.ring-diff-up {
  color: #9a6400;
  background: #ffe6a6;
}

.ring-level-good {
  background: #c6efce;
}

.ring-level-mid {
  background: #00b0f0;
  color: #00283a;
}

.ring-level-bad {
  background: #ffc7ce;
}

.ring-sheet-total td {
  background: #f8f1df;
  font-weight: 900;
  text-align: right;
}

.dashboard-hero {
  min-height: 170px;
  display: grid;
  align-items: center;
}

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

.metric-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(52, 39, 24, 0.08);
}

.metric-card strong {
  font-size: 34px;
  line-height: 1;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-actions .list-head {
  margin-bottom: 16px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 18px;
  color: var(--text);
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(52, 39, 24, 0.06);
}

.quick-card:hover {
  border-color: rgba(185, 120, 21, 0.55);
  transform: translateY(-1px);
}

.quick-card strong {
  font-size: 18px;
}

.quick-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.permission-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding: 14px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.ring-permission-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e1d3bd;
  border-radius: 8px;
}

.ring-permission-panel[hidden] {
  display: none;
}

.ring-permission-head,
.ring-permission-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ring-permission-head {
  justify-content: space-between;
}

.ring-permission-head small {
  color: var(--muted);
}

.ring-permission-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ring-permission-group {
  overflow: hidden;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.ring-permission-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  list-style-position: inside;
}

.ring-permission-group summary small {
  color: var(--gold);
  font-weight: 800;
}

.ring-permission-group > div {
  display: grid;
  gap: 1px;
  padding: 0 8px 8px;
}

.ring-permission-group label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px;
  background: #fff;
  border-radius: 5px;
  cursor: pointer;
}

.ring-permission-group label:hover {
  background: #fff5df;
}

.ring-permission-group input {
  width: auto;
  margin-top: 3px;
}

.ring-permission-group label span {
  display: grid;
  gap: 2px;
}

.ring-permission-group label b {
  color: var(--text);
  font-size: 13px;
}

.ring-permission-group label small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.ring-permission-lock {
  margin: 0;
  padding: 8px 10px;
  color: #7b4b05;
  background: #fff0c9;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.ring-sheet-table input[readonly] {
  color: #81796f;
  background: #f1eee8;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .ring-permission-groups {
    grid-template-columns: 1fr;
  }

  .ring-permission-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-label input {
  width: auto;
}

.inline-field-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.36fr) minmax(260px, 0.64fr);
  gap: 16px;
  align-items: start;
}

.media-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.media-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 16px;
  background: #fffdf8;
  border: 1px solid #eadbc4;
  border-radius: 8px;
}

.media-panel h3 {
  margin: 0;
  color: #5c3b13;
  font-size: 15px;
}

.media-check {
  min-height: 42px;
  padding: 0 12px;
  color: #5c4932;
  background: #fff8eb;
  border: 1px solid #eadbc4;
  border-radius: 6px;
}

.media-current {
  background: #fbf5e9;
}

.media-current p {
  margin: 0;
  color: #5c4932;
  line-height: 1.65;
  word-break: break-all;
}

.panel-hint {
  margin: 0;
  color: #8c7c68;
  font-size: 13px;
  line-height: 1.7;
}

.media-clear {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 40px;
  padding: 0 12px;
  color: #7b3c21;
  background: #fff1e8;
  border: 1px solid #e7c4b0;
  border-radius: 6px;
}

.showcase-section-hint {
  margin: -4px 0 16px;
}

.showcase-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.showcase-admin-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
  padding: 18px;
  border: 1px solid #eadbc4;
  border-radius: 8px;
  background: #fffdf8;
}

.showcase-admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid #eee2d0;
}

.showcase-admin-heading h3,
.showcase-admin-heading p {
  margin: 0;
}

.showcase-admin-heading h3 {
  color: #5c3b13;
  font-size: 16px;
}

.showcase-admin-heading p {
  margin-top: 5px;
  color: #8c7c68;
  font-size: 12px;
  line-height: 1.6;
}

.showcase-switch {
  position: relative;
  display: inline-flex;
  grid-template-columns: none;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.showcase-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.showcase-switch span {
  position: relative;
  width: 38px;
  height: 22px;
  border: 1px solid #d9c6aa;
  border-radius: 12px;
  background: #e8dfd2;
  transition: background .18s ease, border-color .18s ease;
}

.showcase-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(76, 49, 18, .22);
  transition: transform .18s ease;
}

.showcase-switch input:checked + span {
  border-color: #9b681d;
  background: #b77a25;
}

.showcase-switch input:checked + span::after {
  transform: translateX(16px);
}

.showcase-switch input:focus-visible + span {
  outline: 3px solid rgba(183, 122, 37, .2);
}

.showcase-switch b {
  color: #5c4932;
  font-size: 13px;
}

.showcase-current-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.showcase-current-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.showcase-upload-preview[hidden] {
  display: none;
}

.showcase-upload-preview {
  padding: 12px;
  border: 1px dashed #d5b98e;
  border-radius: 7px;
  background: #fff9ef;
}

.showcase-upload-preview-heading {
  margin: 0 0 10px;
  color: #7d531d;
  font-size: 13px;
  font-weight: 700;
}

.showcase-upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.showcase-upload-preview-grid.is-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.showcase-upload-preview-item {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e2d1b8;
  border-radius: 5px;
  background: #171510;
}

.showcase-upload-preview-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.showcase-upload-preview-grid.is-wide img {
  aspect-ratio: 16 / 9;
}

.showcase-upload-preview-item figcaption {
  overflow: hidden;
  padding: 6px 7px;
  color: #6b5a45;
  background: #fffdf8;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase-media-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4d5bf;
  border-radius: 6px;
  background: #f8f1e6;
}

.showcase-media-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #191713;
}

.showcase-current-wide .showcase-media-item img {
  aspect-ratio: 16 / 9;
}

.showcase-media-item .check-label {
  min-height: 34px;
  justify-content: center;
  padding: 6px;
  color: #7b3c21;
  font-size: 12px;
  background: #fff8ed;
}

.showcase-empty {
  margin: 0;
  padding: 22px 12px;
  color: #9a8b77;
  border: 1px dashed #ddccb3;
  border-radius: 6px;
  background: #fbf6ed;
  text-align: center;
}

.account-card {
  max-width: 760px;
}

.account-form {
  grid-template-columns: 1fr;
  max-width: 520px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

label textarea {
  min-height: 96px;
}

textarea {
  resize: vertical;
}

small {
  color: #8c7c68;
}

.button-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(260px, 0.65fr);
  gap: 16px;
  margin-bottom: 14px;
}

.image-button-row {
  grid-template-columns: minmax(160px, 0.3fr) minmax(240px, 0.45fr) minmax(190px, 0.25fr);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  background: #9f6212;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.is-submitting {
  opacity: 0.82;
}

button[aria-busy="true"] {
  filter: brightness(0.96);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.domain-builder {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1.2fr) minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff8eb;
}

.domain-builder label {
  margin: 0;
}

.domain-builder .mini-btn {
  min-height: 42px;
  white-space: nowrap;
}

.review-password {
  min-width: min(320px, 100%);
  margin: 0;
}

.review-password input {
  margin-top: 5px;
}

.notice,
.alert {
  padding: 12px 14px;
  background: #fff1cc;
  border: 1px solid #e3bb65;
  border-radius: 6px;
}

.cleanup-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.cleanup-stats div {
  padding: 16px;
  background: #fff8eb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cleanup-stats strong {
  display: block;
  color: #8b510b;
  font-size: 24px;
}

.cleanup-stats span {
  color: var(--muted);
  font-size: 13px;
}

.cleanup-actions {
  margin-top: 12px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 16px;
  padding: 10px;
  background: #fbf5e9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  color: #77572a;
  background: #fffdf8;
  border: 1px solid #e3d2b8;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
}

.category-tabs a.active {
  color: #fff8e9;
  background: #7b4b11;
  border-color: #7b4b11;
  box-shadow: 0 8px 18px rgba(123, 75, 17, 0.18);
}

table {
  width: 100%;
  border-collapse: collapse;
}

.project-table {
  border-collapse: separate;
  border-spacing: 0;
}

.project-table thead th {
  color: #857764;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #fbf5e9;
}

.project-table tbody tr:not(.owner-group) {
  background: #fffdf8;
}

.project-table tbody tr:not(.owner-group):hover {
  background: #fff8eb;
}

th,
td {
  padding: 14px 10px;
  text-align: left;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

td input {
  min-width: 280px;
}

.project-table td input {
  min-width: 0;
}

.project-main {
  min-width: 230px;
}

.project-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.project-title-line strong {
  font-size: 15px;
  line-height: 1.35;
}

.sort-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  color: #7a4607;
  background: #fff0cf;
  border: 1px solid #e3c27d;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  color: #745f43;
  background: #f8efe1;
  border: 1px solid #eadbc4;
  border-radius: 999px;
  font-size: 12px;
}

.domain-cell {
  min-width: 250px;
}

.copy-url {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copy-url input {
  height: 34px;
  padding: 7px 9px;
  color: #433627;
  background: #fffdf8;
  border-radius: 5px;
  font-size: 13px;
}

.domain-copy + .domain-copy {
  margin-top: 8px;
}

.editor .domain-copy input {
  height: 42px;
  padding: 11px 12px;
}

.editor .domain-copy button {
  min-height: 42px;
}

.domain-list {
  display: block;
  margin-top: 8px;
}

.copy-url button {
  flex: 0 0 auto;
  min-height: 38px;
}

.table-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  gap: 8px;
  min-width: 230px;
}

.table-stats span {
  display: grid;
  gap: 3px;
  padding: 9px 8px;
  background: #fff8eb;
  border: 1px solid #ead9bd;
  border-radius: 6px;
  text-align: center;
}

.table-stats b {
  color: #7a4607;
  font-size: 16px;
}

.table-stats em {
  color: #867762;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.time-cell {
  min-width: 132px;
  color: #7b6b58;
  font-size: 12px;
}

.actions-cell {
  width: 250px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.row-actions a,
.row-actions form {
  margin: 0;
}

.transfer-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-basis: 100%;
  margin-top: 2px !important;
}

.transfer-action select {
  flex: 1 1 auto;
  min-width: 138px;
  height: 30px;
  padding: 4px 8px;
  background: #fffdf8;
  border-radius: 5px;
  font-size: 12px;
}

td a {
  margin-right: 12px;
}

.inline-action {
  display: inline;
  margin-right: 0;
}

.inline-action button {
  display: inline;
  min-height: 0;
  padding: 0;
  color: var(--gold);
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
}

.inline-action button:hover {
  text-decoration: underline;
}

.mini-btn,
.inline-action .mini-btn,
a.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  color: #fff;
  background: #9f6212;
  border: 1px solid #9f6212;
  border-radius: 5px;
  font: 700 12px/1 "Microsoft YaHei", Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.mini-btn:hover,
.inline-action .mini-btn:hover,
a.mini-btn:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.mini-btn.ghost {
  color: #7a4607;
  background: #fff8eb;
  border-color: #e0c99f;
}

.mini-btn.muted {
  color: #614d34;
  background: #efe4d2;
  border-color: #ddc9a8;
}

.mini-btn.danger {
  color: #fff;
  background: #a33b2f;
  border-color: #a33b2f;
}

button.danger {
  color: #fff;
  background: #a33b2f;
  border-color: #a33b2f;
}

.mini-btn.review-ready {
  color: #fff;
  background: #168a44;
  border-color: #168a44;
}

.mini-btn.review-done {
  color: #efe8dc;
  background: #8c8578;
  border-color: #8c8578;
}

.review-badge {
  color: #0f7f3d;
  background: #e5f7eb;
  border-color: #bde6ca !important;
}

.owner-group td {
  padding: 10px 12px;
  color: #fff5dc;
  background: #5f3a0b;
  border-top: 18px solid var(--bg);
  font-weight: 700;
}

.owner-toggle {
  min-height: 28px;
  margin-right: 10px;
  padding: 0 10px;
  color: #fff;
  background: #7f511d;
  border: 1px solid rgba(255, 245, 220, 0.28);
  border-radius: 6px;
  font-size: 12px;
}

.service-table th,
.service-table td {
  padding: 16px 14px;
}

.service-table .project-main strong {
  display: block;
  font-size: 16px;
}

.service-domains {
  min-width: 320px;
}

.service-copy {
  justify-content: flex-start;
}

.service-copy + .service-copy {
  margin-top: 8px;
}

.service-copy span {
  flex: 1 1 auto;
  min-width: 0;
  color: #4f3d27;
  word-break: break-all;
}

.service-copy .mini-btn {
  flex: 0 0 auto;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #745006;
  background: #fff1ce;
  border: 1px solid #e1c681;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.service-account {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #1f4f7c;
  background: #eaf5ff;
  border: 1px solid #bad9f1;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.service-owner-group td {
  border-top-width: 10px;
}

.stats-card {
  padding: 10px;
}

.stats-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 14px 18px;
  background: #f1fbf5;
  border: 1px solid #bee7c7;
}

.stats-topbar h2 {
  margin: 0 0 6px;
  color: #0063a7;
  font-size: 15px;
}

.stats-topbar p {
  margin: 0;
  color: #c08400;
  font-size: 13px;
}

.stats-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8fb983;
  font-size: 13px;
  white-space: nowrap;
}

.stats-layout {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  border: 1px solid #b8c7ff;
}

.stats-side {
  background: #f7fcff;
  border-right: 1px solid #b8c7ff;
}

.stats-side a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  color: #00518f;
  background: #e9eeff;
  border-bottom: 1px solid #b8c7ff;
  font-size: 14px;
}

.stats-side a.active {
  background: #faffff;
  color: #003f75;
  font-weight: 800;
}

.stats-panel {
  min-height: 510px;
  padding: 12px;
  background: #fbffff;
}

.stats-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid #0d89d4;
  font-size: 13px;
}

.stats-filter label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #111;
}

.stats-filter input {
  width: 150px;
  height: 28px;
  padding: 3px 6px;
  background: #fff;
  border-radius: 0;
}

.stats-filter a {
  margin-left: 2px;
  color: #001eff;
}

.stats-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 10px 0;
  border: 1px solid #c9c9c9;
  background: #f1effc;
}

.stats-kpis div {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: center;
  border-right: 1px solid #c9c9c9;
}

.stats-kpis div:last-child {
  border-right: 0;
}

.stats-kpis strong {
  color: #ff4b00;
  font-size: 24px;
}

.stats-kpis span {
  color: #6b6270;
  font-size: 13px;
}

.stats-table {
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

.stats-table th,
.stats-table td {
  padding: 8px 10px;
  color: #222;
  border: 1px solid #bcbcbc;
}

.stats-table th {
  font-weight: 400;
  text-align: center;
  background: #fbfbfb;
}

.stats-table td {
  text-align: center;
}

.stats-table .stats-total td {
  background: #fafafa;
  font-weight: 700;
}

.stats-url-cell {
  text-align: left !important;
  word-break: break-all;
}

.detail-table th:first-child,
.detail-table td:first-child {
  width: 120px;
}

.detail-table th:last-child,
.detail-table td:last-child {
  width: 90px;
}

.detail-info {
  text-align: left !important;
}

.detail-info p {
  margin: 3px 0;
  word-break: break-all;
}

.detail-info strong {
  color: #00a762;
}

.stats-code-box {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.stats-code-box h3 {
  margin: 10px 0 0;
  font-size: 15px;
}

@media (max-width: 980px) {
  .project-table,
  .project-table thead,
  .project-table tbody,
  .project-table th,
  .project-table td,
  .project-table tr {
    display: block;
  }

  .project-table thead {
    display: none;
  }

  .project-table tbody tr:not(.owner-group) {
    padding: 14px;
    border-top: 1px solid var(--line);
  }

  .project-table td {
    padding: 8px 0;
    border-top: 0;
  }

  .table-stats {
    min-width: 0;
  }

  .actions-cell {
    width: auto;
  }

  .media-layout {
    grid-template-columns: 1fr;
  }

  .showcase-admin-grid {
    grid-template-columns: 1fr;
  }

  .stats-layout {
    grid-template-columns: 1fr;
  }

  .stats-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
  }

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

  .dashboard-grid,
  .quick-grid,
  .tool-grid,
  .tool-featured-grid,
  .tool-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 230, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(82, 105, 255, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(3, 9, 20, 0.96), rgba(7, 14, 28, 0.94)),
    #050b14;
}

body:not(:has(.admin-header)) a[href*="finance"] {
  display: none !important;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(62, 221, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(62, 221, 255, 0.05) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  background-size: 48px 48px, 48px 48px, 100% 5px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
}

.login-page::after {
  content: "const future = choose(direction) > repeat(effort);\A while(alive){ learn(); build(); deploy(); }\A // root@private-garden: access granted\A function destiny(){ return knowledge.transform(life); }\A npm run success -- --mode production";
  position: fixed;
  left: 6vw;
  bottom: 8vh;
  width: min(620px, 88vw);
  pointer-events: none;
  color: rgba(86, 240, 255, 0.16);
  font: 700 18px/1.8 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  text-shadow: 0 0 18px rgba(46, 226, 255, 0.28);
}

.login-card {
  width: min(420px, calc(100% - 32px));
  position: relative;
  z-index: 1;
  padding: 34px 34px 32px;
  color: #eafcff;
  background:
    linear-gradient(180deg, rgba(13, 31, 52, 0.84), rgba(6, 14, 28, 0.9)),
    rgba(6, 14, 28, 0.88);
  border: 1px solid rgba(81, 224, 255, 0.34);
  border-radius: 12px;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.46),
    0 0 44px rgba(28, 196, 255, 0.12),
    inset 0 1px 0 rgba(180, 245, 255, 0.18);
  backdrop-filter: blur(14px);
}

.login-card h1 {
  margin: 0 0 26px;
  color: #eafcff;
  font-size: 30px;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0 22px rgba(52, 221, 255, 0.36);
}

.login-card label {
  margin-bottom: 16px;
  color: #9fc4d0;
}

.login-card input {
  height: 46px;
  color: #eafcff;
  background: rgba(9, 25, 45, 0.76);
  border-color: rgba(81, 224, 255, 0.28);
  border-radius: 8px;
  outline: none;
}

.login-card input:focus {
  border-color: #4ee9ff;
  box-shadow: 0 0 0 3px rgba(78, 233, 255, 0.13), 0 0 24px rgba(78, 233, 255, 0.12);
}

.login-card button {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  color: #03101c;
  background: linear-gradient(180deg, #7af3ff, #1aa7ff);
  border: 1px solid #8df6ff;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(26, 167, 255, 0.28);
}

.login-card button:hover {
  filter: brightness(1.04);
}

.login-slogan {
  position: fixed;
  left: 50%;
  top: 13vh;
  z-index: 1;
  width: min(960px, calc(100% - 40px));
  transform: translateX(-50%);
  color: #dffbff;
  font-size: clamp(28px, 4.2vw, 58px);
  font-weight: 900;
  line-height: 1.18;
  text-align: center;
  text-shadow:
    0 0 18px rgba(57, 224, 255, 0.52),
    0 0 44px rgba(49, 118, 255, 0.34);
}

.hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .admin-header {
    position: static;
    width: auto;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-header nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-header nav a {
    min-width: 0;
  }

  .admin-main {
    width: min(100% - 24px, 1360px);
    margin: 16px auto 48px;
  }

  .dashboard-grid,
  .quick-grid,
  .tool-grid,
  .tool-featured-grid,
  .tool-recent-grid,
  .ring-days-grid,
  .grid,
  .button-row,
  .list-head,
  .module-tabs,
  .module-empty,
  .module-empty-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .domain-builder {
    grid-template-columns: 1fr;
  }


  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  .ring-sheet-table {
    display: table;
  }

  .ring-sheet-table thead {
    display: table-header-group;
  }

  .ring-sheet-table tbody {
    display: table-row-group;
  }

  .ring-sheet-table tr {
    display: table-row;
  }

  .ring-sheet-table th,
  .ring-sheet-table td {
    display: table-cell;
  }

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