
/*****************************************/
/*            LIQUID DESIGN :            */
/*****************************************/
/* === LIQUID DESIGN : Ext.list.Tree === */
.liquid-tree .x-treelist {
  background: linear-gradient(180deg, #f8fbff 0%, #ecf3ff 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.liquid-tree .x-treelist-item {
  position: relative;
  border-radius: 10px;
  margin: 3px 8px;
  overflow: hidden;
  transition: background 0.35s ease, transform 0.25s ease;
}

.liquid-tree .x-treelist-item:hover {
  background: rgba(25, 118, 210, 0.08);
  transform: translateX(4px);
}

.liquid-tree .x-treelist-item-text {
  color: #1d3557;
  font-weight: 500;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease;
}

.liquid-tree .x-treelist-item:hover .x-treelist-item-text {
  color: #1976d2;
}

.liquid-tree .x-treelist-item-icon {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
  transition: transform 0.25s ease, color 0.3s ease;
}

.liquid-tree .x-treelist-item:hover .x-treelist-item-icon {
  transform: scale(1.1);
  color: #1976d2;
}

/* --- Scrollbar elegante --- */
.liquid-tree .x-treelist-container::-webkit-scrollbar {
  width: 6px;
}

.liquid-tree .x-treelist-container::-webkit-scrollbar-thumb {
  background: rgba(25, 118, 210, 0.3);
  border-radius: 3px;
}

/* --- Ripple click (animazione acqua) --- */
@keyframes ripple {
  from {
    transform: scale(0);
    opacity: 0.4;
  }

  to {
    transform: scale(4);
    opacity: 0;
  }
}

.liquid-tree .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(25, 118, 210, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
  z-index: 2;
}


/* ========== LIQUID THEME: Window  ========== */
.x-window {
  border-radius: 12px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 6px 24px rgba(0, 50, 100, 0.15), 0 0 0 1px rgba(25, 118, 210, 0.08);
  overflow: hidden;
  animation: liquidFadeIn 0.35s ease;
}

.x-window-header {
  border-bottom: 1px solid rgba(25, 118, 210, 0.15);
  font-weight: 600;
  color: #1d3557;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  letter-spacing: 0.3px;
}

.x-window-body {
  background-color: #fafcff;
  border: none !important;
}

/* --- Effetto "onda" al focus o drag --- */
.x-window:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(25, 118, 210, 0.05), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.x-window.x-window-dragging:before,
.x-window:focus-within:before {
  opacity: 1;
}

/* --- Animazione apertura --- */
@keyframes liquidFadeIn {
  from {
    transform: scale(0.98) translateY(10px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* --- Pulsanti window --- */
.x-tool {
  transition: background 0.3s ease, transform 0.2s ease;
  border-radius: 50%;
}

.x-tool:hover {
  background: rgba(25, 118, 210, 0.15);
  transform: scale(1.15);
}

/* ========== LIQUID THEME:  Grid ========== */
.x-grid {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(25, 118, 210, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.x-grid:hover {
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.12);
}

/* --- Header colonne --- */
.x-grid-header-ct {
  background: linear-gradient(90deg, rgba(25, 118, 210, 0.05), rgba(25, 118, 210, 0.08));
  border-bottom: 1px solid rgba(25, 118, 210, 0.15);
}

.x-column-header {
  background: transparent !important;
  color: #1d3557;
  font-weight: 600;
  border: none !important;
  transition: background 0.25s ease;
}

.x-column-header-over {
  background: rgba(25, 118, 210, 0.08) !important;
}

/* --- Righe --- */
.x-grid-item {
  transition: background 0.25s ease;
}

.x-grid-item:hover {
  background: rgba(25, 118, 210, 0.04);
}

/* --- Riga selezionata --- */
.x-grid-item-selected {
  background: linear-gradient(90deg, rgba(25, 118, 210, 0.12), rgba(25, 118, 210, 0.18)) !important;
  color: #0d47a1 !important;
  font-weight: 500;
}

/* --- Barra di stato / footer --- */
.x-toolbar-footer {
  background: linear-gradient(90deg, rgba(25, 118, 210, 0.08), rgba(25, 118, 210, 0.15));
  border-top: 1px solid rgba(25, 118, 210, 0.1);
}

/* --- Scrollbar elegante --- */
.x-grid-body::-webkit-scrollbar {
  width: 8px;
}

.x-grid-body::-webkit-scrollbar-thumb {
  background: rgba(25, 118, 210, 0.25);
  border-radius: 4px;
}

/* Root toggle (add this class to <body> or a container) */
.liquid-theme {
  --accent: currentColor;
}

/* ===== LIQUID THEME:  Panel ===== */
.liquid-theme .x-panel {
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 6px 18px rgba(0, 40, 80, 0.10), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* Header */
.liquid-theme .x-panel-header {
  position: relative;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.05));
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Left liquid accent bar, inherits --accent (keeps your theme colors) */
.liquid-theme .x-panel-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  /* background: var(--accent, currentColor); */
  opacity: .35;
  border-top-left-radius: 12px;
}

/* Title */
.liquid-theme .x-panel-header .x-title-text {
  font-weight: 600;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

/* Panel body */
.liquid-theme .x-panel-body {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: none !important;
}

/* Sub-panels inside body get gentle separation */
.liquid-theme .x-panel .x-panel {
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ===== LIQUID THEME: Toolbar ===== */
.liquid-theme .x-toolbar {
  background: linear-gradient(180deg, #fbfdff, #f1f6ff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 40, 80, 0.08);
  padding: 4px 6px;
}

/* Buttons */
.liquid-theme .x-toolbar .x-btn {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: background .25s ease, transform .12s ease, box-shadow .25s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.liquid-theme .x-toolbar .x-btn-over {
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 40, 80, .10);
}

.liquid-theme .x-toolbar .x-btn-pressed {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(0);
}

/* Icons a filo con testo */
.liquid-theme .x-toolbar .x-btn .x-btn-icon-el {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

/* Separator subtle */
.liquid-theme .x-toolbar .x-toolbar-separator-horizontal {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.12), transparent);
  width: 1px;
  margin: 0 6px;
}

/* ===== Ripple (shared) ===== */
@keyframes ripple {
  from {
    transform: scale(0);
    opacity: .35;
  }

  to {
    transform: scale(4);
    opacity: 0;
  }
}

.liquid-theme .ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: color-mix(in srgb, var(--accent, currentColor) 30%, transparent);
  transform: scale(0);
  animation: ripple .6s linear;
  z-index: 1;
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, #000 10%, transparent)) {
  .liquid-theme .ripple {
    background: rgba(0, 0, 0, .15);
  }
}

/* ===== Focus ring soft ===== */
.liquid-theme .x-btn:focus,
.liquid-theme .x-panel:focus {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, currentColor) 35%, transparent);
}

@supports not (box-shadow: 0 0 0 2px color-mix(in srgb, #000 35%, transparent)) {

  .liquid-theme .x-btn:focus,
  .liquid-theme .x-panel:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .15);
  }
}