:root {
  --aries-bg: #f4f7fb;
  --aries-bg-soft: #eef3f8;
  --aries-card: rgba(255, 255, 255, 0.92);
  --aries-card-solid: #ffffff;
  --aries-line: #d7e2ee;
  --aries-line-strong: #c3d3e4;
  --aries-text: #10243f;
  --aries-text-soft: #5d6f86;
  --aries-brand: #1f6feb;
  --aries-brand-soft: #e8f1ff;
  --aries-brand-deep: #174ea6;
  --aries-success: #0f9d6c;
  --aries-warning: #d97706;
  --aries-danger: #dc4c64;
  --aries-shadow: 0 18px 48px rgba(15, 35, 64, 0.08);
  --aries-radius-xl: 28px;
  --aries-radius-lg: 22px;
  --aries-radius-md: 16px;
  --aries-radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--aries-text);
  background:
    radial-gradient(circle at top right, rgba(103, 164, 255, 0.16), transparent 26%),
    radial-gradient(circle at bottom left, rgba(116, 205, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, var(--aries-bg) 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body.aries-panel-open {
  overflow: hidden;
}

.aries-admin-shell {
  display: flex;
  min-height: 100vh;
}

.aries-panel-sidebar {
  position: sticky;
  top: 0;
  width: 292px;
  height: 100vh;
  padding: 20px 18px;
  border-right: 1px solid rgba(215, 226, 238, 0.9);
  background: rgba(247, 250, 253, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 40;
}

.aries-panel-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}

.aries-panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.aries-panel-brand:hover,
.aries-panel-brand:focus {
  text-decoration: none;
}

.aries-panel-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(135deg, #39a7ff 0%, var(--aries-brand-deep) 100%);
  box-shadow: 0 12px 28px rgba(31, 111, 235, 0.32);
}

.aries-panel-brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--aries-text);
}

.aries-panel-brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: var(--aries-text-soft);
}

.aries-panel-nav-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aries-panel-nav-title {
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7b8ca3;
}

.aries-panel-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aries-panel-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 18px;
  color: #30465f;
  text-decoration: none;
  transition: 0.18s ease;
}

.aries-panel-nav-link:hover,
.aries-panel-nav-link:focus {
  color: var(--aries-text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.85);
}

.aries-panel-nav-link.is-active {
  color: var(--aries-brand-deep);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(234,242,255,0.98));
  box-shadow: 0 10px 26px rgba(16, 36, 63, 0.08);
}

.aries-panel-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(199, 213, 229, 0.85);
  background: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  color: inherit;
}

.aries-panel-nav-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.aries-panel-nav-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.aries-panel-nav-hint {
  margin-top: 2px;
  font-size: 12px;
  color: #7b8ca3;
  line-height: 1.25;
}

.aries-panel-sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(215, 226, 238, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
}

.aries-panel-sidebar-footer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--aries-text);
}

.aries-panel-sidebar-footer-text {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--aries-text-soft);
}

.aries-panel-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.aries-panel-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 18px 24px 0;
}

.aries-panel-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 14px 18px;
  border: 1px solid rgba(215, 226, 238, 0.9);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 30px rgba(15, 35, 64, 0.06);
}

.aries-panel-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.aries-panel-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(199, 213, 229, 0.9);
  border-radius: 16px;
  background: #fff;
  color: var(--aries-text);
  font-size: 20px;
}

.aries-panel-page-meta {
  min-width: 0;
}

.aries-panel-page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--aries-text);
}

.aries-panel-page-desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--aries-text-soft);
}

.aries-panel-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aries-panel-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--aries-brand-soft);
  color: var(--aries-brand-deep);
  font-size: 12px;
  font-weight: 700;
}

.aries-panel-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border-radius: 18px;
  background: rgba(245, 249, 255, 0.92);
  color: var(--aries-text);
  text-decoration: none;
}

.aries-panel-user-trigger:hover,
.aries-panel-user-trigger:focus {
  color: var(--aries-text);
  text-decoration: none;
}

.aries-panel-avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(215, 226, 238, 0.9);
}

.aries-panel-content {
  padding: 20px 24px 28px;
}

.aries-panel-content .container-fluid {
  padding: 0;
}

.aries-mobile-backdrop {
  display: none;
}

.card,
.panel {
  margin-bottom: 18px;
  border: 1px solid rgba(215, 226, 238, 0.92);
  border-radius: 24px;
  background: var(--aries-card);
  box-shadow: var(--aries-shadow);
  overflow: hidden;
}

.card-header,
.panel-heading {
  padding: 18px 22px 12px;
  border-bottom: 1px solid rgba(215, 226, 238, 0.72);
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.92), rgba(246, 250, 255, 0.88));
}

.card-header h4,
.panel-heading h4,
.panel-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--aries-text);
}

.card-body,
.panel-body {
  padding: 20px 22px 22px;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--aries-text);
  font-size: 13px;
  font-weight: 600;
}

.form-control,
select.form-control,
textarea.form-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--aries-line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--aries-text);
  box-shadow: none;
  transition: 0.18s ease;
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  border-color: rgba(31, 111, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

textarea.form-control {
  min-height: 110px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.btn {
  border-radius: 14px;
  border: 0;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 600;
  transition: 0.18s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--aries-brand) 0%, var(--aries-brand-deep) 100%);
}

.btn-info {
  background: linear-gradient(135deg, #22c1ff 0%, #0e9ad6 100%);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #ff7a7a 0%, var(--aries-danger) 100%);
}

.btn-default,
.btn-secondary {
  background: #edf3fb;
  color: #203856;
}

.btn-link {
  min-height: auto;
}

.btn-xs {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 12px;
}

.table-responsive {
  border-radius: 18px;
}

.table {
  margin-bottom: 0;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.table > thead > tr > th {
  border-bottom: 1px solid var(--aries-line);
  border-top: 0;
  background: #f4f8fd;
  color: #58708e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td {
  border-top: 1px solid rgba(215, 226, 238, 0.8);
  vertical-align: middle;
}

.table-hover > tbody > tr:hover {
  background: rgba(232, 241, 255, 0.45);
}

.alert {
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 26px rgba(15, 35, 64, 0.05);
}

.alert-success {
  background: rgba(222, 247, 236, 0.95);
  color: #0f6b47;
}

.alert-danger {
  background: rgba(254, 235, 238, 0.95);
  color: #b4233c;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-ok {
  background: rgba(223, 247, 236, 0.9);
  color: #0f8a5f;
}

.badge-danger {
  background: rgba(253, 230, 233, 0.95);
  color: #c43d53;
}

.pagination > li > a,
.pagination > li > span {
  margin-right: 6px;
  border: 0;
  border-radius: 12px !important;
  color: #365074;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px rgba(15, 35, 64, 0.05);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
  background: var(--aries-brand);
}

.dropdown-menu {
  min-width: 180px;
  padding: 8px 0;
  border: 1px solid rgba(215, 226, 238, 0.92);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 35, 64, 0.12);
}

.dropdown-menu > li > a {
  padding: 8px 16px;
  color: var(--aries-text);
}

.dropdown-menu > li > a:hover {
  background: rgba(232, 241, 255, 0.7);
}

.help-block,
small {
  color: var(--aries-text-soft);
}

.ios-popup-lock {
  overflow: hidden;
}

.ios-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 18, 31, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  padding: 18px;
}

.ios-popup.is-open {
  display: flex;
}

.ios-box {
  width: min(540px, 100%);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 68px rgba(15, 35, 64, 0.24);
  overflow: hidden;
}

.ios-head {
  padding: 22px 22px 14px;
  border-bottom: 1px solid rgba(215, 226, 238, 0.75);
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.ios-head h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  color: var(--aries-text);
}

.ios-head p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--aries-text-soft);
}

.ios-body {
  padding: 16px 22px 10px;
  max-height: 56vh;
  overflow: auto;
}

.ios-card {
  margin-bottom: 12px;
  padding: 14px 15px;
  border: 1px solid rgba(215, 226, 238, 0.78);
  border-radius: 18px;
  background: #fff;
}

.ios-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--aries-text);
}

.ios-card p,
.ios-empty-note,
.ios-list {
  color: #3a4f6b;
}

.ios-section-label {
  margin: 0 0 6px;
  color: #0f294a;
  font-size: 13px;
  font-weight: 700;
}

.ios-list li {
  margin: 4px 0;
  line-height: 1.65;
}

.ios-meta {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

.ios-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.ios-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
}

.ios-tag-beta {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.ios-tag-stable {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.ios-version-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 10px;
}

.ios-version-item {
  border-radius: 12px;
  border: 1px solid #e6edf7;
  background: #f8fbff;
  padding: 10px 11px;
}

.ios-version-item .k {
  color: #62748d;
  font-size: 12px;
  margin-bottom: 4px;
}

.ios-version-item .v {
  color: #0f294a;
  font-size: 15px;
  font-weight: 700;
  word-break: break-all;
}

.ios-foot {
  padding: 12px 22px 18px;
  border-top: 1px solid rgba(215, 226, 238, 0.75);
  background: rgba(255, 255, 255, 0.96);
}

.ios-check {
  margin: 0 0 10px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  font-size: 13px;
}

.ios-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ios-btn {
  border: 0;
  border-radius: 14px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.ios-btn:hover,
.ios-btn:focus {
  text-decoration: none;
}

.ios-btn-primary {
  background: linear-gradient(135deg, var(--aries-brand) 0%, var(--aries-brand-deep) 100%);
  color: #fff;
}

.ios-btn-ghost {
  background: #edf3fb;
  color: #28415f;
}

.is-submitting {
  opacity: 0.65;
  pointer-events: none;
}

.aries-auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px 16px;
}

.aries-auth-card {
  width: min(480px, 100%);
  border: 1px solid rgba(215, 226, 238, 0.92);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 68px rgba(15, 35, 64, 0.12);
  overflow: hidden;
}

.aries-auth-head {
  padding: 26px 28px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(243,248,255,0.92) 100%);
  border-bottom: 1px solid rgba(215, 226, 238, 0.82);
}

.aries-auth-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--aries-text);
}

.aries-auth-head p {
  margin: 8px 0 0;
  color: var(--aries-text-soft);
  line-height: 1.7;
}

.aries-auth-body {
  padding: 20px 28px 28px;
}

@media (max-width: 1180px) {
  .aries-panel-sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-108%);
    transition: transform 0.24s ease;
    box-shadow: 0 20px 60px rgba(15, 35, 64, 0.14);
  }

  body.aries-panel-open .aries-panel-sidebar {
    transform: translateX(0);
  }

  .aries-mobile-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(8, 18, 32, 0.3);
    z-index: 35;
  }

  body.aries-panel-open .aries-mobile-backdrop {
    display: block;
  }

  .aries-panel-toggle {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .aries-panel-topbar {
    padding: 14px 14px 0;
  }

  .aries-panel-topbar-inner {
    min-height: 72px;
    padding: 12px 14px;
  }

  .aries-panel-page-title {
    font-size: 17px;
  }

  .aries-panel-content {
    padding: 14px;
  }

  .card-header,
  .panel-heading {
    padding: 16px 16px 10px;
  }

  .card-body,
  .panel-body {
    padding: 16px;
  }

  .ios-box,
  .aries-auth-card {
    border-radius: 22px;
  }

  .ios-buttons {
    grid-template-columns: 1fr;
  }

  .aries-auth-head,
  .aries-auth-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}
