:root {
  --teqwp-green: #60b747;
  --teqwp-green-dark: #378d31;
  --teqwp-green-soft: #edf7ea;
  --teqwp-black: #171717;
  --teqwp-border: #cbd1cb;
  --teqwp-muted: #626862;
}

.teqwp-portal,
.teqwp-admin-wrap {
  color: #202320;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.teqwp-portal {
  max-width: 1600px;
  margin: 0 auto;
}

.teqwp-portal * { box-sizing: border-box; }

.teqwp-portal__header,
.teqwp-admin-title {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
  margin: 0 0 16px;
  background: linear-gradient(180deg, #242424, #111);
  border-bottom: 4px solid var(--teqwp-green);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
}

.teqwp-portal__header img,
.teqwp-admin-title img {
  width: min(310px, 34vw);
  height: 58px;
  padding: 7px 12px;
  object-fit: contain;
  background: #fff;
  border-radius: 3px;
}

.teqwp-portal__header h2,
.teqwp-admin-title h1 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 24px;
  line-height: 1.15;
}

.teqwp-portal__header p,
.teqwp-admin-title p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 13px;
}

.teqwp-admin-title .button-hero { margin-left: auto; }

.teqwp-search-card,
.teqwp-admin-card,
.teqwp-welcome,
.teqwp-recent {
  padding: 16px;
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid var(--teqwp-border);
  box-shadow: 0 5px 18px rgba(0,0,0,.05);
}

.teqwp-search-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 13px;
}

.teqwp-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.teqwp-search-row input {
  flex: 1 1 320px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #8f968f;
  border-radius: 3px;
  font-size: 15px;
  text-transform: uppercase;
}

.teqwp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #9aa19a;
  border-radius: 3px;
  background: #f7f8f7;
  color: #222 !important;
  text-decoration: none !important;
  font-weight: 650;
  font-size: 13px;
}

.teqwp-button:hover { background: var(--teqwp-green-soft); border-color: var(--teqwp-green-dark); }
.teqwp-button--primary { background: var(--teqwp-green-dark); border-color: var(--teqwp-green-dark); color: #fff !important; }
.teqwp-button--primary:hover { background: #2f792b; }

.teqwp-notice {
  padding: 13px 16px;
  margin: 0 0 16px;
  border-left: 5px solid;
  background: #fff;
}
.teqwp-notice--warning { border-color: #b88200; background: #fff8df; }
.teqwp-notice--success { border-color: var(--teqwp-green-dark); background: var(--teqwp-green-soft); }

.teqwp-record-summary,
.teqwp-admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.teqwp-record-summary > div,
.teqwp-admin-stats > div {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--teqwp-border);
  border-left: 4px solid var(--teqwp-green);
}

.teqwp-record-summary span,
.teqwp-admin-stats span {
  display: block;
  margin-bottom: 4px;
  color: var(--teqwp-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.teqwp-record-summary strong { font-size: 13px; overflow-wrap: anywhere; }
.teqwp-admin-stats strong { font-size: 27px; }

.teqwp-app-shell {
  overflow: hidden;
  margin: 0 0 18px;
  background: #d7dbd7;
  border: 1px solid #8f968f;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
}

.teqwp-app-shell__bar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 12px;
  background: #181818;
  border-bottom: 3px solid var(--teqwp-green);
  color: #fff;
  font-size: 12px;
}

.teqwp-app-shell__bar span { color: rgba(255,255,255,.72); }
.teqwp-app-frame { display: block; width: 100%; min-height: 700px; border: 0; background: #f1f3f1; }

.teqwp-table-wrap { overflow-x: auto; }
.teqwp-table-wrap table { width: 100%; border-collapse: collapse; }
.teqwp-table-wrap th,
.teqwp-table-wrap td { padding: 9px 10px; border-bottom: 1px solid #d9ddd9; text-align: left; vertical-align: top; }
.teqwp-table-wrap th { background: #e8ebe8; font-size: 12px; }
.teqwp-table-wrap td { font-size: 13px; }

.teqwp-admin-wrap { max-width: 1800px; }
.teqwp-admin-title { margin: 16px 0; }
.teqwp-admin-card__head,
.teqwp-setup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.teqwp-admin-card__head { padding-bottom: 12px; border-bottom: 1px solid var(--teqwp-border); }
.teqwp-admin-card__head h2,
.teqwp-setup-card h2 { margin: 0 0 4px; }
.teqwp-admin-card__head p,
.teqwp-setup-card p { margin: 0; color: var(--teqwp-muted); }
.teqwp-admin-card__head form { display: flex; gap: 6px; }
.teqwp-admin-card__head input[type="search"] { min-width: 300px; }

.teqwp-badge {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.teqwp-badge.is-public { color: #266f25; background: #edf8eb; border-color: #8ec784; }
.teqwp-badge.is-private { color: #745800; background: #fff7db; border-color: #d3b65c; }
.teqwp-actions { white-space: nowrap; }
.teqwp-delete-link { color: #9b1c13 !important; }

@media (max-width: 1000px) {
  .teqwp-record-summary,
  .teqwp-admin-stats { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .teqwp-portal__header,
  .teqwp-admin-title { align-items: flex-start; flex-wrap: wrap; }
  .teqwp-admin-title .button-hero { margin-left: 0; }
}

@media (max-width: 640px) {
  .teqwp-portal__header img,
  .teqwp-admin-title img { width: 100%; max-width: 300px; }
  .teqwp-record-summary,
  .teqwp-admin-stats { grid-template-columns: 1fr; }
  .teqwp-admin-card__head,
  .teqwp-setup-card { align-items: stretch; flex-direction: column; }
  .teqwp-admin-card__head input[type="search"] { min-width: 0; width: 100%; }
  .teqwp-app-shell__bar { flex-direction: column; }
}


.teqwp-import-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.4fr);
  gap: 22px;
  align-items: center;
}
.teqwp-import-card h2 { margin: 0 0 5px; }
.teqwp-import-card p { margin: 0; color: var(--teqwp-muted); }
.teqwp-import-form { display: flex; align-items: end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.teqwp-import-form label { display: grid; gap: 5px; color: #3b403b; font-size: 12px; font-weight: 650; }
.teqwp-import-form input[type="file"] { max-width: 310px; }
.teqwp-import-form select { min-width: 145px; }
@media (max-width: 900px) {
  .teqwp-import-card { grid-template-columns: 1fr; }
  .teqwp-import-form { justify-content: flex-start; align-items: stretch; }
}
