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

:root {
  --ka-bg: #07111d;
  --ka-bg-deep: #040913;
  --ka-surface: rgba(11, 19, 33, 0.82);
  --ka-surface-strong: rgba(9, 16, 28, 0.94);
  --ka-surface-soft: rgba(15, 28, 47, 0.74);
  --ka-line: rgba(142, 176, 230, 0.16);
  --ka-line-strong: rgba(78, 188, 255, 0.3);
  --ka-text: #f5f9ff;
  --ka-muted: #95a8c6;
  --ka-brand: #2599ff;
  --ka-brand-2: #14d4bc;
  --ka-shadow: 0 30px 80px rgba(1, 7, 18, 0.48);
  --ka-shadow-soft: 0 20px 48px rgba(1, 7, 18, 0.28);
}

html.keyauth-modern-root,
body.keyauth-modern {
  min-height: 100%;
}

html.keyauth-modern-root {
  scroll-behavior: smooth;
}

body.keyauth-modern {
  position: relative;
  font-family: "Plus Jakarta Sans", "IBM Plex Sans", sans-serif;
  color: var(--ka-text);
  background:
    radial-gradient(circle at top left, rgba(37, 153, 255, 0.16), transparent 26%),
    radial-gradient(circle at bottom right, rgba(20, 212, 188, 0.14), transparent 30%),
    linear-gradient(180deg, var(--ka-bg-deep) 0%, var(--ka-bg) 42%, #081423 100%) !important;
}

body.keyauth-modern::before,
body.keyauth-modern::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.45;
}

body.keyauth-modern::before {
  top: 6rem;
  left: -5rem;
  width: 15rem;
  height: 15rem;
  background: rgba(37, 153, 255, 0.24);
}

body.keyauth-modern::after {
  right: -5rem;
  bottom: 7rem;
  width: 14rem;
  height: 14rem;
  background: rgba(20, 212, 188, 0.2);
}

body.keyauth-modern * {
  scrollbar-width: thin;
  scrollbar-color: rgba(94, 128, 186, 0.7) transparent;
}

body.keyauth-modern *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.keyauth-modern *::-webkit-scrollbar-track {
  background: transparent;
}

body.keyauth-modern *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(37, 153, 255, 0.86), rgba(20, 212, 188, 0.7));
  border-radius: 999px;
}

body.keyauth-modern ::selection {
  background: rgba(37, 153, 255, 0.34);
  color: #ffffff;
}

body.keyauth-modern h1,
body.keyauth-modern h2,
body.keyauth-modern h3,
body.keyauth-modern h4,
body.keyauth-modern h5,
body.keyauth-modern h6 {
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.04em;
  color: #f8fbff;
}

body.keyauth-modern a {
  transition:
    color 0.24s ease,
    transform 0.24s ease,
    box-shadow 0.24s ease,
    opacity 0.24s ease;
}

body.keyauth-modern p,
body.keyauth-modern label,
body.keyauth-modern span.text-gray-500,
body.keyauth-modern span.text-gray-400,
body.keyauth-modern .text-gray-500,
body.keyauth-modern .text-gray-400 {
  color: var(--ka-muted) !important;
}

body.keyauth-modern .text-gray-300 {
  color: #d9e6fb !important;
}

body.keyauth-modern .text-white,
body.keyauth-modern .text-white-900 {
  color: var(--ka-text) !important;
}

body.keyauth-modern .text-blue-700,
body.keyauth-modern .text-blue-600,
body.keyauth-modern .text-blue-500 {
  color: #58b7ff !important;
}

body.keyauth-modern .border-custom,
body.keyauth-modern .border-custom-1,
body.keyauth-modern .border-gray-700,
body.keyauth-modern .border-\[\#0f0f17\] {
  border-color: var(--ka-line) !important;
}

body.keyauth-modern hr {
  border-color: var(--ka-line) !important;
  opacity: 1;
}

body.keyauth-modern .bg-custom-back,
body.keyauth-modern .bg-custom-back-1,
body.keyauth-modern .bg-custom-back-lbl,
body.keyauth-modern .bg-\[\#0f0f17\],
body.keyauth-modern .bg-\[\#09090d\] {
  border: 1px solid var(--ka-line);
  background:
    linear-gradient(180deg, rgba(11, 19, 33, 0.94), rgba(6, 11, 22, 0.9)) !important;
  box-shadow: var(--ka-shadow-soft);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.keyauth-modern .bg-custom-back-1,
body.keyauth-modern .bg-\[\#09090d\] {
  background:
    linear-gradient(180deg, rgba(6, 12, 22, 0.92), rgba(8, 16, 29, 0.96)) !important;
}

body.keyauth-modern .bg-custom-back-lbl {
  background: rgba(11, 19, 33, 0.96) !important;
}

body.keyauth-modern .keyauth-shell,
body.keyauth-modern .keyauth-customer-shell,
body.keyauth-modern .keyauth-main-content,
body.keyauth-modern main.keyauth-main,
body.keyauth-modern .min-h-screen.flex.flex-col.bg-\[\#09090d\],
body.keyauth-modern .flex.overflow-hidden.pt-16.bg-\[\#09090d\] {
  position: relative;
  z-index: 1;
}

body.keyauth-modern .keyauth-shell,
body.keyauth-modern .keyauth-customer-shell,
body.keyauth-modern #main-content.keyauth-main-content,
body.keyauth-modern .keyauth-main-content.bg-custom-back-1,
body.keyauth-modern main.keyauth-main,
body.keyauth-modern .p-4.bg-\[\#09090d\],
body.keyauth-modern .bg-\[\#09090d\].block.sm\:flex.items-center.justify-between {
  border: 0;
  background: transparent !important;
  box-shadow: none;
}

body.keyauth-modern main.keyauth-main {
  padding: 10px 12px 24px;
}

body.keyauth-modern .rounded-xl,
body.keyauth-modern .rounded-lg,
body.keyauth-modern .rounded-md {
  border-radius: 22px !important;
}

body.keyauth-modern .shadow,
body.keyauth-modern .shadow-sm,
body.keyauth-modern .shadow-md,
body.keyauth-modern .shadow-lg {
  box-shadow: var(--ka-shadow-soft) !important;
}

body.keyauth-modern #sidebar {
  background: rgba(6, 11, 22, 0.82) !important;
  border-right: 1px solid var(--ka-line) !important;
  box-shadow: 22px 0 55px rgba(1, 7, 18, 0.42) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

body.keyauth-modern .bg-custom-back-1.fixed.top-0.z-50 {
  border: 0;
  border-bottom: 1px solid var(--ka-line);
  background: rgba(4, 10, 20, 0.76) !important;
  box-shadow: 0 18px 40px rgba(1, 7, 18, 0.34);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

body.keyauth-modern .sidebar-logo {
  filter: drop-shadow(0 10px 22px rgba(37, 153, 255, 0.24));
}

body.keyauth-modern .sidebar-link {
  position: relative;
  border: 1px solid transparent;
  color: rgba(234, 242, 255, 0.82) !important;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

body.keyauth-modern .sidebar-link:hover,
body.keyauth-modern .sidebar-link:focus {
  transform: translateX(4px);
  border-color: rgba(78, 188, 255, 0.18);
  background: rgba(37, 153, 255, 0.11) !important;
  box-shadow: 0 14px 28px rgba(1, 7, 18, 0.18);
  color: #ffffff !important;
}

body.keyauth-modern .sidebar-link.bg-blue-700,
body.keyauth-modern a.bg-blue-700,
body.keyauth-modern button.bg-blue-700,
body.keyauth-modern .bg-blue-700 {
  background: linear-gradient(135deg, #1b88ff, #12c7ff) !important;
  border-color: rgba(112, 211, 255, 0.45) !important;
  color: #ffffff !important;
}

body.keyauth-modern .bg-green-700 {
  background: linear-gradient(135deg, #0d8b66, #1bcf8f) !important;
  border-color: rgba(82, 230, 178, 0.3) !important;
  color: #ffffff !important;
}

body.keyauth-modern .bg-orange-700 {
  background: linear-gradient(135deg, #d78520, #f6bc57) !important;
  border-color: rgba(255, 212, 129, 0.3) !important;
  color: #09121f !important;
}

body.keyauth-modern .bg-red-700 {
  background: linear-gradient(135deg, #d84c63, #ff7f8f) !important;
  border-color: rgba(255, 160, 173, 0.28) !important;
  color: #ffffff !important;
}

body.keyauth-modern .bg-purple-700 {
  background: linear-gradient(135deg, #1a8fff, #24d4ff) !important;
  border-color: rgba(123, 223, 255, 0.32) !important;
  color: #ffffff !important;
}

body.keyauth-modern .hover\:bg-blue-700:hover,
body.keyauth-modern .hover\:bg-purple-800:hover,
body.keyauth-modern .hover\:bg-orange-800:hover,
body.keyauth-modern .hover\:bg-red-800:hover {
  filter: brightness(1.06);
}

body.keyauth-modern button,
body.keyauth-modern input[type="submit"],
body.keyauth-modern input[type="button"],
body.keyauth-modern .copy-button,
body.keyauth-modern a.inline-flex[class*="bg-"] {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease,
    opacity 0.2s ease;
}

body.keyauth-modern button:hover,
body.keyauth-modern input[type="submit"]:hover,
body.keyauth-modern input[type="button"]:hover,
body.keyauth-modern .copy-button:hover,
body.keyauth-modern a.inline-flex[class*="bg-"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(1, 7, 18, 0.24);
}

body.keyauth-modern input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.keyauth-modern select,
body.keyauth-modern textarea {
  border: 1px solid rgba(128, 165, 224, 0.16) !important;
  background: rgba(4, 10, 18, 0.7) !important;
  color: #f6fbff !important;
  border-radius: 18px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    background-color 0.24s ease;
}

body.keyauth-modern input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
body.keyauth-modern select:focus,
body.keyauth-modern textarea:focus {
  border-color: rgba(85, 189, 255, 0.55) !important;
  box-shadow:
    0 0 0 4px rgba(37, 153, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  background: rgba(4, 10, 18, 0.92) !important;
}

body.keyauth-modern input::placeholder,
body.keyauth-modern textarea::placeholder {
  color: rgba(149, 168, 198, 0.72) !important;
}

body.keyauth-modern input[type="checkbox"] {
  accent-color: var(--ka-brand);
}

body.keyauth-modern table {
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 24px;
  background: rgba(9, 16, 28, 0.88);
  box-shadow: var(--ka-shadow-soft);
}

body.keyauth-modern table thead tr {
  background: rgba(255, 255, 255, 0.04);
}

body.keyauth-modern table th {
  padding: 15px 16px !important;
  border-bottom: 1px solid var(--ka-line);
  color: #adc1df !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.keyauth-modern table td {
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(128, 165, 224, 0.08);
  color: #edf5ff !important;
}

body.keyauth-modern table tbody tr:hover {
  background: rgba(37, 153, 255, 0.06);
}

body.keyauth-modern [data-profile-img] {
  border: 2px solid rgba(91, 191, 255, 0.3);
  box-shadow: 0 14px 30px rgba(3, 9, 20, 0.26);
}

body.keyauth-modern #search-suggestions,
body.keyauth-modern #dropdown,
body.keyauth-modern [id$="dropdown"] {
  border: 1px solid var(--ka-line) !important;
  background: rgba(8, 15, 28, 0.96) !important;
  box-shadow: var(--ka-shadow) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.keyauth-modern .app-card,
body.keyauth-modern .mb-1.w-full.bg-\[\#0f0f17\],
body.keyauth-modern .max-w-sm.border.border-gray-700.rounded-lg.shadow {
  overflow: hidden;
  position: relative;
}

body.keyauth-modern .app-card::before,
body.keyauth-modern .mb-1.w-full.bg-\[\#0f0f17\]::before,
body.keyauth-modern .max-w-sm.border.border-gray-700.rounded-lg.shadow::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(135deg, var(--ka-brand), var(--ka-brand-2));
}

body.keyauth-modern footer.bg-custom-back {
  margin: 18px 18px 24px !important;
  padding: 6px;
  border: 1px solid var(--ka-line);
  background: linear-gradient(180deg, rgba(8, 15, 28, 0.92), rgba(6, 11, 21, 0.98)) !important;
  box-shadow: var(--ka-shadow-soft);
}

body.keyauth-modern footer a {
  color: #dbe9ff !important;
}

body.keyauth-modern footer a:hover {
  color: #75dbd1 !important;
  text-decoration: none;
}

body.keyauth-modern .keyauth-support-link {
  border: 1px solid rgba(130, 170, 228, 0.18);
  background: linear-gradient(180deg, rgba(10, 20, 36, 0.92), rgba(7, 13, 24, 0.94)) !important;
  box-shadow: 0 16px 35px rgba(1, 7, 18, 0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.keyauth-modern .keyauth-support-link:hover {
  background: linear-gradient(180deg, rgba(19, 36, 62, 0.94), rgba(8, 18, 34, 0.96)) !important;
}

body.keyauth-modern .keyauth-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--ka-line);
  background: rgba(7, 13, 24, 0.84);
  box-shadow: var(--ka-shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.keyauth-modern .keyauth-language-switcher__button {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(226, 236, 251, 0.86);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

body.keyauth-modern .keyauth-language-switcher__button:hover,
body.keyauth-modern .keyauth-language-switcher__button:focus {
  color: #ffffff;
  transform: translateY(-1px);
}

body.keyauth-modern .keyauth-language-switcher__button.is-active {
  background: linear-gradient(135deg, var(--ka-brand), var(--ka-brand-2));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(9, 107, 188, 0.26);
}

body.keyauth-modern .keyauth-floating-language-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 90;
}

html[dir="rtl"] body.keyauth-modern .keyauth-floating-language-switcher {
  right: auto;
  left: 16px;
}

body.keyauth-modern .keyauth-support-word {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

html[dir="rtl"] body.keyauth-modern,
html[dir="rtl"] body.keyauth-modern input,
html[dir="rtl"] body.keyauth-modern textarea,
html[dir="rtl"] body.keyauth-modern select,
html[dir="rtl"] body.keyauth-modern button {
  font-family: "Cairo", "Plus Jakarta Sans", "IBM Plex Sans", sans-serif;
}

html[dir="rtl"] body.keyauth-modern h1,
html[dir="rtl"] body.keyauth-modern h2,
html[dir="rtl"] body.keyauth-modern h3,
html[dir="rtl"] body.keyauth-modern h4,
html[dir="rtl"] body.keyauth-modern h5,
html[dir="rtl"] body.keyauth-modern h6 {
  font-family: "Cairo", "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0;
}

html[dir="rtl"] body.keyauth-modern p,
html[dir="rtl"] body.keyauth-modern label,
html[dir="rtl"] body.keyauth-modern h1,
html[dir="rtl"] body.keyauth-modern h2,
html[dir="rtl"] body.keyauth-modern h3,
html[dir="rtl"] body.keyauth-modern h4,
html[dir="rtl"] body.keyauth-modern h5,
html[dir="rtl"] body.keyauth-modern h6 {
  text-align: right;
}

html[dir="rtl"] body.keyauth-modern .text-left {
  text-align: right !important;
}

html[dir="rtl"] body.keyauth-modern .text-right {
  text-align: left !important;
}

html[dir="rtl"] body.keyauth-modern .left-1 {
  left: auto !important;
  right: 0.25rem !important;
}

html[dir="rtl"] body.keyauth-modern .origin-\[0\] {
  transform-origin: 100% 0 !important;
}

html[dir="rtl"] body.keyauth-modern input,
html[dir="rtl"] body.keyauth-modern textarea,
html[dir="rtl"] body.keyauth-modern select {
  text-align: right;
}

html[dir="rtl"] body.keyauth-modern input[type="email"],
html[dir="rtl"] body.keyauth-modern input[type="url"],
html[dir="rtl"] body.keyauth-modern input[type="password"] {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] body.keyauth-modern #custom-support-button {
  right: auto;
  left: 0;
}

body.keyauth-modern #loader,
body.keyauth-modern [data-loader] {
  background:
    radial-gradient(circle at 30% 30%, rgba(37, 153, 255, 0.18), transparent 20%),
    radial-gradient(circle at 70% 68%, rgba(20, 212, 188, 0.12), transparent 24%),
    linear-gradient(180deg, #050a13 0%, #08111d 100%) !important;
}

body.keyauth-modern--auth section.relative.z-20 {
  padding: 32px 16px;
}

body.keyauth-modern--auth section.relative.z-20 > .bg-custom-back {
  position: relative;
  overflow: hidden;
  width: min(560px, calc(100% - 12px));
  max-width: min(560px, calc(100% - 12px)) !important;
  padding: 24px !important;
  border-radius: 30px !important;
  background:
    linear-gradient(180deg, rgba(11, 19, 33, 0.96), rgba(6, 11, 22, 0.9)) !important;
  box-shadow: var(--ka-shadow);
}

body.keyauth-modern--auth section.relative.z-20 > .bg-custom-back::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(135deg, var(--ka-brand), var(--ka-brand-2));
}

body.keyauth-modern--auth .flex.justify-center.mb-3 a,
body.keyauth-modern--auth .flex.justify-center.mb-3 {
  position: relative;
  z-index: 1;
}

body.keyauth-modern--auth h3 {
  color: #d6e5ff !important;
  font-size: 0.98rem;
}

body.keyauth-modern--auth [data-loginbutton="1"],
body.keyauth-modern--auth button[name="register"],
body.keyauth-modern--auth button[name="login"] {
  background: linear-gradient(135deg, var(--ka-brand), var(--ka-brand-2)) !important;
  border: 0 !important;
  box-shadow: 0 18px 35px rgba(9, 107, 188, 0.28);
}

body.keyauth-modern--auth .w-23,
body.keyauth-modern--auth .social-button,
body.keyauth-modern--auth .flex.flex-col.items-center.justify-center.text-center.bg-custom-back-1 {
  border-radius: 18px !important;
  border: 1px solid rgba(130, 170, 228, 0.14);
  background:
    linear-gradient(180deg, rgba(14, 25, 42, 0.95), rgba(9, 16, 28, 0.88)) !important;
}

body.keyauth-modern--auth .w-23:hover,
body.keyauth-modern--auth .social-button:hover,
body.keyauth-modern--auth .flex.flex-col.items-center.justify-center.text-center.bg-custom-back-1:hover {
  transform: translateY(-2px) scale(1.01);
}

body.keyauth-modern--auth .fixed.inset-0.overflow-hidden.pointer-events-none.z-0 {
  opacity: 0.9;
}

body.keyauth-modern--customer #sidebar > div,
body.keyauth-modern--customer #sidebar .bg-\[\#0f0f17\] {
  background: transparent !important;
  box-shadow: none !important;
}

body.keyauth-modern--customer #main-content {
  background: transparent !important;
}

body.keyauth-modern--customer .max-w-sm.border.border-gray-700.rounded-lg.shadow {
  width: 100%;
  max-width: none;
}

@media (max-width: 1024px) {
  body.keyauth-modern .bg-custom-back-1.fixed.top-0.z-50 {
    left: 0;
  }

  body.keyauth-modern main.keyauth-main {
    padding: 8px 8px 20px;
  }
}

@media (max-width: 767px) {
  body.keyauth-modern--auth section.relative.z-20 {
    padding: 18px 10px;
  }

  body.keyauth-modern--auth section.relative.z-20 > .bg-custom-back {
    padding: 18px !important;
    border-radius: 24px !important;
  }

  body.keyauth-modern #sidebar {
    width: min(88vw, 320px);
  }

  body.keyauth-modern footer.bg-custom-back {
    margin: 12px 12px 18px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.keyauth-modern-root {
    scroll-behavior: auto;
  }

  body.keyauth-modern *,
  body.keyauth-modern *::before,
  body.keyauth-modern *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
