:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Critical above-the-fold styles */
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  background-color: #242424;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

.page-enter {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.page-enter-active {
  opacity: 1;
  transition: opacity 300ms;
}
.page-exit {
  opacity: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.page-exit-active {
  opacity: 0;
  transition: opacity 300ms;
}

/* Kendo Editor text color override */
.k-editor-content,
.k-editor-content *,
.k-editor-content p,
.k-editor-content div,
.k-editor-content span,
.k-editor-content strong,
.k-editor-content em,
.k-editor-content h1,
.k-editor-content h2,
.k-editor-content h3,
.k-editor-content h4,
.k-editor-content h5,
.k-editor-content h6,
.k-editor-content li,
.k-editor-content td,
.k-editor-content th,
.k-editor .k-editor-content,
.k-editor .k-editor-content *,
.k-editor .k-editor-content p,
.k-editor .k-editor-content div,
.k-editor .k-editor-content span,
.k-editor .k-editor-content strong,
.k-editor .k-editor-content em,
.k-editor * {
  color: #f5f1e9 !important;
}

/* Prevent layout shifts */
.dashboard-content {
  transition: opacity 0.2s ease-in-out;
  margin-top: 0 !important;
}

.dashboard-content.content-wrapper {
  margin-top: 20px !important;
  padding-top: 20px !important;
  min-height: 300px;
  contain: layout;
}

.dashboard-content.content-wrapper h2 {
  margin-top: 0 !important;
}

.dashboard-content.loading {
  opacity: 0.7;
}

/* Force stable layout from initial load */
.app-layout {
  width: 100%;
  min-height: 100vh;
  display: flex;
  position: relative;
  will-change: auto;
  contain: layout;
  transform: translateZ(0); /* Force hardware acceleration */
  margin-top: 10px;
}

.content-area {
  width: 1000px;
  margin-left: 100px;
  position: relative;
  padding: 0 20px;
  min-height: 400px;
  contain: layout;
  transform: translateY(-75px);
}

/* Ensure content doesn't shift during loading */
.content-wrapper {
  width: 1000px;
  margin: 0 auto;
  min-height: 200px;
  position: relative;
  margin-top: 0 !important;
}

/* Prevent layout shifts in header area */
.k-appbar {
  min-height: 60px !important;
  height: 60px !important;
  will-change: auto;
  contain: layout;
}

/* Ensure header container has stable dimensions */
div[style*="display: flex"][style*="alignItems: center"] {
  min-height: 200px !important;
  contain: layout;
  transform: translateZ(0); /* Force hardware acceleration */
  margin-top: 10px;
}

/* Target the AppBar container specifically */
div[style*="display: flex"][style*="alignItems: center"][style*="height: auto"] {
  margin-top: 10px !important;
}

/* Prevent breadcrumb layout shifts */
.k-breadcrumb {
  min-height: 20px !important;
  will-change: auto;
}

/* Ensure PanelBar has consistent positioning */
.k-panelbar {
  position: relative !important;
  will-change: auto;
}

/* Fix login form layout shifts */
.k-input {
  width: 300px !important;
  max-width: 300px !important;
  min-width: 300px !important;
  contain: layout;
}

/* Ensure login form container has stable dimensions */
form {
  width: 350px !important;
  margin: 0 auto !important;
  contain: layout;
}

/* Enhanced visual styling with shadows */
/* PostCard component shadows */
.k-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.k-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Campfire theme shadow for cards */
.k-card {
  box-shadow: 0 2px 8px rgba(237, 189, 125, 0.1);
}

.k-card:hover {
  box-shadow: 0 4px 16px rgba(237, 189, 125, 0.3);
}

/* PanelBar component shadow */
.k-panelbar {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

/* Campfire theme shadow for PanelBar */
.k-panelbar {
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

/* Button component shadows */
.k-button {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.k-button:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Campfire theme shadow for buttons */
.k-button {
  box-shadow: 0 2px 8px rgba(237, 189, 125, 0.1);
}

.k-button:hover {
  box-shadow: 0 4px 16px rgba(237, 189, 125, 0.3);
}