/* GLOBAL */
.pe-wrapper {
    min-width: 100vw !important;
    padding: 0 40px;
    margin: 20px calc(50% - 50vw) !important;
    box-sizing: border-box;
    font-size: 14px;
}

.pe-wrapper * {
    font-family: 'Source Serif Pro', serif !important;
}

/* COMMON FORM POPUP */
.pe-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    max-width: none;
    padding: 20px;
    box-sizing: border-box;
}

.pe-form-popup {
    width: min(620px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    padding: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    box-sizing: border-box;
}

.pe-form-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.pe-form-popup-title {
    color: #0f172a;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.pe-form-popup-close {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    color: #64748b;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: none !important;
    transition: background-color .15s ease, color .15s ease;
}

.pe-form-popup-close:hover {
    background: #f1f5f9 !important;
    color: #0f172a;
}

.pe-form-popup-body {
    padding: 10px 24px;
    overflow-y: auto;
    max-height: 550px;
}

.pe-form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 20px;
}

.pe-form-field:last-child {
    margin-bottom: 0 !important;
}

.pe-form-label {
    display: block;
    color: #334155;
    font-weight: 600;
    line-height: 1.4;
    font-size: 15px;
}

.pe-form-popup input:not([type="file"]),
.pe-form-popup textarea,
.pe-form-popup select {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-family: 'Source Serif Pro', serif !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.pe-form-popup select {
    cursor: pointer;
}

.pe-form-popup textarea {
    min-height: 120px;
    resize: vertical;
}

.pe-form-popup input:not([type="file"]):focus,
.pe-form-popup textarea:focus,
.pe-form-popup select:focus {
    border-color: #e8f1fb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10) !important;
}

.pe-form-popup input::placeholder,
.pe-form-popup textarea::placeholder {
    color: #94a3b8;
}

.pe-form-popup-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

/* TOOLBAR */
.pe-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
}

.pe-btn {
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #000;
    font-weight: 600;
    background: #fff;
    font-size: 14px !important;
}

.pe-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pe-des {
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid #aaa !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: 'Source Serif Pro', serif !important;
    box-sizing: border-box !important;
}

.field-title {
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
    font-size: 15px;
}

.header {
    padding: 10px 0;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
}

.input-error {
    color: red;
    font-size: 12px;
    height: 0;
}

/* FILTER INPUT */
.lr-filter {
    width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f8f8f8;
    box-sizing: border-box;
    transition: 0.2s ease;
}

.lr-filter:focus {
    border-color: #4a90e2;
    background: #fff;
    outline: none;
}

.lr-table th,
.lr-table td,
#lr-view-table th,
#lr-view-table td {
    border: 1px solid #ccc;
}

/* TABLE */
.lr-table,
#lr-view-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
}

.lr-table tr:hover td,
#lr-view-table tr:hover td {
    background: #f9fbff;
}

/* ===========================
   MOBILE RESPONSIVE FIX
   =========================== */
button,
.pe-btn,
.q-delete-all,
.ps-toggle,
.ps-del,
.file-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
}

@media (max-width: 768px) {
    .pe-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .pe-btn {
        text-align: center;
    }

    .pe-wrapper {
        padding: 0 15px;
    }

    .pe-layout {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
    }

    .pe-left,
    .pe-right {
        flex: 0 0 auto;
    }

    .pe-popup {
        padding: 12px;
    }

    .pe-form-popup {
        width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 12px;
    }

    .pe-form-popup-header {
        padding: 16px 18px;
    }

    .pe-form-popup-title {
        font-size: 18px;
    }

    .pe-form-popup-body {
        padding: 18px;
        max-height: calc(100vh - 165px);
    }

    .pe-form-popup-footer {
        padding: 14px 18px;
    }
}

/* BUTTON */
.btn {
    border: none;
    border-radius: 9px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: .18s ease;
}

.btn-secondary {
    background: #1e456b;
    color: #e8f1fb;
}

.btn-secondary:hover {
    background: #e8f1fb;
    color: #1e456b;
}

.btn-primary {
    background: #e8f1fb;
    color: #3f6f9c;
}

.btn-primary:hover {
    background: #dcebf9;
}

.btn-neutral {
    background: #d2d7dc;
    color: #16181c;
}

.btn-neutral:hover {
    background: #e7ebef;
}

.noti-main {
    font-weight: 600;
}