@import "./styles.css";
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");

/* Aurora workspace: reimagined glassmorphism-inspired admin UI */

body.style-aurora {
  --brand: #ff4f00;
  --brand-secondary: #ff9a4f;
  --text: #fef6ed;
  --muted: #9fb0c8;
  --bg: #05060b;
  --card: rgba(7, 9, 14, 0.82);
  --border: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(8, 10, 18, 0.9);
  --header-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  --sidebar-bg: rgba(8, 10, 18, 0.92);
  --aurora-logo-height: clamp(46px, 5vw, 60px);
  --aurora-header-gap: calc(var(--aurora-logo-height) * 0.05);
  --sidebar-action-bg: rgba(255, 255, 255, 0.03);
  --sidebar-action-hover-bg: rgba(255, 139, 61, 0.18);
  --sidebar-action-border: rgba(255, 255, 255, 0.18);
  --sidebar-action-color: rgba(255, 255, 255, 0.92);
  --sidebar-action-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
  --sidebar-action-glyph-bg: rgba(255, 139, 61, 0.2);
  --sidebar-action-glyph-color: #ffe1bf;
  --sidebar-action-secondary-border: rgba(255, 139, 61, 0.35);
  --sidebar-action-secondary-border-hover: rgba(255, 139, 61, 0.55);
  --sidebar-action-secondary-hover-bg: rgba(255, 139, 61, 0.12);
  --chat-bg: rgba(6, 12, 24, 0.72);
  --chat-border: rgba(255, 255, 255, 0.18);
  --chat-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
  --chat-messages-bg: rgba(10, 18, 32, 0.88);
  --chat-messages-border: rgba(255, 255, 255, 0.16);
  --chat-user-bg: linear-gradient(135deg, rgba(255, 139, 61, 0.48), rgba(255, 209, 102, 0.32));
  --chat-user-color: #fff8ed;
  --chat-assistant-bg: rgba(255, 255, 255, 0.08);
  --chat-assistant-color: rgba(255, 255, 255, 0.92);
  --chat-user-shadow: 0 22px 46px rgba(255, 139, 61, 0.35);
  --chat-assistant-shadow: 0 18px 38px rgba(2, 6, 23, 0.7);
  font-family: "Outfit", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

body.style-aurora h1 {
  font-size: clamp(2rem, 1.6rem + 0.6vw, 2.4rem);
  line-height: 1.2;
  font-weight: 600;
}

body.style-aurora h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.26vw, 1.65rem);
  line-height: 1.18;
  font-weight: 600;
}

body.style-aurora h3 {
  font-size: clamp(1.1rem, 0.98rem + 0.25vw, 1.35rem);
  line-height: 1.24;
  font-weight: 600;
}

body.style-aurora h4 {
  font-size: 1.25rem;
  line-height: 1.28;
  font-weight: 600;
}

body.style-aurora h5 {
  font-size: 1.125rem;
  line-height: 1.25;
  font-weight: 600;
}

body.style-aurora h6 {
  font-size: 1.0625rem;
  line-height: 1.3;
  font-weight: 600;
}

body.style-aurora p,
body.style-aurora li,
body.style-aurora label,
body.style-aurora input,
body.style-aurora select,
body.style-aurora textarea,
body.style-aurora .button,
body.style-aurora button,
body.style-aurora input[type="submit"] {
  font-size: 1rem;
  line-height: 1.6;
}

body.style-aurora small {
  font-size: 0.75rem;
  line-height: 1.4;
}

body.style-aurora::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/public/assets/brand/wfguard-bg.png") center/cover no-repeat fixed;
  opacity: 0.75;
  filter: saturate(1.12) brightness(1);
  z-index: -3;
}

body.style-aurora::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(130deg, rgba(8, 11, 19, 0.88), rgba(9, 6, 3, 0.85));
  z-index: -2;
}

body.style-aurora .bg-canvas {
  display: none;
}

body.style-aurora.theme-aurora {
  color: var(--text);
}

body.style-aurora .layout-stack {
  display: grid;
  grid-template-columns: minmax(240px, 292px) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "sidebar header"
    "sidebar main"
    "sidebar footer";
  gap: clamp(20px, 3vw, 40px);
  min-height: 100vh;
  max-width: 1460px;
  width: calc(100% - clamp(24px, 5vw, 88px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 60px) clamp(18px, 4vw, 52px);
  align-items: start;
}

body.style-aurora .site-header {
  grid-area: header;
  position: sticky;
  top: clamp(20px, 4vw, 60px);
  align-self: start;
  width: 100%;
  margin: 0;
  background: var(--header-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: var(--aurora-header-gap) clamp(18px, 2vw, 28px);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(8px);
  z-index: 10;
}

body.style-aurora .site-header nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: clamp(18px, 3vw, 32px);
  row-gap: 12px;
}

body.style-aurora .site-header nav > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.style-aurora .site-header nav > ul:first-of-type {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: nowrap;
  min-width: 0;
}

body.style-aurora .site-header nav > ul:first-of-type > li {
  display: flex;
  align-items: center;
  min-width: 0;
}

body.style-aurora .site-header nav > ul:last-of-type {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 16px);
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
}

body.style-aurora .site-header nav > ul:last-of-type > li {
  display: inline-flex;
}

body.style-aurora .aurora-chip {
  margin-left: auto;
}

body.style-aurora .aurora-welcome {
  margin-left: 0;
  text-align: left;
}

body.style-aurora .brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 16px;
  padding-right: 20px;
  text-decoration: none;
  color: inherit;
}

body.style-aurora .brand .logo {
  height: var(--aurora-logo-height);
  width: auto;
}

body.style-aurora .brand strong {
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

body.style-aurora .brand small {
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.7);
}

body.style-aurora #btnSidebar {
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(12, 22, 48, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #e0e7ff;
  transition: transform 120ms ease, box-shadow 160ms ease;
}

body.style-aurora #btnSidebar:hover {
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

body.style-aurora .aurora-welcome {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: clamp(160px, 20vw, 240px);
  margin-left: 0;
  flex: 1 1 auto;
  text-align: left;
}

body.style-aurora .aurora-welcome__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.78);
}

body.style-aurora .aurora-welcome__value {
  font-size: 1.125rem;
  line-height: 1.26;
  font-weight: 600;
  color: #f8fafc;
}

body.style-aurora .aurora-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

body.style-aurora .header-icon {
  background: rgba(11, 20, 36, 0.88);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 12px 16px;
  color: #dbe4ff;
  gap: 10px;
  transition: transform 140ms ease, box-shadow 180ms ease, border-color 140ms ease;
}

body.style-aurora .aurora-assist-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.style-aurora .aurora-assist-icon__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #f8fafc;
  padding: 0;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

body.style-aurora .aurora-assist-icon__btn i {
  width: 20px;
  height: 20px;
}

body.style-aurora .aurora-assist-icon__btn:hover,
body.style-aurora .aurora-assist-icon__btn:focus-visible {
  background: rgba(148, 163, 184, 0.16);
  color: #ffffff;
}

body.style-aurora .aurora-login {
  display: inline-flex;
  align-items: center;
  color: rgba(148, 163, 184, 0.78);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

body.style-aurora .aurora-login:hover {
  color: #f8fafc;
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(12, 21, 38, 0.68);
}

body.style-aurora .site-header .header-icon,
body.style-aurora .site-header .header-avatar {
  display: none;
}

body.style-aurora .header-icon .label {
  display: inline;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

body.style-aurora .header-icon:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.65);
  box-shadow: 0 18px 45px rgba(124, 58, 237, 0.35);
  color: #fff;
}

body.style-aurora .header-avatar {
  border-radius: 16px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(99, 102, 241, 0.24);
  background: rgba(11, 20, 36, 0.92);
}

body.style-aurora .sidebar {
  grid-area: sidebar;
  position: sticky;
  top: clamp(20px, 4vw, 60px);
  align-self: start;
  transform: none;
  width: 100%;
  height: calc(100vh - clamp(40px, 8vw, 110px));
  background: var(--sidebar-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: clamp(20px, 2.8vw, 32px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
}

body.style-aurora .sidebar__header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

body.style-aurora .sidebar__header .brand-sm {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

body.style-aurora .sidebar__summary {
  display: grid;
  gap: 14px;
  padding: 6px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

body.style-aurora .sidebar__summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.72);
}

body.style-aurora .sidebar__summary-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #f8fafc;
}

body.style-aurora .sidebar__nav {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.style-aurora .sidebar__nav h3 {
  display: none;
}

body.style-aurora .sidebar-section {
  margin-bottom: 16px;
}

body.style-aurora .sidebar-section__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  padding: 0;
  cursor: pointer;
}

body.style-aurora .sidebar-section__toggle::after {
  content: '▾';
  font-size: 0.72rem;
  transition: transform 160ms ease;
}

body.style-aurora .sidebar-section__toggle[aria-expanded="false"]::after {
  transform: rotate(-90deg);
}

body.style-aurora .sidebar-section__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 800px;
  overflow: hidden;
  transition: max-height 200ms ease, opacity 200ms ease;
}

body.style-aurora .sidebar-section__content.is-collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

body.style-aurora .sidebar__nav a {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(14, 16, 24, 0.68);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  gap: 10px;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 160ms ease;
}

body.style-aurora .sidebar__nav a:hover {
  border-color: rgba(255, 79, 0, 0.45);
  background: rgba(255, 79, 0, 0.12);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55);
  transform: translateX(2px);
}

body.style-aurora .sidebar__close {
  display: none;
}

body.style-aurora #sidebarBackdrop {
  display: none;
}

body.style-aurora main.container {
  grid-area: main;
  width: 100%;
  max-width: 100%;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 30px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(6px);
}

body.style-aurora .container,
body.style-aurora .container-wide {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

body.style-aurora .site-footer {
  grid-area: footer;
  align-self: stretch;
  margin: 0;
  padding: clamp(14px, 2vw, 24px) clamp(6px, 2vw, 12px) 0;
  color: rgba(148, 163, 184, 0.7);
  text-align: right;
}

body.style-aurora .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(4px);
  transition: transform 180ms ease, box-shadow 200ms ease;
}

body.style-aurora .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

body.style-aurora .card > header {
  background: linear-gradient(135deg, rgba(255, 139, 61, 0.95), rgba(255, 209, 102, 0.8));
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

body.style-aurora .hero .searchbar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}

body.style-aurora .hero input,
body.style-aurora .hero select {
  border-radius: 14px;
}

body.style-aurora input,
body.style-aurora select,
body.style-aurora textarea {
  background: rgba(6, 12, 24, 0.55);
  border: 1px solid var(--border);
  color: #fef6ed;
  border-radius: 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  backdrop-filter: blur(4px);
}

body.style-aurora input:focus,
body.style-aurora select:focus,
body.style-aurora textarea:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.24);
}

body.style-aurora label {
  color: rgba(226, 232, 240, 0.85);
}

body.style-aurora .muted {
  color: rgba(148, 163, 184, 0.75);
}

body.style-aurora .button,
body.style-aurora button,
body.style-aurora input[type="submit"] {
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(56, 189, 248, 0.82));
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  line-height: 1.35;
  box-shadow: 0 20px 55px rgba(79, 70, 229, 0.45);
  transition: transform 120ms ease, box-shadow 180ms ease;
}

body.style-aurora .button.secondary,
body.style-aurora button.secondary {
  background: rgba(11, 20, 36, 0.85);
  border-color: rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  box-shadow: none;
}

body.style-aurora .button:hover,
body.style-aurora button:hover,
body.style-aurora input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 70px rgba(79, 70, 229, 0.5);
}

body.style-aurora .badge {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #e0f2fe;
  font-size: 0.75rem;
  line-height: 1.2;
  font-weight: 600;
}

body.style-aurora .table {
  border-radius: 18px;
  overflow: hidden;
}

body.style-aurora .table th,
body.style-aurora .table td {
  border-color: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

body.style-aurora .table thead tr {
  background: rgba(79, 70, 229, 0.4);
}

body.style-aurora .table tbody tr:nth-child(even) {
  background: rgba(11, 20, 36, 0.72);
}

body.style-aurora .modal__dialog {
  background: rgba(11, 20, 36, 0.92);
  border-radius: 24px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 42px 110px rgba(12, 22, 48, 0.7);
  backdrop-filter: blur(24px);
}

body.style-aurora .modal__header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.style-aurora .popover__card {
  background: rgba(11, 20, 36, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.28);
  box-shadow: 0 32px 90px rgba(12, 22, 48, 0.62);
}

body.style-aurora .assistant__panel {
  background: rgba(11, 20, 36, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 40px 110px rgba(12, 22, 48, 0.68);
}

body.style-aurora .assistant__card {
  background: rgba(12, 21, 38, 0.88);
  border: 1px solid rgba(99, 102, 241, 0.28);
  box-shadow: 0 22px 52px rgba(12, 22, 48, 0.48);
}

body.style-aurora .assistant__media {
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 24px 56px rgba(12, 22, 48, 0.42);
}

body.style-aurora .assistant__media figcaption {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.82), rgba(56, 189, 248, 0.72));
  color: #f8fafc;
}

body.style-aurora .assistant__form input {
  background: rgba(12, 21, 38, 0.82);
  border-radius: 14px;
}

body.style-aurora .grid {
  gap: clamp(14px, 2vw, 24px);
}

body.style-aurora .hero,
body.style-aurora section.card {
  margin-bottom: clamp(20px, 3vw, 32px);
}

body.style-aurora .toast {
  background: rgba(11, 20, 36, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.34);
  color: #e0e7ff;
  box-shadow: 0 20px 60px rgba(12, 22, 48, 0.6);
}

@media (max-width: 640px) {
  body.style-aurora .chat__messages {
    max-height: 34vh;
  }
}

@media (min-width: 1200px) {
  body.style-aurora .site-header nav > ul:first-of-type {
    flex-wrap: nowrap;
  }
}

@media (max-width: 1024px) {
  body.style-aurora .layout-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    gap: 0;
  }

  body.style-aurora .site-header {
    position: sticky;
    top: 0;
    border-radius: 0 0 24px 24px;
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: 0 28px 70px rgba(12, 22, 48, 0.65);
    transition: transform 180ms ease, opacity 160ms ease;
    will-change: transform;
  }

  body.style-aurora .site-header.site-header--hidden {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
  }

  body.style-aurora .site-header nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  body.style-aurora .site-header nav > ul:first-of-type {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  body.style-aurora .site-header nav > ul:first-of-type > li {
    flex: 0 0 auto;
  }

  body.style-aurora .aurora-welcome {
    flex: 1 1 100%;
  }

  body.style-aurora .aurora-chip {
    margin-left: 0;
    width: auto;
    flex: 0 0 auto;
  }

  body.style-aurora .site-header nav > ul:last-of-type {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    overflow: visible;
  }

  body.style-aurora .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    max-width: 320px;
    width: 88vw;
    border-radius: 0 28px 28px 0;
    transform: translateX(-100%);
    padding: 28px;
    z-index: 1200;
  }

  body.style-aurora.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.style-aurora .sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    width: 36px;
    height: 36px;
    background: rgba(12, 21, 38, 0.92);
    color: #e2e8f0;
  }

  body.style-aurora #sidebarBackdrop {
    display: block;
  }

  body.style-aurora main.container {
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  body.style-aurora .site-footer {
    text-align: center;
    padding: 32px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.style-aurora *,
  body.style-aurora *::before,
  body.style-aurora *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
