:root {
  color-scheme: light;
  --ink: #182026;
  --muted: #65717a;
  --line: #d8e0e6;
  --panel: #ffffff;
  --soft: #f3f6f8;
  --blue: #1768ac;
  --blue-dark: #0f4f86;
  --teal: #1f9b8e;
  --green: #4f8f4f;
  --amber: #d99a2b;
  --rose: #c45f71;
  --shadow: 0 24px 70px rgba(28, 45, 60, 0.15);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(31, 155, 142, 0.17), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(217, 154, 43, 0.14), transparent 26%),
    linear-gradient(180deg, #f7f9fb, #eef3f4);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.admin-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0;
}

.login-panel {
  width: min(440px, 100%);
  margin: 8vh auto 0;
  padding: 30px;
  border: 1px solid rgba(216, 224, 230, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 3px;
  width: 24px;
  height: 24px;
}

.brand-mark span {
  border-radius: 3px;
}

.brand-mark span:nth-child(1) {
  background: var(--blue);
}

.brand-mark span:nth-child(2) {
  background: var(--teal);
}

.brand-mark span:nth-child(3) {
  background: var(--amber);
}

.brand-mark span:nth-child(4) {
  background: var(--green);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #44515a;
  font-size: 14px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.login-form input:focus {
  border-color: rgba(23, 104, 172, 0.58);
  box-shadow: 0 0 0 4px rgba(23, 104, 172, 0.12);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 760;
}

.button.primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(23, 104, 172, 0.22);
}

.button.secondary {
  border-color: rgba(101, 113, 122, 0.22);
  background: #ffffff;
  color: #26333d;
}

.button.ghost {
  background: transparent;
  color: var(--muted);
}

.button.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.reset-link {
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
}

.reset-link:hover {
  text-decoration: underline;
}

.form-note {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.reset-help {
  border: 1px solid rgba(216, 224, 230, 0.86);
  border-radius: 8px;
  background: var(--soft);
  color: #44515a;
  font-size: 13px;
}

.reset-help summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
}

.reset-help ol {
  margin: 0;
  padding: 0 18px 14px 34px;
  line-height: 1.55;
}

.reset-help li + li {
  margin-top: 6px;
}

.dashboard.is-hidden,
.login-panel.is-hidden {
  display: none;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 42px;
}

.admin-header .brand {
  margin-bottom: 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-heading {
  max-width: 720px;
  margin-bottom: 32px;
}

.store-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.upload-panel,
.store-panel {
  border: 1px solid rgba(216, 224, 230, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(28, 45, 60, 0.08);
}

.upload-panel {
  padding: 22px;
}

.store-panel {
  min-height: 460px;
  padding: 22px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(31, 155, 142, 0.24);
  border-radius: 999px;
  background: #eef8f6;
  color: #24786f;
  font-size: 12px;
  font-weight: 780;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 24px;
  border: 1px dashed rgba(23, 104, 172, 0.38);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.drop-zone strong {
  margin: 14px 0 4px;
  color: var(--ink);
  font-size: 18px;
}

.upload-icon {
  position: relative;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(23, 104, 172, 0.26);
  border-radius: 14px;
  background: #ffffff;
}

.upload-icon::before,
.upload-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  background: var(--blue);
  transform: translateX(-50%);
}

.upload-icon::before {
  top: 13px;
  width: 3px;
  height: 22px;
  border-radius: 999px;
}

.upload-icon::after {
  top: 13px;
  width: 14px;
  height: 14px;
  border-top: 3px solid var(--blue);
  border-left: 3px solid var(--blue);
  background: transparent;
  transform: translateX(-50%) rotate(45deg);
}

.validation-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.upload-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.upload-message.is-error {
  color: #a64152;
}

.upload-message.is-success {
  color: #2f6f3d;
}

.validation-card ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.validation-card li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.validation-card li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c8d2da;
}

.validation-card li.is-valid::before {
  background: var(--green);
}

.validation-card li.is-invalid::before {
  background: var(--rose);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state h3 {
  color: var(--ink);
}

.widget-list {
  display: grid;
  gap: 12px;
}

.widget-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.widget-row h3 {
  margin-bottom: 5px;
}

.widget-id {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.widget-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.widget-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  color: #44515a;
  font-size: 12px;
  font-weight: 730;
}

.package-name {
  align-self: start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  text-align: right;
}

@media (max-width: 860px) {
  .admin-header,
  .admin-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .package-name {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .admin-shell {
    width: calc(100% - 28px);
    padding: 18px 0;
  }

  .login-panel,
  .upload-panel,
  .store-panel {
    padding: 18px;
  }

  h1 {
    font-size: 34px;
  }

  .button {
    width: 100%;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
