:root {
  color-scheme: light;
  --bg: #f3f5f9;
  --bg-panel: #ffffff;
  --bg-soft: #f7f9fc;
  --bg-sidebar: #0f172a;
  --text: #162033;
  --text-muted: #66758f;
  --border: #d8e0ee;
  --border-strong: #c6d3ea;
  --brand: #f38020;
  --brand-soft: rgba(243, 128, 32, 0.14);
  --primary: #276ef1;
  --primary-hover: #1658ce;
  --success: #1e8e5a;
  --warning: #c67605;
  --danger: #c62828;
  --shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(39, 110, 241, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

#app {
  min-height: 100vh;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

code {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(39, 110, 241, 0.08);
  color: #174ea6;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 28px 20px;
  background:
    linear-gradient(180deg, rgba(243, 128, 32, 0.18), transparent 22%),
    var(--bg-sidebar);
  color: #d7e3fb;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #ffab5b);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(243, 128, 32, 0.28);
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-copy {
  margin-top: 4px;
  font-size: 12px;
  color: #93a4c7;
}

.sidebar-domain {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar-domain strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 16px;
}

.sidebar-domain-label,
.nav-group-title,
.page-eyebrow,
.eyebrow,
.status-card-label,
.summary-item-label,
.stat-card-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-domain-label {
  color: #93a4c7;
}

.sidebar-nav {
  margin-top: 26px;
  display: grid;
  gap: 20px;
}

.nav-group {
  display: grid;
  gap: 10px;
}

.nav-group-title {
  color: #7d8dad;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(243, 128, 32, 0.16), rgba(39, 110, 241, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-item-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.nav-item-copy {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #93a4c7;
}

.app-main {
  min-width: 0;
  padding: 26px 28px 40px;
}

.content-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.content-header-main {
  min-width: min(100%, 520px);
  flex: 1 1 520px;
}

.header-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.page-eyebrow,
.eyebrow {
  color: var(--brand);
}

.page-title {
  margin: 8px 0 10px;
  font-size: 32px;
  line-height: 1.1;
}

.page-description {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.status-card {
  min-width: 260px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.status-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.status-card-note {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-panel {
  min-width: 280px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.auth-panel-status {
  display: block;
  margin: 8px 0 14px;
  font-size: 16px;
  line-height: 1.45;
  word-break: break-word;
}

.content-body {
  display: grid;
  gap: 18px;
}

.view {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 22px;
  border: 1px solid rgba(214, 222, 235, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(39, 110, 241, 0.05), rgba(243, 128, 32, 0.08)),
    var(--bg-panel);
}

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

.panel h2,
.panel h3,
.notice-title {
  margin: 6px 0 0;
}

.panel p,
.info-banner p {
  margin: 0;
  line-height: 1.65;
}

.muted {
  color: var(--text-muted);
}

.hero-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(20px, 4vw, 48px);
}

.auth-card {
  width: min(100%, 420px);
}

.auth-actions {
  margin-top: 18px;
}

.summary-panel {
  display: grid;
  align-content: start;
  gap: 18px;
}

.tag-row,
.translation-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(39, 110, 241, 0.12);
  background: rgba(39, 110, 241, 0.08);
  color: #27519d;
  font-size: 12px;
  font-weight: 700;
}

.interactive-tag {
  cursor: pointer;
}

.interactive-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.interactive-tag.fallback {
  border-style: dashed;
  border-color: rgba(198, 118, 5, 0.45);
  background: rgba(198, 118, 5, 0.08);
  color: #8c5200;
}

.success-tag {
  border-color: rgba(30, 142, 90, 0.2);
  background: rgba(30, 142, 90, 0.11);
  color: var(--success);
}

.warning-tag {
  border-color: rgba(198, 118, 5, 0.22);
  background: rgba(198, 118, 5, 0.1);
  color: var(--warning);
}

.danger-tag {
  border-color: rgba(198, 40, 40, 0.18);
  background: rgba(198, 40, 40, 0.08);
  color: var(--danger);
}

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

.summary-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-soft);
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  word-break: break-word;
}

.info-banner {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(198, 118, 5, 0.25);
  border-radius: 16px;
  background: rgba(255, 243, 224, 0.7);
}

.accent-banner {
  border-left: 4px solid var(--brand);
}

.inline-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.field-block {
  margin-top: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #4f5e79;
  font-size: 12px;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(39, 110, 241, 0.55);
  box-shadow: 0 0 0 4px rgba(39, 110, 241, 0.12);
}

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

button {
  min-height: 40px;
  padding: 9px 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}

button:hover {
  background: var(--primary-hover);
}

button.secondary {
  background: #5f6f8c;
}

button.secondary:hover {
  background: #4f5e79;
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: #a61e1e;
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.button-row {
  margin-top: 16px;
}

.button-row-inline {
  margin-top: 14px;
}

.compact-row {
  margin-top: 0;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: #33415c;
  font-size: 14px;
  font-weight: 600;
}

.checkline input {
  width: auto;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(39, 110, 241, 0.04), rgba(39, 110, 241, 0.01));
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.list {
  display: grid;
  gap: 14px;
}

.notice-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-soft);
}

.notice-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.notice-title {
  font-size: 20px;
  font-weight: 800;
}

.notice-meta {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.75;
}

.notice-content {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  white-space: pre-wrap;
  line-height: 1.7;
}

.translation-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.translation-summary-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.translation-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(39, 110, 241, 0.08);
  color: #27519d;
  font-size: 12px;
  font-weight: 800;
}

.translation-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.translation-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #33415c;
}

.translation-tab:hover {
  background: #eef4ff;
}

.translation-tab-status {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #bcc7da;
}

.translation-tab.filled .translation-tab-status {
  background: var(--success);
}

.translation-tab.missing .translation-tab-status {
  background: var(--danger);
}

.translation-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.translation-tab.active .translation-tab-status {
  background: rgba(255, 255, 255, 0.95);
}

.translation-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-soft);
  padding: 16px;
}

.translation-panel {
  display: none;
}

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

.translation-card textarea {
  min-height: 120px;
}

.translation-summary {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.translation-label {
  color: #4f5e79;
  font-size: 12px;
  font-weight: 700;
}

.preview-note {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(198, 118, 5, 0.12);
  color: #8c5200;
  font-size: 10px;
  font-weight: 800;
}

pre {
  margin: 0;
  min-height: 220px;
  padding: 16px;
  overflow: auto;
  border-radius: 18px;
  background: #0f172a;
  color: #d7e3fb;
  font-size: 12px;
  line-height: 1.7;
}

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

  .auth-screen {
    padding: 32px 20px;
  }

  .app-sidebar {
    position: static;
    min-height: auto;
  }

  .hero-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-main {
    padding: 20px 16px 32px;
  }

  .auth-screen {
    padding: 20px 16px 32px;
  }

  .app-sidebar {
    padding: 20px 16px;
  }

  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .page-title {
    font-size: 28px;
  }
}
