/* ═══════════════════════════════════════════════════════════════
   ARKAIA EQUILIBRAGE — Modern Jade Theme v2
   Design philosophy : Linear.app meets Stripe Dashboard
   ═══════════════════════════════════════════════════════════════ */

[v-cloak] { display: none; }

html { scrollbar-color: #1c2733 #0a0e14; }

body {
    background:
        radial-gradient(circle at 15% 0%,  rgba(20, 184, 166, 0.06), transparent 50%),
        radial-gradient(circle at 85% 100%, rgba(6, 182, 212, 0.05), transparent 55%),
        #0a0e14;
}

/* ─── Scrollbars ─── */
.custom-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb {
    background: #1c2733;
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background .2s;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #2a3a4a;
    background-clip: padding-box;
}

/* ─── Sidebar category buttons ─── */
.cat-btn {
    width: 100%;
    padding: 9px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #a8b5c2;
    font-size: 13px;
    cursor: pointer;
    transition: all .12s ease-out;
    text-align: left;
    position: relative;
}
.cat-btn:hover {
    background: rgba(20, 184, 166, 0.06);
    color: #5eead4;
}
.cat-btn.cat-active {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.14), rgba(6, 182, 212, 0.06));
    border-color: rgba(20, 184, 166, 0.35);
    color: #2dd4bf;
    box-shadow:
        0 0 18px -6px rgba(20, 184, 166, 0.3),
        inset 0 1px 0 rgba(94, 234, 212, 0.08);
}
.cat-active::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(180deg, #2dd4bf, #06b6d4);
    border-radius: 0 2px 2px 0;
}
.cat-badge {
    background: rgba(255, 255, 255, 0.04);
    color: #6b7c8b;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    font-family: "JetBrains Mono", monospace;
    flex-shrink: 0;
    transition: all .12s;
}
.cat-active .cat-badge {
    background: rgba(20, 184, 166, 0.25);
    color: #5eead4;
}

/* ═══ ENTRY ROWS — Le coeur du redesign ═══ */
.entry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding: 14px 18px;
    background: rgba(15, 22, 32, 0.4);
    border: 1px solid #18222e;
    border-radius: 10px;
    transition: all .18s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 56px;
}
.entry-row:hover {
    background: rgba(15, 22, 32, 0.75);
    border-color: #25364a;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.4);
}
.entry-row.overridden {
    background: linear-gradient(90deg,
        rgba(20, 184, 166, 0.08) 0%,
        rgba(20, 184, 166, 0.03) 30%,
        rgba(15, 22, 32, 0.5) 60%);
    border-color: rgba(20, 184, 166, 0.25);
    border-left: 3px solid #14b8a6;
    padding-left: 15px;
}
.entry-row.dirty {
    background: linear-gradient(90deg,
        rgba(6, 182, 212, 0.12) 0%,
        rgba(6, 182, 212, 0.05) 30%,
        rgba(15, 22, 32, 0.5) 60%);
    border-color: rgba(6, 182, 212, 0.35);
    border-left: 3px solid #06b6d4;
    animation: dirty-pulse 1.4s ease-in-out infinite;
}
@keyframes dirty-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
    50%      { box-shadow: 0 0 28px -8px rgba(6, 182, 212, 0.55); }
}

/* ─── Left part : favorite + key + description ─── */
.entry-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.fav-btn {
    background: transparent;
    border: none;
    color: #1c2733;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 20px;
    text-align: center;
    transition: all .18s;
    flex-shrink: 0;
}
.fav-btn:hover {
    color: #fbbf24;
    transform: scale(1.25) rotate(72deg);
}
.fav-btn.on {
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.7);
}

.entry-row code {
    color: #5eead4;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color .12s;
}
.entry-row:hover code { color: #99f6e4; }
.entry-row.overridden code { color: #2dd4bf; }

.entry-row p {
    color: #6b7c8b;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 2px;
}

/* ─── Right part : controls ─── */
.entry-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Number input — propre, pas de spinners moches */
.num-input {
    background: rgba(10, 14, 20, 0.8);
    border: 1px solid #1c2733;
    color: #f4f7fa;
    padding: 7px 12px;
    border-radius: 7px;
    width: 96px;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    transition: all .15s;
    letter-spacing: -0.02em;
}
.num-input:focus {
    outline: none;
    border-color: #14b8a6;
    background: rgba(10, 14, 20, 1);
    box-shadow:
        0 0 0 3px rgba(20, 184, 166, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.num-input:hover:not(:focus) {
    border-color: #25364a;
}
/* Force hide spinners (Chrome/Safari/Edge) */
input[type=number].num-input::-webkit-inner-spin-button,
input[type=number].num-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
/* Force hide spinners (Firefox) */
input[type=number].num-input {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* ═══ Slider — design premium ═══ */
.ark-slider {
    flex: 1;
    min-width: 160px;
    max-width: 260px;
    height: 28px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    padding: 0;
    margin: 0;
}

/* Track (Chrome/Safari) */
.ark-slider::-webkit-slider-runnable-track {
    height: 6px;
    background:
        linear-gradient(to right,
            #14b8a6 0%,
            #06b6d4 var(--fill, 0%),
            transparent var(--fill, 0%)),
        linear-gradient(to right,
            rgba(28, 39, 51, 0.6),
            rgba(28, 39, 51, 0.6));
    border-radius: 3px;
    transition: background .15s;
}

/* Track (Firefox) */
.ark-slider::-moz-range-track {
    height: 6px;
    background: rgba(28, 39, 51, 0.6);
    border-radius: 3px;
}
.ark-slider::-moz-range-progress {
    height: 6px;
    background: linear-gradient(to right, #14b8a6, #06b6d4);
    border-radius: 3px;
}

/* Thumb (Chrome/Safari) */
.ark-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #5eead4, #14b8a6 60%);
    border: 2px solid #0a0e14;
    margin-top: -7px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    box-shadow:
        0 0 0 4px rgba(20, 184, 166, 0),
        0 2px 6px rgba(0, 0, 0, 0.4),
        0 0 14px rgba(20, 184, 166, 0.4);
}
.ark-slider:hover::-webkit-slider-thumb {
    transform: scale(1.15);
    box-shadow:
        0 0 0 6px rgba(20, 184, 166, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(34, 211, 238, 0.5);
}
.ark-slider:focus::-webkit-slider-thumb {
    box-shadow:
        0 0 0 6px rgba(20, 184, 166, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(34, 211, 238, 0.6);
}
.ark-slider::-webkit-slider-thumb:active { transform: scale(1.05); }

/* Thumb (Firefox) */
.ark-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #5eead4, #14b8a6 60%);
    border: 2px solid #0a0e14;
    cursor: pointer;
}

/* Range info (min · max) — subtil */
.range-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    color: #4a5b6c;
    font-weight: 500;
    white-space: nowrap;
    min-width: 70px;
    justify-content: flex-end;
}
.range-meta .dot { color: #2a3a4a; }

/* % change badge — pill colore */
.delta-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    font-family: "JetBrains Mono", monospace;
    letter-spacing: -0.01em;
    min-width: 58px;
    justify-content: center;
    line-height: 1.2;
}
.delta-up {
    background: rgba(52, 211, 153, 0.12);
    color: #4ade80;
    border: 1px solid rgba(52, 211, 153, 0.25);
}
.delta-down {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.25);
}
.delta-placeholder { width: 58px; }

/* Reset button — icon only, hover rotate */
.reset-btn {
    background: transparent;
    color: #4a5b6c;
    border: 1px solid #1c2733;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.reset-btn:hover {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.4);
    transform: rotate(-90deg);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #4a5b6c;
}

/* ─── Toast notifications ─── */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 10px;
    backdrop-filter: blur(16px);
    box-shadow:
        0 12px 28px -6px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    pointer-events: auto;
    min-width: 240px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid;
}
.toast-success {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(20, 184, 166, 0.45);
    color: #5eead4;
}
.toast-error {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(244, 63, 94, 0.45);
    color: #fda4af;
}
.toast-info {
    background: rgba(6, 182, 212, 0.16);
    border-color: rgba(6, 182, 212, 0.45);
    color: #67e8f9;
}

.toast-enter-active, .toast-leave-active {
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast-enter-from { opacity: 0; transform: translateX(40px) scale(0.95); }
.toast-leave-to   { opacity: 0; transform: translateX(40px) scale(0.95); }

/* Fade transition */
.fade-enter-active, .fade-leave-active { transition: opacity .25s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* ═══ Tech groups (vue groupee par technique) ═══ */
.tech-group {
    background: rgba(15, 22, 32, 0.5);
    border: 1px solid #18222e;
    border-radius: 12px;
    overflow: hidden;
    transition: all .2s;
}
.tech-group:hover { border-color: #25364a; }
.tech-group.expanded { background: rgba(15, 22, 32, 0.75); }

.tech-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.06), transparent);
    border: none;
    color: #e4ebf0;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.tech-header:hover { background: linear-gradient(90deg, rgba(20, 184, 166, 0.12), transparent); }
.tech-header.static { cursor: default; }
.tech-header.static:hover { background: linear-gradient(90deg, rgba(20, 184, 166, 0.06), transparent); }

.tech-chevron {
    color: #14b8a6;
    font-size: 10px;
    transition: transform .2s ease-out;
    width: 12px;
    display: inline-block;
}
.tech-group.expanded .tech-chevron { transform: rotate(90deg); }

.tech-name {
    font-weight: 700;
    font-size: 14px;
    color: #5eead4;
    letter-spacing: -0.01em;
    flex: 1;
}
.tech-count {
    font-family: "JetBrains Mono", monospace;
    font-size: 10.5px;
    color: #6b7c8b;
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 9px;
    border-radius: 10px;
    flex-shrink: 0;
}

.tech-body {
    border-top: 1px solid #18222e;
    padding: 12px 16px 14px;
}

.tech-level {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 14px;
    padding: 8px 0;
}
.tech-level + .tech-level { border-top: 1px solid rgba(28, 39, 51, 0.5); }
.tech-level-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a5b6c;
    font-weight: 600;
    padding-top: 14px;
}
.tech-level-entries {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Compact entry row dans tech groups (sans description, juste le stat) */
.entry-row.compact {
    padding: 8px 12px;
    min-height: 44px;
    background: rgba(10, 14, 20, 0.4);
}
.stat-label {
    font-size: 12.5px;
    color: #b8c5d1;
    font-weight: 500;
}

/* ═══ Modal logs ═══ */
.modal-enter-active, .modal-leave-active { transition: all .25s cubic-bezier(0.4, 0, 0.2, 1); }
.modal-enter-from, .modal-leave-to { opacity: 0; backdrop-filter: blur(0); }
.modal-enter-active > div, .modal-leave-active > div { transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1); }
.modal-enter-from > div { transform: scale(0.96) translateY(8px); }
.modal-leave-to > div   { transform: scale(0.98); }

.log-row {
    display: grid;
    grid-template-columns: 80px 200px 1fr;
    gap: 16px;
    align-items: center;
    padding: 9px 12px;
    background: rgba(15, 22, 32, 0.5);
    border: 1px solid #18222e;
    border-radius: 8px;
    transition: all .12s;
    font-size: 12.5px;
}
.log-row:hover {
    background: rgba(15, 22, 32, 0.85);
    border-color: #25364a;
}
.log-time {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: #6b7c8b;
    text-align: right;
}
.log-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b8c5d1;
    min-width: 0;
}
.log-avatar {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #06b6d4);
    color: #0a0e14;
    font-weight: 700;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.log-action {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.log-action code {
    font-family: "JetBrains Mono", monospace;
    color: #5eead4;
    font-size: 11.5px;
    truncate: true;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}
.log-tag {
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.log-tag-set {
    background: rgba(20, 184, 166, 0.18);
    color: #5eead4;
    border: 1px solid rgba(20, 184, 166, 0.4);
}
.log-tag-reset {
    background: rgba(107, 124, 139, 0.18);
    color: #94a3b8;
    border: 1px solid rgba(107, 124, 139, 0.4);
}
.log-values {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11.5px;
    margin-left: auto;
    flex-shrink: 0;
}
.log-old { color: #6b7c8b; text-decoration: line-through; }
.log-new { color: #fbbf24; font-weight: 600; }

.log-tag-revert {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}
.log-tag-legacy {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.log-revert-btn {
    background: transparent;
    color: #4a5b6c;
    border: 1px solid #1c2733;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: all .15s;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.log-revert-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.4);
    transform: rotate(-180deg);
}

/* ═══ Pending rows ═══ */
.pending-row {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 12px 16px;
    background: rgba(15, 22, 32, 0.5);
    border: 1px solid #18222e;
    border-left: 3px solid #f59e0b;
    border-radius: 10px;
    transition: all .15s;
}
.pending-row:hover {
    background: rgba(15, 22, 32, 0.85);
    border-color: #25364a;
    border-left-color: #fbbf24;
}
.pending-meta { display: flex; align-items: center; gap: 10px; }
.pending-change { min-width: 0; }
.pending-change code {
    color: #5eead4;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}
.pending-values {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
}
.pending-actions { display: flex; gap: 6px; }
.btn-approve, .btn-refuse, .btn-restore, .btn-snapshot-del {
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid;
}
.btn-approve {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
}
.btn-approve:hover { background: #22c55e; color: #0a0e14; }
.btn-refuse {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.35);
}
.btn-refuse:hover { background: #f43f5e; color: #fff; }
.btn-restore {
    background: rgba(20, 184, 166, 0.15);
    color: #5eead4;
    border-color: rgba(20, 184, 166, 0.4);
}
.btn-restore:hover { background: #14b8a6; color: #0a0e14; }
.btn-snapshot-del {
    background: transparent;
    color: #6b7c8b;
    border-color: #1c2733;
    padding: 6px 10px;
}
.btn-snapshot-del:hover {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.4);
}

/* ═══ Snapshot rows ═══ */
.snapshot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(15, 22, 32, 0.5);
    border: 1px solid #18222e;
    border-radius: 10px;
    transition: all .12s;
}
.snapshot-row:hover { background: rgba(15, 22, 32, 0.85); border-color: #25364a; }
.snapshot-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.snapshot-badge {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.snap-auto {
    background: rgba(107, 124, 139, 0.18);
    color: #94a3b8;
    border: 1px solid rgba(107, 124, 139, 0.4);
}
.snap-manual {
    background: rgba(20, 184, 166, 0.18);
    color: #5eead4;
    border: 1px solid rgba(20, 184, 166, 0.4);
}
.snapshot-actions { display: flex; gap: 6px; flex-shrink: 0; }
