/* ============================================================
   qiuyu API · Liquid Glass overlay (iOS-style)
   Loaded after the app bundle CSS. Deepens the built-in glass
   surfaces: stronger blur + saturation, specular top edge,
   bright refractive border, layered depth shadows.
   Palette follows the app theme (teal primary, cosmos dark).
   ============================================================ */

/* --- ambient glow under everything (shows through the glass) --- */
body {
  background-image:
    radial-gradient(1100px 750px at 88% -10%, rgba(20, 184, 166, .13), transparent 60%),
    radial-gradient(950px 700px at -12% 108%, rgba(59, 130, 246, .11), transparent 60%),
    radial-gradient(700px 500px at 55% 120%, rgba(168, 85, 247, .07), transparent 60%);
  background-attachment: fixed;
}

/* --- cards: the main glass surface --- */
body .card,
body .card-glass {
  background-color: rgba(255, 255, 255, .46);
  background-image: linear-gradient(155deg,
    rgba(255, 255, 255, .66) 0%,
    rgba(255, 255, 255, .30) 38%,
    rgba(255, 255, 255, .42) 72%,
    rgba(255, 255, 255, .58) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .22),
    inset 1px 0 0 rgba(255, 255, 255, .30),
    0 16px 44px rgba(19, 50, 47, .13);
}
body .card:is(.dark *),
body .card-glass:is(.dark *) {
  background-color: rgba(10, 24, 27, .44);
  background-image: linear-gradient(155deg,
    rgba(32, 64, 68, .55) 0%,
    rgba(12, 28, 31, .42) 40%,
    rgba(18, 40, 44, .48) 74%,
    rgba(28, 56, 60, .52) 100%);
  border-color: rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 1px rgba(255, 255, 255, .05),
    inset 1px 0 0 rgba(255, 255, 255, .07),
    0 16px 44px rgba(0, 0, 0, .42);
}
body .card-hover {
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease;
}
body .card-hover:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .22),
    0 22px 54px rgba(19, 50, 47, .18);
}
body .card-hover:is(.dark *):hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 1px rgba(255, 255, 255, .05),
    0 22px 54px rgba(0, 0, 0, .5);
}

/* --- top header bar --- */
body .app-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, .68), rgba(255, 255, 255, .46));
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, .65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 10px 30px rgba(19, 50, 47, .07);
}
body .app-header:is(.dark *) {
  background: linear-gradient(180deg, rgba(20, 42, 46, .66), rgba(10, 24, 27, .52));
  border-bottom-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 30px rgba(0, 0, 0, .3);
}
body .app-header__inner,
body .app-header__inner--usage {
  background: transparent;
}

/* --- sidebar --- */
body .app-shell aside {
  background: linear-gradient(165deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .38));
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 12px 0 36px rgba(19, 50, 47, .06);
}
body .app-shell aside:is(.dark *) {
  background: linear-gradient(165deg, rgba(22, 46, 50, .58), rgba(9, 22, 25, .46));
  border-right-color: rgba(255, 255, 255, .11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 12px 0 36px rgba(0, 0, 0, .28);
}

/* --- dialogs & modals --- */
body .dialog-panel,
body .modal-content {
  background-color: rgba(255, 255, 255, .55);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .38) 55%, rgba(255, 255, 255, .55));
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 28px 70px rgba(10, 30, 28, .25);
}
body .dialog-panel:is(.dark *),
body .modal-content:is(.dark *) {
  background-color: rgba(12, 27, 30, .55);
  background-image: linear-gradient(160deg, rgba(34, 66, 70, .5), rgba(12, 27, 30, .45) 55%, rgba(24, 48, 52, .5));
  border-color: rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    0 28px 70px rgba(0, 0, 0, .55);
}
body .dialog-overlay,
body .modal-overlay {
  background: rgba(5, 14, 15, .40);
  -webkit-backdrop-filter: blur(7px) saturate(150%);
  backdrop-filter: blur(7px) saturate(150%);
}

/* --- buttons: glossy liquid primary --- */
body .btn-primary {
  background-image: linear-gradient(180deg, #34d8c3 0%, #14b8a6 46%, #0d9488 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(0, 0, 0, .14),
    0 8px 22px rgba(20, 184, 166, .35);
  border-radius: 12px;
}
body .btn-primary:hover {
  filter: brightness(1.07);
}
body .btn-primary:active {
  transform: translateY(1px);
}
body .btn-secondary {
  background: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 14px rgba(19, 50, 47, .08);
}
body .btn-secondary:is(.dark *) {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

/* --- tables inside glass cards --- */
body .mtable thead th {
  background: rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
body .mtable thead th:is(.dark *) {
  background: rgba(255, 255, 255, .05);
}
body .mtable tbody tr {
  transition: background .15s ease;
}
body .mtable tbody tr:hover {
  background: rgba(20, 184, 166, .06);
}

/* --- small polish --- */
::selection {
  background: rgba(20, 184, 166, .30);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 145, 145, .45) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(110, 145, 145, .40);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
