@font-face {
  font-family: "UKIJ Tor";
  src: url("/admin/fonts/UKIJTorRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  --bg: #0d1211;
  --surface: rgba(17, 24, 23, 0.84);
  --surface-strong: rgba(20, 28, 27, 0.96);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4efe6;
  --muted: #b1bbb5;
  --accent: #7fe0c7;
  --accent-2: #e3b36d;
  --danger: #ff8978;
  --warn: #f2c46c;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.22);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --sidebar-width: 352px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 18% 10%, rgba(127, 224, 199, 0.14), transparent 24%),
    radial-gradient(circle at 92% 0%, rgba(227, 179, 109, 0.12), transparent 28%),
    linear-gradient(180deg, #0a0f0e 0%, var(--bg) 52%, #090c0c 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "UKIJ Tor", "Noto Sans Arabic", "Microsoft Uighur", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(127, 224, 199, 0.09), transparent 20%),
    radial-gradient(circle at 90% 0%, rgba(227, 179, 109, 0.08), transparent 25%),
    linear-gradient(180deg, #0d1211 0%, #111816 50%, #0b0f0f 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
  opacity: 0.35;
}

[hidden] {
  display: none !important;
}

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

a {
  color: inherit;
}

.auth-shell {
  min-height: 100vh;
  width: min(1140px, calc(100vw - 24px));
  margin: 0 auto;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.auth-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 18px;
}

.auth-card {
  width: 100%;
  padding: 28px;
  border-radius: 34px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at top right, rgba(127, 224, 199, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(24, 33, 31, 0.96) 0%, rgba(14, 19, 18, 0.98) 100%);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.auth-mark,
.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(127, 224, 199, 0.16), rgba(227, 179, 109, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-card h1,
.auth-card h2,
.sidebar-card h1,
.sidebar-card h2,
.panel h3,
.workspace-topbar h2,
.hero-copy h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.auth-card h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.1;
}

.auth-card h2 {
  font-size: 1.2rem;
}

.auth-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-info-card {
  justify-content: space-between;
}

.auth-info-stack {
  display: grid;
  gap: 12px;
}

.auth-info-item {
  padding: 16px 16px 15px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.auth-info-item strong {
  display: block;
  margin-bottom: 6px;
}

.auth-info-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-metrics div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.auth-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.auth-metrics strong {
  font-size: 14px;
}

.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 18px;
  width: min(1720px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.workspace {
  display: grid;
  gap: 16px;
}

.sidebar-card,
.panel,
.hero-panel,
.workspace-topbar {
  background:
    linear-gradient(180deg, rgba(23, 32, 31, 0.9) 0%, rgba(15, 21, 20, 0.92) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar-card,
.panel,
.hero-panel,
.workspace-topbar {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.panel:hover,
.sidebar-card:hover,
.workspace-topbar:hover {
  border-color: rgba(127, 224, 199, 0.16);
}

.sidebar-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.hero-stack {
  display: grid;
  gap: 14px;
}

.brand-copy {
  display: grid;
  gap: 6px;
}

.brand-kicker,
.panel-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.sidebar-copy,
.auth-copy,
.section-copy,
.mini-list,
.panel-status,
.inline-status,
.detail-row,
.side-stat,
.module-note,
.meta-text,
.content-snippet,
.kpi-note {
  line-height: 1.7;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.field span {
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(6, 10, 10, 0.58);
  color: var(--text);
  min-height: 48px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(177, 187, 181, 0.72);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(127, 224, 199, 0.5);
  box-shadow: 0 0 0 4px rgba(127, 224, 199, 0.1);
  background: rgba(7, 12, 12, 0.76);
}

textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.75;
}

#release-editor,
#strings-editor,
#categories-editor,
.progress-view {
  direction: ltr;
  text-align: left;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12.8px;
}

button {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, box-shadow 140ms ease, background 140ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #4cc4ab 100%);
  color: #05120f;
  box-shadow: 0 12px 24px rgba(127, 224, 199, 0.18);
  font-weight: 700;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

.inline-status,
.panel-status {
  margin: 12px 0 0;
  font-size: 13px;
}

.inline-status[data-tone="error"],
.panel-status[data-tone="error"] {
  color: var(--danger);
}

.inline-status[data-tone="success"],
.panel-status[data-tone="success"] {
  color: var(--accent);
}

.section-nav {
  display: grid;
  gap: 8px;
  position: relative;
}

.nav-section-button {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-section-button:hover {
  background: rgba(127, 224, 199, 0.08);
  border-color: rgba(127, 224, 199, 0.18);
}

.nav-section-button.is-active {
  background: rgba(127, 224, 199, 0.14);
  border-color: rgba(127, 224, 199, 0.22);
  color: var(--accent);
  transform: translateX(-2px);
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.session-label {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.mini-list {
  margin: 0;
  padding: 0 18px 0 0;
  display: grid;
  gap: 10px;
}

.workspace-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto auto;
  gap: 18px;
  align-items: center;
  border-radius: 26px;
  padding: 18px 20px;
  position: sticky;
  top: 18px;
  z-index: 8;
}

.workspace-topbar h2 {
  font-size: 1.6rem;
  line-height: 1.1;
}

.workspace-topbar p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.workspace-topbar-chips,
.workspace-topbar-actions,
.hero-actions,
.sidebar-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.workspace-topbar-chips {
  justify-content: flex-start;
}

.workspace-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 224, 199, 0.16), transparent 72%);
  pointer-events: none;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h2 {
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  line-height: 1.06;
}

.hero-copy p {
  margin: 12px 0 0;
  max-width: 64ch;
  font-size: 1rem;
}

.hero-actions {
  min-width: 220px;
  justify-content: flex-start;
  align-content: flex-start;
  padding-top: 6px;
}

.side-stat-list,
.detail-stack,
.list-stack,
.queue-summary,
.kpi-grid,
.module-grid,
.overview-grid,
.operations-grid,
.workbench,
.asset-readiness-grid,
.link-preview-grid {
  display: grid;
  gap: 14px;
}

.kpi-section {
  margin-top: -4px;
}

.kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
}

.kpi-value {
  margin-top: 8px;
  font-size: 30px;
  color: var(--text);
  line-height: 1;
}

.kpi-note {
  margin-top: 8px;
  font-size: 12px;
}

.overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  border-radius: var(--radius-xl);
  padding: 18px;
  min-width: 0;
  scroll-margin-top: 104px;
}

.panel-tall {
  min-height: 360px;
}

.panel-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-block {
  display: grid;
  gap: 14px;
  scroll-margin-top: 104px;
}

.workbench {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
}

.operations-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-card,
.list-row,
.module-card,
.queue-pill,
.asset-status-card,
.link-preview-card,
.preview-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.content-card {
  padding: 16px;
}

.card-topline,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(127, 224, 199, 0.12);
  color: var(--accent);
  border: 1px solid rgba(127, 224, 199, 0.12);
}

.badge.warn {
  background: rgba(242, 196, 108, 0.12);
  color: var(--warn);
}

.badge.danger {
  background: rgba(255, 137, 120, 0.12);
  color: var(--danger);
}

.badge.soft {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.content-card h4,
.module-card h4,
.list-row h4 {
  margin: 12px 0 0;
  font-size: 17px;
}

.detail-row,
.content-snippet,
.module-note,
.meta-text,
.empty-state,
.side-stat {
  color: var(--muted);
}

.content-snippet,
.module-note {
  margin: 8px 0 0;
}

.detail-stack {
  align-content: start;
}

.detail-row {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stack-heading {
  margin: 6px 0 2px;
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-row strong {
  color: var(--text);
}

.queue-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.queue-pill {
  padding: 15px;
}

.queue-pill .label {
  color: var(--muted);
  font-size: 12px;
}

.queue-pill .value {
  margin-top: 8px;
  font-size: 26px;
  color: var(--text);
}

.list-row {
  padding: 15px;
}

.list-row + .list-row,
.content-card + .content-card {
  margin-top: 0;
}

.list-panel,
.form-panel {
  min-height: 580px;
}

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

.full-width {
  grid-column: 1 / -1;
}

.editor-preview {
  margin-top: 16px;
}

.preview-card {
  padding: 18px;
}

.panel-head.compact {
  margin-bottom: 12px;
}

.asset-readiness-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.asset-status-card,
.link-preview-card {
  padding: 14px;
}

.asset-status-card strong,
.link-preview-card strong {
  color: var(--text);
}

.asset-status-card .label,
.link-preview-card .label {
  font-size: 12px;
  color: var(--muted);
}

.asset-status-card .value {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.asset-status-card.ready {
  border-color: rgba(127, 224, 199, 0.22);
  background: rgba(127, 224, 199, 0.06);
}

.asset-status-card.missing {
  border-color: rgba(242, 196, 108, 0.18);
  background: rgba(242, 196, 108, 0.06);
}

.link-preview-card {
  display: grid;
  gap: 10px;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(127, 224, 199, 0.08);
  color: var(--accent);
  border: 1px solid rgba(127, 224, 199, 0.1);
}

.preview-link:hover {
  background: rgba(127, 224, 199, 0.14);
}

.content-asset-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.asset-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.asset-chip.ready {
  background: rgba(127, 224, 199, 0.1);
  color: var(--accent);
}

.asset-chip.missing {
  background: rgba(242, 196, 108, 0.08);
  color: var(--warn);
}

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

.module-card {
  padding: 16px;
}

.progress-view {
  margin: 0;
  white-space: pre-wrap;
  color: var(--muted);
  line-height: 1.8;
}

.toolbar-wrap {
  margin-bottom: 12px;
}

.toolbar--filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 1.2fr);
  gap: 10px;
  width: min(100%, 860px);
}

.toolbar--actions {
  justify-content: flex-end;
}

.toolbar--stack {
  flex-direction: column;
  align-items: stretch;
}

.toolbar--stack > * {
  width: 100%;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.mobile-dock {
  display: none;
}

@media (max-width: 1500px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: static;
  }

  .workspace-topbar {
    grid-template-columns: 1fr;
  }

  .overview-grid,
  .operations-grid,
  .workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-info-card {
    order: -1;
  }

  .auth-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 76px;
  }

  .auth-shell {
    width: min(100vw - 16px, 100%);
    padding: 12px 0 20px;
  }

  .auth-card,
  .sidebar-card,
  .panel,
  .hero-panel,
  .workspace-topbar {
    padding: 16px;
    border-radius: 20px;
  }

  .admin-shell {
    width: min(100vw - 16px, 100%);
    padding: 10px 0 20px;
    gap: 12px;
  }

  .sidebar {
    display: none;
  }

  .hero-panel,
  .panel-head,
  .section-head {
    flex-direction: column;
  }

  .workspace-topbar-chips,
  .workspace-topbar-actions {
    width: 100%;
  }

  .kpi-grid,
  .queue-summary,
  .form-grid,
  .asset-readiness-grid,
  .toolbar--filters {
    grid-template-columns: 1fr;
  }

  .toolbar--filters {
    width: 100%;
  }

  .toolbar > *,
  .hero-actions > *,
  .sidebar-actions > *,
  .workspace-topbar-actions > * {
    width: 100%;
  }

  button,
  select,
  input,
  textarea {
    width: 100%;
  }

  .mobile-dock {
    display: grid;
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 50;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
    background: rgba(9, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .mobile-dock .nav-section-button {
    min-height: 42px;
    padding: 10px 8px;
    font-size: 12px;
    text-align: center;
  }
}
