:root {
    --jv-footer-accent: #ff6b81;
    --jv-footer-bg: #ffffff;
    --jv-footer-text: #94a3b8;
    --jv-footer-border: #f0f2f5;
}

.global-action-sidebar,
.jv-action-sidebar {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn-item {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid color-mix(in srgb, var(--jv-footer-accent) 22%, transparent);
    border-radius: 50%;
    color: #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform .22s ease, background .22s ease, color .22s ease, box-shadow .22s ease;
    text-decoration: none;
    padding: 0;
    outline: none;
    box-sizing: border-box;
}

.action-icon { font-size: 14px; line-height: 1; margin-bottom: 2px; transition: .2s; }
.btn-to-home .action-icon { font-size: 16px; margin-bottom: 0; }
.action-text { font-size: 9px; font-weight: 700; transform: scale(.9); opacity: .82; }
.action-btn-item:hover { transform: translateY(-3px) scale(1.05); background: var(--jv-footer-accent); border-color: var(--jv-footer-accent); color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--jv-footer-accent) 35%, transparent); }
.action-btn-item:hover .action-text { opacity: 1; }
.btn-to-top { border-color: rgba(52, 152, 219, .2); }
.btn-to-top:hover { background: #3498db; border-color: #3498db; box-shadow: 0 6px 20px rgba(52, 152, 219, .35); }

.jv-footer {
    text-align: center;
    padding: 26px 15px;
    font-size: 12px;
    color: var(--jv-footer-text);
    background: var(--jv-footer-bg);
    border-top: 1px solid var(--jv-footer-border);
    margin-top: 50px;
    box-sizing: border-box;
}

.jv-footer-align-left { text-align: left; }
.jv-footer-align-left .footer-nav,
.jv-footer-align-left .jv-footer-widgets { justify-content: flex-start; }

.jv-footer-glass {
    background: color-mix(in srgb, var(--jv-footer-bg) 84%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.jv-footer-soft {
    background: linear-gradient(180deg, color-mix(in srgb, var(--jv-footer-bg) 94%, #f8fafc), var(--jv-footer-bg));
}

.footer-nav,
.jv-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px 20px;
    max-width: 920px;
    margin: 0 auto 15px auto;
}

.footer-nav a,
.jv-footer a {
    text-decoration: none;
    color: #666;
    transition: color .2s ease, transform .2s ease;
    font-weight: 500;
}

.footer-nav a { font-size: 14px; }
.footer-nav a:hover,
.jv-footer a:hover { color: var(--jv-footer-accent); }

.jv-footer-lines p { margin: 5px 0; line-height: 1.7; }

.footer-status-box,
.jv-footer-status {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
    font-size: 12px;
    color: var(--jv-footer-text);
    line-height: 1.8;
}

.footer-status-box span.highlight,
.jv-footer-status span.highlight {
    color: var(--jv-footer-accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
}

.jv-footer-widgets {
    max-width: 920px;
    margin: 14px auto 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.jv-footer-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #edf2f7;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .04);
    line-height: 1.45;
}

.jv-footer-widget strong {
    color: #334155;
    font-size: 12px;
    white-space: nowrap;
}

.jv-widget-notice { border-color: color-mix(in srgb, var(--jv-footer-accent) 22%, #edf2f7); }
.jv-widget-links { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.jv-widget-links a { color: #475569; padding: 2px 7px; border-radius: 999px; background: #f8fafc; }
.jv-widget-links a:hover { color: #fff; background: var(--jv-footer-accent); }
.jv-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.jv-badges span { color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; padding: 2px 8px; }
.jv-custom-html { display: inline-flex; align-items: center; gap: 6px; }

/* Admin config entry */
.jv-footer-config-toggle {
    position: fixed;
    right: 30px;
    bottom: 20px;
    z-index: 1000000;
    border: 1px solid color-mix(in srgb, var(--jv-footer-accent) 35%, #fff);
    background: rgba(255, 255, 255, .92);
    color: #334155;
    box-shadow: 0 8px 26px rgba(15, 23, 42, .1);
    border-radius: 999px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.jv-footer-config-toggle:hover { color: #fff; background: var(--jv-footer-accent); }

.jv-footer-editor { position: fixed; inset: 0; z-index: 1000001; display: none; }
.jv-footer-editor.active { display: block; }
.jv-editor-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .42); backdrop-filter: blur(3px); }
.jv-editor-panel {
    position: absolute;
    right: 24px;
    top: 24px;
    bottom: 24px;
    width: min(980px, calc(100vw - 48px));
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.jv-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.jv-editor-header strong { display: block; font-size: 17px; color: #0f172a; }
.jv-editor-header span { display: block; margin-top: 4px; color: #64748b; font-size: 12px; }
.jv-editor-header button,
.jv-row-remove {
    border: none;
    background: #fff1f2;
    color: #e11d48;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.jv-editor-tabs { display: flex; gap: 8px; padding: 12px 14px 0; overflow-x: auto; border-bottom: 1px solid #edf2f7; }
.jv-editor-tabs button {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 10px 10px 0 0;
    padding: 9px 14px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 700;
}
.jv-editor-tabs button.active { background: #fff; color: var(--jv-footer-accent); border-bottom-color: #fff; }
.jv-editor-body { flex: 1; overflow: auto; padding: 18px; background: #fff; }
.jv-editor-footer { display: flex; justify-content: space-between; gap: 10px; padding: 14px 18px; border-top: 1px solid #edf2f7; background: #fbfdff; }

.jv-editor-primary,
.jv-editor-secondary,
.jv-small-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.jv-editor-primary { border-color: var(--jv-footer-accent); background: var(--jv-footer-accent); color: #fff; }
.jv-editor-secondary:hover,
.jv-small-btn:hover { border-color: var(--jv-footer-accent); color: var(--jv-footer-accent); }
.jv-editor-primary:disabled { opacity: .6; cursor: not-allowed; }

.jv-editor-section { display: flex; flex-direction: column; gap: 12px; }
.jv-editor-help { color: #64748b; font-size: 12px; line-height: 1.7; background: #f8fafc; border: 1px solid #edf2f7; border-radius: 12px; padding: 10px 12px; }
.jv-editor-list { display: flex; flex-direction: column; gap: 10px; }
.jv-editor-card,
.jv-editor-row {
    border: 1px solid #e7edf5;
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .04);
}
.jv-editor-row { display: grid; grid-template-columns: 28px 1fr 1.4fr auto; gap: 10px; align-items: center; }
.jv-editor-row.compact { grid-template-columns: 28px 1fr 1fr auto; }
.jv-editor-row.action-row { grid-template-columns: 28px .6fr .7fr 1fr 1.4fr auto; }

.jv-editor-row input,
.jv-editor-row select,
.jv-editor-row textarea,
.jv-editor-card input,
.jv-editor-card select,
.jv-editor-card textarea {
    width: 100%;
    border: 1px solid #dbe5f0;
    background: #fff;
    border-radius: 10px;
    padding: 9px 10px;
    color: #1e293b;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
}
.jv-editor-row textarea,
.jv-editor-card textarea { min-height: 82px; resize: vertical; font-family: inherit; line-height: 1.55; }
.jv-editor-row input:focus,
.jv-editor-row select:focus,
.jv-editor-row textarea:focus,
.jv-editor-card input:focus,
.jv-editor-card select:focus,
.jv-editor-card textarea:focus { border-color: var(--jv-footer-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jv-footer-accent) 12%, transparent); }

.jv-toggle { display: inline-flex; align-items: center; gap: 6px; color: #475569; font-size: 12px; white-space: nowrap; }
.jv-toggle input { width: 16px !important; height: 16px; }
.jv-row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.jv-row-move { display: inline-flex; flex-direction: column; gap: 4px; }
.jv-row-move button { width: 28px; height: 24px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; cursor: pointer; color: #475569; }
.jv-row-move button:hover { border-color: var(--jv-footer-accent); color: var(--jv-footer-accent); background: #fff; }
.jv-row-remove { width: 30px; height: 30px; font-size: 16px; }

.jv-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.jv-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jv-field label { display: block; margin-bottom: 6px; color: #475569; font-size: 12px; font-weight: 700; }
.jv-field small { display: block; margin-top: 4px; color: #94a3b8; line-height: 1.5; }

.jv-component-toolbar { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.jv-component-card { display: grid; gap: 12px; }
.jv-component-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.jv-component-title { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #0f172a; }
.jv-component-desc { color: #64748b; font-size: 12px; }
.jv-sub-list { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.jv-sub-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; align-items: center; }

.jv-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    z-index: 1000002;
    background: rgba(15, 23, 42, .9);
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .22);
}

@media screen and (max-width: 900px) {
    .jv-editor-panel { right: 12px; top: 12px; bottom: 12px; width: calc(100vw - 24px); }
    .jv-editor-row,
    .jv-editor-row.compact,
    .jv-editor-row.action-row { grid-template-columns: 1fr; }
    .jv-row-move { flex-direction: row; }
    .jv-row-actions { justify-content: flex-start; }
    .jv-form-grid,
    .jv-form-grid.three { grid-template-columns: 1fr; }
}

@media screen and (max-width: 600px) {
    .global-action-sidebar,
    .jv-action-sidebar { bottom: 76px; right: 14px; gap: 10px; }
    .action-btn-item { width: 44px; height: 44px; }
    .action-icon { font-size: 13px; }
    .action-text { display: none; }
    .btn-to-home .action-icon { font-size: 16px; }
    .footer-nav,
    .jv-footer-nav { gap: 10px 15px; }
    .footer-nav a { font-size: 13px; }
    .jv-footer-widget { width: 100%; justify-content: center; border-radius: 14px; }
    .jv-footer-config-toggle { right: 14px; bottom: 16px; padding: 9px 12px; }
    .jv-editor-header { align-items: flex-start; }
    .jv-editor-tabs { padding-left: 10px; padding-right: 10px; }
    .jv-editor-body { padding: 12px; }
    .jv-editor-footer { flex-direction: column-reverse; }
    .jv-editor-primary,
    .jv-editor-secondary { width: 100%; }
}
