:root {
  --ink: #020a07;
  --panel: #06130d;
  --panel2: #0a1d13;
  --gold: #d4aa45;
  --gold2: #f3d77b;
  --text: #f8fbf5;
  --muted: #9aaca2;
  --line: rgba(212, 170, 69, .2);
  --success: #66ff52;
}

body {
  background:
    radial-gradient(circle at 85% 5%, rgba(45, 255, 62, .12), transparent 34rem),
    linear-gradient(145deg, #010604, #041009 60%, #020805);
}

body::before {
  opacity: .15;
  background-image:
    linear-gradient(rgba(74, 255, 76, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 255, 76, .08) 1px, transparent 1px);
  background-size: 64px 64px;
}

.topbar { background: rgba(1, 8, 5, .9); }
.login-card,
.panel-section { background: linear-gradient(145deg, rgba(7, 24, 15, .98), rgba(2, 12, 7, .98)); }
.mini-card,
.upload { background: #020b07; }

.panel-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: -8px 0 24px;
  padding: 8px 0 12px;
  scrollbar-width: thin;
}

.panel-tabs a {
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
}

.panel-tabs a:hover {
  color: var(--gold2);
  border-color: var(--gold);
}

.product-edit-grid { grid-template-columns: 1fr; }
.compact { margin-bottom: 0; }

.secondary-button {
  background: transparent;
  color: var(--gold2);
  border: 1px solid var(--line);
  padding: 10px 13px;
}

.empty-state {
  padding: 30px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}

.inquiry-list { display: grid; gap: 14px; }
.inquiry {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(240px, 1.5fr) auto;
  gap: 18px;
  align-items: center;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #020b07;
}

.inquiry.is-new {
  border-color: rgba(102, 255, 82, .55);
  box-shadow: inset 3px 0 #66ff52;
}

.inquiry h3 { margin: 0 0 6px; font-size: 16px; }
.inquiry p { margin: 0; color: var(--muted); line-height: 1.55; }
.inquiry-contact { display: grid; gap: 5px; }
.inquiry-contact a { color: var(--gold2); text-decoration: none; font-size: 13px; }
.inquiry dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 12px; }
.inquiry dt { color: var(--muted); }
.inquiry dd { margin: 0; }

.warranty-admin {
  margin-top: 22px;
}

.warranty-admin__layout {
  display: grid;
  grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr);
  gap: 22px;
  align-items: start;
}

.warranty-editor {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(212, 170, 69, .28);
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0, rgba(102, 255, 82, .08), transparent 18rem),
    #020b07;
}

.warranty-editor > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 3px;
}

.warranty-editor h3 {
  margin: 5px 0 0;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 500;
}

.warranty-editor > button {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.warranty-registry {
  min-width: 0;
}

.warranty-registry__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}

.warranty-registry__head > div {
  display: grid;
  gap: 4px;
}

.warranty-registry__head strong {
  font-size: 17px;
  color: var(--gold2);
}

.warranty-registry__head small {
  color: var(--muted);
}

.warranty-registry__head input {
  width: min(280px, 46%);
}

.warranty-records {
  display: grid;
  gap: 12px;
  max-height: 920px;
  overflow: auto;
  padding-right: 4px;
}

.warranty-record {
  display: grid;
  gap: 15px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #020b07;
}

.warranty-record[hidden] {
  display: none;
}

.warranty-record > header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.warranty-record h3 {
  margin: 9px 0 0;
  font-size: 16px;
}

.plate-chip {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid rgba(212, 170, 69, .38);
  border-radius: 7px;
  background: linear-gradient(90deg, #f8f8f2 0 17%, #eee 17%);
  color: #07100b;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.status-pill--active {
  border-color: rgba(102, 255, 82, .42);
  background: rgba(102, 255, 82, .1);
  color: #94ff87;
}

.status-pill--expired,
.status-pill--inactive {
  color: #d8cfc0;
}

.status-pill--cancelled {
  border-color: rgba(255, 112, 112, .35);
  color: #ff9f9f;
}

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

.warranty-record dl > div {
  min-width: 0;
  padding-top: 9px;
  border-top: 1px solid rgba(212, 170, 69, .1);
}

.warranty-record dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.warranty-record dd {
  overflow-wrap: anywhere;
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
}

.warranty-record__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warranty-record__actions form {
  margin: 0;
}

.warranty-record__actions .secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.danger-button {
  border: 1px solid rgba(255, 112, 112, .24);
  background: rgba(84, 37, 43, .38);
  color: #ffaeae;
}

@media (max-width: 850px) {
  .inquiry { grid-template-columns: 1fr; }
  .panel-tabs { margin-top: 0; }
  .warranty-admin__layout { grid-template-columns: 1fr; }
  .warranty-registry__head { align-items: stretch; flex-direction: column; }
  .warranty-registry__head input { width: 100%; }
  .warranty-records { max-height: none; overflow: visible; }
}

@media (max-width: 560px) {
  .warranty-editor { padding: 17px; }
  .warranty-record dl { grid-template-columns: 1fr; }
  .warranty-record > header { align-items: stretch; flex-direction: column; }
  .status-pill { align-self: flex-start; }
}
