/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

:root {
  color-scheme: light;
}

body {
  margin: 0;
}

.turbo-progress-bar {
  height: 3px;
  background: linear-gradient(90deg, #00b5ad, #14b8a6, #2dd4bf);
  box-shadow: 0 0 10px rgba(0, 181, 173, 0.45);
}

/* Turbo Frame 与自定义异步操作共用的局部加载反馈。 */
turbo-frame[busy],
[data-partial-loading="overlay"] {
  display: block;
  position: relative;
  min-height: 56px;
  cursor: progress;
  isolation: isolate;
}

turbo-frame[busy]::before,
[data-partial-loading="overlay"]::before {
  position: absolute;
  z-index: 40;
  inset: 0;
  border-radius: inherit;
  background: rgba(248, 250, 252, 0.72);
  content: "";
  backdrop-filter: blur(1.5px);
  animation: partial-loading-fade-in 120ms ease-out both;
}

turbo-frame[busy]::after,
[data-partial-loading="overlay"]::after,
[data-partial-loading="inline"]::after {
  position: absolute;
  z-index: 41;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border: 2px solid rgba(8, 127, 116, 0.2);
  border-top-color: #087f74;
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
  animation: partial-loading-spin 650ms linear infinite;
}

#management_modal[busy]::before {
  position: fixed;
  z-index: 90;
  inset: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(2px);
}

#management_modal[busy]::after {
  position: fixed;
  z-index: 91;
  width: 30px;
  height: 30px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  box-shadow: 0 0 0 9px rgba(15, 23, 42, 0.3);
}

[data-partial-loading="inline"] {
  position: relative !important;
  pointer-events: none;
  cursor: progress;
}

[data-partial-loading="inline"] > * {
  opacity: 0 !important;
}

[data-partial-loading="inline"]::after {
  width: 16px;
  height: 16px;
}

@keyframes partial-loading-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes partial-loading-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  turbo-frame[busy]::before,
  turbo-frame[busy]::after,
  [data-partial-loading]::before,
  [data-partial-loading]::after {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }
}

.admin-shell {
  min-height: 100vh;
}

.hero-glow {
  background:
    radial-gradient(circle at 85% 10%, rgba(0, 181, 173, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.96));
}

.panel-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .panel-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  }
}
