﻿@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;700&display=swap');

@font-face {
  font-family: 'Permanent Marker Custom';
  src: url('/public/assets/fonts/PermanentMarker-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --omega-bg-base: #020b26;
  --omega-bg-surface: #06143a;
  --omega-bg-elevated: #0b1f52;
  --omega-blue-950: #030b22;
  --omega-blue-900: #06143a;
  --omega-blue-800: #0c2f76;
  --omega-blue-700: #1d4fd7;
  --omega-orange-500: #ff7a1b;
  --omega-orange-400: #ff9a4a;
  --omega-text: #f7f9ff;
  --omega-muted: #a9b7d8;
  --omega-surface: rgba(5, 12, 35, 0.86);
  --omega-border: rgba(104, 139, 222, 0.24);
  --omega-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--omega-text);
  font-family: 'Outfit', sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 122, 27, 0.22), transparent 35%),
    radial-gradient(circle at 92% 20%, rgba(29, 79, 215, 0.26), transparent 38%),
    linear-gradient(165deg, var(--omega-bg-base), #041238 50%, var(--omega-bg-surface) 100%);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.omega-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.auth-page,
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-size: cover;
  background-position: center;
}

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

.omega-login-card {
  border-top: 3px solid var(--omega-orange-500);
  overflow: hidden;
}

.login-stage {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(10, 24, 58, 0.58), rgba(10, 24, 58, 0.58)),
    url('/public/assets/login/background-ecosistema.png') center center / cover no-repeat;
}

.login-stage.omega-page::before {
  content: none;
}

.login-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 72%, rgba(255, 159, 74, 0.16), transparent 26%),
    radial-gradient(circle at 78% 26%, rgba(16, 33, 82, 0.36), transparent 32%);
  pointer-events: none;
}

.login-scene {
  position: relative;
  width: min(1480px, 100%);
  height: calc(100dvh - 48px);
  min-height: calc(100dvh - 48px);
  padding: 20px 42px 20px;
  overflow: visible;
}

.login-corner-brand {
  position: absolute;
  top: 14px;
  left: 14px;
  width: clamp(136px, 13vw, 228px);
  height: auto;
  z-index: 3;
}

.login-ecosystem-mark {
  position: absolute;
  top: 2px;
  left: 50%;
  width: min(29vw, 404px);
  transform: translateX(-50%);
  z-index: 2;
}

.login-ecosystem-logo {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.22));
}

.login-character-art {
  position: absolute;
  right: 24px;
  bottom: -28px;
  width: min(34vw, 505px);
  max-height: calc(100dvh + 24px);
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 22px 38px rgba(7, 13, 29, 0.42));
}

.login-panel-stack {
  position: absolute;
  left: 42px;
  top: clamp(180px, 25vh, 250px);
  bottom: auto;
  z-index: 3;
  width: clamp(360px, 31vw, 500px);
  max-width: 500px;
  padding-top: 0;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-access-panel {
  width: 100%;
  min-height: 0;
  padding: 18px 22px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(181, 191, 207, 0.62), rgba(156, 170, 193, 0.54));
  box-shadow:
    0 26px 46px rgba(5, 10, 24, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.login-access-panel h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(1.8rem, 2.8vw, 2.45rem);
  font-weight: 700;
  color: #fffaf3;
  margin-bottom: 2px;
}

.login-lead {
  color: rgba(255, 248, 236, 0.96);
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  display: grid;
  gap: 4px;
  color: #f7f0e5;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.92rem;
}

.login-access-panel input[type='text'],
.login-access-panel input[type='password'] {
  margin-top: 0;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.98);
  color: #243652;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.92rem;
  box-shadow: 0 10px 24px rgba(22, 31, 57, 0.08);
}

.login-access-panel input[type='text']:focus,
.login-access-panel input[type='password']:focus {
  outline: 2px solid rgba(255, 154, 74, 0.48);
  border-color: rgba(255, 154, 74, 0.85);
}

.login-access-panel input:-webkit-autofill,
.login-access-panel input:-webkit-autofill:hover,
.login-access-panel input:-webkit-autofill:focus,
.login-access-panel input:-webkit-autofill:active {
  -webkit-text-fill-color: #243652;
  transition: background-color 5000s ease-in-out 0s;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.98) inset;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.98) inset;
}

.input-with-action.login-password-field {
  position: relative;
  display: block;
}

.input-with-action.login-password-field input {
  margin-top: 0;
  padding-right: 58px;
}

.toggle-pass-eye {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #445a7e;
  cursor: pointer;
}

.toggle-pass-eye:hover {
  color: #1f3557;
}

.eye-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.caps-warning {
  color: #fff1f1;
  background: rgba(160, 29, 29, 0.24);
  border: 1px solid rgba(185, 56, 56, 0.42);
  border-radius: 14px;
  padding: 10px 12px;
}

.login-submit-btn {
  width: 150px;
  min-width: 150px;
  min-height: 50px;
  margin: 8px auto 0;
  padding: 6px 24px 8px;
  border-radius: 18px;
  background: #f89232;
  color: #fffaf1 !important;
  box-shadow: 0 8px 18px rgba(255, 128, 36, 0.18);
  font-family: 'Permanent Marker Custom', cursive !important;
  font-size: 1.22rem;
  font-style: normal;
  font-weight: 400 !important;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.login-submit-btn span {
  color: #fffaf1 !important;
  font-family: 'Permanent Marker Custom', cursive !important;
  font-size: 1.22rem;
  font-weight: 400 !important;
}

.login-submit-btn .btn-spinner {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fffaf1;
}

.login-access-panel .flash {
  margin-bottom: 4px;
  border-radius: 14px;
}

.login-support-copy {
  margin-top: 0;
  max-width: 460px;
  color: rgba(255, 247, 239, 0.98);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(0.82rem, 0.88vw, 0.92rem);
  line-height: 1.06;
  text-shadow: 0 2px 6px rgba(13, 20, 42, 0.22);
}

.glass-card {
  border: 1px solid var(--omega-border);
  background: var(--omega-surface);
  box-shadow: var(--omega-shadow);
  border-radius: 20px;
  backdrop-filter: blur(16px);
}

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

.form-stack.compact {
  gap: 10px;
}

label,
legend {
  color: #cfdaff;
  font-size: 0.9rem;
}

input[type='text'],
input[type='password'],
input[type='url'],
input[type='color'],
input[type='file'],
input[type='datetime-local'],
textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--omega-text);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

input[type='color'] {
  min-height: 42px;
  padding: 4px;
}

input[type='file'] {
  padding: 9px 10px;
}

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

input:focus {
  outline: 2px solid rgba(255, 154, 74, 0.5);
  border-color: rgba(255, 154, 74, 0.75);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--omega-text);
  transition: background-color 5000s ease-in-out 0s;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.06) inset;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.06) inset;
}

fieldset {
  border: 1px solid rgba(119, 154, 235, 0.34);
  border-radius: 14px;
  padding: 12px;
  margin: 0;
}

.btn {
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  padding: 10px 14px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--omega-orange-500), var(--omega-orange-400));
  color: #1c0f02;
  box-shadow: 0 10px 22px rgba(255, 122, 27, 0.35);
}

.btn.is-loading {
  opacity: 0.88;
  cursor: wait;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(17, 12, 5, 0.3);
  border-top-color: #1c0f02;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-secondary {
  background: linear-gradient(135deg, var(--omega-blue-700), var(--omega-blue-800));
  color: #f0f5ff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ffe3e3;
}

.btn-danger:hover {
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.22);
}

.btn-ghost {
  background: rgba(7, 19, 54, 0.7);
  border: 1px solid rgba(119, 154, 235, 0.4);
  color: var(--omega-text);
  width: 100%;
}

.flash {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.flash-success {
  background: rgba(20, 184, 122, 0.16);
  border: 1px solid rgba(20, 184, 122, 0.42);
}

.flash-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.44);
}

.flash-info {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.38);
}

.omega-logo {
  width: clamp(74px, 8vw, 96px);
  height: auto;
  margin-bottom: 6px;
}

.brand-block h1 {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.brand-block p {
  margin-top: 4px;
  color: var(--omega-muted);
}

.dashboard-page {
  position: relative;
  min-height: 100vh;
  height: 100dvh;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  padding: 10px 16px 16px;
  display: grid;
  gap: 10px;
  grid-template-rows: auto 1fr;
  align-content: start;
  background:
    linear-gradient(0deg, rgba(10, 24, 58, 0.58), rgba(10, 24, 58, 0.58)),
    url('/public/assets/login/background-ecosistema.png') center center / cover no-repeat;
}

.dashboard-page.omega-page::before {
  content: none;
}

.dashboard-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 72%, rgba(255, 159, 74, 0.16), transparent 26%),
    radial-gradient(circle at 78% 26%, rgba(16, 33, 82, 0.36), transparent 32%);
}

.dashboard-top {
  position: relative;
  width: 100%;
  min-height: 124px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}

.dashboard-top-left {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: absolute;
  top: 6px;
  left: 0;
}

.dashboard-corner-brand {
  position: relative;
  width: clamp(136px, 13vw, 228px);
  height: auto;
}

.dashboard-brand-wrap {
  position: relative;
  width: clamp(240px, 24vw, 420px);
}

.dashboard-ecosystem-brand {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.2));
}

.dashboard-actions {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  max-width: calc(100vw - 24px);
  z-index: 30;
}

.dashboard-actions form {
  margin: 0;
}

.dashboard-actions .btn-ghost {
  width: auto;
  min-height: 36px;
  background: rgba(7, 19, 54, 0.58);
  padding: 7px 12px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.dashboard-actions .btn-secondary {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.selector-card {
  grid-row: 2;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 18px 0 0;
  align-self: stretch;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  min-height: 0;
}

.dashboard-carousel-stage {
  min-height: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 12px;
  width: 100%;
}

.welcome-banner {
  padding: 0;
  margin: 0;
  padding-left: 12px;
  max-width: none;
  justify-self: start;
}

.welcome-banner div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #def8ff;
  text-shadow: 0 2px 10px rgba(7, 12, 25, 0.22);
}

.systems-carousel {
  position: relative;
  width: 100%;
  padding: 18px clamp(42px, 4vw, 78px) 14px;
  min-height: clamp(280px, 34vh, 360px);
  height: auto;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: rgba(58, 77, 101, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 44px rgba(1, 7, 24, 0.16);
}

.carousel-viewport {
  overflow: hidden;
  min-height: 0;
  padding: 20px clamp(8px, 1.6vw, 28px) 28px;
  touch-action: pan-y pinch-zoom;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  gap: 18px;
  transition: transform 0.42s ease;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 clamp(168px, 14vw, 204px);
  transform-origin: center center;
  transition:
    transform 0.32s ease,
    opacity 0.32s ease,
    filter 0.32s ease;
  transform: scale(0.76);
  opacity: 0.24;
  filter: blur(0.4px);
}

.carousel-slide.is-prev,
.carousel-slide.is-next {
  transform: scale(0.88);
  opacity: 0.58;
  filter: blur(0);
}

.carousel-slide.is-prev-2,
.carousel-slide.is-next-2 {
  transform: scale(0.82);
  opacity: 0.34;
  filter: blur(0);
}

.carousel-slide.is-active {
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
}

.carousel-slide.is-distant {
  opacity: 0.08;
}

.carousel-nav {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(119, 154, 235, 0.34);
  background: rgba(5, 18, 52, 0.88);
  color: #eef4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
}

.carousel-nav.prev {
  left: 0;
}

.carousel-nav.next {
  right: 0;
}

.carousel-nav:hover:not(:disabled) {
  border-color: rgba(255, 154, 74, 0.7);
  color: #fff7ef;
}

.carousel-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-nav span {
  font-size: 1.8rem;
  line-height: 1;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(119, 154, 235, 0.38);
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease;
}

.carousel-dot.is-active {
  background: var(--omega-orange-400);
  transform: scale(1.35);
}

.system-card {
  border: 1px solid rgba(104, 139, 222, 0.28);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 34px rgba(0, 0, 0, 0.24);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 196px;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.carousel-slide.is-active .system-card:hover,
.carousel-slide.is-prev .system-card:hover,
.carousel-slide.is-next .system-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(226, 177, 92, 0.9);
  box-shadow:
    0 0 0 1px rgba(226, 177, 92, 0.25) inset,
    0 18px 28px rgba(0, 0, 0, 0.28);
}

.system-card-media {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(7, 18, 46, 0.95);
  overflow: hidden;
}

.system-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.system-card-body {
  padding: 2px 10px 8px;
  display: grid;
  place-items: center;
}

.system-card-body h2 {
  color: #20364f;
  font-family: 'Permanent Marker Custom', cursive;
  font-size: clamp(0.94rem, 1vw, 1.08rem);
  line-height: 1.08;
  text-align: center;
  font-weight: 400;
}

.system-card-footer {
  display: flex;
  justify-content: center;
}

.carousel-description {
  margin: 12px auto 0;
  max-width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.carousel-description-text {
  color: rgba(250, 247, 242, 0.96);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(0.9rem, 0.95vw, 0.98rem);
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(6, 10, 25, 0.24);
}

.dashboard-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(1, 7, 24, 0.74);
  backdrop-filter: blur(10px);
}

.dashboard-notice-dialog {
  width: min(720px, 100%);
  padding: 22px;
  display: grid;
  gap: 16px;
  background: rgba(4, 15, 45, 0.97);
}

.dashboard-notice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: center;
}

.dashboard-notice-content {
  display: grid;
  gap: 16px;
}

.dashboard-notice-header {
  display: grid;
  gap: 6px;
}

.dashboard-notice-list {
  display: grid;
  gap: 12px;
  max-height: min(48vh, 420px);
  overflow: auto;
}

.dashboard-notice-item {
  border: 1px solid rgba(119, 154, 235, 0.28);
  border-radius: 16px;
  padding: 14px;
  background: rgba(7, 19, 54, 0.64);
  display: grid;
  gap: 8px;
}

.dashboard-notice-item strong {
  font-size: 1.02rem;
}

.dashboard-notice-item p {
  color: #e6efff;
  line-height: 1.5;
  white-space: pre-wrap;
}

.dashboard-notice-actions {
  display: flex;
  justify-content: flex-end;
}

.dashboard-notice-visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dashboard-notice-aurora {
  width: min(100%, 210px);
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.26));
}

.password-card {
  width: min(520px, 100%);
  padding: 22px;
  display: grid;
  gap: 18px;
}

.password-card-header {
  display: grid;
  gap: 6px;
}

.password-card-header p {
  color: var(--omega-muted);
}

.password-form {
  gap: 14px;
}

.password-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.admin-page {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.admin-page > * {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.page-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  z-index: 30;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-header-left .omega-logo {
  margin-bottom: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.page-actions .btn-ghost {
  width: auto;
}

.admin-nav-dropdown {
  position: relative;
}

.admin-nav-dropdown > summary {
  list-style: none;
}

.admin-nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.admin-nav-dropdown[open] > summary {
  box-shadow: 0 10px 22px rgba(29, 79, 215, 0.28);
}

.admin-nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  display: grid;
  gap: 4px;
  border-radius: 14px;
  z-index: 40;
  background: rgba(4, 15, 45, 0.95);
}

.admin-nav-menu a {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  color: #dbe8ff;
  font-weight: 600;
}

.admin-nav-menu a:hover {
  border-color: rgba(255, 154, 74, 0.55);
  background: rgba(255, 122, 27, 0.14);
}

.upload-box {
  border: 1px solid rgba(119, 154, 235, 0.3);
  border-radius: 14px;
  padding: 12px;
  background: rgba(4, 15, 45, 0.62);
  display: grid;
  gap: 10px;
}

.upload-box h3 {
  font-size: 1rem;
}

.split-grid {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

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

.admin-menu-card {
  border: 1px solid rgba(119, 154, 235, 0.3);
  border-radius: 14px;
  padding: 14px;
  background: rgba(4, 15, 45, 0.75);
  display: grid;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-menu-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 154, 74, 0.9);
  box-shadow: 0 10px 22px rgba(255, 122, 27, 0.2);
}

.admin-menu-card.static:hover {
  transform: none;
  border-color: rgba(119, 154, 235, 0.3);
  box-shadow: none;
}

.admin-section {
  padding: 16px;
  display: grid;
  gap: 12px;
  z-index: 1;
}

.admin-management-grid {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-section-head .btn {
  flex-shrink: 0;
}

.admin-callout {
  border: 1px solid rgba(119, 154, 235, 0.26);
  border-radius: 16px;
  padding: 14px;
  background: rgba(4, 15, 45, 0.6);
  display: grid;
  gap: 6px;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 7, 24, 0.72);
  backdrop-filter: blur(8px);
}

.admin-modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 920px);
  padding: 18px 18px 16px;
  overflow: auto;
  border-radius: 22px;
  background: rgba(4, 15, 45, 0.96);
  z-index: 1;
}

.admin-modal-dialog-wide {
  width: min(820px, 100%);
}

.admin-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(119, 154, 235, 0.32);
  border-radius: 12px;
  background: rgba(7, 19, 54, 0.74);
  color: #f1f5ff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.admin-modal-close:hover {
  border-color: rgba(255, 154, 74, 0.64);
  color: #fff5ec;
}

.admin-modal-form {
  gap: 12px;
}

.admin-modal-actions {
  justify-content: flex-end;
  margin-top: 6px;
}

.admin-modal-actions .btn {
  width: auto;
  min-width: 170px;
}

.admin-modal-actions .btn-danger {
  margin-right: auto;
}

body.modal-open {
  overflow: hidden;
}

.section-title {
  margin-bottom: 2px;
}

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

.user-card {
  border: 1px solid rgba(119, 154, 235, 0.3);
  border-radius: 14px;
  padding: 12px;
  background: rgba(4, 15, 45, 0.78);
}

.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.badge {
  font-size: 0.72rem;
  background: rgba(255, 122, 27, 0.22);
  color: #ffd7b7;
  border: 1px solid rgba(255, 122, 27, 0.48);
  border-radius: 999px;
  padding: 3px 8px;
}

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

.system-edit-row {
  border: 1px solid rgba(119, 154, 235, 0.3);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: rgba(4, 15, 45, 0.78);
}

.system-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 10px;
}

.omega-select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid rgba(119, 154, 235, 0.36);
  background: rgba(4, 15, 45, 0.9);
  color: var(--omega-text);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.omega-select:focus {
  outline: 2px solid rgba(255, 154, 74, 0.55);
  border-color: transparent;
}

.check-inline {
  margin-top: 28px;
}

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

.image-library-toggle {
  margin-top: 18px;
}

.image-library-toggle > summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
}

.image-library-toggle > summary::-webkit-details-marker {
  display: none;
}

.image-library-toggle[open] > summary {
  margin-bottom: 12px;
}

.image-library-body {
  display: grid;
  gap: 12px;
}

.mapping-grid {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.mapping-card {
  gap: 14px;
}

.mapping-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mapping-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mapping-stat,
.mapping-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(119, 154, 235, 0.35);
  background: rgba(29, 79, 215, 0.14);
  color: #dbe8ff;
}

.mapping-stat.is-success,
.mapping-pill.is-success {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.42);
  color: #cbffe9;
}

.mapping-stat.is-warning,
.mapping-pill.is-warning {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.46);
  color: #ffe2b2;
}

.mapping-stat.is-danger,
.mapping-pill.is-danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffd9d9;
}

.mapping-table td:last-child,
.mapping-table th:last-child {
  width: 120px;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-row {
  border: 1px solid rgba(119, 154, 235, 0.28);
  border-radius: 12px;
  padding: 10px;
  background: rgba(4, 15, 45, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.compact-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compact-url {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-edit-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 154, 74, 0.55);
  background: rgba(255, 122, 27, 0.12);
  color: #ffd9b8;
  font-size: 1rem;
  cursor: pointer;
}

.icon-edit-btn:hover {
  background: rgba(255, 122, 27, 0.28);
}

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

.notice-grid {
  grid-template-columns: 1fr 1fr;
}

.history-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(119, 154, 235, 0.26);
  border-radius: 12px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(119, 154, 235, 0.2);
}

.history-table th {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b6c7ee;
  background: rgba(8, 24, 66, 0.75);
}

.history-table td {
  font-size: 0.95rem;
}

.compact-asset img {
  height: 120px;
}

.asset-card {
  border: 1px solid rgba(119, 154, 235, 0.3);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(4, 15, 45, 0.78);
}

.asset-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: rgba(3, 10, 30, 0.85);
}

.asset-meta {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.asset-meta strong {
  font-size: 0.9rem;
}

.asset-meta small {
  color: var(--omega-muted);
}

.asset-actions {
  display: grid;
  gap: 8px;
}

.asset-actions form {
  margin: 0;
}

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

.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none !important;
}

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

.small {
  font-size: 0.86rem;
}

@media (max-width: 1440px) and (min-width: 1041px) {
  .dashboard-top {
    min-height: 110px;
  }

  .dashboard-top-left {
    top: 4px;
  }

  .dashboard-corner-brand {
    width: clamp(126px, 11vw, 170px);
  }

  .dashboard-brand-wrap {
    width: clamp(220px, 20vw, 300px);
  }

  .dashboard-actions {
    gap: 6px;
    flex-wrap: nowrap;
    top: 12px;
    right: 12px;
  }

  .dashboard-actions .btn-secondary,
  .dashboard-actions .btn-ghost {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 0.72rem;
  }
}

@media (max-width: 1040px) {
  .dashboard-top-left {
    width: 100%;
    display: flex;
    justify-content: flex-start;
  }

  .dashboard-page {
    display: block;
    min-height: auto;
    height: auto;
    padding: 10px 10px 18px;
    overflow-x: hidden;
  }

  .dashboard-corner-brand {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    width: 112px;
    margin-bottom: 8px;
  }

  .dashboard-top {
    min-height: auto;
    width: 100%;
    padding: 0 0 10px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 10px;
  }

  .dashboard-brand-wrap {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: min(100%, 190px);
    margin: 0 auto;
  }

  .dashboard-actions {
    width: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    max-width: none;
    top: 10px;
    right: 10px;
  }

  .dashboard-actions .btn-secondary,
  .dashboard-actions .btn-ghost {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 0.68rem;
    border-radius: 8px;
  }

  .selector-card {
    padding: 8px 0 14px;
    min-height: auto;
  }

  .dashboard-carousel-stage {
    min-height: 0;
    height: auto;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 12px;
  }

  .welcome-banner {
    padding-left: 0;
    margin: 0 0 12px;
  }

  .welcome-banner div {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .systems-carousel {
    margin: 0;
    min-height: 0;
    height: auto;
    overflow: hidden;
    padding: 18px 40px 18px;
    border-radius: 12px;
  }

  .carousel-viewport {
    padding: 10px 0 10px;
  }

  .carousel-slide {
    flex-basis: clamp(156px, 24vw, 192px);
  }

  .carousel-nav {
    width: 34px;
    height: 34px;
    top: 50%;
  }

  .carousel-nav.prev {
    left: 8px;
  }

  .carousel-nav.next {
    right: 8px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-management-grid {
    grid-template-columns: 1fr;
  }

  .admin-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-section-head .btn {
    width: 100%;
  }

  .page-actions {
    width: 100%;
    justify-content: space-between;
  }

  .login-scene {
    padding: 20px 18px 28px;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .login-corner-brand {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    width: 156px;
    margin-bottom: 18px;
  }

  .login-ecosystem-mark {
    position: relative;
    top: auto;
    left: auto;
    width: min(100%, 420px);
    transform: none;
    margin: 0 0 18px;
  }

  .login-panel-stack {
    position: relative;
    left: auto;
    bottom: auto;
    top: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: 0;
  }

  .login-access-panel {
    padding: 24px 20px 24px;
  }

  .login-character-art {
    width: min(72vw, 430px);
    right: -92px;
    bottom: -12px;
    opacity: 0.22;
  }

  .login-support-copy {
    max-width: 100%;
    font-size: 1rem;
  }

  .admin-header-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .selector-card {
    padding: 8px 0 14px;
  }

  .system-edit-grid {
    grid-template-columns: 1fr;
  }

  .admin-modal {
    padding: 16px;
    align-items: flex-start;
  }

  .admin-modal-dialog,
  .admin-modal-dialog-wide {
    width: min(100%, 780px);
    max-height: min(92vh, 920px);
    margin-top: 14px;
  }

  .mapping-card-header {
    flex-direction: column;
  }

  .notice-grid {
    grid-template-columns: 1fr;
  }

  .mapping-stats {
    justify-content: flex-start;
  }

  .check-inline {
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .dashboard-corner-brand {
    width: 118px;
    margin-bottom: 8px;
  }

  .dashboard-top {
    margin-bottom: 12px;
    justify-items: center;
  }

  .dashboard-brand-wrap {
    width: min(100%, 210px);
  }

  .dashboard-actions {
    top: 8px;
    right: 8px;
    gap: 4px;
  }

  .dashboard-actions .btn-secondary,
  .dashboard-actions .btn-ghost {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.62rem;
  }

  .dashboard-carousel-stage {
    gap: 12px;
  }

  .admin-modal {
    padding: 10px;
  }

  .admin-modal-dialog,
  .admin-modal-dialog-wide {
    padding: 16px 14px 14px;
    border-radius: 18px;
  }

  .admin-modal-header {
    align-items: center;
  }

  .admin-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .admin-modal-actions {
    flex-direction: column-reverse;
  }

  .admin-modal-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .admin-modal-actions .btn-danger {
    margin-right: 0;
  }

  .systems-carousel {
    padding: 18px 14px 18px;
  }

  .carousel-viewport {
    padding: 8px 0 10px;
  }

  .carousel-track {
    gap: 6px;
  }

  .carousel-slide {
    flex-basis: calc(100% - 64px);
    transform: scale(0.9);
    opacity: 0.12;
    filter: none;
  }

  .carousel-slide.is-prev-2,
  .carousel-slide.is-next-2 {
    transform: scale(0.88);
    opacity: 0.02;
  }

  .carousel-slide.is-prev,
  .carousel-slide.is-next {
    transform: scale(0.93);
    opacity: 0.16;
  }

  .carousel-slide.is-active {
    transform: scale(1);
    opacity: 1;
  }

  .carousel-nav {
    display: none;
  }

  .system-card {
    min-height: 208px;
  }

  .system-card-body {
    padding: 7px 12px 10px;
  }

  .system-card-body h2 {
    font-size: clamp(0.98rem, 4.4vw, 1.14rem);
  }

  .carousel-dots {
    margin-top: 8px;
  }

  .carousel-description {
    margin-top: 8px;
    min-height: 28px;
    padding: 0 8px;
  }

  .carousel-description-text {
    font-size: 0.88rem;
    line-height: 1.3;
  }

  .dashboard-notice-overlay {
    padding: 12px;
  }

  .dashboard-notice-dialog {
    padding: 16px;
    gap: 12px;
  }

  .dashboard-notice-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-notice-visual {
    display: none;
  }

  .dashboard-notice-actions .btn {
    width: 100%;
  }

  .password-form-actions {
    flex-direction: column-reverse;
  }
}

@media (min-width: 861px) and (max-width: 980px) {
  .login-scene {
    height: auto;
    min-height: auto;
    padding: 24px 24px 36px;
    overflow: visible;
  }

  .login-corner-brand {
    top: 18px;
    left: 24px;
    width: 168px;
  }

  .login-ecosystem-mark {
    position: relative;
    top: auto;
    left: auto;
    width: min(100%, 520px);
    transform: none;
    margin: 72px auto 22px;
  }

  .login-panel-stack {
    position: relative;
    left: auto;
    bottom: auto;
    top: auto;
    width: min(100%, 520px);
    max-width: none;
    margin: 0;
    padding-top: 0;
  }

  .login-character-art {
    width: min(58vw, 500px);
    right: -36px;
    opacity: 0.34;
  }
}

@media (max-width: 560px) {
  .auth-page {
    padding: 12px;
  }

  .login-scene {
    padding: 16px 12px 18px;
    height: auto;
  }

  .login-access-panel h2 {
    font-size: 2rem;
  }

  .login-character-art {
    width: 92vw;
    right: -140px;
    bottom: -22px;
    opacity: 0.14;
  }

  .login-submit-btn {
    width: 100%;
  }

  .login-support-copy br {
    display: none;
  }
}
