/* Kafenwa Music Aqua visual layer */
:root {
  color-scheme: light;
  --bg: #e8f2fc;
  --panel: rgba(255, 255, 255, .78);
  --panel-soft: rgba(239, 248, 255, .74);
  --text: #102236;
  --muted: #60758c;
  --border: rgba(90, 128, 170, .28);
  --accent: #2f8dff;
  --accent-2: #0a6fbd;
  --aqua-hi: rgba(255, 255, 255, .94);
  --aqua-mid: rgba(196, 225, 252, .76);
  --aqua-low: rgba(108, 166, 228, .34);
  --aqua-button: linear-gradient(180deg, #bfe8ff 0%, #66baff 46%, #247fdc 100%);
  --aqua-button-primary: linear-gradient(180deg, #9bd7ff 0%, #54adff 44%, #1378e7 100%);
  --aqua-capsule: linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(221, 239, 255, .86) 100%);
  --shadow: 0 24px 70px rgba(54, 92, 132, .22), inset 0 1px 0 rgba(255, 255, 255, .88);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071425;
  --panel: rgba(20, 37, 57, .78);
  --panel-soft: rgba(31, 52, 76, .72);
  --text: #f7fbff;
  --muted: #b7c9db;
  --border: rgba(170, 210, 255, .24);
  --accent: #67bdff;
  --accent-2: #9ed8ff;
  --aqua-hi: rgba(255, 255, 255, .22);
  --aqua-mid: rgba(95, 151, 205, .38);
  --aqua-low: rgba(18, 62, 104, .78);
  --aqua-button: linear-gradient(180deg, #7fc8ff 0%, #2d87da 46%, #103e73 100%);
  --aqua-button-primary: linear-gradient(180deg, #84ceff 0%, #278ee7 48%, #07549e 100%);
  --aqua-capsule: linear-gradient(180deg, rgba(78, 119, 158, .72) 0%, rgba(27, 53, 82, .82) 100%);
  --shadow: 0 28px 80px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .2);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% -12%, rgba(255, 255, 255, .95), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(150, 211, 255, .48), transparent 26rem),
    linear-gradient(180deg, #f9fcff 0%, var(--bg) 44%, #d7eaf9 100%) !important;
  color: var(--text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Lucida Grande", "Segoe UI", system-ui, sans-serif !important;
  letter-spacing: 0 !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 18% -12%, rgba(103, 189, 255, .22), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(38, 104, 166, .24), transparent 25rem),
    linear-gradient(180deg, #0d2138 0%, var(--bg) 55%, #04101f 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55), transparent 18rem),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 34px);
}

h1,
h2,
h3,
h4 {
  letter-spacing: 0 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .76);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 {
  text-shadow: 0 1px 0 rgba(0, 0, 0, .58);
}

a {
  color: var(--accent-2);
}

.aqua-main-title {
  color: #12385c;
  line-height: 1.04 !important;
  max-width: 48rem;
  text-wrap: balance;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .92),
    0 12px 28px rgba(31, 83, 136, .16);
}

.aqua-title-line,
.aqua-title-brand {
  display: block;
}

.aqua-title-line > span {
  display: block;
}

.aqua-title-brand {
  width: fit-content;
  margin-top: .18em;
  padding-right: .04em;
  color: #0b62b1;
  background: linear-gradient(180deg, #ffffff 0%, #89d5ff 32%, #1b83e9 58%, #064f9c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .75),
    0 2px 5px rgba(0, 46, 100, .28),
    0 14px 28px rgba(26, 105, 190, .18);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .aqua-title-brand {
    color: transparent;
  }
}

html[data-theme="dark"] .aqua-main-title {
  color: #f5fbff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, .72),
    0 16px 34px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .aqua-title-brand {
  color: #dff4ff;
  background: linear-gradient(180deg, #ffffff 0%, #c7efff 28%, #7fc8ff 58%, #2b92f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 1px 1px rgba(0, 18, 42, .9),
    0 0 12px rgba(89, 181, 255, .24);
}

.app-topbar,
body > header.sticky {
  border-color: var(--border) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .9) 0%, rgba(234, 246, 255, .84) 45%, rgba(197, 224, 249, .78) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .98),
    inset 0 -1px 0 rgba(72, 116, 164, .15),
    0 16px 38px rgba(52, 91, 132, .16);
  backdrop-filter: blur(18px) saturate(1.22);
  -webkit-backdrop-filter: blur(18px) saturate(1.22);
}

html[data-theme="dark"] .app-topbar,
html[data-theme="dark"] body > header.sticky {
  background:
    linear-gradient(180deg, rgba(52, 83, 115, .88) 0%, rgba(20, 43, 70, .86) 52%, rgba(9, 24, 43, .9) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -1px 0 rgba(0, 0, 0, .48),
    0 18px 42px rgba(0, 0, 0, .32);
}

body > main > header {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: .85rem 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .9) 0%, rgba(236, 247, 255, .78) 52%, rgba(206, 230, 250, .7) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
}

body > main > header a > span.grid {
  border-radius: 999px !important;
  background: var(--aqua-button-primary) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .88),
    inset 0 -10px 18px rgba(0, 74, 152, .28),
    0 10px 24px rgba(22, 100, 190, .26);
}

.panel,
.soft,
.check-row {
  border-color: var(--border) !important;
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .86) 0%, rgba(249, 253, 255, .76) 42%, rgba(222, 240, 255, .68) 100%) !important;
  border: 1px solid var(--border) !important;
  border-radius: 15px !important;
  box-shadow: var(--shadow) !important;
}

html[data-theme="dark"] .panel {
  background:
    linear-gradient(180deg, rgba(39, 65, 94, .83) 0%, rgba(20, 39, 61, .78) 48%, rgba(12, 25, 43, .76) 100%) !important;
}

.soft,
.check-row {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .74) 0%, rgba(228, 243, 255, .66) 100%) !important;
  border: 1px solid var(--border) !important;
  border-radius: 13px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 8px 22px rgba(67, 105, 143, .1);
}

html[data-theme="dark"] .soft,
html[data-theme="dark"] .check-row {
  background:
    linear-gradient(180deg, rgba(62, 93, 126, .58) 0%, rgba(26, 49, 77, .66) 100%) !important;
}

.rounded-lg {
  border-radius: 13px !important;
}

.panel > .border-b:first-child {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .7) 0%, rgba(205, 232, 255, .42) 100%);
  box-shadow: inset 0 -1px 0 rgba(92, 133, 176, .18);
}

.modal-card {
  border-radius: 16px !important;
  box-shadow:
    0 32px 90px rgba(25, 61, 96, .34),
    inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

html[data-theme="dark"] .modal-card {
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .58),
    inset 0 1px 0 rgba(255, 255, 255, .18) !important;
}

.field {
  border: 1px solid rgba(92, 130, 168, .34) !important;
  border-radius: 12px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(245, 251, 255, .9) 54%, rgba(225, 241, 255, .86) 100%) !important;
  color: var(--text) !important;
  box-shadow:
    inset 0 2px 4px rgba(68, 102, 135, .08),
    inset 0 1px 0 rgba(255, 255, 255, .94);
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease, background .16s ease;
}

html[data-theme="dark"] .field {
  background:
    linear-gradient(180deg, rgba(22, 43, 68, .95) 0%, rgba(14, 30, 51, .94) 100%) !important;
  border-color: rgba(171, 215, 255, .26) !important;
}

.field:hover {
  border-color: rgba(47, 141, 255, .45) !important;
}

.field:focus {
  border-color: rgba(38, 135, 240, .72) !important;
  box-shadow:
    0 0 0 4px rgba(71, 159, 255, .18),
    0 0 18px rgba(47, 141, 255, .24),
    inset 0 1px 0 rgba(255, 255, 255, .95) !important;
}

select.field {
  cursor: pointer;
}

textarea.field,
textarea.generated {
  line-height: 1.7;
}

input[type="range"] {
  accent-color: var(--accent);
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

.btn,
button.btn,
a.btn {
  position: relative;
  overflow: hidden;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: var(--aqua-button) !important;
  font-weight: 800;
  letter-spacing: 0 !important;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    inset 0 -9px 18px rgba(89, 147, 202, .18),
    0 9px 20px rgba(43, 91, 138, .16);
  text-shadow:
    0 1px 1px rgba(0, 30, 72, .86),
    0 0 4px rgba(5, 76, 145, .34);
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    filter .14s ease,
    background .14s ease;
}

html[data-theme="dark"] .btn,
html[data-theme="dark"] button.btn,
html[data-theme="dark"] a.btn {
  color: #fff !important;
  text-shadow:
    0 1px 1px rgba(0, 12, 34, .92),
    0 0 4px rgba(76, 165, 255, .3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -10px 18px rgba(0, 0, 0, .22),
    0 10px 24px rgba(0, 0, 0, .34);
}

.btn:hover {
  filter: brightness(1.045) saturate(1.06);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -9px 18px rgba(71, 141, 207, .2),
    0 13px 26px rgba(36, 94, 148, .2);
}

.btn:active {
  filter: brightness(.97);
  transform: translateY(1px) scale(.99);
  box-shadow:
    inset 0 2px 8px rgba(42, 86, 127, .22),
    inset 0 1px 0 rgba(255, 255, 255, .56),
    0 5px 12px rgba(34, 83, 127, .16);
}

.btn:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(71, 159, 255, .28),
    inset 0 1px 0 rgba(255, 255, 255, .96),
    0 12px 28px rgba(36, 94, 148, .22);
}

.btn-primary,
.mode-tab.active,
.btn-sync-ok {
  color: #fff !important;
  background: var(--aqua-button-primary) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .76),
    inset 0 -12px 20px rgba(0, 76, 158, .3),
    0 11px 24px rgba(18, 111, 220, .28) !important;
  text-shadow:
    0 1px 1px rgba(0, 30, 72, .9),
    0 0 5px rgba(0, 82, 160, .38) !important;
}

.btn-secondary {
  color: #fff !important;
  background: var(--aqua-button) !important;
}

.btn i,
.mode-tab i {
  color: currentColor;
  text-shadow: inherit;
}

.btn span,
.mode-tab span {
  display: inline-block;
  line-height: 1;
  transform: translateY(-.02em);
}

.btn-icon {
  border-radius: 999px !important;
}

.mode-tabs {
  border: 0 !important;
  border-radius: 999px !important;
  padding: .18rem;
  background:
    linear-gradient(180deg, rgba(137, 174, 209, .22) 0%, rgba(255, 255, 255, .5) 100%) !important;
  box-shadow:
    inset 0 1px 3px rgba(56, 96, 136, .22),
    inset 0 1px 0 rgba(255, 255, 255, .75);
}

.mode-tab {
  border: 0 !important;
  border-radius: 999px;
  transition: transform .14s ease, filter .14s ease, background .14s ease;
}

.mode-tab:not(.active):hover {
  background: rgba(255, 255, 255, .58);
  color: var(--text);
}

.tag {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--aqua-capsule) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .86),
    0 5px 14px rgba(62, 100, 137, .1);
  color: var(--muted) !important;
}

html[data-theme="dark"] .tag {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 5px 14px rgba(0, 0, 0, .24);
}

.account-dropdown {
  border-radius: 14px !important;
  padding: .45rem !important;
}

.account-menu-item {
  border: 0;
  border-radius: 11px !important;
  transition: background .14s ease, transform .14s ease, box-shadow .14s ease;
}

.account-menu-item:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(211, 234, 255, .76)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
  transform: translateY(-1px);
}

html[data-theme="dark"] .account-menu-item:hover {
  background: linear-gradient(180deg, rgba(76, 117, 154, .6), rgba(25, 53, 84, .74)) !important;
}

.generated-output {
  min-height: 18rem;
  border-radius: 13px;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .64), rgba(232, 245, 255, .46)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .78),
    inset 0 0 0 1px rgba(92, 130, 168, .18);
}

html[data-theme="dark"] .generated-output {
  background:
    linear-gradient(180deg, rgba(13, 29, 50, .68), rgba(7, 19, 34, .58)) !important;
}

.generated-output:empty::before {
  content: "Le contenu genere apparaitra ici.";
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.card-hover {
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  filter: saturate(1.03);
}

.admin-link {
  color: var(--accent-2) !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.check-ok {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 0 0 1px rgba(22, 163, 74, .24),
    0 8px 22px rgba(22, 163, 74, .08) !important;
}

.check-warn {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 0 0 1px rgba(245, 158, 11, .3),
    0 8px 22px rgba(245, 158, 11, .08) !important;
}

.check-fail {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 0 0 1px rgba(220, 38, 38, .3),
    0 8px 22px rgba(220, 38, 38, .08) !important;
}

.brand-logo {
  filter: drop-shadow(0 7px 14px rgba(41, 79, 118, .18));
}

html[data-theme="dark"] .brand-logo {
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .45));
}

.scroll-thin::-webkit-scrollbar {
  width: 10px;
}

.scroll-thin::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .34);
  border-radius: 999px;
}

.scroll-thin::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(132, 197, 255, .86), rgba(43, 132, 224, .78)) !important;
}

footer {
  border-color: var(--border) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(198, 226, 249, .46));
}

footer > div {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding-top: .8rem !important;
  padding-bottom: .8rem !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(225, 241, 255, .58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 12px 30px rgba(44, 92, 139, .14);
}

html[data-theme="dark"] footer > div {
  background:
    linear-gradient(180deg, rgba(50, 82, 114, .68), rgba(14, 34, 58, .72));
}

@media (max-width: 980px) {
  .panel,
  .soft {
    border-radius: 14px !important;
  }

  body > main > header {
    border-radius: 15px;
  }
}

@media (max-width: 720px) {
  .app-topbar .mx-auto {
    padding-top: .7rem !important;
    padding-bottom: .7rem !important;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .account-menu-wrap,
  #account-menu-button {
    width: 100%;
    min-width: 0;
  }

  .btn,
  button.btn,
  a.btn {
    min-height: 2.55rem;
  }

  #sync-button {
    padding-inline: .55rem !important;
  }

  footer > div {
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .btn,
  button.btn,
  a.btn {
    gap: .35rem;
  }

  .mode-tab {
    font-size: .8rem;
  }

  #sync-button {
    font-size: .78rem !important;
  }
}
