:root {
  --bg: #eef3fb;
  --bg-layer: radial-gradient(circle at top left, rgba(35, 98, 204, 0.14), transparent 26%), radial-gradient(circle at bottom right, rgba(26, 164, 137, 0.1), transparent 24%), linear-gradient(180deg, #eff4fc 0%, #e8eef8 100%);
  --sidebar: linear-gradient(180deg, #2b5ac7 0%, #2146a8 100%);
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --line: rgba(18, 42, 79, 0.09);
  --text: #18243a;
  --muted: #6f7b8f;
  --accent: #f09a2a;
  --accent-deep: #cc6f10;
  --secondary: #2c67d8;
  --secondary-soft: rgba(44, 103, 216, 0.12);
  --success: #17986c;
  --success-soft: rgba(23, 152, 108, 0.12);
  --danger: #c84b4b;
  --danger-soft: rgba(200, 75, 75, 0.14);
  --shadow: 0 24px 70px rgba(42, 63, 120, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-layer);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  background: var(--sidebar);
  color: #f7f9ff;
  box-shadow: 10px 0 40px rgba(19, 43, 106, 0.22);
}

.brand-block,
.sidebar-panel {
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
}

.brand-block .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.brand-block h1 {
  font-family: "Bahnschrift", "Noto Sans SC", sans-serif;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.sidebar-copy {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  font-size: 14px;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  align-content: start;
}

.nav-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.nav-item:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-item strong,
.nav-item small {
  display: block;
}

.nav-item strong {
  font-size: 15px;
}

.nav-item small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.nav-kicker {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sidebar-panel {
  align-self: end;
}

.sidebar-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sidebar-panel h2 {
  font-size: 16px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.status-ok {
  color: var(--success);
  background: var(--success-soft);
}

.status-warn {
  color: #7a4a00;
  background: rgba(255, 208, 123, 0.9);
}

.status-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
}

.status-list strong {
  color: #ffffff;
}

.status-text,
.muted-text,
.hero-copy,
.panel-header p,
.summary-card small {
  color: var(--muted);
}

.sidebar-panel .status-text {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.content-area {
  min-width: 0;
  padding: 26px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.admin-view {
  display: none;
}

.admin-view.is-active {
  display: grid;
  gap: 18px;
}

.panel,
.summary-card {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel {
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.topbar .eyebrow {
  color: var(--secondary);
}

.topbar h2 {
  font-family: "Bahnschrift", "Noto Sans SC", sans-serif;
  font-size: 32px;
}

.hero-copy {
  margin-top: 10px;
  line-height: 1.7;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  min-height: 138px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-card > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.summary-card strong {
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1;
}

.tone-orange {
  background: linear-gradient(180deg, #fff5e8 0%, #ffffff 100%);
}

.tone-blue {
  background: linear-gradient(180deg, #ecf4ff 0%, #ffffff 100%);
}

.tone-green {
  background: linear-gradient(180deg, #ecfbf5 0%, #ffffff 100%);
}

.tone-neutral {
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
}

.card-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.overview-copy {
  display: grid;
  gap: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.compact-panel {
  align-self: start;
}

.quick-links {
  display: grid;
  gap: 10px;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 16px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-weight: 700;
}

.single-column-card {
  max-width: 760px;
}

.sync-form-wide {
  max-width: 520px;
}

.files-view-grid {
  grid-template-columns: 320px minmax(0, 1fr);
}

.settings-panel {
  max-width: 920px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-hint {
  color: var(--muted);
  font-size: 14px;
}

.panel-header {
  margin-bottom: 16px;
}

.row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border-radius: 15px;
  padding: 13px 15px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(44, 103, 216, 0.35);
  box-shadow: 0 0 0 4px rgba(44, 103, 216, 0.08);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.primary-button,
.secondary-button,
.inline-button,
.ghost-button,
.link-like,
.icon-button {
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease;
}

.primary-button:hover,
.secondary-button:hover,
.inline-button:hover,
.ghost-button:hover,
.link-like:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.secondary-button,
.inline-button {
  border: 0;
  color: var(--secondary);
  background: var(--secondary-soft);
}

.ghost-button,
.link-like,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.inline-button {
  padding: 8px 14px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 33, 52, 0.06);
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid rgba(18, 42, 79, 0.06);
  text-align: left;
  vertical-align: middle;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(239, 244, 252, 0.9);
}

.path-cell {
  max-width: 340px;
  word-break: break-all;
  color: var(--muted);
}

.share-state {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.share-ready {
  color: var(--success);
  background: var(--success-soft);
}

.share-pending {
  color: #8a5600;
  background: rgba(255, 205, 112, 0.22);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-link {
  color: var(--secondary);
  font-weight: 700;
}

.activity-panel {
  padding-bottom: 14px;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.activity-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.share-dialog {
  width: min(720px, calc(100vw - 24px));
  border: 0;
  padding: 0;
  border-radius: 28px;
  background: transparent;
}

.share-dialog::backdrop {
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(6px);
}

.share-dialog-card {
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  padding: 22px;
  box-shadow: var(--shadow);
}

.share-dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.share-dialog-body {
  margin-top: 16px;
  display: grid;
  gap: 16px;
}

.share-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto;
  }

  .content-area {
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .content-area {
    padding: 16px;
  }

  .topbar,
  .row-header,
  .share-dialog-header {
    display: grid;
    gap: 14px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  th:nth-child(2),
  td:nth-child(2),
  th:nth-child(5),
  td:nth-child(5) {
    display: none;
  }
}