/* ================================================================
   PROJECTKART — ADMIN FORMS
   Premium dark admin form system
================================================================ */

.admin-form {
    width: 100%;
}

.admin-form-section {
    margin-bottom: 28px;
    padding: 24px;
    background: var(--color-surface, #0d1118);
    border: 1px solid var(--color-border, #1b2430);
    border-radius: 18px;
}

.admin-form-section:last-child {
    margin-bottom: 0;
}

.admin-form-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-form-section__title {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-form-section__description {
    margin: 6px 0 0;
    max-width: 680px;
    color: #7f8b9c;
    font-size: 13px;
    line-height: 1.6;
}

/* ------------------------------------------------
   FORM GRID
------------------------------------------------ */

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-form-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-form-field--full {
    grid-column: 1 / -1;
}

/* ------------------------------------------------
   FIELD
------------------------------------------------ */

.admin-form-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-form-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    color: #dce3ec;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.admin-form-required {
    color: #4d8dff;
}

.admin-form-help {
    margin-top: 7px;
    color: #6f7b8c;
    font-size: 12px;
    line-height: 1.5;
}

.admin-form-error {
    display: none;
    margin-top: 7px;
    color: #ff7373;
    font-size: 12px;
    line-height: 1.5;
}

.admin-form-field.has-error .admin-form-error {
    display: block;
}

.admin-form-field.has-error .admin-input,
.admin-form-field.has-error .admin-textarea,
.admin-form-field.has-error .admin-select {
    border-color: rgba(255, 91, 91, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 91, 91, 0.08);
}

/* ------------------------------------------------
   INPUTS
------------------------------------------------ */

.admin-input,
.admin-select,
.admin-textarea {
    width: 100%;
    border: 1px solid #202a37;
    outline: none;
    border-radius: 11px;
    background: #090d13;
    color: #f3f6fa;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.admin-input,
.admin-select {
    min-height: 44px;
    padding: 0 13px;
}

.admin-textarea {
    min-height: 130px;
    padding: 12px 13px;
    resize: vertical;
}

.admin-input::placeholder,
.admin-textarea::placeholder {
    color: #596575;
}

.admin-input:hover,
.admin-select:hover,
.admin-textarea:hover {
    border-color: #2b3747;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
    border-color: rgba(40, 120, 255, 0.85);
    background: #0a0f16;
    box-shadow:
        0 0 0 3px rgba(40, 120, 255, 0.10),
        0 0 22px rgba(40, 120, 255, 0.06);
}

.admin-input:disabled,
.admin-select:disabled,
.admin-textarea:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* ------------------------------------------------
   SELECT
------------------------------------------------ */

.admin-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    cursor: pointer;

    background-image:
        linear-gradient(45deg, transparent 50%, #758296 50%),
        linear-gradient(135deg, #758296 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 18px,
        calc(100% - 12px) 18px;
    background-size:
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
}

.admin-select option {
    background: #0d1118;
    color: #ffffff;
}

/* ------------------------------------------------
   INPUT WITH PREFIX / SUFFIX
------------------------------------------------ */

.admin-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-input-group .admin-input {
    padding-left: 42px;
}

.admin-input-group--suffix .admin-input {
    padding-right: 55px;
}

.admin-input-prefix,
.admin-input-suffix {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #667386;
    font-size: 13px;
    pointer-events: none;
}

.admin-input-prefix {
    left: 13px;
}

.admin-input-suffix {
    right: 13px;
}

/* ------------------------------------------------
   PRICE INPUT
------------------------------------------------ */

.admin-price-input {
    position: relative;
}

.admin-price-input .admin-input {
    padding-left: 32px;
}

.admin-price-symbol {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: #7e8a9b;
    font-size: 13px;
    pointer-events: none;
}

/* ------------------------------------------------
   SEARCH FIELD
------------------------------------------------ */

.admin-search-field {
    position: relative;
    width: 100%;
}

.admin-search-field .admin-input {
    padding-left: 40px;
}

.admin-search-field__icon {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 16px;
    height: 16px;
    color: #687587;
    transform: translateY(-50%);
    pointer-events: none;
}

.admin-search-field__clear {
    position: absolute;
    top: 50%;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #738094;
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        color 150ms ease,
        background-color 150ms ease;
}

.admin-search-field__clear:hover {
    background: #151c26;
    color: #ffffff;
}

/* ------------------------------------------------
   CHECKBOX
------------------------------------------------ */

.admin-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.admin-checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.admin-checkbox__box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid #354152;
    border-radius: 5px;
    background: #090d13;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.admin-checkbox__box::after {
    width: 8px;
    height: 4px;
    border-bottom: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    content: "";
    opacity: 0;
    transform: rotate(-45deg) translateY(-1px);
    transition: opacity 140ms ease;
}

.admin-checkbox input:checked + .admin-checkbox__box {
    border-color: #2878ff;
    background: #2878ff;
    box-shadow: 0 0 15px rgba(40, 120, 255, 0.20);
}

.admin-checkbox input:checked + .admin-checkbox__box::after {
    opacity: 1;
}

.admin-checkbox input:focus-visible + .admin-checkbox__box {
    box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.15);
}

.admin-checkbox__label {
    color: #cbd4df;
    font-size: 13px;
    line-height: 1.4;
}

/* ------------------------------------------------
   RADIO
------------------------------------------------ */

.admin-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.admin-radio input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.admin-radio__circle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid #354152;
    border-radius: 50%;
    background: #090d13;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.admin-radio__circle::after {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2878ff;
    content: "";
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 140ms ease, transform 140ms ease;
}

.admin-radio input:checked + .admin-radio__circle {
    border-color: #2878ff;
    box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.08);
}

.admin-radio input:checked + .admin-radio__circle::after {
    opacity: 1;
    transform: scale(1);
}

.admin-radio__label {
    color: #cbd4df;
    font-size: 13px;
}

/* ------------------------------------------------
   TOGGLE
------------------------------------------------ */

.admin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    user-select: none;
}

.admin-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.admin-toggle__track {
    position: relative;
    width: 40px;
    height: 22px;
    flex: 0 0 40px;
    border: 1px solid #303b4a;
    border-radius: 999px;
    background: #151b24;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.admin-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #7b8798;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transition:
        transform 180ms ease,
        background-color 180ms ease;
}

.admin-toggle input:checked + .admin-toggle__track {
    border-color: #2878ff;
    background: #2878ff;
    box-shadow: 0 0 16px rgba(40, 120, 255, 0.18);
}

.admin-toggle input:checked + .admin-toggle__track .admin-toggle__thumb {
    background: #ffffff;
    transform: translateX(18px);
}

.admin-toggle input:focus-visible + .admin-toggle__track {
    box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.13);
}

.admin-toggle__text {
    color: #cbd4df;
    font-size: 13px;
}

/* ------------------------------------------------
   CHECKBOX / RADIO GROUPS
------------------------------------------------ */

.admin-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
}

.admin-choice-group--vertical {
    flex-direction: column;
    align-items: flex-start;
}

/* ------------------------------------------------
   IMAGE UPLOAD
------------------------------------------------ */

.admin-upload {
    position: relative;
    width: 100%;
    min-height: 190px;
    border: 1px dashed #334052;
    border-radius: 14px;
    background: #090d13;
    transition:
        border-color 180ms ease,
        background-color 180ms ease,
        box-shadow 180ms ease;
}

.admin-upload:hover,
.admin-upload.is-dragging {
    border-color: rgba(40, 120, 255, 0.75);
    background: rgba(40, 120, 255, 0.035);
    box-shadow: inset 0 0 30px rgba(40, 120, 255, 0.025);
}

.admin-upload input[type="file"] {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.admin-upload__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 25px;
    text-align: center;
    pointer-events: none;
}

.admin-upload__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    border: 1px solid #263241;
    border-radius: 13px;
    background: #10161f;
    color: #5e9bff;
}

.admin-upload__title {
    margin: 0 0 5px;
    color: #e7ecf2;
    font-size: 13px;
    font-weight: 650;
}

.admin-upload__text {
    margin: 0;
    color: #697688;
    font-size: 12px;
    line-height: 1.5;
}

.admin-upload__browse {
    color: #4d91ff;
    font-weight: 600;
}

.admin-upload__hint {
    margin-top: 8px;
    color: #505c6c;
    font-size: 11px;
}

/* ------------------------------------------------
   IMAGE PREVIEW
------------------------------------------------ */

.admin-image-preview {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 1px solid #222d3a;
    border-radius: 14px;
    background: #090d13;
}

.admin-image-preview img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    background: #0a0e14;
}

.admin-image-preview__remove {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    background: rgba(5, 8, 12, 0.82);
    color: #d9e0e8;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition:
        background-color 150ms ease,
        color 150ms ease,
        border-color 150ms ease;
}

.admin-image-preview__remove:hover {
    border-color: rgba(255, 91, 91, 0.35);
    background: rgba(130, 25, 25, 0.8);
    color: #ff8888;
}

/* ------------------------------------------------
   FORM ACTIONS
------------------------------------------------ */

.admin-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #1b2430;
}

.admin-form-actions--between {
    justify-content: space-between;
}

.admin-form-actions__left,
.admin-form-actions__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-form-actions__left {
    margin-right: auto;
}

/* ------------------------------------------------
   INLINE FORM
------------------------------------------------ */

.admin-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.admin-inline-form .admin-form-field {
    flex: 1;
}

/* ------------------------------------------------
   PRODUCT SLUG
------------------------------------------------ */

.admin-slug-preview {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    margin-top: 7px;
    padding: 0 10px;
    border: 1px solid #1d2632;
    border-radius: 8px;
    background: #080c12;
    color: #687587;
    font-family: monospace;
    font-size: 11px;
    overflow: hidden;
}

.admin-slug-preview span:last-child {
    color: #8995a5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------------------------------------------------
   FORM NOTICE
------------------------------------------------ */

.admin-form-notice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid #202d3c;
    border-radius: 11px;
    background: rgba(40, 120, 255, 0.035);
}

.admin-form-notice__icon {
    flex: 0 0 auto;
    color: #5595ff;
}

.admin-form-notice__content {
    min-width: 0;
}

.admin-form-notice__title {
    margin: 0 0 3px;
    color: #dbe5f1;
    font-size: 12px;
    font-weight: 650;
}

.admin-form-notice__text {
    margin: 0;
    color: #748195;
    font-size: 11px;
    line-height: 1.55;
}

/* ------------------------------------------------
   RESPONSIVE
------------------------------------------------ */

@media (max-width: 1000px) {
    .admin-form-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-form-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .admin-form-section {
        padding: 18px;
        border-radius: 15px;
    }

    .admin-form-section__header {
        flex-direction: column;
        gap: 10px;
    }

    .admin-form-grid,
    .admin-form-grid--three,
    .admin-form-grid--four {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .admin-form-field--full {
        grid-column: auto;
    }

    .admin-inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-form-actions,
    .admin-form-actions--between {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .admin-form-actions__left,
    .admin-form-actions__right {
        width: 100%;
        margin: 0;
    }

    .admin-form-actions__left > *,
    .admin-form-actions__right > * {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .admin-form-section {
        padding: 15px;
    }

    .admin-choice-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-upload,
    .admin-upload__content {
        min-height: 165px;
    }
}
/* ================================================================
   PRODUCT / COMPONENT EDITOR
   Matches classes used by admin/product-edit.html
================================================================ */

.admin-body {
    margin: 0;
    min-height: 100vh;
    background: #07090d;
    color: #e8eef8;
}

.admin-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.admin-button:hover {
    transform: translateY(-1px);
}

.admin-button-primary {
    background: linear-gradient(180deg, #3b86ff, #1768ed);
    box-shadow: 0 10px 24px rgba(40, 120, 255, 0.28);
}

.admin-button-primary:hover {
    background: linear-gradient(180deg, #4d91ff, #1f72f3);
}

.admin-button-secondary {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.admin-button-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.admin-button-danger {
    background: rgba(227, 90, 90, 0.92);
    color: #fff;
}

.admin-button-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
}

.admin-button-full {
    width: 100%;
}

.admin-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.admin-button-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: adminSpin 0.7s linear infinite;
}

@keyframes adminSpin {
    to { transform: rotate(360deg); }
}

.admin-form-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.admin-form-page-header h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.admin-form-page-header p {
    max-width: 560px;
    margin: 8px 0 0;
    color: #8b97ab;
    font-size: 14px;
    line-height: 1.65;
}

.admin-form-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.admin-product-form {
    width: 100%;
}

.admin-product-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.admin-product-form-main,
.admin-product-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.admin-form-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: #0c1118;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.admin-form-card-header {
    padding: 22px 24px 0;
}

.admin-form-card-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.admin-form-card-header p {
    margin: 6px 0 0;
    color: #8b97ab;
    font-size: 13px;
    line-height: 1.55;
}

.admin-form-card-body {
    padding: 20px 24px 24px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.admin-form-group + .admin-form-group {
    margin-top: 16px;
}

.admin-form-grid .admin-form-group + .admin-form-group {
    margin-top: 0;
}

.admin-form-group label {
    color: #c5d0e0;
    font-size: 12px;
    font-weight: 650;
}

.admin-form-group label span {
    color: #6ea0ff;
}

.admin-form-group small,
.admin-character-count {
    color: #6e7b90;
    font-size: 11px;
    line-height: 1.5;
}

.admin-form-group input[type="text"],
.admin-form-group input[type="email"],
.admin-form-group input[type="url"],
.admin-form-group input[type="number"],
.admin-form-group input[type="tel"],
.admin-form-group select,
.admin-form-group textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: #10151d;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.admin-form-group textarea {
    min-height: 140px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.55;
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
    border-color: rgba(40, 120, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(40, 120, 255, 0.12);
}

.admin-form-group input[readonly] {
    color: #b7c2d3;
    background: #0c1118;
}

.admin-form-group select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #8b97ab 50%),
        linear-gradient(135deg, #8b97ab 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 22px,
        calc(100% - 12px) 22px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.admin-input-with-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.admin-input-action {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #8eb4ff;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.admin-input-action:hover {
    background: rgba(40, 120, 255, 0.12);
}

.admin-price-field {
    position: relative;
    display: block;
    width: 100%;
}

.admin-price-field__symbol {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 2;
    transform: translateY(-50%);
    color: #8b97ab;
    font-size: 14px;
    font-weight: 650;
    pointer-events: none;
}

.admin-price-field__input,
.admin-form-group .admin-price-field__input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 0 14px 0 36px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    background: #10151d !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: none !important;
}

.admin-price-field__input:focus,
.admin-form-group .admin-price-field__input:focus {
    border-color: rgba(40, 120, 255, 0.75) !important;
    box-shadow: 0 0 0 4px rgba(40, 120, 255, 0.14) !important;
}

.admin-form-group input[type="number"] {
    -moz-appearance: textfield;
}

.admin-form-group input[type="number"]::-webkit-outer-spin-button,
.admin-form-group input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
}

.admin-image-upload {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(40, 120, 255, 0.1), transparent 55%),
        #0a0f16;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background-color 160ms ease;
}

.admin-image-upload.is-dragging,
.admin-image-upload:hover {
    border-color: rgba(40, 120, 255, 0.55);
    background:
        radial-gradient(circle at 50% 0%, rgba(40, 120, 255, 0.16), transparent 55%),
        #0b121b;
}

.admin-image-upload-content {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.admin-image-upload-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    border-radius: 14px;
    background: rgba(40, 120, 255, 0.12);
    color: #8eb4ff;
    font-size: 22px;
}

.admin-image-upload-content strong {
    color: #fff;
    font-size: 15px;
}

.admin-image-upload-content p {
    margin: 0;
    max-width: 320px;
    color: #8b97ab;
    font-size: 13px;
    line-height: 1.5;
}

.admin-image-upload-content span {
    color: #6e7b90;
    font-size: 11px;
}

.admin-image-preview {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #090d13;
}

.admin-image-preview img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.admin-image-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.admin-upload-progress {
    margin-top: 14px;
}

.admin-upload-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #8b97ab;
    font-size: 12px;
}

.admin-progress {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.admin-progress-value {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2878ff, #5b9dff);
}

.admin-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
}

.admin-switch-row > span:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-switch-row strong {
    color: #fff;
    font-size: 13px;
    font-weight: 650;
}

.admin-switch-row small {
    color: #8b97ab;
    font-size: 12px;
    line-height: 1.45;
}

.admin-switch-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 160ms ease;
}

.admin-switch i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 160ms ease;
}

.admin-switch-row input:checked + .admin-switch {
    background: #2878ff;
}

.admin-switch-row input:checked + .admin-switch i {
    transform: translateX(20px);
}

.admin-form-divider {
    height: 1px;
    margin: 18px 0;
    background: rgba(255, 255, 255, 0.08);
}

.admin-product-preview {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: #0a0f16;
}

.admin-product-preview-image {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 0.85;
    background: #10151d;
    color: #6e7b90;
    font-size: 12px;
}

.admin-product-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-preview-content {
    padding: 16px;
}

.admin-product-preview-category {
    display: block;
    margin-bottom: 6px;
    color: #6ea0ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-product-preview-content h4 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-product-preview-content p {
    margin: 8px 0 0;
    color: #8b97ab;
    font-size: 12px;
    line-height: 1.55;
}

.admin-product-preview-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 14px;
}

.admin-product-preview-price strong {
    color: #fff;
    font-size: 18px;
}

.admin-product-preview-price del {
    color: #6e7b90;
    font-size: 13px;
}

.admin-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #8b97ab;
    font-size: 12px;
}

.admin-meta-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-meta-row:first-child {
    padding-top: 0;
}

.admin-meta-row code,
.admin-meta-row strong {
    color: #fff;
    font-size: 12px;
}

.admin-product-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    padding: 18px 0 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-form-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-form-status {
    min-height: 1.2em;
    color: #8b97ab;
    font-size: 13px;
}

.admin-form-status[data-status="error"] {
    color: #ff8b8b;
}

.admin-form-status[data-status="success"] {
    color: #7ddea0;
}

.admin-form-status[data-status="info"] {
    color: #8eb4ff;
}

.admin-page-loading,
.admin-page-error {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 280px;
    padding: 40px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: #0c1118;
    text-align: center;
}

.admin-loading-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: #2878ff;
    border-radius: 50%;
    animation: adminSpin 0.7s linear infinite;
}

.admin-page-error strong {
    color: #fff;
    font-size: 18px;
}

.admin-page-error p {
    margin: 0;
    color: #8b97ab;
}

.admin-modal[hidden],
.admin-page-loading[hidden],
.admin-page-error[hidden],
.admin-image-preview[hidden],
.admin-upload-progress[hidden],
[data-product-meta-card][hidden] {
    display: none !important;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.admin-modal-dialog {
    position: relative;
    width: min(100%, 420px);
    padding: 28px 24px 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: #0c1118;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.admin-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8b97ab;
    font-size: 22px;
    cursor: pointer;
}

.admin-modal-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 14px;
    font-size: 22px;
    font-weight: 700;
}

.admin-modal-icon-danger {
    background: rgba(227, 90, 90, 0.12);
    color: #ff8b8b;
}

.admin-modal-dialog h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

.admin-modal-dialog p {
    margin: 10px 0 0;
    color: #8b97ab;
    font-size: 14px;
    line-height: 1.6;
}

.admin-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

@media (max-width: 1100px) {
    .admin-product-form-layout {
        grid-template-columns: 1fr;
    }

    .admin-product-form-sidebar {
        order: -1;
    }
}

@media (max-width: 720px) {
    .admin-form-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-form-card-header,
    .admin-form-card-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-product-form-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .admin-form-footer-actions {
        flex-direction: column-reverse;
    }

    .admin-form-footer-actions .admin-button {
        width: 100%;
    }

    .admin-input-with-action {
        grid-template-columns: 1fr;
    }
}


.admin-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-image-gallery[hidden] {
    display: none !important;
}

.admin-image-gallery__item {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: #0a0e14;
}

.admin-image-gallery__item.is-primary {
    border-color: rgba(40, 120, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(40, 120, 255, 0.25);
}

.admin-image-gallery__item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.admin-image-gallery__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
}

.admin-image-gallery__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(40, 120, 255, 0.18);
    color: #8eb4ff;
    font-size: 11px;
    font-weight: 700;
}

.admin-image-gallery__btn {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #d7e3f5;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.admin-image-gallery__btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-image-gallery__btn--danger {
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}
