/* ==========================================================================
   RCH London admin — modern form kit
   Shared by product / category / post editors.
   ========================================================================== */

:root {
    --vz-ink: #0f172a;
    --vz-muted: #64748b;
    --vz-line: #e2e8f0;
    --vz-line-soft: #eef2f7;
    --vz-brand: #0ea472;
    --vz-brand-soft: #e7f7f0;
    --vz-radius: 14px;
    --vz-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
}

/* ------------------------------------------------------------------ layout */

.vz-form {
    --vz-gutter: 1.25rem;
}

.vz-form__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--vz-gutter);
    align-items: start;
}

@media (max-width: 1199.98px) {
    .vz-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.vz-form__side {
    position: sticky;
    top: 1rem;
    display: grid;
    gap: var(--vz-gutter);
    min-width: 0;
}

@media (max-width: 1199.98px) {
    .vz-form__side {
        position: static;
    }
}

/* ------------------------------------------------------------------- panel */

.vz-panel {
    background: #fff;
    border: 1px solid var(--vz-line);
    border-radius: var(--vz-radius);
    box-shadow: var(--vz-shadow);
    overflow: hidden;
}

.vz-panel + .vz-panel {
    margin-top: var(--vz-gutter);
}

.vz-panel__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--vz-line-soft);
    background: linear-gradient(180deg, #fbfdff, #f6f8fb);
}

.vz-panel__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--vz-brand-soft);
    color: var(--vz-brand);
    font-size: 0.95rem;
}

.vz-panel__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--vz-ink);
    letter-spacing: -0.01em;
}

.vz-panel__sub {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: var(--vz-muted);
    line-height: 1.35;
}

.vz-panel__body {
    padding: 1.15rem;
}

.vz-panel__body > .vz-row:last-child > [class*='vz-col']:last-child .form-group,
.vz-panel__body > .vz-row:last-child .form-group:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------- tabs */

.vz-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: var(--vz-gutter);
    padding: 0.4rem;
    background: #fff;
    border: 1px solid var(--vz-line);
    border-radius: var(--vz-radius);
    box-shadow: var(--vz-shadow);
}

.vz-tabs__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--vz-muted);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.vz-tabs__btn i {
    font-size: 0.8rem;
    opacity: 0.85;
}

.vz-tabs__btn:hover {
    background: #f1f5f9;
    color: var(--vz-ink);
}

.vz-tabs__btn.is-active {
    background: var(--vz-ink);
    color: #fff;
}

.vz-tabs__btn.is-active i {
    opacity: 1;
}

.vz-tabpane[hidden] {
    display: none !important;
}

/* -------------------------------------------------------------------- grid */

.vz-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0 1rem;
}

.vz-col-3,
.vz-col-4,
.vz-col-6,
.vz-col-8,
.vz-col-9,
.vz-col-12 {
    min-width: 0;
}

.vz-col-3 { grid-column: span 3; }
.vz-col-4 { grid-column: span 4; }
.vz-col-6 { grid-column: span 6; }
.vz-col-8 { grid-column: span 8; }
.vz-col-9 { grid-column: span 9; }
.vz-col-12 { grid-column: span 12; }

@media (max-width: 991.98px) {
    .vz-col-3 { grid-column: span 6; }
    .vz-col-4 { grid-column: span 6; }
}

@media (max-width: 575.98px) {
    .vz-col-3,
    .vz-col-4,
    .vz-col-6,
    .vz-col-8,
    .vz-col-9 {
        grid-column: span 12;
    }
}

/* ------------------------------------------------------------------ inputs */

.vz-form .form-group {
    margin-bottom: 1.05rem;
}

.vz-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.01em;
    text-transform: none;
}

.vz-label__req {
    color: #dc3545;
    font-weight: 700;
}

.vz-label__opt {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.vz-form .form-control,
.vz-form .custom-select {
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #fbfdff;
    color: var(--vz-ink);
    font-size: 0.9rem;
    box-shadow: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.vz-form .form-control:not(textarea):not(.form-control-sm) {
    height: calc(2.45rem + 2px);
}

.vz-form .form-control:focus,
.vz-form .custom-select:focus {
    background: #fff;
    border-color: var(--vz-brand);
    box-shadow: 0 0 0 3px rgba(14, 164, 114, 0.14);
}

.vz-form textarea.form-control {
    line-height: 1.55;
    min-height: 90px;
}

.vz-form textarea.vz-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
}

.vz-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--vz-muted);
}

.vz-hint code {
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.74rem;
}

.vz-form .input-group-text {
    border: 1px solid #dbe3ec;
    border-radius: 10px 0 0 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
}

.vz-form .input-group > .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.vz-form .input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.vz-form .input-group-append .input-group-text {
    border-radius: 0 10px 10px 0;
}

.vz-form .is-invalid,
.vz-form .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.vz-form .invalid-feedback {
    font-size: 0.76rem;
}

/* ----------------------------------------------------------------- toggles */

.vz-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.55rem;
}

.vz-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--vz-line);
    border-radius: 11px;
    background: #fbfdff;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
    margin: 0;
}

.vz-toggle:hover {
    border-color: #cbd5e1;
}

.vz-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vz-toggle__box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #fff;
    font-size: 0.65rem;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.vz-toggle__box i {
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.vz-toggle__text {
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.25;
}

.vz-toggle input:checked ~ .vz-toggle__box {
    background: var(--vz-brand);
    border-color: var(--vz-brand);
}

.vz-toggle input:checked ~ .vz-toggle__box i {
    opacity: 1;
    transform: scale(1);
}

.vz-toggle input:checked ~ .vz-toggle__text {
    color: var(--vz-ink);
}

.vz-toggle:has(input:checked) {
    border-color: rgba(14, 164, 114, 0.45);
    background: var(--vz-brand-soft);
}

.vz-toggle input:focus-visible ~ .vz-toggle__box {
    box-shadow: 0 0 0 3px rgba(14, 164, 114, 0.2);
}

/* ------------------------------------------------------- image field (one) */

.vz-field__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.vz-field__label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
}

.vz-field__count {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
}

.vz-field__actions {
    display: inline-flex;
    gap: 0.3rem;
}

.vz-field__actions .btn {
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
}

.vz-field__progress {
    height: 4px;
    margin-top: 0.5rem;
    border-radius: 999px;
}

.vz-field__progress .progress-bar {
    background-color: var(--vz-brand);
}

.vz-field__path {
    margin: 0.45rem 0 0;
    overflow: hidden;
}

.vz-field__path code {
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

.vz-field__manual {
    margin-top: 0.45rem;
    border-radius: 9px !important;
    font-size: 0.78rem !important;
}

.vz-field__help {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--vz-muted);
}

.vz-imgfield__drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: var(--vz-ratio, 4 / 5);
    max-height: 320px;
    overflow: hidden;
    cursor: pointer;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background:
        linear-gradient(45deg, #f8fafc 25%, transparent 25%) 0 0/16px 16px,
        linear-gradient(-45deg, #f8fafc 25%, transparent 25%) 0 8px/16px 16px,
        #fff;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.vz-imgfield__drop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
}

.vz-imgfield__drop.is-dragging {
    border-color: var(--vz-brand);
    background-color: var(--vz-brand-soft);
}

.vz-imgfield__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem;
    text-align: center;
    color: var(--vz-muted);
}

.vz-imgfield__empty i {
    font-size: 1.6rem;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.vz-imgfield__empty strong {
    font-size: 0.85rem;
    color: #475569;
}

.vz-imgfield__empty span {
    font-size: 0.74rem;
}

.vz-imgfield__badge {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.16s ease;
    pointer-events: none;
}

.vz-imgfield:hover .vz-imgfield__badge {
    opacity: 1;
}

.vz-imgfield.is-busy,
.vz-gallery.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

/* -------------------------------------------------------- gallery (many) */

.vz-gallery__drop {
    position: relative;
    padding: 0.6rem;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fbfdff;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.vz-gallery__drop.is-dragging {
    border-color: var(--vz-brand);
    background: var(--vz-brand-soft);
}

.vz-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 0.5rem;
}

.vz-gallery__grid:empty {
    display: none;
}

.vz-gallery__cell {
    position: relative;
    border: 1px solid var(--vz-line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    cursor: grab;
    transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.vz-gallery__cell:hover {
    border-color: #94a3b8;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
}

.vz-gallery__cell.is-dragging {
    opacity: 0.45;
}

.vz-gallery__cell.is-drop-target {
    border-color: var(--vz-brand);
    transform: translateY(-2px);
}

.vz-gallery__cell img {
    display: block;
    width: 100%;
    height: 92px;
    object-fit: cover;
    background: #f1f5f9;
}

.vz-gallery__order {
    position: absolute;
    top: 4px;
    left: 4px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
}

.vz-gallery__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 0.66rem;
    line-height: 1;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.16s ease;
}

.vz-gallery__cell:hover .vz-gallery__remove {
    opacity: 1;
}

.vz-gallery__name {
    display: block;
    padding: 0.25rem 0.35rem;
    border-top: 1px solid var(--vz-line-soft);
    color: #64748b;
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vz-gallery__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 1.4rem 1rem;
    text-align: center;
    color: var(--vz-muted);
    cursor: pointer;
}

.vz-gallery__empty i {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.vz-gallery__empty strong {
    font-size: 0.85rem;
    color: #475569;
}

.vz-gallery__empty span {
    font-size: 0.74rem;
}

/* ------------------------------------------------------- library modal */

.vz-media-modal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
}

.vz-media-modal .modal-header {
    border-bottom: 1px solid var(--vz-line-soft);
    background: #f8fafc;
}

.vz-media-modal .modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vz-ink);
}

.vz-media-modal__grid {
    max-height: 56vh;
    overflow-y: auto;
}

.vz-media-modal__item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f1f5f9;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.vz-media-modal__item img {
    display: block;
    width: 100%;
    height: 88px;
    object-fit: cover;
}

.vz-media-modal__item:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.vz-media-modal__check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--vz-brand);
    color: #fff;
    font-size: 0.66rem;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.vz-media-modal__item.is-selected {
    border-color: var(--vz-brand);
}

.vz-media-modal__item.is-selected .vz-media-modal__check {
    opacity: 1;
    transform: scale(1);
}

/* ---------------------------------------------------------- sticky actions */

.vz-actionbar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: var(--vz-gutter);
    padding: 0.75rem 1.1rem;
    border: 1px solid var(--vz-line);
    border-radius: var(--vz-radius);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    box-shadow: 0 -6px 26px rgba(15, 23, 42, 0.09);
}

.vz-actionbar__note {
    margin: 0;
    font-size: 0.78rem;
    color: var(--vz-muted);
}

.vz-actionbar .btn {
    border-radius: 10px;
    font-weight: 600;
}

.vz-actionbar__save {
    padding: 0.5rem 1.4rem;
    background: var(--vz-brand);
    border-color: var(--vz-brand);
    color: #fff;
}

.vz-actionbar__save:hover,
.vz-actionbar__save:focus {
    background: #0b8a60;
    border-color: #0b8a60;
    color: #fff;
}

/* --------------------------------------------------------------- side card */

.vz-side__stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--vz-line-soft);
    font-size: 0.8rem;
}

.vz-side__stat:last-child {
    border-bottom: 0;
}

.vz-side__stat span:first-child {
    color: var(--vz-muted);
}

.vz-side__stat span:last-child {
    font-weight: 700;
    color: var(--vz-ink);
}

/* ------------------------------------------------------------ review table */

.vz-review-form {
    padding: 1rem;
    border: 1px solid var(--vz-line);
    border-radius: 12px;
    background: #fbfdff;
}

.vz-table {
    margin-bottom: 0;
}

.vz-table thead th {
    border-top: 0;
    border-bottom: 1px solid var(--vz-line);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.vz-table td {
    vertical-align: middle;
    font-size: 0.85rem;
}

/* Keep AdminLTE dark mode readable if it is ever enabled. */
.dark-mode .vz-panel,
.dark-mode .vz-tabs,
.dark-mode .vz-actionbar {
    background: #343a40;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .vz-panel__head {
    background: #3a4148;
    border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .vz-panel__title,
.dark-mode .vz-label,
.dark-mode .vz-toggle__text {
    color: #f8f9fa;
}
