﻿.df-wrap {
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.df-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.df-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.df-subtitle {
    font-size: .82rem;
    color: #9ca3af;
    margin-top: 2px;
}

.df-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

.df-label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .35rem;
    display: block;
}

.df-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .9rem;
    color: #111827;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}

    .df-input:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99,102,241,.1);
    }

.df-row {
    margin-bottom: 1.1rem;
}

.df-check-wrap {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
}

    .df-check-wrap input[type="checkbox"] {
        cursor: pointer;
        width: 16px;
        height: 16px;
        accent-color: #6366f1;
    }

.df-check-label {
    font-size: .88rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.df-select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .9rem;
    color: #111827;
    outline: none;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s;
}

    .df-select:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99,102,241,.1);
    }

.df-file-wrap {
    border: 1.5px dashed #e5e7eb;
    border-radius: 8px;
    padding: .75rem 1rem;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color .15s;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: #6366f1;
    font-weight: 600;
}

    .df-file-wrap:hover {
        border-color: #6366f1;
    }

.df-file-preview {
    margin-top: .75rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

    .df-file-preview img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }

.df-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .85rem;
    margin-top: 1rem;
}

.df-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1.5rem;
}

.btn-df-save {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .55rem 2rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .btn-df-save:hover {
        background: #4f46e5;
    }

.btn-df-cancel {
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    padding: .55rem 1.5rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .btn-df-cancel:hover {
        background: #e5e7eb;
    }

.btn-df-delete {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: .3rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .btn-df-delete:hover {
        background: #fee2e2;
    }

/* Translations */
.trans-wrap {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.trans-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    background: #f9fafb;
}

.trans-tab {
    padding: .55rem 1.1rem;
    font-size: .82rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}

    .trans-tab:hover {
        color: #374151;
    }

    .trans-tab.active {
        color: #6366f1;
        border-bottom-color: #6366f1;
    }

.trans-content {
    padding: 1rem;
}

/* Loading */
.df-loading {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
    font-size: .9rem;
}

.df-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 1rem;
}

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



/********************List************************/
.dl-wrap { padding: 1.5rem 1rem; }

    .dl-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.75rem;
        flex-wrap: wrap;
        gap: .75rem;
    }

    .dl-title { font-size: 1.25rem; font-weight: 700; color: #111827; }
    .dl-subtitle { font-size: .82rem; color: #9ca3af; margin-top: 2px; }

    .btn-dl-add {
        background: #6366f1;
        color: #fff;
        border: none;
        border-radius: 8px;
        padding: .55rem 1.25rem;
        font-size: .88rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: .4rem;
        transition: background .15s;
        text-decoration: none;
    }

    .btn-dl-add:hover { background: #4f46e5; color: #fff; }

    .dl-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        margin-bottom: 1.25rem;
        flex-wrap: wrap;
    }

    .dl-search {
        display: flex;
        align-items: center;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: .45rem .9rem;
        gap: .5rem;
        flex: 1;
        max-width: 360px;
    }

    .dl-search input {
        border: none;
        outline: none;
        font-size: .88rem;
        background: transparent;
        width: 100%;
        color: #374151;
    }

    .dl-search-icon { color: #9ca3af; }

    .dl-page-size {
        display: flex;
        align-items: center;
        gap: .5rem;
        font-size: .82rem;
        color: #6b7280;
        white-space: nowrap;
    }

    .dl-select {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: .4rem .6rem;
        font-size: .82rem;
        color: #374151;
        background: #fff;
        cursor: pointer;
        outline: none;
    }

    .dl-card {
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        overflow: hidden;
    }

    .dl-table {
        width: 100%;
        border-collapse: collapse;
        font-size: .88rem;
    }

    .dl-table thead tr {
        background: #f9fafb;
        border-bottom: 1px solid #e9ecef;
    }

    .dl-table thead th {
        padding: .75rem 1rem;
        font-size: .72rem;
        font-weight: 700;
        letter-spacing: .05em;
        text-transform: uppercase;
        color: #6b7280;
        text-align: right;
        white-space: nowrap;
    }

        .dl-table tbody tr {
            border-bottom: 1px solid #f3f4f6;
            transition: background .1s;
            white-space: nowrap;
        }

    .dl-table tbody tr:last-child { border-bottom: none;  }
    .dl-table tbody tr:hover { background: #f9fafb; }

    .dl-table tbody td {
        padding: .75rem 1rem;
        color: #374151;
        max-width: 200px;
        word-break: break-word;
        text-align: right;
    }

    .dl-cell-img {
        width: 48px;
        height: 48px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

.dl-actions {
    display: flex;
    align-items: center;
    gap: .4rem;
    justify-content: center;
    flex-wrap: nowrap;
}

    .btn-dl-edit {
        background: #eef2ff;
        color: #6366f1;
        border: none;
        border-radius: 6px;
        padding: .3rem .65rem;
        font-size: .8rem;
        cursor: pointer;
        transition: background .12s;
        font-weight: 600;
    }

    .btn-dl-edit:hover { background: #e0e7ff; }

    .btn-dl-delete {
        background: #fef2f2;
        color: #dc2626;
        border: none;
        border-radius: 6px;
        padding: .3rem .65rem;
        font-size: .8rem;
        cursor: pointer;
        transition: background .12s;
        font-weight: 600;
    }

    .btn-dl-delete:hover { background: #fee2e2; }

    .dl-empty {
        text-align: center;
        padding: 4rem 2rem;
        color: #9ca3af;
    }

    .dl-empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }
    .dl-empty p { font-size: .9rem; }

    .dl-loading {
        text-align: center;
        padding: 3rem;
        color: #9ca3af;
        font-size: .9rem;
    }

    .dl-spinner {
        width: 28px;
        height: 28px;
        border: 3px solid #e9ecef;
        border-top-color: #6366f1;
        border-radius: 50%;
        animation: spin .7s linear infinite;
        margin: 0 auto .75rem;
    }

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

    .dl-pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        padding: 1rem;
        border-top: 1px solid #f3f4f6;
    }

    .dl-page-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        background: #fff;
        color: #374151;
        font-size: .82rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all .12s;
        font-weight: 500;
    }

    .dl-page-btn:hover { background: #f3f4f6; }
    .dl-page-btn.active { background: #6366f1; color: #fff; border-color: #6366f1; }

    .dl-count {
        font-size: .78rem;
        color: #9ca3af;
        padding: 0 .5rem;
    }

    /********************Page Form************************/
.df-section-title {
    font-size: .78rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #e9ecef;
}

.slug-prefix {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    direction: rtl;
}

    .slug-prefix span {
        padding: .5rem .75rem;
        background: #f9fafb;
        font-size: .82rem;
        color: #9ca3af;
        border-right: 1px solid #e5e7eb;
        white-space: nowrap;
    }

.slug-input {
    flex: 1;
    border: none;
    padding: .5rem .75rem;
    font-size: .9rem;
    color: #111827;
    background: transparent;
    outline: none;
}

.df-textarea {
    min-height: 180px;
    resize: vertical;
}

.df-alert {
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .85rem;
    margin-top: 1rem;
}

    .df-alert.success {
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
        color: #16a34a;
    }

    .df-alert.danger {
        background: #fef2f2;
        border: 1px solid #fecaca;
        color: #dc2626;
    }
    /*********************Page List*****************************/
    .dl-slug {
    font-size: .8rem;
    color: #6b7280;
    font-family: monospace;
    background: #f3f4f6;
    padding: .15rem .45rem;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-head-title { font-size: 1rem; font-weight: 600; }

.btn-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
}

.modal-body { padding: 1.5rem; flex: 1; }

.modal-foot {
    display: flex;
    justify-content: flex-start;
    flex-direction: row-reverse;
    gap: .75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
}

.btn-modal-save {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .52rem 1.75rem;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-modal-cancel {
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    padding: .52rem 1.25rem;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
}

.df-textarea { min-height: 140px; resize: vertical; }

/***********************File Upload************************/
.fm-upload {
    border: 1.5px dashed #c7d2fe;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    background: #f5f3ff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    margin-bottom: 1.25rem;
}

    .fm-upload:hover {
        border-color: #6366f1;
        background: #ede9fe;
    }

.fm-upload-icon {
    font-size: 1.75rem;
    color: #a5b4fc;
    margin-bottom: .5rem;
}

.fm-upload-text {
    font-size: .85rem;
    color: #6366f1;
    font-weight: 600;
}

.fm-upload-sub {
    font-size: .75rem;
    color: #9ca3af;
    margin-top: .25rem;
}

.fm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.fm-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s, transform .15s;
}

    .fm-card:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,.08);
        transform: translateY(-2px);
    }

.fm-thumb {
    position: relative;
    height: 140px;
    background: #f3f4f6;
    overflow: hidden;
}

    .fm-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.fm-thumb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5rem;
}

.fm-thumb-doc {
    background: #fef2f2;
}

.fm-type-badge {
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 4px;
    padding: .15rem .4rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fm-badge-pdf {
    background: #dc2626;
}

.fm-body {
    padding: .85rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.fm-name {
    font-size: .82rem;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-meta {
    font-size: .75rem;
    color: #9ca3af;
}

.fm-actions {
    display: flex;
    gap: .4rem;
    margin-top: .6rem;
}

.btn-fm-view {
    flex: 1;
    background: #eef2ff;
    color: #6366f1;
    border: none;
    border-radius: 6px;
    padding: .3rem .5rem;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    transition: background .12s;
}

    .btn-fm-view:hover {
        background: #e0e7ff;
    }

.btn-fm-copy {
    background: #f0fdf4;
    color: #16a34a;
    border: none;
    border-radius: 6px;
    padding: .3rem .5rem;
    font-size: .78rem;
    cursor: pointer;
    transition: background .12s;
}

    .btn-fm-copy:hover {
        background: #dcfce7;
    }

.btn-fm-delete {
    background: #fef2f2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    padding: .3rem .5rem;
    font-size: .78rem;
    cursor: pointer;
    transition: background .12s;
}

    .btn-fm-delete:hover {
        background: #fee2e2;
    }
.fm-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f3ff;
    border: 1.5px solid #c7d2fe;
    border-radius: 12px;
    padding: .85rem 1.1rem;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.fm-preview-info {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.fm-preview-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.fm-preview-icon {
    font-size: 2rem;
}

.fm-preview-name {
    font-size: .88rem;
    font-weight: 500;
    color: #111827;
}

.fm-preview-size {
    font-size: .78rem;
    color: #9ca3af;
    margin-top: 2px;
}

.fm-preview-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.btn-fm-upload {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .45rem 1.25rem;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}

    .btn-fm-upload:hover {
        background: #4f46e5;
    }

    .btn-fm-upload:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

.btn-fm-discard {
    background: #fff;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .9rem;
    transition: background .12s;
}

    .btn-fm-discard:hover {
        background: #fef2f2;
        color: #dc2626;
        border-color: #fecaca;
    }

.fm-upload-msg {
    font-size: .82rem;
    font-weight: 500;
}

    .fm-upload-msg.success {
        color: #16a34a;
    }

    .fm-upload-msg.error {
        color: #dc2626;
    }

    /********************Widget Item Page*********************/
.wi-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 20px;
}

.wi-badge-active {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.wi-badge-inactive {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.wi-img-preview {
    position: relative;
    display: inline-block;
    margin-top: .5rem;
}

    .wi-img-preview img {
        width: 120px;
        height: 120px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        display: block;
    }

.wi-img-remove {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    border: none;
    font-size: .75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}


/************************Menu Item***************************/
.btn-mi-save {
    background: #f0fdf4;
    color: #16a34a;
    border: 0.5px solid #bbf7d0;
    border-radius: 8px;
    padding: .52rem 1.1rem;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}

    .btn-mi-save:hover {
        background: #dcfce7;
    }

.mi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mi-children {
    margin-right: 1.5rem;
    border-right: 2px solid #e9ecef;
    padding-right: .75rem;
    margin-top: .35rem;
}

.mi-item {
    margin-bottom: .35rem;
}

.mi-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    background: #fff;
    border: 0.5px solid #e9ecef;
    transition: background .12s;
}

    .mi-row:hover {
        background: #f9fafb;
    }

.mi-handle {
    color: #d1d5db;
    cursor: grab;
    font-size: 1.1rem;
    user-select: none;
    flex-shrink: 0;
}

    .mi-handle:active {
        cursor: grabbing;
    }

.mi-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.mi-title {
    font-size: .88rem;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mi-url {
    font-size: .75rem;
    color: #9ca3af;
    font-family: monospace;
}

/*********************Select Site***********************/
.ss-last-site {
    font-size: .82rem;
    color: #9ca3af;
    margin-bottom: 1.25rem;
}