/* ==========================================================================
   FRONTEND THEME — OPTIMIZED & PROFESSIONAL
   ========================================================================== */

/* Google Fonts (Auth pages) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');


/* ==========================================================================
   1. UTILITIES & GLOBAL OVERRIDES
   ========================================================================== */

/* Alpine.js cloak */
[x-cloak] { display: none !important; }

/* Out-of-hours banner offsets */
html.has-ooo-banner nav { top: 40px !important; }
html.has-ooo-banner body { padding-top: 40px !important; }


/* ==========================================================================
   2. DYNAMIC ACCENT COLOR MAPPINGS
   (replaces fixed indigo/purple utility classes)
   ========================================================================== */

/* --- Text Colors --- */
.text-teal-600,
.text-cyan-600,
.text-teal-500,
.text-cyan-500,
.group:hover .group-hover\:text-teal-500,
.group:hover .group-hover\:text-teal-600,
.group:hover .group-hover\:text-teal-400 {
  color: var(--accent-color) !important;
}

.hover\:text-teal-600:hover,
.hover\:text-teal-700:hover,
.hover\:text-teal-800:hover,
.hover\:text-cyan-600:hover,
.hover\:text-cyan-700:hover,
.hover\:text-teal-500:hover {
  color: var(--accent-color-hover) !important;
}

/* --- Background Colors --- */
.bg-teal-600,
.bg-cyan-600,
.bg-teal-500,
.bg-cyan-500 {
  background-color: var(--accent-color) !important;
}

.hover\:bg-teal-700:hover,
.hover\:bg-teal-600:hover,
.hover\:bg-cyan-700:hover,
.hover\:bg-cyan-600:hover {
  background-color: var(--accent-color-hover) !important;
}

/* --- Light Backgrounds --- */
.bg-teal-50,
.bg-cyan-50 {
  background-color: var(--accent-color-light) !important;
}

.hover\:bg-teal-50:hover,
.hover\:bg-cyan-50:hover {
  background-color: var(--accent-color-light-hover) !important;
}

/* --- Borders --- */
.border-teal-600,
.border-cyan-600,
.border-teal-500,
.border-cyan-500,
.hover\:border-teal-200:hover,
.hover\:border-cyan-200:hover,
.hover\:border-teal-500:hover,
.focus\:border-teal-500:focus,
.focus\:border-cyan-500:focus {
  border-color: var(--accent-color) !important;
}

.border-teal-200,
.border-cyan-200 {
  border-color: var(--accent-color-border-light) !important;
}

/* --- Focus Rings --- */
.focus\:ring-teal-500:focus,
.focus\:ring-cyan-500:focus,
.focus\:ring-teal-600:focus,
.focus\:ring-cyan-600:focus {
  --tw-ring-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
              var(--tw-ring-shadow, 0 0 #0000),
              0 0 0 4px var(--accent-color-light) !important;
}

/* --- Shadows --- */
.shadow-teal-600\/10,
.shadow-cyan-600\/10 {
  --tw-shadow-color: color-mix(in srgb, var(--accent-color) 10%, transparent) !important;
  --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color),
               0 4px 6px -4px var(--tw-shadow-color) !important;
}

/* --- Gradients --- */
.from-teal-500,
.from-teal-600 {
  --tw-gradient-from: color-mix(in srgb, var(--accent-color) 85%, #fff) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)) !important;
}

.via-teal-700,
.via-teal-950 {
  --tw-gradient-stops: var(--tw-gradient-from), var(--accent-color) 50%, var(--tw-gradient-to, rgba(255, 255, 255, 0)) !important;
}

.to-teal-900 {
  --tw-gradient-to: color-mix(in srgb, var(--accent-color) 70%, #000) !important;
}

/* --- SVG Logo Stops --- */
svg stop[stop-color="#0f766e"] { stop-color: var(--accent-color) !important; }
svg stop[stop-color="#0d9488"] { stop-color: color-mix(in srgb, var(--accent-color) 80%, #fff) !important; }
svg stop[stop-color="#0891b2"] { stop-color: color-mix(in srgb, var(--accent-color) 50%, #fff) !important; }

/* --- Premium Custom Components --- */
.wysiwyg.focus {
  border-color: var(--accent-color) !important;
}

.input-premium:focus {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 4px var(--accent-color-light) !important;
}

.hover-card-premium:hover {
  border-color: var(--accent-color-border-light) !important;
}

.bg-mesh-purple {
  background: linear-gradient(135deg,
    var(--accent-color) 0%,
    color-mix(in srgb, var(--accent-color) 70%, #000) 50%,
    color-mix(in srgb, var(--accent-color) 40%, #000) 100%) !important;
}

.bg-accent-grad {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-hover) 100%) !important;
}

.hover\:bg-accent-grad:hover {
  background: linear-gradient(135deg, var(--accent-color-hover) 0%, var(--accent-color) 100%) !important;
}

.hover\:border-teal-100:hover {
  border-color: var(--accent-color-border-light) !important;
}

.hover\:bg-teal-50\/20:hover {
  background-color: var(--accent-color-light) !important;
}


/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */

.hero-welcome-content { font-size: 1.5rem; line-height: 1.6; }

.hero-welcome-content,
.hero-welcome-content h1,
.hero-welcome-content h2,
.hero-welcome-content p,
.hero-welcome-content span,
.hero-welcome-content strong,
.hero-welcome-content a {
  color: #ffffff !important;
}

.hero-welcome-content h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
@media (max-width: 640px) {
  .hero-welcome-content h1 { font-size: 2.25rem; }
}

.hero-welcome-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-welcome-content p {
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.9) !important;
  font-size: 1.1rem;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

.hero-welcome-content a { text-decoration: underline; font-weight: 600; }
.hero-welcome-content strong { font-weight: 700; }

/* Search input reset */
.hero-area-search-input {
  color: #ffffff !important;
  border: 0 !important;
  border-color: transparent !important;
  background-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  --tw-ring-offset-width: 0px !important;
  --tw-ring-offset-color: transparent !important;
  --tw-ring-color: transparent !important;
}

.hero-area-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
  opacity: 1 !important;
}


/* ==========================================================================
   4. TICKET CREATE FORM & KB SUGGESTIONS
   ========================================================================== */

/* --- Form Elements --- */
.ct-input {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
.ct-input:focus {
  background: #ffffff;
  border-color: rgb(var(--c-primary-600));
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.ct-input::placeholder { color: #94a3b8; }

.ct-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.375rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.ct-label span { font-weight: 500; text-transform: none; color: #94a3b8; }

.ct-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid #f1f5f9;
  margin-bottom: 1.25rem;
}

/* Wysiwyg wrapper */
.wysiwyg-wrapper {
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f8fafc;
  transition: border-color .2s, box-shadow .2s;
}
.wysiwyg-wrapper:focus-within {
  background: #fff;
  border-color: rgb(var(--c-primary-600));
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

/* Error message */
.ct-error {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .375rem;
  font-size: .75rem;
  font-weight: 600;
  color: #dc2626;
}

/* Sidebar dropdown button */
.ct-select-btn {
  position: relative;
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.ct-select-btn:focus,
.ct-select-btn:hover {
  background: #fff;
  border-color: rgb(var(--c-primary-600));
  outline: none;
}

/* Submit button */
.ct-submit {
  width: 100%;
  padding: .75rem 1rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  border: none;
  border-radius: 0.875rem;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
  background: linear-gradient(135deg, rgb(var(--c-primary-700)) 0%, rgb(var(--c-primary-600)) 100%);
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.ct-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,.4); }
.ct-submit:disabled { background: #cbd5e1; box-shadow: none; cursor: not-allowed; transform: none; }

/* --- KB Suggestions Panel --- */
#kb-suggest {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              margin-top 0.3s ease;
}
#kb-suggest.is-visible {
  max-height: 1000px;
  opacity: 1;
  margin-top: 1rem;
}

.kb-container {
  border-radius: 1rem;
  border: 1.5px solid rgba(13, 148, 136, 0.15);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
  box-shadow: 0 10px 25px -5px rgba(13, 148, 136, 0.05), 0 8px 16px -6px rgba(13, 148, 136, 0.05);
  backdrop-filter: blur(8px);
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.kb-title-area {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
}

.kb-title-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: rgba(13, 148, 136, 0.1);
  color: rgb(var(--c-primary-600));
  position: relative;
}

.kb-title-icon-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  background: rgba(13, 148, 136, 0.2);
  animation: kb-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes kb-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0; }
}

.kb-title-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(var(--c-primary-700));
}

.kb-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.kb-item { list-style: none; }

.kb-link {
  display: block;
  background: #ffffff;
  border: 1.5px solid #f1f5f9;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
}
.kb-link:hover {
  border-color: rgb(var(--c-primary-200));
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.08), 0 4px 6px -4px rgba(13, 148, 136, 0.08);
}

.kb-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.kb-item-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kb-item-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  transition: color 0.2s;
}
.kb-link:hover .kb-item-title { color: rgb(var(--c-primary-700)); }

.kb-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 0.375rem;
  background: rgb(var(--c-primary-50));
  color: rgb(var(--c-primary-700));
  border: 1px solid rgb(var(--c-primary-100));
}

.kb-external-icon {
  color: #94a3b8;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.kb-link:hover .kb-external-icon {
  color: rgb(var(--c-primary-700));
  transform: translate(1px, -1px);
}

.kb-excerpt {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.375rem;
  line-height: 1.5;
}

.kb-footer-tip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid rgba(13, 148, 136, 0.1);
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(var(--c-primary-600));
}

/* --- Skeleton Loading --- */
.kb-skeleton-card {
  background: #ffffff;
  border: 1.5px solid #f1f5f9;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.kb-skeleton-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kb-shimmer {
  background: linear-gradient(90deg, #f8fafc 25%, #f1f5f9 50%, #f8fafc 75%);
  background-size: 200% 100%;
  animation: kb-shimmer-anim 1.5s infinite linear;
  border-radius: 0.25rem;
}
@keyframes kb-shimmer-anim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}


/* ==========================================================================
   5. CHANGELOG RICH TEXT (Summernote-authored)
   ========================================================================== */

.changelog-rich {
  color: #475569;
  line-height: 1.7;
}

.changelog-rich ul,
.changelog-rich ol {
  padding-left: 0;
  margin: 0.25rem 0 0.5rem;
  list-style: none;
}

.changelog-rich li {
  list-style: none;
  position: relative;
  line-height: 1.6;
}

/* Category labels (Improvements:, Fixes:, etc.) */
.changelog-rich > li:has(ul),
.changelog-rich > li:has(ol),
.changelog-rich > ul > li:has(ul),
.changelog-rich > ul > li:has(ol) {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  padding-left: 0;
}
.changelog-rich > li:has(ul):first-child,
.changelog-rich > li:has(ol):first-child,
.changelog-rich > ul > li:has(ul):first-child,
.changelog-rich > ul > li:has(ol):first-child {
  margin-top: 0;
}
.changelog-rich li:has(ul)::before,
.changelog-rich li:has(ol)::before {
  display: none !important;
}

/* Nested list items (feature/bugfix) */
.changelog-rich li li,
.changelog-rich ul ul li,
.changelog-rich li:not(:has(ul)):not(:has(ol)) {
  font-weight: 400;
  color: #475569;
  font-size: 0.875rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  padding-left: 1.25rem;
}

.changelog-rich li li::before,
.changelog-rich ul ul li::before,
.changelog-rich li:not(:has(ul)):not(:has(ol))::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-color, rgb(var(--c-primary-700)));
  font-weight: bold;
  opacity: 0.55;
}

.changelog-rich p {
  margin: 0.5rem 0;
  line-height: 1.6;
}
.changelog-rich p:first-child { margin-top: 0; }
.changelog-rich p:last-child { margin-bottom: 0; }

.changelog-rich a {
  color: var(--accent-color, rgb(var(--c-primary-700)));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.changelog-rich a:hover { color: var(--accent-color-hover, rgb(var(--c-primary-800))); }

.changelog-rich strong,
.changelog-rich b {
  font-weight: 600;
  color: #0f172a;
}

.changelog-rich h1,
.changelog-rich h2,
.changelog-rich h3 {
  font-weight: 700;
  color: #0f172a;
  margin: 1.25rem 0 0.5rem;
}
.changelog-rich h1 { font-size: 1.1rem; }
.changelog-rich h2 { font-size: 0.95rem; }
.changelog-rich h3 { font-size: 0.875rem; }


/* ==========================================================================
   6. BLANK LAYOUT / AUTH PAGES (dark glass UI)
   ========================================================================== */

body.hold-transition,
body.hold-transition.dark-mode,
body.login-page,
body.register-page {
  background-color: #070913 !important;
  font-family: 'Outfit', sans-serif !important;
}

body.hold-transition,
body.hold-transition.dark-mode,
body.login-page,
body.register-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

/* Grid Overlay & Glass Floating Shapes */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

.glass-shape {
  position: absolute;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  pointer-events: none;
  z-index: 1;
}

.glass-shape-1 {
  width: 30vw;
  height: 30vw;
  min-width: 250px;
  min-height: 250px;
  top: 10%;
  left: 5%;
  animation: blobFloat 25s infinite alternate ease-in-out;
}

.glass-shape-2 {
  width: 35vw;
  height: 35vw;
  min-width: 300px;
  min-height: 300px;
  bottom: 5%;
  right: 5%;
  animation: blobFloat 30s infinite alternate-reverse ease-in-out;
}

@keyframes blobFloat {
  0% {
    transform: rotate(0deg) translate(0px, 0px) scale(1);
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  }
  50% {
    transform: rotate(180deg) translate(40px, -60px) scale(1.15);
    border-radius: 50% 50% 30% 70% / 50% 60% 40% 60%;
  }
  100% {
    transform: rotate(360deg) translate(-20px, 20px) scale(1);
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  }
}

/* Glow backdrops */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  opacity: 0.7;
  z-index: 1;
}
.bg-glow-1 {
  top: -15%;
  left: -15%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.28) 0%, rgba(0, 0, 0, 0) 70%);
  animation: floatGlow1 22s infinite alternate ease-in-out;
}
.bg-glow-2 {
  bottom: -15%;
  right: -15%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.22) 0%, rgba(0, 0, 0, 0) 70%);
  animation: floatGlow2 28s infinite alternate ease-in-out;
}
.bg-glow-3 {
  top: 25%;
  left: 20%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  animation: floatGlow1 24s infinite alternate-reverse ease-in-out;
}

@keyframes floatGlow1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, 12%) scale(1.15); }
}
@keyframes floatGlow2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10%, -6%) scale(1.2); }
}

/* Auth Wrapper & Card */
.auth-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.auth-card {
  background: rgba(11, 17, 32, 0.45);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4),
              0 24px 70px -10px rgba(0, 0, 0, 0.7),
              inset 0 1px 1px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  animation: authCardEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authCardEnter {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, rgb(var(--c-primary-600)), rgb(var(--c-primary-500)));
}

/* Brand Logo & Titles */
.auth-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  text-decoration: none !important;
}
.auth-logo-svg {
  width: 58px;
  height: 58px;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 8px 16px rgba(13, 148, 136, 0.35));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 8px 16px rgba(13, 148, 136, 0.35)); }
  50% { filter: drop-shadow(0 8px 24px rgba(8, 145, 178, 0.5)); transform: translateY(-1px); }
}

.auth-logo-container:hover .auth-logo-svg {
  transform: scale(1.06) translateY(-2px);
}

.brand-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.75px;
  text-align: center;
  display: block;
  background: linear-gradient(135deg, rgb(var(--c-primary-400)) 0%, rgb(var(--c-primary-600)) 50%, rgb(var(--c-primary-500)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
  margin: 0;
  line-height: 1.15;
}
.auth-logo-container:hover .brand-logo { opacity: 0.9; }

.brand-subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 2.25rem;
  font-weight: 400;
}

/* Forms & Inputs */
.auth-input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.auth-input-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 14px 16px 14px 46px !important;
  color: #f8fafc !important;
  font-size: 0.95rem !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  box-shadow: none !important;
}

.auth-input-group input::placeholder { color: #475569 !important; }

.auth-input-group input:focus {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18) !important;
}

.auth-input-group .input-icon {
  position: absolute;
  left: 18px;
  top: 26px;
  transform: translateY(-50%);
  color: #475569;
  transition: color 0.3s ease, transform 0.3s ease;
  font-size: 1.1rem;
  z-index: 10;
  pointer-events: none;
}

.auth-input-group input:focus ~ .input-icon {
  color: #3b82f6;
  transform: translateY(-50%) scale(1.05);
}

/* Custom Checkbox */
.auth-remember-wrapper {
  display: flex;
  align-items: center;
  user-select: none;
}
.auth-remember-wrapper input[type="checkbox"] { display: none; }

.auth-remember-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.auth-remember-label:hover { color: #cbd5e1; }

.auth-remember-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.02);
}
.auth-remember-wrapper input[type="checkbox"]:checked + .auth-remember-label .auth-remember-checkbox {
  background: #3b82f6;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.auth-remember-checkbox::after {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 10px;
  color: #fff;
  display: none;
}
.auth-remember-wrapper input[type="checkbox"]:checked + .auth-remember-label .auth-remember-checkbox::after {
  display: block;
}

/* Buttons */
.btn-auth-submit {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border: none !important;
  color: #ffffff !important;
  border-radius: 14px !important;
  padding: 14px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.5px !important;
  width: 100% !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}
.btn-auth-submit:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%) !important;
}
.btn-auth-submit:active { transform: translateY(0) !important; }

.btn-auth-envato {
  background: linear-gradient(135deg, #81b441 0%, #4f8a10 100%) !important;
  border: none !important;
  color: #ffffff !important;
  border-radius: 14px !important;
  padding: 14px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.5px !important;
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(129, 180, 65, 0.25) !important;
  cursor: pointer !important;
  text-decoration: none !important;
}
.btn-auth-envato:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(129, 180, 65, 0.4) !important;
  background: linear-gradient(135deg, #93c94f 0%, #5f9d14 100%) !important;
  color: #ffffff !important;
}
.btn-auth-envato:active { transform: translateY(0) !important; }

/* Dividers */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.75rem 0;
  color: #4b5563;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-divider::before { margin-right: 1rem; }
.auth-divider::after { margin-left: 1rem; }

/* Demo Quick Login Widget Styling */
.demo-accounts-container {
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.25rem 1rem 1rem;
  margin-bottom: 1.5rem;
}
.demo-accounts-title {
  font-size: 0.725rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.demo-accounts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.btn-demo-account {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 10px !important;
  padding: 8px 6px !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  width: 100% !important;
}
.btn-demo-account:hover {
  transform: translateY(-2px) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}
.btn-demo-account:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.role-badge {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}
.role-badge.admin { color: #f43f5e; }
.role-badge.agent { color: rgb(var(--c-primary-400)); }
.role-badge.customer { color: #34d399; }

/* Hover outlines depending on account type */
.btn-demo-account:hover .role-badge.admin { color: #ff4d6d; }
.btn-demo-account:hover .role-badge.agent { color: #9fa8ff; }
.btn-demo-account:hover .role-badge.customer { color: #52e5a7; }

.btn-demo-account:hover:has(.admin) { border-color: rgba(244, 63, 94, 0.3) !important; }
.btn-demo-account:hover:has(.agent) { border-color: rgba(129, 140, 248, 0.3) !important; }
.btn-demo-account:hover:has(.customer) { border-color: rgba(52, 211, 153, 0.3) !important; }

/* Autofill Pulse Highlight Animation */
@keyframes inputPulse {
  0% { box-shadow: 0 0 0 0px rgba(59, 130, 246, 0.6); border-color: #3b82f6 !important; }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.2); }
  100% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); border-color: #3b82f6 !important; }
}
.input-highlight {
  animation: inputPulse 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Links */
.auth-footer-links {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}
.auth-footer-links a,
.auth-footer-links .link-button {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none !important;
  display: inline-block;
  align-self: center;
}
.auth-footer-links .link-button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.auth-footer-links a:hover,
.auth-footer-links .link-button:hover { color: #3b82f6; }

/* Validation Error Styling */
.auth-input-group input.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}
.auth-input-group input.is-invalid ~ .input-icon { color: #ef4444 !important; }

.invalid-feedback {
  display: block !important;
  color: #f87171 !important;
  font-size: 0.825rem !important;
  margin-top: 0.5rem !important;
  font-weight: 500 !important;
  text-align: left !important;
}

/* Alerts */
.alert-error,
.alert-danger,
.alert-success {
  border-radius: 12px !important;
  font-size: 0.9rem !important;
  padding: 12px 16px !important;
  margin-bottom: 1.5rem !important;
  border: none !important;
}
.alert-error,
.alert-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-left: 4px solid #ef4444 !important;
}
.alert-success {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-left: 4px solid #10b981 !important;
}

/* Wrapper fix */
.wrapper {
  width: 100%;
  background: transparent !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}


/* ==========================================================================
   7. AUTH DARK MODE ACCENT COLOR OVERRIDES
   (applies dynamic accent to blank layout elements)
   ========================================================================== */
body.hold-transition.dark-mode .auth-card::before {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent-color) 70%, #fff),
    var(--accent-color),
    color-mix(in srgb, var(--accent-color) 70%, #000)
  ) !important;
}

body.hold-transition.dark-mode .brand-logo {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-color) 85%, #fff) 0%,
    var(--accent-color) 50%,
    color-mix(in srgb, var(--accent-color) 70%, #000) 100%
  ) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.hold-transition.dark-mode .auth-input-group input:focus {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 4px var(--accent-color-light) !important;
}

body.hold-transition.dark-mode .auth-input-group input:focus ~ .input-icon {
  color: var(--accent-color) !important;
}

body.hold-transition.dark-mode .auth-remember-wrapper input[type="checkbox"]:checked + .auth-remember-label .auth-remember-checkbox {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 3px var(--accent-color-light) !important;
}

body.hold-transition.dark-mode .btn-auth-submit {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-hover) 100%) !important;
  box-shadow: 0 4px 14px var(--accent-color-light) !important;
}

body.hold-transition.dark-mode .btn-auth-submit:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 90%, #fff) 0%, var(--accent-color) 100%) !important;
  box-shadow: 0 6px 20px var(--accent-color-light-hover) !important;
}

body.hold-transition.dark-mode .auth-footer-links a:hover,
body.hold-transition.dark-mode .auth-footer-links .link-button:hover {
  color: var(--accent-color) !important;
}

/* ==========================================================================
   8. REVAMP UTILITIES — skeletons, validation, micro-interactions
   ========================================================================== */

/* --- Loading skeletons --- */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: #e2e8f0;
  border-radius: 0.5rem;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.55), transparent);
  animation: et-shimmer 1.6s infinite;
}

@keyframes et-shimmer {
  100% { transform: translateX(100%); }
}

/* --- Image blur-up --- */
img.is-loaded {
  animation: et-img-in 0.4s ease-out;
}

@keyframes et-img-in {
  from { opacity: 0.4; filter: blur(6px); }
  to   { opacity: 1; filter: blur(0); }
}

/* --- Unified form validation --- */
.form-error {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e11d48;
}

.input-invalid,
input.input-invalid:focus,
textarea.input-invalid:focus,
select.input-invalid:focus {
  border-color: #fda4af !important;
  box-shadow: 0 0 0 3px rgb(225 29 72 / 0.08) !important;
}

/* --- Button press feedback --- */
.envaticket button:not(:disabled):active,
.envaticket a[class*="rounded-full"]:active,
.envaticket a[class*="rounded-xl"]:active {
  transform: scale(0.985);
}

/* --- Submit spinner (data-loading-form) --- */
.btn-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-inline-end: 0.5em;
  vertical-align: -0.125em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 9999px;
  animation: et-spin 0.65s linear infinite;
}

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

/* --- Focus visibility for keyboard users --- */
.envaticket a:focus-visible,
.envaticket button:focus-visible {
  outline: 2px solid rgb(var(--c-primary-500) / 0.6);
  outline-offset: 2px;
}
