/* Khung tổng thể ERP */
.erp-wrapper {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-sizing: border-box;
}

.erp-wrapper h2, .erp-wrapper h3, .erp-wrapper h4 {
    color: #333;
}

/* Menu điều hướng Tabs */
.erp-nav-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}
.erp-nav-tabs a {
    margin-right: 15px;
    text-decoration: none;
    font-weight: bold;
    color: #555;
}
.erp-nav-tabs a.active-tab {
    color: #0073aa;
}
.erp-nav-tabs a.active-admin-tab {
    color: #d63638;
}

/* Form container */
.erp-form-box {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    border-radius: 5px;
}
.erp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.erp-input, .erp-textarea {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.erp-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Bảng dữ liệu (Tables) */
.erp-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.erp-table th, .erp-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}
.erp-table th {
    background: #f1f1f1;
}

/* Nút bấm (Buttons) */
.erp-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 3px;
    font-weight: bold;
}
.erp-btn-danger {
    background: #d63638;
}
.erp-btn:hover {
    opacity: 0.9;
}

/* Thông báo */
.erp-alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}
.erp-alert-error {
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    color: #c62828;
}
.erp-alert-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

/* Badges phân loại */
.erp-badge {
    background: #e1f5fe;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #0277bd;
    font-weight: bold;
}.erp-builder-crud{width:100%;}.erp-builder-form{margin:18px 0;padding:14px;border:1px solid #dcdcde;border-radius:8px;background:#fff}.erp-builder-form summary{cursor:pointer;font-weight:600;margin-bottom:12px}.erp-builder-field{display:flex;flex-direction:column;gap:6px;margin:12px 0;max-width:620px}.erp-builder-field input,.erp-builder-field textarea{width:100%;max-width:100%;padding:9px;border:1px solid #c3c4c7;border-radius:5px}.erp-table-wrap{overflow:auto;max-width:100%}.erp-builder-crud .erp-table{width:100%;border-collapse:collapse}.erp-builder-crud .erp-table th,.erp-builder-crud .erp-table td{padding:10px;border-bottom:1px solid #e2e4e7;text-align:left;vertical-align:top}.erp-builder-crud .erp-table th{background:#f6f7f7}.erp-builder-crud button{cursor:pointer}


/* Module hóa đơn, danh mục hàng hóa và lịch sử kho. */
.erp-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.erp-search-form .erp-input {
    flex: 1 1 220px;
    min-width: 160px;
    max-width: 520px;
}

.erp-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 14px 0;
}

.erp-result-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.erp-wrapper .description {
    color: #646970;
    font-size: 13px;
}

.erp-wrapper input[type="file"].erp-input {
    display: block;
    margin: 12px 0;
    padding: 12px;
    background: #fff;
}

.erp-wrapper .erp-alert {
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .erp-grid-2 {
        grid-template-columns: 1fr;
    }

    .erp-nav-tabs {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .erp-nav-tabs a {
        margin-right: 0;
    }

    .erp-search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .erp-search-form .erp-input {
        max-width: none;
    }
}

/* Cấu hình logo công ty — WordPress Media Library, không nhập URL. */
.erp-company-logo-field{padding:12px 0 16px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.erp-company-logo-field input[type=file]{max-width:100%}
.erp-company-logo-preview{display:flex;align-items:center;justify-content:center;min-width:200px;min-height:86px;max-width:100%;padding:10px;border:1px dashed #b8c4ce;border-radius:8px;background:#f8fafc;color:#677389}
.erp-company-logo-preview img{display:block;max-width:260px;max-height:130px;width:auto;height:auto;object-fit:contain}
