:root {
  --bg: #eef3f8;
  --surface: rgba(255, 255, 255, 0.9);
  --border: #d6dfeb;
  --text: #162033;
  --muted: #667085;
  --primary: #165dff;
  --primary-strong: #0f49c7;
  --accent: #dff0ff;
  --shadow: 0 20px 60px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "SF Pro Display", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(22, 93, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.sidebar {
  border-right: 1px solid rgba(214, 223, 235, 0.9);
  padding: 28px 22px;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.7);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #51a8ff);
  color: white;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand h1,
.panel-header h2,
.card-header h3 {
  margin: 0;
}

.brand p,
.panel-header p,
.status-label {
  margin: 4px 0 0;
  color: var(--muted);
}

.token-box,
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 92px;
}

.primary-btn,
.secondary-btn,
.nav-btn {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.primary-btn {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  font-weight: 700;
}

.primary-btn:hover {
  background: var(--primary-strong);
}

.secondary-btn {
  background: var(--accent);
  color: var(--primary);
  padding: 10px 14px;
  font-weight: 600;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
}

.nav-btn {
  text-align: left;
  padding: 12px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.nav-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow);
}

.status-box {
  margin-top: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
}

.content {
  padding: 28px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 20px;
}

.grid-two.compact {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(214, 223, 235, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 72vh;
  overflow: auto;
}

.list-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
  padding: 14px;
}

.list-item strong {
  display: block;
  margin-bottom: 4px;
}

.list-item-meta {
  color: var(--muted);
  font-size: 13px;
}

.translation-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #43506a;
  font-size: 12px;
  border: 1px solid #e4eaf3;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-check {
  justify-content: flex-end;
}

.inline-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 8px;
}

.upload-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.toolbar-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.pager button {
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(214, 223, 235, 0.9);
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .toolbar-grid {
    grid-template-columns: 1fr;
  }
}
