:root {
  --bg: #f7fbfe;
  --surface: #ffffff;
  --line: #d9e5ee;
  --text: #163041;
  --muted: #607a8b;
  --primary: #0f7c78;
  --primary-2: #0b5f5b;
  --danger: #b31b45;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(16, 39, 58, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(15, 124, 120, 0.1), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(189, 135, 66, 0.12), transparent 24%),
    var(--bg);
}

.container {
  width: min(1200px, 94vw);
  margin: 1.25rem auto 2rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.55rem;
  line-height: 1.16;
  font-weight: 600;
}

p {
  margin: 0 0 0.8rem;
}

.panel-head {
  margin-bottom: 0.88rem;
}

.panel-head h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
}

.panel-head p {
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.stack {
  display: grid;
  gap: 0.7rem;
}

label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.84rem;
  color: var(--muted);
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.58rem 0.74rem;
  color: var(--text);
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(15, 124, 120, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 124, 120, 0.14);
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.btn-row {
  display: flex;
  gap: 0.52rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.58rem 0.88rem;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.btn-ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #c93a62, var(--danger));
}

.status {
  font-size: 0.85rem;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: #117755;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  background: #f4f8fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  font-size: 0.78rem;
  max-height: 340px;
  overflow: auto;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.65rem;
}

.auth-note,
.muted {
  color: var(--muted);
  font-size: 0.83rem;
}

.tabs {
  display: flex;
  gap: 0.48rem;
  margin-bottom: 0.72rem;
  flex-wrap: wrap;
}

.shell-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.shell-nav a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 0.42rem 0.74rem;
  font-size: 0.82rem;
}

.shell-nav a.active {
  border-color: rgba(15, 124, 120, 0.58);
  box-shadow: 0 0 0 3px rgba(15, 124, 120, 0.15);
}

.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.tab.active {
  border-color: rgba(15, 124, 120, 0.58);
  box-shadow: 0 0 0 3px rgba(15, 124, 120, 0.15);
}

.panel-section {
  display: none;
}

.panel-section.active {
  display: block;
}

.dashboard-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dash-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  background: #fbfdff;
}

.dash-card h3 {
  margin-bottom: 0.25rem;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

.dash-value {
  margin: 0;
  font-size: clamp(1.28rem, 2vw, 1.6rem);
  line-height: 1.1;
  color: var(--text);
  font-weight: 600;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.media-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.media-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.media-item figcaption {
  padding: 0.36rem 0.5rem;
  font-size: 0.75rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.62rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #f7fbfe;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.14rem 0.48rem;
  font-size: 0.74rem;
}

.badge.pending {
  border-color: #f0c27c;
  background: #fff8ea;
}

.badge.approved {
  border-color: #84cfbb;
  background: #ecfaf5;
}

.editor {
  margin-top: 0.82rem;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.check-item {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.38rem 0.48rem;
  color: var(--text);
}

.check-item input {
  width: auto;
  margin: 0;
}

.meta-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.meta-row .btn {
  padding: 0.34rem 0.68rem;
  font-size: 0.76rem;
}

@media (max-width: 980px) {
  .grid,
  .grid-3,
  .check-grid,
  .dashboard-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .top-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
