:root {
  --shell-ink: #132238;
  --shell-accent: #1f6aa5;
  --shell-accent-soft: rgba(31, 106, 165, 0.12);
  --shell-card: rgba(255, 255, 255, 0.9);
  --shell-line: rgba(19, 34, 56, 0.1);
  --shell-soft: #6f7f92;
}

body {
  font-family: "Manrope", sans-serif;
  background: #f3f5f7;
  color: var(--shell-ink);
}

.shell-navbar,
.admin-toolbar {
  backdrop-filter: blur(18px);
}

.shell-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--shell-line);
}

.brand-subtitle,
.text-secondary,
.form-hint {
  color: rgba(19, 34, 56, 0.72) !important;
}

.shell-navbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.375rem;
}

.shell-branding,
.shell-navbar-actions,
.shell-user,
.shell-user-meta {
  display: flex;
  align-items: center;
}

.shell-branding {
  gap: 1rem;
  flex-wrap: wrap;
}

.shell-brand {
  color: var(--shell-ink);
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.shell-brand:hover {
  color: var(--shell-ink);
  text-decoration: none;
}

.shell-datetime {
  color: var(--shell-soft);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
}

.shell-navbar-actions {
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shell-user {
  gap: 0.75rem;
  padding-right: 0.5rem;
}

.shell-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #e7c46d, #b5792c);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(19, 34, 56, 0.08);
}

.shell-user-meta {
  gap: 0.55rem;
}

.shell-user-email {
  font-size: 0.98rem;
  color: #37506d;
}

.shell-user-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border-radius: 0.75rem;
  background: #f1f4f8;
  color: var(--shell-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.shell-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.55rem;
  height: 3rem;
  border: 1px solid rgba(19, 34, 56, 0.24);
  border-radius: 0.6rem;
  background: #fff;
  color: #5f7186;
  font-size: 1.05rem;
  font-weight: 700;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.shell-icon-btn:hover {
  border-color: rgba(31, 106, 165, 0.38);
  color: var(--shell-accent);
  background: #f9fbfd;
}

.shell-menu-row {
  border-top: 1px solid rgba(19, 34, 56, 0.06);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 4.2rem;
  overflow-x: auto;
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 4.2rem;
  padding: 0.25rem 0.95rem;
  border-bottom: 2px solid transparent;
  color: #2f435b;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav-link:hover,
.top-nav-link.active {
  color: var(--shell-ink);
  border-bottom-color: var(--shell-accent);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(53, 116, 76, 0.18);
  border-radius: 999px;
  background: rgba(53, 116, 76, 0.12);
  color: #234d33;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-toolbar {
  padding: 1.25rem 0 0.5rem;
}

.card {
  background: var(--shell-card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 20px 60px rgba(41, 51, 70, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.metric-card.compact .card-body {
  padding: 0.9rem 1rem;
}

.metric-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(19, 34, 56, 0.6);
}

.metric-value {
  margin: 0.15rem 0;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.domain-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.domain-name {
  font-weight: 800;
}

.site-badges,
.infra-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(19, 34, 56, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-soft.accent {
  background: var(--shell-accent-soft);
  color: #174a73;
}

.badge-soft.success {
  background: rgba(53, 116, 76, 0.12);
  color: #28563a;
}

.badge-soft.warning {
  background: rgba(222, 141, 27, 0.15);
  color: #80520a;
}

.geo-chip {
  gap: 0.45rem;
}

.geo-flag {
  width: 1rem;
  height: 0.75rem;
  border-radius: 0.15rem;
  box-shadow: 0 0 0 1px rgba(19, 34, 56, 0.08);
}

.promotion-stack,
.target-stack,
.status-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stack-title,
.kv-value,
.server-item-name,
.timeline-title,
.user-email {
  font-weight: 700;
}

.stack-meta,
.server-item-meta,
.timeline-date,
.detail-subtitle,
.user-meta {
  color: rgba(19, 34, 56, 0.72);
}

.table-actions {
  white-space: nowrap;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.table-sort::after {
  content: "↕";
  color: rgba(19, 34, 56, 0.38);
  font-size: 0.8rem;
}

.table-sort.is-asc::after {
  content: "↑";
  color: var(--shell-ink);
}

.table-sort.is-desc::after {
  content: "↓";
  color: var(--shell-ink);
}

.columns-manager,
.server-grid,
.rule-list,
.timeline,
.section-list,
.detail-stack {
  display: grid;
  gap: 1rem;
}

.column-item,
.server-item,
.kv-item {
  padding: 1rem;
  border: 1px solid var(--shell-line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.column-item,
.column-item-actions,
.column-item-main,
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.column-item {
  justify-content: space-between;
}

.column-item-title {
  font-weight: 700;
}

.server-item-head,
.section-row,
.detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.bar-track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 34, 56, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f7ab5, #64a3d3);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 1.5rem;
}

.detail-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

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

.kv-label {
  margin-bottom: 0.35rem;
  color: rgba(19, 34, 56, 0.62);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-item {
  padding-left: 1rem;
  border-left: 2px solid rgba(19, 34, 56, 0.1);
}

.section-row {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(19, 34, 56, 0.08);
}

.section-row:last-child {
  border-bottom: 0;
}

.user-table .table td,
.user-table .table th {
  vertical-align: middle;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(19, 34, 56, 0.08);
  color: rgba(19, 34, 56, 0.68);
  font-weight: 800;
  font-size: 1.1rem;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.6rem;
  border-radius: 0.45rem;
  background: rgba(19, 34, 56, 0.08);
  color: rgba(19, 34, 56, 0.72);
  font-weight: 700;
}

@media (max-width: 991px) {
  .shell-navbar-top {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .shell-branding,
  .shell-navbar-actions {
    width: 100%;
  }

  .shell-navbar-actions {
    justify-content: space-between;
  }

  .shell-user {
    padding-right: 0;
  }

  .admin-toolbar {
    padding-top: 1rem;
  }

  .detail-grid,
  .kv-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .shell-brand {
    font-size: 1.75rem;
  }

  .shell-datetime {
    font-size: 0.92rem;
  }

  .shell-user-meta {
    flex-wrap: wrap;
  }

  .shell-icon-btn {
    width: 3.1rem;
    height: 2.75rem;
  }

  .top-nav {
    min-height: 3.5rem;
  }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  background:
    radial-gradient(circle at top left, rgba(33, 112, 159, 0.28), transparent 35%),
    radial-gradient(circle at bottom right, rgba(223, 169, 76, 0.24), transparent 30%),
    linear-gradient(135deg, #eff4f8 0%, #f6f2ea 45%, #eef3f6 100%);
}

.auth-hero,
.auth-panel {
  padding: 2rem;
}

.auth-hero {
  display: flex;
  align-items: stretch;
}

.auth-hero-panel,
.auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 1.75rem;
  box-shadow: 0 24px 60px rgba(24, 38, 59, 0.1);
  backdrop-filter: blur(20px);
}

.auth-hero-panel {
  width: 100%;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  background:
    linear-gradient(160deg, rgba(16, 43, 73, 0.94), rgba(28, 77, 117, 0.88)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 55%);
  color: #f5f8fb;
}

.auth-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-title {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.auth-copy {
  max-width: 42rem;
  margin: 0;
  color: rgba(245, 248, 251, 0.78);
  font-size: 1.05rem;
  line-height: 1.7;
}

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

.auth-highlight-card {
  padding: 1.15rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-highlight-title {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.auth-highlight-copy {
  color: rgba(245, 248, 251, 0.72);
  font-size: 0.92rem;
  line-height: 1.55;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(100%, 31rem);
  padding: 2.1rem;
  background: rgba(255, 255, 255, 0.8);
}

.auth-card-head {
  margin-bottom: 1.75rem;
}

.auth-kicker {
  margin-top: 0.8rem;
  margin-bottom: 0.55rem;
  color: var(--shell-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.auth-form-copy {
  margin: 0.65rem 0 0;
  color: rgba(19, 34, 56, 0.64);
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-input {
  min-height: 3.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(19, 34, 56, 0.14);
  background: rgba(255, 255, 255, 0.92);
}

.auth-input:focus {
  border-color: rgba(31, 106, 165, 0.45);
  box-shadow: 0 0 0 0.25rem rgba(31, 106, 165, 0.12);
}

.auth-password-row,
.auth-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-password-wrap {
  position: relative;
}

.auth-input-password {
  padding-right: 5rem;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--shell-accent);
  font-size: 0.88rem;
  font-weight: 800;
}

.auth-password-toggle:hover {
  color: #164b75;
}

.auth-inline-hint,
.auth-feedback {
  min-height: 1.2rem;
  font-size: 0.92rem;
}

.auth-inline-hint {
  color: #9b6b13;
}

.auth-feedback {
  color: #b14141;
}

.auth-muted {
  color: rgba(19, 34, 56, 0.56);
  font-size: 0.88rem;
}

.auth-check {
  margin: 0;
}

.auth-submit {
  min-height: 3.5rem;
  border: 0;
  border-radius: 1rem;
  background: linear-gradient(135deg, #165380, #2f7ab5);
  box-shadow: 0 18px 34px rgba(25, 85, 131, 0.22);
  font-weight: 800;
}

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

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

@media (max-width: 767px) {
  .auth-hero,
  .auth-panel {
    padding: 1rem;
  }

  .auth-hero-panel,
  .auth-card {
    border-radius: 1.35rem;
  }

  .auth-hero-panel {
    padding: 1.5rem;
  }

  .auth-title {
    max-width: none;
    font-size: 2.4rem;
  }

  .auth-card {
    padding: 1.35rem;
  }

  .auth-password-row,
  .auth-form-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
